Index: openacs-4/packages/dotfolio-ui/dotfolio-ui.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/dotfolio-ui.info,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/dotfolio-ui.info	5 May 2005 08:54:42 -0000	1.1
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!-- Generated by the OpenACS Package Manager -->
+
+<package key="dotfolio-ui" url="http://openacs.org/repository/apm/packages/dotfolio-ui" type="apm_application">
+    <package-name>dotFOLIO UI</package-name>
+    <pretty-plural>dotFOLIO UI</pretty-plural>
+    <initial-install-p>f</initial-install-p>
+    <singleton-p>f</singleton-p>
+    
+    <version name="0.1d" url="http://openacs.org/repository/download/apm/dotfolio-ui-0.1d.apm">
+        <owner url="mailto:nick.c@rroll.net">Nick Carroll</owner>
+        <summary>User interface for dotFOLIO space.</summary>
+        <vendor url="http://www.weg.ee.usyd.edu.au">Web Engineering Group</vendor>
+        <description format="text/html">User interface for dotFOLIO space.</description>
+        <maturity>0</maturity>
+
+        <provides url="dotfolio-ui" version="0.1d"/>
+
+        <callbacks>
+        </callbacks>
+        <parameters>
+        <!-- No version parameters -->
+        </parameters>
+
+    </version>
+</package>
Index: openacs-4/packages/dotfolio-ui/catalog/dotfolio-ui.en_US.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/catalog/dotfolio-ui.en_US.ISO-8859-1.xml,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/catalog/dotfolio-ui.en_US.ISO-8859-1.xml	5 May 2005 08:54:42 -0000	1.1
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<message_catalog package_key="dotfolio-ui" package_version="0.1d" locale="en_US" charset="ISO-8859-1">
+
+  <msg key="dotfolio">dotFOLIO</msg>
+  <msg key="title">Title</msg>
+  <msg key="content">Content</msg>
+  <msg key="portrait">Portrait</msg>
+  <msg key="learner_profile">Learner Profile</msg>
+  <msg key="blog_entries">Blog Entries</msg>
+  <msg key="help_edit_portrait">Click the edit icon to add your portrait</msg>
+  <msg key="tooltip_edit_portrait">Edit Portrait</msg>
+  <msg key="tooltip_edit_welcome">Edit Welcome Note</msg>
+  <msg key="tooltip_edit_profile">Edit Your Profile</msg>
+  <msg key="no_information_provided">No information provided for portfolio owner's profile.</msg>
+  <msg key="profile_pref_name">Name</msg>
+  <msg key="profile_tele_work">Telephone (Work)</msg>
+  <msg key="profile_tele_home">Telephone (Home)</msg>
+  <msg key="profile_mobile">Mobile</msg>
+  <msg key="profile_im_msn">MSN Messenger</msg>
+  <msg key="profile_im_aim">AIM</msg>
+  <msg key="profile_interests">Interests</msg>
+  <msg key="profile_company">Company</msg>
+  <msg key="profile_job_desc">Job Description</msg>
+  <msg key="profile_goals">Goals</msg>
+  <msg key="profile_edu_level">Level of Education</msg>
+  <msg key="profile_university">University</msg>
+  <msg key="profile_main_skills">Main Skills</msg>
+  <msg key="more">More</msg>
+  <msg key="no_entries">No entries</msg>
+  <msg key="related_items">Related Items</msg>
+  <msg key="relate">Relate</msg>
+  <msg key="view_item">View item</msg>
+  <msg key="remove_item">Remove item</msg>
+  <msg key="remove">remove</msg>
+  <msg key="add_related_items">Add Related Items</msg>
+  <msg key="delete">delete</msg>
+  <msg key="edit">edit</msg>
+  <msg key="edit_title">Edit title</msg>
+  <msg key="all_clipboards">All clipboards</msg>
+  <msg key="clipper">Clipper</msg>
+  <msg key="clipboards">Clipboards</msg>
+  <msg key="clipboard">Clipboard</msg>
+  <msg key="clipboard_name">Clipboard Name</msg>
+  <msg key="no_clipboards">You do not currently have any clipboards.</msg>
+  <msg key="provide_clipboard_name">You must provide a name for the clipboard</msg>
+  <msg key="clipboard_num_characters_or_less_part1">Title for clipboard must be</msg>
+  <msg key="clipboard_num_characters_or_less_part2">characters or less.</msg>
+  <msg key="clip_this_item_to">Clip this item to:</msg>
+  <msg key="go">Go</msg>
+  <msg key="currently_clipped_to">Currently clipped to:</msg>
+  <msg key="view_all">View all</msg>
+  <msg key="tooltip_view_all_existing_clipboards">View all existing clipboards</msg>
+  <msg key="item_viewed_num_times">Item has been viewed %views% times</msg>
+  <msg key="item_viewed_once">Item has been viewed once</msg>
+  <msg key="by_num_unique_visitors">by %unique_views% unique visitors.</msg>
+  <msg key="by_one_unique_visitor">by one unique visitor.</msg>
+  <msg key="general">General</msg>
+  <msg key="your_clipboards">Your Clipboards</msg>
+  <msg key="num_items_last_used">(%clipboards.clipped% items, last used %clipboards.last_clip%)</msg>
+  <msg key="log_in_or_register">You need to &lt;a href="/register/"&gt;log in or register&lt;/a&gt; to manage you clipboards.</msg>
+  <msg key="no_items_in_clipboard">There are not items in this clipboard.</msg>
+  <msg key="delete_clipboard">Delete this clipboard</msg>
+  <msg key="items_attached">items attached</msg>
+  <msg key="items_in_this_clipboard">Items in this clipboard:</msg>
+  <msg key="clipped">clipped</msg>
+
+</message_catalog>
Index: openacs-4/packages/dotfolio-ui/lib/clipper-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/lib/clipper-postgresql.xql,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/lib/clipper-postgresql.xql	5 May 2005 08:54:42 -0000	1.1
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+
+<queryset>
+    <rdbms><type>postgresql</type><version>7.4</version></rdbms>
+
+    <fullquery name="obj_title">
+      <querytext>
+        SELECT o.object_type, pretty_name AS tname, pretty_plural AS tname_s,
+	       title AS obj_title, package_id AS obj_pkg, 
+	       acs_object__name(object_id) AS acs_name
+               FROM acs_objects o, acs_object_types t
+	       WHERE object_id = :displayed_object_id
+	       AND t.object_type = o.object_type
+      </querytext>
+    </fullquery>
+
+    <fullquery name="record_view">
+      <querytext>
+	SELECT views__record_view(:displayed_object_id, :user_id)
+      </querytext>
+    </fullquery>
+
+    <fullquery name="views">
+      <querytext>
+        SELECT views, unique_views
+	    FROM view_aggregates
+	    WHERE object_id = :displayed_object_id
+      </querytext>
+    </fullquery>
+
+</queryset>
\ No newline at end of file
Index: openacs-4/packages/dotfolio-ui/lib/clipper.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/lib/clipper.adp,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/lib/clipper.adp	5 May 2005 08:54:42 -0000	1.1
@@ -0,0 +1,49 @@
+<div class="portlet" id="portlet-clipper">
+  <div class="padding">
+    <h5>#dotfolio-ui.clipper#</h5>
+    <div class="portletBody">
+      <div align="left" class="portletContent">
+
+        <div class="clipperSection">
+          <h3>#dotfolio-ui.related_items#</h3>
+          <p><a class="clipperButton" href="@url@related/relate?object_one=@displayed_object_id@">#dotfolio-ui.add_related_items#</a></p>
+        </div>
+
+        <HR>
+        <div class="clipperSection">
+          <h3>#dotfolio-ui.clipboards#</h3>
+          <p>#dotfolio-ui.clip_this_item_to#</p>
+          <form style="display: inline;" action="@url@clipboards/attach">
+            <input type="hidden" name="object_id" value="@displayed_object_id@"></input>
+            <select name="clipboard_id">
+            <multiple name="clipboards">
+            <option value="@clipboards.clipboard_id@" @clipboards.selected@>@clipboards.title@</option>
+            </multiple>
+            </select>
+            <input type="submit" value="#dotfolio-ui.go#" class="clipperButton"></input>
+          </form>
+	  <P>
+          <if @clipped:rowcount@ gt 0>
+            <p>#dotfolio-ui.currently_clipped_to#</p>
+            <multiple name="clipped">
+            &gt;&nbsp;<a href="@url@clipboards/view?clipboard_id=@clipped.clipboard_id@" title="View clipboard">@clipped.title@</a><BR>
+            </multiple>
+	    <P>
+            <a class="clipperButton" href="@url@clipboards/" title="#dotfolio-ui.tooltip_view_all_existing_clipboards#">#dotfolio-ui.view_all#</a></p>
+          </if>
+        </div>
+
+        <HR>
+        <div class="clipperSection">
+          <p>
+            <if @views@ eq 1>#dotfolio-ui.item_viewed_once#&nbsp;</if>
+            <else>#dotfolio-ui.item_viewed_num_times#&nbsp;</else>
+            <if @unique_views@ eq 1>#dotfolio-ui.by_one_unique_visitor#</if>
+            <else>#dotfolio-ui.by_num_unique_visitors#</else>
+          </p>
+        </div>
+
+      </div>
+    </div>
+  </div>
+</div>
Index: openacs-4/packages/dotfolio-ui/lib/clipper.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/lib/clipper.tcl,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/lib/clipper.tcl	5 May 2005 08:54:42 -0000	1.1
@@ -0,0 +1,49 @@
+ad_page_contract {
+
+    Displays tools for adding displayed objects to the clipboard, and adding
+    related items.
+
+    @author  Nick Carroll (nick.c@rroll.net)
+    @creation-date 2005-03-24
+    @cvs-id  $Id: clipper.tcl,v 1.1 2005/05/05 08:54:42 ncarroll Exp $
+} {
+
+}
+
+
+# generic stuff we need
+set url [dotfolio::ui::organiser_url]
+set subsite [ad_conn subsite_id]
+set user_id [ad_conn user_id]
+set cur_pkg [ad_conn package_id]
+
+db_1row obj_title {}
+
+if {[empty_string_p $obj_title]} { 
+    set obj_title EMPTY
+}
+
+if {[empty_string_p $acs_name]} { 
+    set acs_name EMPTY
+}
+
+# get the clipboard info 
+clipboard::clipboards -create_new -force_default [ad_conn user_id] clipboards
+clipboard::clipped $displayed_object_id [ad_conn user_id] clipped
+
+# record object view and get current count.
+db_string record_view {} -default 0
+if {![db_0or1row views {}]} { 
+    set views missing
+    set unique_views missing
+}
+
+set return_url [ad_return_url]
+
+# Stuff for related items
+relation::get_related -object_id $displayed_object_id -datasource related
+template::multirow extend related delete_url
+template::multirow foreach related { 
+    set delete_url [export_vars -base related/relation-delete \
+			{rel_id return_url}]
+}
Index: openacs-4/packages/dotfolio-ui/lib/dotfolio-master.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/lib/dotfolio-master.adp,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/lib/dotfolio-master.adp	5 May 2005 08:54:42 -0000	1.1
@@ -0,0 +1,97 @@
+<master src="/www/site-master">
+<property name="header_stuff">
+<link rel="stylesheet" type="text/css" href="/resources/dotfolio-ui/dotfolio-grey.css" media="all"/>
+</property>
+
+<if @title@ not nil>
+    <property name="title">@title;noquote@</property>
+</if>
+<if @signatory@ not nil>
+  <property name="signatory">@signatory;noquote@</property>
+</if>
+<if @focus@ not nil>
+  <property name="focus">@focus;noquote@</property>
+</if>
+<if @context@ not nil>
+  <property name="context">@context;noquote@</property>
+</if>
+
+<!-- Top level navigation -->
+
+<div id="navbar-div">
+  <div id="navbar-container">
+    <div id="navbar"> 
+      <multiple name="tabs">
+        <if @tabs.selected_p@ true>
+          <div class="tab" id="navbar-here">
+            <if @tabs.link_p@ true>
+              <a href="@tabs.url@" title="@tabs.title@">@tabs.label@</a>
+            </if>
+            <else>        
+              @tabs.label@
+            </else>
+          </div>
+        </if>
+        <else>
+          <div class="tab">
+            <if @tabs.link_p@ true>
+              <a href="@tabs.url@" title="@tabs.title@">@tabs.label@</a>
+            </if>
+            <else>        
+              @tabs.label@
+            </else>
+          </div>
+        </else>
+      </multiple>
+    </div>
+  </div>
+</div>
+
+<div id="navbar-body">
+
+<!-- Body -->
+
+<!-- Display clipper and related items if there is a displayed object. -->
+<if @displayed_object_id@ not nil>
+  <p>
+  <div class="visualClear"></div>
+
+  <table id="portal-columns">
+    <tbody>
+      <tr>
+        <td id="portal-column-one">
+        <div class="visualPadding">
+          <include src="/packages/dotfolio-ui/lib/clipper" displayed_object_id="@displayed_object_id@" />
+        </div>
+        </td>
+
+        <td id="portal-column-content">
+          <div class="visualPadding">
+            <div class="documentBorder">
+              <div class="documentContent">
+                <slave>
+              </div>
+            </div>
+
+<!-- Need to add related items section below main content. -->
+            <include src="/packages/dotfolio-ui/lib/related-items" displayed_object_id="@displayed_object_id@" />
+
+          </div>
+        </td>
+
+      </tr>
+
+    </tbody>
+  </table>
+
+</if>
+<else>
+  <P>
+  <slave>
+</else>
+<div style="clear: both;"></div>
+
+</div>
+
+<!-- Include tooltip script for help. -->
+<script language="JavaScript" type="text/javascript" src="/resources/dotfolio-ui/tooltip.js"></script>
Index: openacs-4/packages/dotfolio-ui/lib/dotfolio-master.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/lib/dotfolio-master.tcl,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/lib/dotfolio-master.tcl	5 May 2005 08:54:42 -0000	1.1
@@ -0,0 +1,55 @@
+ad_page_contract {
+
+    Master template for dotfolio.
+
+    @author  Nick Carroll (nick.c@rroll.net)
+    @creation-date 2005-03-24
+    @cvs-id  $Id: dotfolio-master.tcl,v 1.1 2005/05/05 08:54:42 ncarroll Exp $
+} {
+
+}
+
+
+if { ![info exists section] } {
+    set section {}
+}
+
+if { ![info exists header_stuff] } {
+    set header_stuff {}
+}
+
+if { ![info exists subnavbar_link] } {
+    set subnavbar_link {}
+}
+
+# This will set 'sections' and 'subsections' multirows
+subsite::define_pageflow -section $section
+subsite::get_section_info -array section_info
+
+# Find the subsite we belong to
+set subsite_url [site_node_closest_ancestor_package_url]
+array set subsite_sitenode [site_node::get -url $subsite_url]
+set subsite_node_id $subsite_sitenode(node_id)
+set subsite_name $subsite_sitenode(instance_name)
+
+if { [string equal [ad_conn url] $subsite_url] } {
+    set subsite_url {}
+}
+
+# Need to ignore the admin section to avoid permissions problems.
+# Would prefer portfolio owners to be subsite administrators but not
+# have all the privileges of an administrator.  Do not want to display
+# admin section even if user is the administrator.  Temporary hack till
+# we can work out finer granularity of permissions in acs-subsites.
+
+# Refer to proc get_pageflow_struct in
+# /packages/acs-subsite/tcl/subsite-procs.tcl.
+template::multirow create tabs name label title url selected_p link_p
+template::multirow foreach sections {
+
+    if {![string equal $name "admin"]} {
+
+	template::multirow append tabs $name $label $title $url \
+	                               $selected_p $link_p
+    }
+}
Index: openacs-4/packages/dotfolio-ui/lib/index-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/lib/index-postgresql.xql,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/lib/index-postgresql.xql	5 May 2005 08:54:42 -0000	1.1
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+
+<queryset>
+    <rdbms><type>postgresql</type><version>7.4</version></rdbms>
+
+    <fullquery name="blog_entries">
+      <querytext>
+        SELECT blog.title, entry_id,
+            to_char(blog.entry_date, 'FMMonth FMDDth, YYYY') AS pretty_date
+            FROM pinds_blog_entries blog, apm_packages pkg
+            WHERE pkg.package_key = 'lars-blogger'
+            AND pkg.package_id IN ([join $list_of_package_ids ,]) 
+            AND blog.package_id = pkg.package_id
+            ORDER BY blog.entry_date DESC
+      </querytext>
+    </fullquery>
+
+</queryset>
\ No newline at end of file
Index: openacs-4/packages/dotfolio-ui/lib/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/lib/index.adp,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/lib/index.adp	5 May 2005 08:54:42 -0000	1.1
@@ -0,0 +1,109 @@
+<master>
+<property name="title">#dotfolio-ui.dotfolio#</property>
+
+<P>
+<div class="visualClear"></div>
+
+<table id="portal-columns">
+  <tbody>
+    <tr>
+      <td id="portal-column-one">
+      <div class="visualPadding">
+        <div class="portlet" id="portlet-portrait">
+          <div class="padding">
+            <h5>#dotfolio-ui.portrait#</h5>
+            <div class="portletBody">
+              <if @owner_p@ eq "1">
+              <div class="portletEdit">
+                <a href="user/portrait/upload?return_url=@url@" onmouseover="this.T_WIDTH=65;return escape('#dotfolio-ui.tooltip_edit_portrait#')"><img src="/resources/dotfolio-ui/edit.jpg"></a>
+              </div>
+              </if>
+              <div align="center" class="portletContent">
+              <if @portrait_p@ eq "1">
+              <img class="dotfolioPortrait" src="shared/portrait-bits.tcl?user_id=@owner_id@">
+              </if>
+              <else>
+                <if @owner_p@ eq "1">
+                <img onmouseover="this.T_WIDTH=120;this.T_TEMP=3500;return escape('<img src=\'/resources/dotfolio-ui/help.jpg\'> #dotfolio-ui.help_edit_portrait#')" class="dotfolioPortrait" src="/resources/dotfolio-ui/blank_portrait.jpg">
+ 	        </if>
+                <else>
+                <img class="dotfolioPortrait" src="/resources/dotfolio-ui/blank_portrait.jpg">
+                </else>
+              </else>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+      </td>
+
+      <td id="portal-column-content">
+        <div class="visualPadding">
+          <div class="documentBorder">
+            <if @owner_p@ eq "1">
+            <div class="portletEdit">
+              <a href="?edit_welcome" onmouseover="this.T_WIDTH=100;return escape('#dotfolio-ui.tooltip_edit_welcome#')"><img src="/resources/dotfolio-ui/edit.jpg"></a>
+            </div>
+            </if>
+
+            <div class="documentContent">
+              <if @edit_welcome_p@ eq "1">
+              <include src="welcome-edit" owner_username=@owner_username@>
+              </if>
+              <else>
+              <include src="welcome-view" owner_username=@owner_username@>
+              </else>
+            </div>
+          </div>
+        </div>
+
+        <div class="visualPadding">
+          <div class="documentBorder">
+            <if @owner_p@ eq "1">
+            <div class="portletEdit">
+              <a href="?edit_profile" onmouseover="this.T_WIDTH=85;return escape('#dotfolio-ui.tooltip_edit_profile#')"><img src="/resources/dotfolio-ui/edit.jpg"></a>
+            </div>
+            </if>
+
+            <div class="documentContent">
+              <if @edit_profile_p@ eq "1">
+              <include src="profile-edit" owner_username=@owner_username@>
+              </if>
+              <else>
+              <include src="profile-view" owner_username=@owner_username@>
+              </else>
+            </div>
+          </div>
+        </div>
+      </td>
+
+      <td id="portal-column-two">
+        <div class="visualPadding">
+          <div class="portlet" id="portlet-blogs">
+            <div class="padding">
+              <h5>#dotfolio-ui.blog_entries#</h5>
+              <div class="portletBody">
+                <div align="left" class="portletContent">
+                  <multiple name="blog_entries">
+                    <div class="portletBlogEntries">
+                      <a href="blog/one-entry?entry_id=@blog_entries.entry_id@">@blog_entries.title@</a>
+                    </div>
+                    <span class="portletBlogDates">@blog_entries.pretty_date@</span>
+                    <P>
+                    <HR>
+                  </multiple>
+                  <if @blog_entries:rowcount@ eq 0>
+                    <span class="portletBlogEntries">#dotfolio-ui.no_entries#</span>
+                  </if>
+                  <else>
+                    <a href="blog"><span class="portletBlogEntries">#dotfolio-ui.more#</span></a>
+                  </else>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </td>
+    </tr>
+  </tbody>
+</table>
Index: openacs-4/packages/dotfolio-ui/lib/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/lib/index.tcl,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/lib/index.tcl	5 May 2005 08:54:42 -0000	1.1
@@ -0,0 +1,40 @@
+ad_page_contract {
+    The home page for an eportfolio.
+
+    @author Nick Carroll (nick.c@rroll.net)
+    @creation-date 2005-03-16
+} -query {
+    edit_welcome:optional
+    edit_profile:optional
+}
+
+set package_id [ad_conn package_id]
+set node_id [ad_conn node_id]
+set user_id [ad_conn user_id]
+set url [ad_conn url]
+
+# Get owner_id and username.
+set owner_id [dotfolio::user::get_owner_id]
+set owner_username [dotfolio::user::get_owner_username $owner_id]
+
+# Is the user the owner of the dotfolio?
+set owner_p [dotfolio::user::owner_p $user_id]
+
+# Does the owner have a portrait?
+set portrait_p [dotfolio::user::portrait_p $owner_id]
+
+set list_of_package_ids [subsite::util::packages -node_id $node_id]
+
+db_multirow blog_entries blog_entries {}
+
+set edit_welcome_p 0
+if {[info exists edit_welcome]} {
+    set edit_welcome_p 1
+}
+
+set edit_profile_p 0
+if {[info exists edit_profile]} {
+    set edit_profile_p 1
+}
+
+ad_return_template
Index: openacs-4/packages/dotfolio-ui/lib/profile-edit-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/lib/profile-edit-postgresql.xql,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/lib/profile-edit-postgresql.xql	5 May 2005 08:54:42 -0000	1.1
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+
+<queryset>
+    <rdbms><type>postgresql</type><version>7.4</version></rdbms>
+
+    <fullquery name="get_profile_attributes">
+      <querytext>
+	SELECT pref_name, tele_work, tele_home, mobile,
+	       im_msn, im_aim, interests, company, job_desc,
+	       goals, edu_level, university, main_skills
+	FROM dotfolio_owner_identification
+	WHERE owner_id = :owner_id
+      </querytext>
+    </fullquery>
+
+    <fullquery name="insert_profile_attributes">
+      <querytext>
+	SELECT dotfolio_owner_identification__new (:owner_id, :pref_name,
+              :tele_work, :tele_home, :mobile, :im_msn, :im_aim,
+              :interests, :company, :job_desc, :goals, :edu_level,
+              :university, :main_skills)
+      </querytext>
+    </fullquery>
+
+    <fullquery name="update_profile_attributes">
+      <querytext>
+	UPDATE dotfolio_owner_identification SET
+            pref_name = :pref_name,
+	    tele_work = :tele_work,
+	    tele_home = :tele_home,
+	    mobile = :mobile,
+	    im_msn = :im_msn,
+	    im_aim = :im_aim,
+	    interests = :interests,
+	    company = :company,
+	    job_desc = :job_desc,
+	    goals = :goals,
+	    edu_level = :edu_level,
+	    university = :university,
+	    main_skills = :main_skills
+	WHERE
+	    owner_id = :owner_id
+      </querytext>
+    </fullquery>
+
+    <fullquery name="profile_exists">
+      <querytext>
+	SELECT 1 FROM dotfolio_owner_identification WHERE owner_id = :owner_id
+      </querytext>
+    </fullquery>
+
+</queryset>
\ No newline at end of file
Index: openacs-4/packages/dotfolio-ui/lib/profile-edit.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/lib/profile-edit.adp,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/lib/profile-edit.adp	5 May 2005 08:54:42 -0000	1.1
@@ -0,0 +1 @@
+<formtemplate id="edit_profile_attributes"></formtemplate>
\ No newline at end of file
Index: openacs-4/packages/dotfolio-ui/lib/profile-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/lib/profile-edit.tcl,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/lib/profile-edit.tcl	5 May 2005 08:54:42 -0000	1.1
@@ -0,0 +1,144 @@
+ad_page_contract {
+
+    Page for editing dotfolio owner's profile.
+
+} -query {
+    owner_id:integer,notnull,optional
+} -properties {
+
+}
+
+set user_id [ad_conn user_id]
+set package_id [ad_conn package_id]
+
+# Since we define owner_id here, ad_form will always be an edit_request, and
+# never a new_request.
+set owner_id [dotfolio::user::get_owner_id]
+
+# Check if the user has permission to edit the owner's profile.
+permission::require_permission \
+    -object_id $package_id \
+    -party_id $user_id \
+    -privilege "admin"
+
+# Export variable edit_profile as empty query string.  Used to display this
+# include script.
+set edit_profile ""
+ad_form -name edit_profile_attributes -cancel_url {./} \
+    -export {edit_profile} -form {
+	# The owner id is key
+	owner_id:key
+
+	# Preferred name
+	{pref_name:text \
+	    {label "[_ dotfolio-ui.profile_pref_name]" }
+	    {html {size 40}}
+	}
+
+	# Work telephone number
+	{tele_work:text,optional \
+	     {label "[_ dotfolio-ui.profile_tele_work]" }
+	    {html {size 40}}
+	}
+
+	# Home telephone number
+	{tele_home:text,optional \
+	     {label "[_ dotfolio-ui.profile_tele_home]" }
+	    {html {size 40}}
+	}
+
+	# Mobile number
+	{mobile:text,optional \
+	     {label "[_ dotfolio-ui.profile_mobile]" }
+	    {html {size 40}}
+	}
+
+	# MSN Messenger
+	{im_msn:text,optional \
+	     {label "[_ dotfolio-ui.profile_im_msn]" }
+	    {html {size 40}}
+	}
+
+	# AIM
+	{im_aim:text,optional \
+	     {label "[_ dotfolio-ui.profile_im_aim]" }
+	    {html {size 40}}
+	}
+
+	# Interests
+	{interests:text,optional \
+	     {label "[_ dotfolio-ui.profile_interests]" }
+	    {html {size 40}}
+	}
+
+	# Company
+	{company:text,optional \
+	     {label "[_ dotfolio-ui.profile_company]" }
+	    {html {size 40}}
+	}
+
+	# Job Description
+	{job_desc:text,optional \
+	     {label "[_ dotfolio-ui.profile_job_desc]" }
+	    {html {size 40}}
+	}
+
+	# Goals
+	{goals:text,optional \
+	     {label "[_ dotfolio-ui.profile_goals]" }
+	    {html {size 40}}
+	}
+
+	# Level of education
+	{edu_level:text,optional \
+	     {label "[_ dotfolio-ui.profile_edu_level]" }
+	    {html {size 40}}
+	}
+
+	# University
+	{university:text,optional \
+	     {label "[_ dotfolio-ui.profile_university]" }
+	    {html {size 40}}
+	}
+
+	# Main skills
+	{main_skills:text,optional \
+	     {label "[_ dotfolio-ui.profile_main_skills]" }
+	    {html {size 40}}
+	}
+
+    } -edit_request {
+	
+	set owner_id [dotfolio::user::get_owner_id]
+	db_0or1row get_profile_attributes {}
+
+    } -after_submit {
+
+	# Check to see if profile exists first.
+	# This check is required as we have explicity set the key as
+	# the owner_id above.
+	set exists_p [db_0or1row profile_exists {}]
+
+	# If profile exists, then do update, otherwise do insert.
+	if {$exists_p} {
+	    db_dml update_profile_attributes {}
+	} else {
+	    db_0or1row insert_profile_attributes {}
+	}
+
+	ad_returnredirect "./"
+
+	ad_script_abort
+    }
+
+ad_return_template
+
+
+#        INSERT INTO dotfolio_owner_identification
+#            (owner_id, pref_name, tele_work, tele_home, 
+#             mobile, im_msn, im_aim, interests, company, 
+#             job_desc, goals, edu_level, university, main_skills)
+#        VALUES
+#            (:owner_id, :pref_name, :tele_work, :tele_home, :mobile,
+#             :im_msn, :im_aim, :interests, :company, :job_desc, :goals, 
+#             :edu_level, :university, :main_skills)
Index: openacs-4/packages/dotfolio-ui/lib/profile-view-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/lib/profile-view-postgresql.xql,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/lib/profile-view-postgresql.xql	5 May 2005 08:54:42 -0000	1.1
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+
+<queryset>
+    <rdbms><type>postgresql</type><version>7.4</version></rdbms>
+
+    <fullquery name="get_identification">
+      <querytext>
+	SELECT pref_name, tele_work, tele_home, mobile, im_msn, im_aim,
+	       interests, company, job_desc, goals, edu_level, university,
+	       main_skills
+	FROM dotfolio_owner_identification
+	WHERE owner_id = :owner_id
+      </querytext>
+    </fullquery>
+
+</queryset>
Index: openacs-4/packages/dotfolio-ui/lib/profile-view.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/lib/profile-view.adp,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/lib/profile-view.adp	5 May 2005 08:54:42 -0000	1.1
@@ -0,0 +1 @@
+<listtemplate name="profile_attributes"></listtemplate>
Index: openacs-4/packages/dotfolio-ui/lib/profile-view.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/lib/profile-view.tcl,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/lib/profile-view.tcl	5 May 2005 08:54:42 -0000	1.1
@@ -0,0 +1,80 @@
+ad_page_contract {
+
+    Page for viewing profile content portlet on homepage.
+
+} -properties {
+    profile:multirow
+}
+
+set owner_id [dotfolio::user::get_owner_id]
+
+db_0or1row get_identification {}
+
+template::multirow create profile attribute value
+
+# NC: Nasty way of displaying profile attributes.  Need to find a better 
+# way to do this.  But short on time, so this will have to do for now.
+if {[info exists pref_name] && ![empty_string_p $pref_name]} {
+    template::multirow append profile [_ dotfolio-ui.profile_pref_name] $pref_name
+}
+if {[info exists tele_work] && ![empty_string_p $tele_work]} {
+    template::multirow append profile \
+	[_ dotfolio-ui.profile_tele_work] $tele_work
+}
+if {[info exists tele_home] && ![empty_string_p $tele_home]} {
+    template::multirow append profile \
+	[_ dotfolio-ui.profile_tele_home] $tele_home
+}
+if {[info exists mobile] && ![empty_string_p $mobile]} {
+    template::multirow append profile \
+	[_ dotfolio-ui.profile_mobile] $mobile
+}
+if {[info exists im_msn] && ![empty_string_p $im_msn]} {
+    template::multirow append profile \
+	[_ dotfolio-ui.profile_im_msn] $im_msn
+}
+if {[info exists im_aim] && ![empty_string_p $im_aim]} {
+    template::multirow append profile \
+	[_ dotfolio-ui.profile_im_aim] $im_aim
+}
+if {[info exists interests] && ![empty_string_p $interests]} {
+    template::multirow append profile \
+	[_ dotfolio-ui.profile_interests] $interests
+}
+if {[info exists company] && ![empty_string_p $company]} {
+    template::multirow append profile \
+	[_ dotfolio-ui.profile_company] $company
+}
+if {[info exists job_desc] && ![empty_string_p $job_desc]} {
+    template::multirow append profile \
+	[_ dotfolio-ui.profile_job_desc] $job_desc
+}
+if {[info exists goals] && ![empty_string_p $goals]} {
+    template::multirow append profile \
+	[_ dotfolio-ui.profile_goals] $goals
+}
+if {[info exists edu_level] && ![empty_string_p $edu_level]} {
+    template::multirow append profile \
+	[_ dotfolio-ui.profile_edu_level] $edu_level
+}
+if {[info exists university] && ![empty_string_p $university]} {
+    template::multirow append profile \
+	[_ dotfolio-ui.profile_university] $university
+}
+if {[info exists main_skills] && ![empty_string_p $main_skills]} {
+    template::multirow append profile \
+	[_ dotfolio-ui.profile_main_skills] $main_skills
+}
+
+template::list::create \
+    -name profile_attributes \
+    -multirow profile \
+    -no_data [_ dotfolio-ui.no_information_provided] \
+    -elements {
+        attribute {}
+	value {
+	    html {width "100%"}
+	}
+    }
+
+ad_return_template
Index: openacs-4/packages/dotfolio-ui/lib/related-items.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/lib/related-items.adp,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/lib/related-items.adp	5 May 2005 08:54:42 -0000	1.1
@@ -0,0 +1,12 @@
+<if @related:rowcount@ gt 0>
+
+  <div class="visualPadding"></div>
+  <div class="documentBorder">
+    <div class="documentContent">
+
+      <listtemplate name="related_items"></listtemplate>
+
+    </div>
+  </div>
+
+</if>
\ No newline at end of file
Index: openacs-4/packages/dotfolio-ui/lib/related-items.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/lib/related-items.tcl,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/lib/related-items.tcl	5 May 2005 08:54:42 -0000	1.1
@@ -0,0 +1,43 @@
+ad_page_contract {
+
+    Displays related items for a displayed_object_id.
+
+    @author  Nick Carroll (nick.c@rroll.net)
+    @creation-date 2005-03-24
+    @cvs-id  $Id: related-items.tcl,v 1.1 2005/05/05 08:54:42 ncarroll Exp $
+} {
+
+}
+
+set url [dotfolio::ui::organiser_url]
+set return_url [ad_return_url]
+set delete_related_url "related/relation-delete"
+
+# Stuff for related items
+relation::get_related -object_id $displayed_object_id -datasource related
+template::multirow extend related delete_url
+template::multirow foreach related { 
+    set delete_url [export_vars -base $url$delete_related_url \
+			{rel_id return_url}]
+}
+
+template::list::create \
+    -name related_items \
+    -multirow related \
+    -key object_id \
+    -elements {
+	object_title {
+	    label \#dotfolio-ui.related_items\#
+	    link_url_eval {/o/$object_id}
+	    link_html {title \#dotfolio-ui.view_item\#}
+            html {width "100%"}
+	}
+	remove {
+	    display_template {Remove}
+	    link_url_eval {$delete_url}
+	    link_html {title \#dotfolio-ui.remove_item\#}
+	    sub_class narrow
+	}
+    }
+
+ad_return_template
Index: openacs-4/packages/dotfolio-ui/lib/welcome-edit-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/lib/welcome-edit-postgresql.xql,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/lib/welcome-edit-postgresql.xql	5 May 2005 08:54:42 -0000	1.1
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+
+<queryset>
+    <rdbms><type>postgresql</type><version>7.4</version></rdbms>
+
+    <fullquery name="get_welcome_item">
+      <querytext>
+        SELECT cr_items.item_id, title, content
+            FROM cr_items, cr_revisions
+            WHERE name='welcome'
+            AND parent_id=:folder_id
+            AND latest_revision=revision_id
+      </querytext>
+    </fullquery>
+
+    <fullquery name="set_live">
+      <querytext>
+        UPDATE cr_items SET live_revision=latest_revision
+            WHERE item_id=:item_id
+      </querytext>
+    </fullquery>
+
+</queryset>
\ No newline at end of file
Index: openacs-4/packages/dotfolio-ui/lib/welcome-edit.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/lib/welcome-edit.adp,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/lib/welcome-edit.adp	5 May 2005 08:54:42 -0000	1.1
@@ -0,0 +1 @@
+<formtemplate id="edit_welcome_content"></formtemplate>
Index: openacs-4/packages/dotfolio-ui/lib/welcome-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/lib/welcome-edit.tcl,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/lib/welcome-edit.tcl	5 May 2005 08:54:42 -0000	1.1
@@ -0,0 +1,76 @@
+ad_page_contract {
+
+    Page for editing main content portlet on homepage.
+
+} -query {
+    item_id:integer,notnull,optional
+} -properties {
+    title:onevalue
+    content:onevalue
+}
+
+set package_id [ad_conn package_id]
+set folder_id [dotfolio::get_folder_id -package_id $package_id]
+set user_id [ad_conn user_id]
+set ip_address [ad_conn peeraddr]
+
+set item_id [content::item::get_id -item_path "welcome" -resolve_index "t" -root_folder_id $folder_id]
+
+permission::require_permission \
+    -object_id $folder_id \
+    -party_id $user_id \
+    -privilege "create"
+
+# Export variable edit.  Required because main-edit is an include script
+# in index.  Not sure why this is so.  Got this technique from the
+# Wiki package.
+set edit_welcome ""
+ad_form -name edit_welcome_content -cancel_url {./} -export {edit_welcome} -form {
+    # The content item key
+    item_id:key
+
+    # "title" is of type text and will use a text widget.
+    {title:text \
+	 {label "[_ dotfolio-ui.title]" }
+	{html {size 40}}
+     }
+
+    # "content" is of type text and will use a textarea widget.
+    {content:richtext(richtext) \
+	 {label "[_ dotfolio-ui.content]" }
+        {html {rows 20 cols 50 wrap soft}}
+    }
+
+} -edit_request {
+
+    db_1row get_welcome_item {}
+
+} -new_data {
+
+    content::item::new \
+        -name "welcome" \
+        -parent_id $folder_id \
+        -creation_user $user_id \
+        -creation_ip $ip_address \
+        -title $title \
+        -text $content \
+        -is_live "t" \
+        -storage_type "text"
+
+} -edit_data {
+
+    content::revision::new \
+        -item_id $item_id \
+        -title $title \
+        -content $content
+
+    db_dml set_live {}
+
+} -after_submit {
+
+    ad_returnredirect "./"
+
+    ad_script_abort
+}
+
+ad_return_template
Index: openacs-4/packages/dotfolio-ui/lib/welcome-view-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/lib/welcome-view-postgresql.xql,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/lib/welcome-view-postgresql.xql	5 May 2005 08:54:42 -0000	1.1
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+
+<queryset>
+    <rdbms><type>postgresql</type><version>7.4</version></rdbms>
+
+    <fullquery name="get_content">
+      <querytext>
+	SELECT content,title from cr_revisions, cr_items
+	    WHERE revision_id=live_revision
+	    AND cr_items.item_id=:item_id
+      </querytext>
+    </fullquery>
+
+</queryset>
Index: openacs-4/packages/dotfolio-ui/lib/welcome-view.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/lib/welcome-view.adp,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/lib/welcome-view.adp	5 May 2005 08:54:42 -0000	1.1
@@ -0,0 +1,3 @@
+<property name="title">@title;noquote@</property>
+
+@content;noquote@
\ No newline at end of file
Index: openacs-4/packages/dotfolio-ui/lib/welcome-view.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/lib/welcome-view.tcl,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/lib/welcome-view.tcl	5 May 2005 08:54:42 -0000	1.1
@@ -0,0 +1,18 @@
+ad_page_contract {
+
+    Page for viewing main content portlet on homepage.
+
+} -properties {
+    content:onevalue
+    title:onevalue
+}
+
+set package_id [ad_conn package_id]
+set folder_id [dotfolio::get_folder_id -package_id $package_id]
+
+set item_id [content::item::get_id -item_path "welcome" \
+		 -resolve_index "t" -root_folder_id $folder_id]
+
+db_1row get_content {}
+
+set content [template::util::richtext::get_property text $content]
Index: openacs-4/packages/dotfolio-ui/www/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/www/index.adp,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/www/index.adp	5 May 2005 08:54:43 -0000	1.1
@@ -0,0 +1,7 @@
+<master src="resources/main-portal-column-content">
+
+<ul>
+  <li><a href="related">Related Items</a></li>
+  <li><a href="clipboards">Clipboards</a></li>
+</ul>
+
Index: openacs-4/packages/dotfolio-ui/www/clipboards/ae-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/www/clipboards/ae-postgresql.xql,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/www/clipboards/ae-postgresql.xql	5 May 2005 08:54:43 -0000	1.1
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+
+<queryset>
+
+  <fullquery name="do_update">
+    <querytext>
+        UPDATE acs_objects
+           SET title = :title, last_modified = now(),
+               modifying_user = :user_id, modifying_ip = :peeraddr
+         WHERE object_id = :clipboard_id AND object_type = 'clipboard'
+    </querytext>
+  </fullquery>
+
+  <fullquery name="select_title">
+    <querytext>
+      SELECT title FROM acs_objects
+          WHERE object_id = :clipboard_id
+          AND object_type = 'clipboard'
+    </querytext>
+  </fullquery>
+    
+</queryset>
Index: openacs-4/packages/dotfolio-ui/www/clipboards/ae.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/www/clipboards/ae.adp,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/www/clipboards/ae.adp	5 May 2005 08:54:43 -0000	1.1
@@ -0,0 +1,6 @@
+<master>
+<property name="title">Clipboard</property>
+<property name="context">{./ clipboards} add/edit</property>
+
+<formtemplate id="clip_ae"></formtemplate>
+
Index: openacs-4/packages/dotfolio-ui/www/clipboards/ae.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/www/clipboards/ae.tcl,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/www/clipboards/ae.tcl	5 May 2005 08:54:43 -0000	1.1
@@ -0,0 +1,43 @@
+ad_page_contract {
+    add/edit an object clipboard and optionally attach an 
+    object at the same time.
+
+    @author Jeff Davis davis@xarg.net
+    @creation-date 10/30/2003
+    @cvs-id $Id: ae.tcl,v 1.1 2005/05/05 08:54:43 ncarroll Exp $
+} {
+    clipboard_id:optional
+    {object_id:integer,optional {}}
+}
+
+set user_id [auth::require_login]
+set limit 16
+
+ad_form -name clip_ae -export {object_id} -form {
+    clipboard_id:key(acs_object_id_seq)
+    {title:text(text)
+        {label \#dotfolio-ui.clipboard_name\#}
+        {html {size $limit}}}
+} -select_query_name {select_title} -validate {
+    {title
+        {![string is space $title]} 
+        \#dotfolio-ui.provide_clipboard_name\#
+    }
+    {title
+	{[string length $title] <= $limit}
+        "\#dotfolio-ui.clipboard_num_characters_or_less_part1\# $limit \#dotfolio-ui.clipboard_num_characters_or_less_part2\#"
+    }
+} -new_data {
+    clipboard::new -title $title
+} -edit_data {
+    set peeraddr [ad_conn peeraddr]
+    permission::require_permission -object_id $clipboard_id -privilege admin
+    db_dml do_update {}
+} -after_submit {
+    if {![empty_string_p $object_id]} { 
+        ad_returnredirect "attach?[export_vars -url {object_id clipboard_id}]"
+    } else { 
+        ad_returnredirect ./
+    }
+    ad_script_abort
+}
Index: openacs-4/packages/dotfolio-ui/www/clipboards/attach.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/www/clipboards/attach.tcl,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/www/clipboards/attach.tcl	5 May 2005 08:54:43 -0000	1.1
@@ -0,0 +1,31 @@
+# /packages/cop-ui/www/clipboard/attach.tcl
+ad_page_contract {
+    Attach an object to one of your clipboards
+    Requires registration.
+
+    @author Jeff Davis davis@xarg.net
+    @creation-date 10/30/2003
+    @cvs-id $Id: attach.tcl,v 1.1 2005/05/05 08:54:43 ncarroll Exp $
+} {
+    object_id:integer,notnull
+    clipboard_id:integer,notnull
+}
+
+set user_id [auth::require_login]
+
+if {$clipboard_id < 0} {
+    ad_returnredirect "ae?object_id=$object_id"
+    ad_script_abort
+}
+
+# If we got clipboard_id 0 then we need to create a "General" clipboard
+if {$clipboard_id == 0} {
+    set clipboard_id [clipboard::new -title [_ dotfolio-ui.general]]
+}
+
+if {$clipboard_id > 0} { 
+    clipboard::attach -clipboard_id $clipboard_id -object_id $object_id -user_id $user_id
+}
+
+# should redirect to the original object and preserve state...
+ad_returnredirect [get_referrer]
Index: openacs-4/packages/dotfolio-ui/www/clipboards/delete.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/www/clipboards/delete.tcl,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/www/clipboards/delete.tcl	5 May 2005 08:54:43 -0000	1.1
@@ -0,0 +1,17 @@
+# /packages/cop-ui/www/clipboard/delete.tcl
+ad_page_contract {
+    delete a clipboard.
+
+    @author Jeff Davis <davis@xarg.net>
+    @creation-date 11/2/2003
+    @cvs-id $Id: delete.tcl,v 1.1 2005/05/05 08:54:43 ncarroll Exp $
+} {
+    clipboard_id:integer,notnull
+}
+
+
+permission::require_permission -object_id $clipboard_id -privilege delete
+
+clipboard::delete -clipboard_id $clipboard_id
+
+ad_returnredirect ./
Index: openacs-4/packages/dotfolio-ui/www/clipboards/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/www/clipboards/index.adp,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/www/clipboards/index.adp	5 May 2005 08:54:43 -0000	1.1
@@ -0,0 +1,17 @@
+<master>
+  <property name="title">#dotfolio-ui.your_clipboards#</property>
+  <property name="context">#dotfolio-ui.clipboards#</property>
+  <if @user_id@ eq 0>#dotfolio-ui.log_in_or_register#</if>
+  <else>
+    <if @clipboards:rowcount@ eq 0>#dotfolio-ui.no_clipboards#</if>
+    <else>
+      <ul>
+        <multiple name="clipboards">
+          <li> 
+            <a href="view?clipboard_id=@clipboards.clipboard_id@">@clipboards.title@</a> <if @clipboards.clipped@ ne 0>#dotfolio-ui.num_items_last_used#</if>
+            <a class="button" href="ae?clipboard_id=@clipboards.clipboard_id@">#dotfolio-ui.edit#</a> <a href="delete?clipboard_id=@clipboards.clipboard_id@" class="button">#dotfolio-ui.delete#</a>
+          </li>
+        </multiple>
+      </ul>
+    </else>
+  </else>
Index: openacs-4/packages/dotfolio-ui/www/clipboards/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/www/clipboards/index.tcl,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/www/clipboards/index.tcl	5 May 2005 08:54:43 -0000	1.1
@@ -0,0 +1,15 @@
+# /packages/cop-ui/www/clipboard/view.tcl
+ad_page_contract {
+    Display all the clipboards for the logged in user
+
+    @author Jeff Davis (davis@xarg.net)
+    @creation-date 11/12/2003
+    @cvs-id $Id: index.tcl,v 1.1 2005/05/05 08:54:43 ncarroll Exp $
+} {}
+
+
+set user_id [auth::require_login]
+
+if {$user_id > 0} { 
+    clipboard::clipboards -count $user_id clipboards
+}
Index: openacs-4/packages/dotfolio-ui/www/clipboards/remove.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/www/clipboards/remove.tcl,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/www/clipboards/remove.tcl	5 May 2005 08:54:43 -0000	1.1
@@ -0,0 +1,21 @@
+# /packages/cop-ui/www/clipboard/remove.tcl
+ad_page_contract {
+    Detach an item from the clipboard.
+
+    @author Jeff Davis davis@xarg.net
+    @creation-date 10/30/2003
+    @cvs-id $Id: remove.tcl,v 1.1 2005/05/05 08:54:43 ncarroll Exp $
+} {
+    object_id:integer,notnull
+    clipboard_id:integer,notnull
+}
+
+set user_id [auth::require_login]
+
+if {$clipboard_id < 0} { 
+    ad_returnredirect "ae?object_id=$object_id"
+    ad_script_abort
+}
+
+clipboard::remove -user_id $user_id -clipboard_id $clipboard_id -object_id $object_id
+ad_returnredirect [get_referrer]
Index: openacs-4/packages/dotfolio-ui/www/clipboards/view-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/www/clipboards/view-postgresql.xql,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/www/clipboards/view-postgresql.xql	5 May 2005 08:54:43 -0000	1.1
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+
+<queryset>
+
+  <fullquery name="clipboard">
+    <querytext>
+      SELECT u.first_names || ' ' || u.last_name AS owner_name,
+          c.owner_id, o.title 
+      FROM clipboards c, acs_objects o, acs_users_all u
+      WHERE c.clipboard_id = :clipboard_id 
+          AND o.object_id = c.clipboard_id
+          AND o.object_type = 'clipboard'
+          AND c.owner_id = u.user_id
+    </querytext>
+  </fullquery>
+
+  <fullquery name="get_items">
+    <querytext>
+      SELECT o.object_id, t.pretty_name AS object_type,
+          coalesce(o.title,'object '||o.object_id) AS item_title,
+          to_char(m.clipped_on,'YYYY-MM-DD HH24:MI:SS') AS clipped_ansi
+      FROM clipboard_object_map m, acs_objects o, acs_object_types t
+      WHERE clipboard_id = :clipboard_id
+          AND o.object_id = m.object_id
+          AND t.object_type = (case when o.object_type = 'content_item' then (select case when i.content_type = 'content_extlink' then 'content_extlink' else r.object_type end from acs_objects r, cr_items i where r.object_id = coalesce(i.live_revision, i.latest_revision, i.item_id) and i.item_id = o.object_id) else o.object_type end)
+    </querytext>
+  </fullquery>
+    
+</queryset>
Index: openacs-4/packages/dotfolio-ui/www/clipboards/view.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/www/clipboards/view.adp,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/www/clipboards/view.adp	5 May 2005 08:54:43 -0000	1.1
@@ -0,0 +1,21 @@
+  <master>
+  <property name="title">@title@</property>
+  <property name="context">@context@</property>
+
+
+  <p>#dotfolio-ui.clipboard# @title@ (@items:rowcount@ #dotfolio-ui.items_attached#) <a href="ae?clipboard_id=@clipboard_id@" class="button">#dotfolio-ui.edit_title#</a> 
+  <a href="." class="button">#dotfolio-ui.all_clipboards#</a></p>
+  <if @items:rowcount@ gt 0>
+    <p>#dotfolio-ui.items_in_this_clipboard#</p>
+    <ul>
+      <multiple name="items">
+        <li style="padding: 4px;"> <a href="/o/@items.object_id@">@items.item_title@</a> [@items.object_type@], #dotfolio-ui.clipped# @items.clipped@ <a href="remove?clipboard_id=@clipboard_id@&amp;object_id=@items.object_id@" class="button">#dotfolio-ui.remove#</a></li>
+      </multiple>
+    </ul>
+  </if>
+  <else>
+    <p>#dotfolio-ui.no_items_in_clipboard#</p>
+  </else>
+
+
+<p><a href="delete?clipboard_id=@clipboard_id@" class="button">#dotfolio-ui.delete_clipboard#</a></p>
Index: openacs-4/packages/dotfolio-ui/www/clipboards/view.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/www/clipboards/view.tcl,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/www/clipboards/view.tcl	5 May 2005 08:54:43 -0000	1.1
@@ -0,0 +1,28 @@
+ad_page_contract {
+    display a given clipboards contents.
+
+    @author Jeff Davis (davis@xarg.net)
+    @creation-date 11/12/2003
+    @cvs-id $Id: view.tcl,v 1.1 2005/05/05 08:54:43 ncarroll Exp $
+} { 
+    clipboard_id:integer,notnull
+}
+
+set user_id [auth::refresh_login]
+
+# Check that the user is permissioned for this clipboard.
+permission::require_permission -party_id $user_id \
+    -object_id $clipboard_id -privilege read
+
+if {![db_0or1row clipboard {}] } {
+    ad_return_complaint 1 "Invalid clipboard id."
+    ad_script_abort
+}
+
+set context [list [list ./ Clipboards] $title]
+
+# TODO: Yuck! should fix this query.  maybe stick it in a view...
+db_multirow -extend {clipped} items get_items {} {
+    set clipped [util::age_pretty -timestamp_ansi $clipped_ansi \
+		     -sysdate_ansi [clock_to_ansi [clock seconds]]]
+}
Index: openacs-4/packages/dotfolio-ui/www/related/index-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/www/related/index-postgresql.xql,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/www/related/index-postgresql.xql	5 May 2005 08:54:43 -0000	1.1
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+
+<queryset>
+
+  <fullquery name="related">
+    <querytext>
+      SELECT to_char(ro.creation_date,'YYYY-MM-DD HH24:MI') as related_on, coalesce(o1.title,'? '||o1.object_type||o1.object_id) as object_one_title, o2.title as object_two_title, person__name(ro.creation_user) as name, object_id_one, object_id_two
+      FROM content_rels r, acs_objects o1, acs_objects o2, acs_rels ar, acs_objects ro
+     WHERE o1.object_id = ar.object_id_one
+       and o2.object_id = ar.object_id_two
+       and ar.rel_id = r.rel_id 
+       and ro.object_id = r.rel_id
+       and ( o1.package_id in ([join $packages ,])
+             or o2.package_id in ([join $packages ,]))
+   [template::list::orderby_clause -orderby -name "related"]
+    </querytext>
+  </fullquery>
+    
+</queryset>
Index: openacs-4/packages/dotfolio-ui/www/related/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/www/related/index.adp,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/www/related/index.adp	5 May 2005 08:54:43 -0000	1.1
@@ -0,0 +1,5 @@
+<master src="../resources/main-portal-column-content">
+<property name="title">@title@</property>
+<property name="context">@context@</property>
+
+<listtemplate name="related"></listtemplate>
Index: openacs-4/packages/dotfolio-ui/www/related/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/www/related/index.tcl,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/www/related/index.tcl	5 May 2005 08:54:43 -0000	1.1
@@ -0,0 +1,56 @@
+ad_page_contract {
+    Display the recently related items
+
+    @author Jeff Davis (davis@xarg.net)
+    @creation-date 11/12/2003
+
+    @cvs-id $Id: index.tcl,v 1.1 2005/05/05 08:54:43 ncarroll Exp $
+} {
+    {orderby "related_on,desc"}    
+}
+
+set user_id [auth::refresh_login]
+
+set title [_ dotfolio-ui.related_items]
+
+set context [list {related items}]
+
+set elements {
+    object_one_title {
+        label {Item1}
+        display_template {<a href="/o/@related.object_id_one@">@related.object_one_title@</a>}
+	html {width "35%"}
+    }
+    object_two_title {
+        label {Item2}
+        display_template {<a href="/o/@related.object_id_two@">@related.object_two_title@</a>}
+	html {width "35%"}
+    }
+    related_on {
+        label {Added}
+	html {width "15%"}
+    }
+    name {
+        label {By}
+	link_url_col user_url 
+            html {width "15%"}
+    }
+}
+
+set packages [dotfolio::packages -node_id [ad_conn node_id]]
+
+template::list::create \
+    -name related \
+    -multirow related \
+    -elements $elements \
+    -orderby { 
+        object_one_title { orderby lower(o1.title) }
+        object_two_title { orderby lower(o2.title) }
+        related_on { orderby ro.creation_date }
+        name { orderby {lower(person__name(ro.creation_user))}}
+    }
+
+db_multirow -extend {extra user_url} related related {} {
+    set user_url [acs_community_member_url -user_id $user_id]
+    set extra foo
+}
Index: openacs-4/packages/dotfolio-ui/www/related/relate-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/www/related/relate-postgresql.xql,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/www/related/relate-postgresql.xql	5 May 2005 08:54:43 -0000	1.1
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+
+<queryset>
+
+  <fullquery name="object_name">
+    <querytext>
+      SELECT coalesce(o.title,acs_object__name(:object_one))
+          FROM acs_objects o WHERE o.object_id = :object_one
+    </querytext>
+  </fullquery>
+    
+</queryset>
Index: openacs-4/packages/dotfolio-ui/www/related/relate.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/www/related/relate.adp,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/www/related/relate.adp	5 May 2005 08:54:43 -0000	1.1
@@ -0,0 +1,7 @@
+<master>
+  <property name="title">@title@</property>
+  <property name="context">@context;noquote@</property>
+
+  <include src="/packages/related-items/lib/relate" user_id="@user_id@" object_one="@object_one@" orderby="@orderby@" admin_p="@admin_p">
+
+
Index: openacs-4/packages/dotfolio-ui/www/related/relate.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/www/related/relate.tcl,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/www/related/relate.tcl	5 May 2005 08:54:43 -0000	1.1
@@ -0,0 +1,28 @@
+# /packages/cop-ui/www/related/relate.tcl
+ad_page_contract {
+    Relate object_id.
+    Requires registration.
+
+    @author Jeff Davis davis@xarg.net
+    @creation-date 10/30/2003
+    @cvs-id $Id: relate.tcl,v 1.1 2005/05/05 08:54:43 ncarroll Exp $
+} {
+    object_one:integer,notnull
+    {orderby "clipboard,desc"}
+}
+
+set user_id [auth::require_login]
+set admin_p [permission::permission_p -object_id [ad_conn package_id] -privilege admin]
+
+set title [_ dotfolio-ui.relate]
+
+if {![empty_string_p $object_one]} {
+    set object_name [db_string object_name {} -default {}]
+    if {![empty_string_p $object_name]} { 
+        append title " to $object_name"
+    } else { 
+        append title " to object $object_one"
+    }
+}
+
+set context [list [list ./ relate] {relate object}]
Index: openacs-4/packages/dotfolio-ui/www/related/relation-add.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/www/related/relation-add.adp,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/www/related/relation-add.adp	5 May 2005 08:54:43 -0000	1.1
@@ -0,0 +1 @@
+<include src="/packages/related-items/lib/relation-add">
\ No newline at end of file
Index: openacs-4/packages/dotfolio-ui/www/related/relation-delete.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/www/related/relation-delete.adp,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/www/related/relation-delete.adp	5 May 2005 08:54:43 -0000	1.1
@@ -0,0 +1 @@
+<include src="/packages/related-items/lib/relation-delete">
Index: openacs-4/packages/dotfolio-ui/www/resources/blank_portrait.jpg
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/www/resources/blank_portrait.jpg,v
diff -u
Binary files differ
Index: openacs-4/packages/dotfolio-ui/www/resources/dotfolio-grey.css
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/www/resources/dotfolio-grey.css,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/www/resources/dotfolio-grey.css	5 May 2005 08:54:43 -0000	1.1
@@ -0,0 +1,178 @@
+.portlet {
+    border: none;
+    margin-bottom: 1em;
+    padding: 0;
+}
+
+.portlet h5 { 
+    background-color: #eeeeee;
+    border: 1px solid #666;
+    padding: 0em 1em 0em 1em;
+    display: inline;
+    font-size: 12px;
+    font-weight: normal;
+    white-space: nowrap;
+    position: relative;
+    top: -1px;
+}
+
+.portletBody {
+    position: relative;
+    top: -1px;
+    background: transparent;
+    border: 1px solid #666;
+}
+
+.portletEdit {
+    background-color: #eeeeee;
+    display: inline;
+    font-size: 10px;
+    font-weight: normal;
+    float:right;
+    padding: 1px;
+}
+
+.portletOptions {
+    display: inline;
+    font-size: 10px;
+    font-weight: normal;
+    float:right;
+    padding: 1px;
+}
+
+.portletContent {
+    padding: 1em;
+    background-color: transparent;
+}
+
+.portlet .even {
+    background-color: #e6e6e6;
+}
+
+.portlet .odd {
+    background-color: transparent;
+}
+
+.visualClear {
+    display: block;
+    clear: both;
+}
+
+#portal-columns {
+    width: 100% !important;
+    border-collapse: collapse;
+    border-spacing: 0;
+}
+
+#portal-column-one {
+    vertical-align: top;
+    width: 10em;
+}
+
+#portal-column-content {
+    vertical-align: top;
+    margin: 0;
+    padding: 0;
+}
+
+#portal-column-two {
+    vertical-align: top;
+    width: 10em;
+}
+
+/* Padding for the columns */
+#portal-column-one .visualPadding {
+    /*padding: 2em 0em 1em 2em;*/
+    padding: 1em 0em 1em 0em;
+}
+
+#portal-column-content .visualPadding {
+    /*padding: 0em 2em 1em 2em;*/
+    padding: 0em 1em 1em 1em;
+}
+
+#portal-column-two .visualPadding {
+    /*padding: 2em 2em 1em 0em;*/
+    padding: 1em 0em 1em 0em;
+}
+
+.dotfolioPortrait {
+    height: 120px;
+    width: 120px;
+}
+
+.documentBorder {
+    border: 1px solid #666;
+    background: White;
+}
+
+.documentContent {
+    padding: 1em !important;
+}
+
+.portletBlogEntries {
+    font-size: 80%;
+}
+
+.portletBlogDates {
+    font-size: 60%;
+}
+
+.clipperSection {
+    font-size: 80%;
+}
+
+input.clipperButton { 
+  font: 85% arial;
+  height: 15px;
+  border: solid 1px black;
+  background-color: #e1e1e1;
+  text-align: center; 
+  padding: 1px;
+  padding-left: 2px;
+  padding-right: 2px;
+  color: black;
+  text-decoration: none;
+  white-space: nowrap;
+}
+
+input.clipperButton:hover { 
+  text-decoration: none;
+  background-color: #ccc;
+  border: solid 1px black;
+}
+
+a.clipperButton {
+  font: 85% arial;
+  height: 15px;
+  border: solid 1px black;
+  background-color: #e1e1e1;
+  text-align: center;
+  padding: 1px;
+  padding-left: 8px;
+  padding-right: 8px;
+  color: black;
+  text-decoration: none;
+  white-space: nowrap;
+}
+
+a.clipperButton:link {
+  text-decoration: none;
+  border: solid 1px black;
+}
+
+a.clipperButton:visited {
+  text-decoration: none;
+  border: solid 1px black;
+}
+
+a.clipperButton:hover {
+  text-decoration: none;
+  background-color: #ccc;
+  border: solid 1px black;
+}
+
+a.clipperButton:active {
+  text-decoration: none;
+  border: solid 1px black;
+}
\ No newline at end of file
Index: openacs-4/packages/dotfolio-ui/www/resources/edit.jpg
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/www/resources/edit.jpg,v
diff -u
Binary files differ
Index: openacs-4/packages/dotfolio-ui/www/resources/help.jpg
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/www/resources/help.jpg,v
diff -u
Binary files differ
Index: openacs-4/packages/dotfolio-ui/www/resources/main-portal-column-content.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/www/resources/main-portal-column-content.adp,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/www/resources/main-portal-column-content.adp	5 May 2005 08:54:43 -0000	1.1
@@ -0,0 +1,23 @@
+<master>
+<property name="title">@title@</property>
+<property name="context">@context@</property>
+<property name="header_stuff">@header_stuff;noquote@</property>
+
+<P>
+<div class="visualClear"></div>
+
+<table id="portal-columns">
+  <tbody>
+    <tr>
+      <td id="portal-column-content">
+        <div class="visualPadding">
+          <div class="documentBorder">
+            <div class="documentContent">
+            <slave>
+            </div>
+          </div>
+        </div>
+      </td>
+    </tr>
+  </tbody>
+</table>
Index: openacs-4/packages/dotfolio-ui/www/resources/main-portal-column-content.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/www/resources/main-portal-column-content.tcl,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/www/resources/main-portal-column-content.tcl	5 May 2005 08:54:43 -0000	1.1
@@ -0,0 +1,11 @@
+if { ![info exists title] } {
+    set title {}
+}
+
+if { ![info exists context] } {
+    set context {}
+}
+
+if { ![info exists header_stuff] } {
+    set header_stuff {}
+}
Index: openacs-4/packages/dotfolio-ui/www/resources/tooltip.js
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio-ui/www/resources/tooltip.js,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio-ui/www/resources/tooltip.js	5 May 2005 08:54:43 -0000	1.1
@@ -0,0 +1,509 @@
+/* This notice must be untouched at all times.
+
+wz_tooltip.js    v. 3.27
+
+The latest version is available at
+http://www.walterzorn.com
+or http://www.devira.com
+or http://www.walterzorn.de
+or http://www.walterzorn.com/tooltip/tooltip_e.htm
+
+Copyright (c) 2002-2004 Walter Zorn. All rights reserved.
+Created 1. 12. 2002 by Walter Zorn (Web: http://www.walterzorn.com )
+Last modified: 14. 2. 2005
+
+Cross-browser tooltips working even in Opera 5 and 6,
+as well as in NN 4, Gecko-Browsers, IE4+, Opera 7 and Konqueror.
+No onmouseouts required.
+Appearance of tooltips can be individually configured
+via commands within the onmouseovers.
+
+LICENSE: LGPL
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License (LGPL) as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+For more details on the GNU Lesser General Public License,
+see http://www.gnu.org/copyleft/lesser.html
+*/
+
+
+
+////////////////  GLOBAL TOOPTIP CONFIGURATION  /////////////////////
+var ttBgColor      = "#e6ecff";
+var ttBgImg        = "";           // path to background image;
+var ttBorderColor  = "#003399";
+var ttBorderWidth  = 1;
+var ttDelay        = 500;          // time span until tooltip shows up [milliseconds]
+var ttFontColor    = "#000066";
+var ttFontFace     = "arial,helvetica,sans-serif";
+var ttFontSize     = "11px";
+var ttFontWeight   = "normal";     // alternative is "bold";
+var ttOffsetX      = 12;            // horizontal offset of left-top corner from mousepointer
+var ttOffsetY      = 15;           // vertical offset                   "
+var ttPadding      = 3;            // spacing between border and content
+var ttShadowColor  = "";
+var ttShadowWidth  = 0;
+var ttTemp         = 0;            // time span after which the tooltip disappears; 0 (zero) means "infinite timespan"
+var ttTextAlign    = "left";
+var ttTitleColor   = "#ffffff";    // color of caption text
+var ttWidth        = 300;
+////////////////////  END OF TOOLTIP CONFIG  ////////////////////////
+
+
+
+//////////////  TAGS WITH TOOLTIP FUNCTIONALITY  ////////////////////
+// List may be extended or shortened:
+var tt_tags = new Array("a","area","b","big","caption","center","code","dd","div","dl","dt","em","h1","h2","h3","h4","h5","h6","i","img","input","li","map","ol","p","pre","s","small","span","strike","strong","sub","sup","table","td","th","tr","tt","u","var","ul","layer");
+/////////////////////////////////////////////////////////////////////
+
+
+
+///////// DON'T CHANGE ANYTHING BELOW THIS LINE /////////////////////
+var tt_obj,                // current tooltip
+tt_objW = 0, tt_objH = 0,  // width and height of tt_obj
+tt_objX = 0, tt_objY = 0,
+tt_offX = 0, tt_offY = 0,
+xlim = 0, ylim = 0,        // right and bottom borders of visible client area
+tt_sup = false,            // true if T_ABOVE cmd
+tt_sticky = false,         // tt_obj sticky?
+tt_wait = false,
+tt_vis = false,            // tooltip visibility flag
+tt_sub = false,            // true while tooltip below mousepointer
+tt_u = "undefined",
+tt_inputs = new Array(),   // drop-down-boxes to be hidden in IE
+// Opera: disable href when hovering <a>
+tt_tag = null;             // stores hovered dom node, href and previous statusbar txt
+
+
+var tt_db = (document.compatMode && document.compatMode != "BackCompat")? document.documentElement : document.body? document.body : null,
+tt_n = navigator.userAgent.toLowerCase();
+
+// Browser flags
+var tt_op = !!(window.opera && document.getElementById),
+tt_op6 = tt_op && !document.defaultView,
+tt_op7 = tt_op && !tt_op6,
+tt_ie = tt_n.indexOf("msie") != -1 && document.all && tt_db && !tt_op,
+tt_n4 = (document.layers && typeof document.classes != tt_u),
+tt_n6 = (!tt_op && document.defaultView && typeof document.defaultView.getComputedStyle != tt_u),
+tt_w3c = !tt_ie && !tt_n6 && !tt_op && document.getElementById;
+
+tt_n = "";
+
+
+function tt_Int(t_x)
+{
+	var t_y;
+	return isNaN(t_y = parseInt(t_x))? 0 : t_y;
+}
+
+function wzReplace(t_x, t_y)
+{
+	var t_ret = "",
+	t_str = this,
+	t_xI;
+	while((t_xI = t_str.indexOf(t_x)) != -1)
+	{
+		t_ret += t_str.substring(0, t_xI) + t_y;
+		t_str = t_str.substring(t_xI + t_x.length);
+	}
+	return t_ret+t_str;
+}
+String.prototype.wzReplace = wzReplace;
+
+function tt_N4Tags(tagtyp, t_d, t_y)
+{
+	t_d = t_d || document;
+	t_y = t_y || new Array();
+	var t_x = (tagtyp=="a")? t_d.links : t_d.layers;
+	for(var z = t_x.length; z--;) t_y[t_y.length] = t_x[z];
+	for(var z = t_d.layers.length; z--;) t_y = tt_N4Tags(tagtyp, t_d.layers[z].document, t_y);
+	return t_y;
+}
+
+function tt_GetSelects()
+{
+	if (!tt_op6 && !tt_ie) return;
+	var t_s = tt_op6? "input" : "select";
+	if (document.all)
+	{
+		var t_i = document.all.tags(t_s).length; while(t_i--)
+			tt_inputs[t_i] = document.all.tags(t_s)[t_i];
+	}
+	else if (document.getElementsByTagName)
+	{
+		var t_i = document.getElementsByTagName(t_s).length; while(t_i--)
+			tt_inputs[t_i] = document.getElementsByTagName(t_s)[t_i];
+	}
+	var t_i = tt_inputs.length; while(t_i--)
+	{
+		tt_inputs[t_i].x = 0;
+		tt_inputs[t_i].y = 0;
+		var t_o = tt_inputs[t_i];
+		while(t_o)
+		{
+			tt_inputs[t_i].x += t_o.offsetLeft || 0;
+			tt_inputs[t_i].y += t_o.offsetTop|| 0;
+			t_o = t_o.offsetParent;
+		}
+	}
+}
+
+function tt_Htm(tt, t_id, txt)
+{
+	var t_bgc = (typeof tt.T_BGCOLOR != tt_u)? tt.T_BGCOLOR : ttBgColor,
+	t_bgimg   = (typeof tt.T_BGIMG != tt_u)? tt.T_BGIMG : ttBgImg,
+	t_bc      = (typeof tt.T_BORDERCOLOR != tt_u)? tt.T_BORDERCOLOR : ttBorderColor,
+	t_bw      = (typeof tt.T_BORDERWIDTH != tt_u)? tt.T_BORDERWIDTH : ttBorderWidth,
+	t_ff      = (typeof tt.T_FONTFACE != tt_u)? tt.T_FONTFACE : ttFontFace,
+	t_fc      = (typeof tt.T_FONTCOLOR != tt_u)? tt.T_FONTCOLOR : ttFontColor,
+	t_fsz     = (typeof tt.T_FONTSIZE != tt_u)? tt.T_FONTSIZE : ttFontSize,
+	t_fwght   = (typeof tt.T_FONTWEIGHT != tt_u)? tt.T_FONTWEIGHT : ttFontWeight,
+	t_padd    = (typeof tt.T_PADDING != tt_u)? tt.T_PADDING : ttPadding,
+	t_shc     = (typeof tt.T_SHADOWCOLOR != tt_u)? tt.T_SHADOWCOLOR : (ttShadowColor || 0),
+	t_shw     = (typeof tt.T_SHADOWWIDTH != tt_u)? tt.T_SHADOWWIDTH : (ttShadowWidth || 0),
+	t_algn    = (typeof tt.T_TEXTALIGN != tt_u)? tt.T_TEXTALIGN : ttTextAlign,
+	t_tit     = (typeof tt.T_TITLE != tt_u)? tt.T_TITLE : "",
+	t_titc    = (typeof tt.T_TITLECOLOR != tt_u)? tt.T_TITLECOLOR : ttTitleColor,
+	t_w       = (typeof tt.T_WIDTH != tt_u)? tt.T_WIDTH  : ttWidth;
+	if (t_shc || t_shw)
+	{
+		t_shc = t_shc || "#cccccc";
+		t_shw = t_shw || 5;
+	}
+	if (tt_n4 && (t_fsz == "10px" || t_fsz == "11px")) t_fsz = "12px";
+
+
+	var t_y = '<div id="'+t_id+'" style="position:absolute;z-index:1010;';
+	t_y += 'left:0px;top:0px;width:'+(t_w+t_shw)+'px;visibility:'+(tt_n4? 'hide' : 'hidden')+';">' +
+		'<table border="0" cellpadding="0" cellspacing="0"'+(t_bc? (' bgcolor="'+t_bc+'"') : '')+' width="'+t_w+'">';
+	if (t_tit)
+	{
+		t_y += '<tr><td style="padding-left:3px;padding-right:3px;" align="'+t_algn+'"><font color="'+t_titc+'" face="'+t_ff+'" ' +
+			'style="color:'+t_titc+';font-family:'+t_ff+';font-size:'+t_fsz+';"><b>' +
+			(tt_n4? '&nbsp;' : '')+t_tit+'<\/b><\/font><\/td><\/tr>';
+	}
+	t_y += '<tr><td><table border="0" cellpadding="'+t_padd+'" cellspacing="'+t_bw+'" width="100%">' +
+		'<tr><td'+(t_bgc? (' bgcolor="'+t_bgc+'"') : '')+(t_bgimg? ' background="'+t_bgimg+'"' : '');
+	if (tt_n6) t_y += ' style="padding:'+t_padd+'px;"';
+	t_y += ' align="'+t_algn+'"><font color="'+t_fc+'" face="'+t_ff+'"' +
+		' style="color:'+t_fc+';font-family:'+t_ff+';font-size:'+t_fsz+';font-weight:'+t_fwght+';">';
+	if (t_fwght == 'bold') t_y += '<b>';
+	t_y += txt;
+	if (t_fwght == 'bold') t_y += '<\/b>';
+	t_y += '<\/font><\/td><\/tr><\/table><\/td><\/tr><\/table>';
+	if (t_shw)
+	{
+		var t_spct = Math.round(t_shw*1.3);
+		if (tt_n4)
+		{
+			t_y += '<layer bgcolor="'+t_shc+'" left="'+t_w+'" top="'+t_spct+'" width="'+t_shw+'" height="0"><\/layer>' +
+				'<layer bgcolor="'+t_shc+'" left="'+t_spct+'" align="bottom" width="'+(t_w-t_spct)+'" height="'+t_shw+'"><\/layer>';
+		}
+		else
+		{
+			var t_opa = tt_n6? '-moz-opacity:0.85;' : tt_ie? 'filter:Alpha(opacity=85);' : '';
+			t_y += '<div id="'+t_id+'R" style="position:absolute;background:'+t_shc+';left:'+t_w+'px;top:'+t_spct+'px;width:'+t_shw+'px;height:1px;overflow:hidden;'+t_opa+'"><\/div>' +
+				'<div style="position:relative;background:'+t_shc+';left:'+t_spct+'px;top:0px;width:'+(t_w-t_spct)+'px;height:'+t_shw+'px;overflow:hidden;'+t_opa+'"><\/div>';
+		}
+	}
+	t_y += '<\/div>';
+	return t_y;
+}
+
+function tt_Init()
+{
+	if (!(tt_op || tt_n4 || tt_n6 || tt_ie || tt_w3c)) return;
+
+	var htm = tt_n4? '<div style="position:absolute;"><\/div>' : '',
+	tags,
+	t_tj,
+	over,
+	esc = 'return escape(';
+	var i = tt_tags.length; while(i--)
+	{
+		tags = tt_ie? (document.all.tags(tt_tags[i]) || 1)
+			: document.getElementsByTagName? (document.getElementsByTagName(tt_tags[i]) || 1)
+			: (!tt_n4 && tt_tags[i]=="a")? document.links
+			: 1;
+		if (tt_n4 && (tt_tags[i] == "a" || tt_tags[i] == "layer")) tags = tt_N4Tags(tt_tags[i]);
+		var j = tags.length; while(j--)
+		{
+			if (typeof (t_tj = tags[j]).onmouseover == "function" && t_tj.onmouseover.toString().indexOf(esc) != -1 && !tt_n6 || tt_n6 && (over = t_tj.getAttribute("onmouseover")) && over.indexOf(esc) != -1)
+			{
+				if (over) t_tj.onmouseover = new Function(over);
+				var txt = unescape(t_tj.onmouseover());
+				htm += tt_Htm(
+					t_tj,
+					"tOoLtIp"+i+""+j,
+					txt.wzReplace("& ","&")
+				);
+
+				t_tj.onmouseover = new Function('e',
+					'tt_Show(e,'+
+					'"tOoLtIp' +i+''+j+ '",'+
+					(typeof t_tj.T_ABOVE != tt_u)+','+
+					((typeof t_tj.T_DELAY != tt_u)? t_tj.T_DELAY : ttDelay)+','+
+					((typeof t_tj.T_FIX != tt_u)? '"'+t_tj.T_FIX+'"' : '""')+','+
+					(typeof t_tj.T_LEFT != tt_u)+','+
+					((typeof t_tj.T_OFFSETX != tt_u)? t_tj.T_OFFSETX : ttOffsetX)+','+
+					((typeof t_tj.T_OFFSETY != tt_u)? t_tj.T_OFFSETY : ttOffsetY)+','+
+					(typeof t_tj.T_STATIC != tt_u)+','+
+					(typeof t_tj.T_STICKY != tt_u)+','+
+					((typeof t_tj.T_TEMP != tt_u)? t_tj.T_TEMP : ttTemp)+
+					');'
+				);
+				t_tj.onmouseout = tt_Hide;
+				if (t_tj.alt) t_tj.alt = "";
+				if (t_tj.title) t_tj.title = "";
+			}
+		}
+	}
+	document.write(htm);
+}
+
+function tt_EvX(t_e)
+{
+	var t_y = tt_Int(t_e.pageX || t_e.clientX || 0) +
+		tt_Int(tt_ie? tt_db.scrollLeft : 0) +
+		tt_offX;
+	if (t_y > xlim) t_y = xlim;
+	var t_scr = tt_Int(window.pageXOffset || (tt_db? tt_db.scrollLeft : 0) || 0);
+	if (t_y < t_scr) t_y = t_scr;
+	return t_y;
+}
+
+function tt_EvY(t_e)
+{
+	var t_y = tt_Int(t_e.pageY || t_e.clientY || 0) +
+		tt_Int(tt_ie? tt_db.scrollTop : 0);
+	if (tt_sup) t_y -= (tt_objH + tt_offY - 15);
+	else if (t_y > ylim || !tt_sub && t_y > ylim-24)
+	{
+		t_y -= (tt_objH + 5);
+		tt_sub = false;
+	}
+	else
+	{
+		t_y += tt_offY;
+		tt_sub = true;
+	}
+	return t_y;
+}
+
+function tt_ReleasMov()
+{
+	if (document.onmousemove == tt_Move)
+	{
+		if (document.releaseEvents) document.releaseEvents(Event.MOUSEMOVE);
+		document.onmousemove = null;
+	}
+}
+
+function tt_HideInput()
+{
+	if (!(tt_ie || tt_op6) || !tt_inputs) return;
+	var t_o;
+	var t_i = tt_inputs.length; while(t_i--)
+	{
+		t_o = tt_inputs[t_i];
+		if (tt_vis && tt_objX+tt_objW > t_o.x && tt_objX < t_o.x+t_o.offsetWidth && tt_objY+tt_objH > t_o.y && tt_objY < t_o.y+t_o.offsetHeight)
+			t_o.style.visibility = 'hidden';
+		else t_o.style.visibility = 'visible';
+	}
+}
+
+function tt_GetDiv(t_id)
+{
+	return(
+		tt_n4? (document.layers[t_id] || null)
+		: tt_ie? (document.all[t_id] || null)
+		: (document.getElementById(t_id) || null)
+	);
+}
+
+function tt_GetDivW()
+{
+	return tt_Int(
+		tt_n4? tt_obj.clip.width
+		: tt_obj.style.pixelWidth? tt_obj.style.pixelWidth
+		: tt_obj.offsetWidth
+	);
+}
+
+function tt_GetDivH()
+{
+	return tt_Int(
+		tt_n4? tt_obj.clip.height
+		: tt_obj.style.pixelHeight? tt_obj.style.pixelHeight
+		: tt_obj.offsetHeight
+	);
+}
+
+// Compat with DragDrop Lib: Ensure that z-index of tooltip is lifted beyond toplevel dragdrop element
+function tt_SetDivZ()
+{
+	var t_i = tt_obj.style || tt_obj;
+	if (window.dd && dd.z)
+		t_i.zIndex = Math.max(dd.z+1, t_i.zIndex);
+}
+
+function tt_SetDivPos(t_x, t_y)
+{
+	var t_i = tt_obj.style || tt_obj;
+	var t_px = (tt_op6 || tt_n4)? '' : 'px';
+	t_i.left = (tt_objX = t_x) + t_px;
+	t_i.top = (tt_objY = t_y) + t_px;
+	tt_HideInput();
+}
+
+function tt_ShowDiv(t_x)
+{
+	if (tt_n4) tt_obj.visibility = t_x? 'show' : 'hide';
+	else tt_obj.style.visibility = t_x? 'visible' : 'hidden';
+	tt_vis = t_x;
+	tt_HideInput();
+}
+
+function tt_OpDeHref(t_e)
+{
+	if (t_e && t_e.target.hasAttribute("href"))
+	{
+		tt_tag = t_e.target;
+		tt_tag.t_href = tt_tag.getAttribute("href");
+		tt_tag.removeAttribute("href");
+		tt_tag.style.cursor = "hand";
+		tt_tag.onmousedown = tt_OpReHref;
+		tt_tag.stats = window.status;
+		window.status = tt_tag.t_href;
+	}
+}
+
+function tt_OpReHref()
+{
+	if (tt_tag)
+	{
+		tt_tag.setAttribute("href", tt_tag.t_href);
+		window.status = tt_tag.stats;
+		tt_tag = null;
+	}
+}
+
+function tt_Show(t_e, t_id, t_sup, t_delay, t_fix, t_left, t_offx, t_offy, t_static, t_sticky, t_temp)
+{
+	if (tt_obj) tt_Hide();
+	var t_mf = document.onmousemove || null;
+	if (window.dd && (window.DRAG && t_mf == DRAG || window.RESIZE && t_mf == RESIZE)) return;
+	var t_uf = document.onmouseup || null;
+	if (t_mf && t_uf) t_uf(t_e);
+
+	tt_obj = tt_GetDiv(t_id);
+	if (tt_obj)
+	{
+		t_e = t_e || window.event;
+		tt_sub = !(tt_sup = t_sup);
+		tt_sticky = t_sticky;
+		tt_objW = tt_GetDivW();
+		tt_objH = tt_GetDivH();
+		tt_offX = t_left? -(tt_objW+t_offx) : t_offx;
+		tt_offY = t_offy;
+		if (tt_op7) tt_OpDeHref(t_e);
+		if (tt_n4)
+		{
+			if (tt_obj.document.layers.length)
+			{
+				var t_sh = tt_obj.document.layers[0];
+				t_sh.clip.height = tt_objH - Math.round(t_sh.clip.width*1.3);
+			}
+		}
+		else
+		{
+			var t_sh = tt_GetDiv(t_id+'R');
+			if (t_sh)
+			{
+				var t_h = tt_objH - tt_Int(t_sh.style.pixelTop || t_sh.style.top || 0);
+				if (typeof t_sh.style.pixelHeight != tt_u) t_sh.style.pixelHeight = t_h;
+				else t_sh.style.height = t_h+'px';
+			}
+		}
+
+		tt_GetSelects();
+
+		xlim = tt_Int((tt_db && tt_db.clientWidth)? tt_db.clientWidth : window.innerWidth) +
+			tt_Int(window.pageXOffset || (tt_db? tt_db.scrollLeft : 0) || 0) -
+			tt_objW -
+			(tt_n4? 21 : 0);
+		ylim = tt_Int(window.innerHeight || tt_db.clientHeight) +
+			tt_Int(window.pageYOffset || (tt_db? tt_db.scrollTop : 0) || 0) -
+			tt_objH - tt_offY;
+
+		tt_SetDivZ();
+		if (t_fix) tt_SetDivPos(tt_Int((t_fix = t_fix.split(','))[0]), tt_Int(t_fix[1]));
+		else tt_SetDivPos(tt_EvX(t_e), tt_EvY(t_e));
+
+		var t_txt = 'tt_ShowDiv(\'true\');';
+		if (t_sticky) t_txt += '{'+
+				'tt_ReleasMov();'+
+				'window.tt_upFunc = document.onmouseup || null;'+
+				'if (document.captureEvents) document.captureEvents(Event.MOUSEUP);'+
+				'document.onmouseup = new Function("window.setTimeout(\'tt_Hide();\', 10);");'+
+			'}';
+		else if (t_static) t_txt += 'tt_ReleasMov();';
+		if (t_temp > 0) t_txt += 'window.tt_rtm = window.setTimeout(\'tt_sticky = false; tt_Hide();\','+t_temp+');';
+		window.tt_rdl = window.setTimeout(t_txt, t_delay);
+
+		if (!t_fix)
+		{
+			if (document.captureEvents) document.captureEvents(Event.MOUSEMOVE);
+			document.onmousemove = tt_Move;
+		}
+	}
+}
+
+var tt_area = false;
+function tt_Move(t_ev)
+{
+	if (!tt_obj) return;
+	if (tt_n6 || tt_w3c)
+	{
+		if (tt_wait) return;
+		tt_wait = true;
+		setTimeout('tt_wait = false;', 5);
+	}
+	var t_e = t_ev || window.event;
+	tt_SetDivPos(tt_EvX(t_e), tt_EvY(t_e));
+	if (tt_op6)
+	{
+		if (tt_area && t_e.target.tagName != 'AREA') tt_Hide();
+		else if (t_e.target.tagName == 'AREA') tt_area = true;
+	}
+}
+
+function tt_Hide()
+{
+	if (window.tt_obj)
+	{
+		if (window.tt_rdl) window.clearTimeout(tt_rdl);
+		if (!tt_sticky || !tt_vis)
+		{
+			if (window.tt_rtm) window.clearTimeout(tt_rtm);
+			tt_ShowDiv(false);
+			tt_SetDivPos(-tt_objW, -tt_objH);
+			tt_obj = null;
+			if (typeof window.tt_upFunc != tt_u) document.onmouseup = window.tt_upFunc;
+		}
+		tt_sticky = false;
+		if (tt_op6 && tt_area) tt_area = false;
+		tt_ReleasMov();
+		if (tt_op7) tt_OpReHref();
+		tt_HideInput();
+	}
+}
+
+tt_Init();