Index: openacs-4/packages/dotfolio/catalog/dotfolio.en_US.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio/catalog/dotfolio.en_US.ISO-8859-1.xml,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/dotfolio/catalog/dotfolio.en_US.ISO-8859-1.xml 5 May 2005 11:16:34 -0000 1.2
+++ openacs-4/packages/dotfolio/catalog/dotfolio.en_US.ISO-8859-1.xml 14 May 2005 14:27:44 -0000 1.3
@@ -4,6 +4,13 @@
Revoke site-wide administrative privileges.
Grant site-wide administrative privileges.
Username
+ Groups
+ Delete
+ Select adviser...
+ Create Group
+ Create Adviser
+ Group Name
+ No groups have been created.
Nuke
You have been added as a user to %system_name% at %system_url%
Enter a valid username. The username will be used to create the dotfolio space.
Index: openacs-4/packages/dotfolio/sql/postgresql/dotfolio-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio/sql/postgresql/dotfolio-create.sql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotfolio/sql/postgresql/dotfolio-create.sql 5 May 2005 08:51:31 -0000 1.1
+++ openacs-4/packages/dotfolio/sql/postgresql/dotfolio-create.sql 14 May 2005 14:27:44 -0000 1.2
@@ -166,3 +166,4 @@
\i users-create.sql
\i dotfolio-identification-create.sql
+\i dotfolio-groups-create.sql
Index: openacs-4/packages/dotfolio/sql/postgresql/dotfolio-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio/sql/postgresql/dotfolio-drop.sql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotfolio/sql/postgresql/dotfolio-drop.sql 5 May 2005 08:51:31 -0000 1.1
+++ openacs-4/packages/dotfolio/sql/postgresql/dotfolio-drop.sql 14 May 2005 14:27:44 -0000 1.2
@@ -23,3 +23,4 @@
\i users-drop.sql
\i dotfolio-identification-drop.sql
+\i dotfolio-groups-drop.sql
Index: openacs-4/packages/dotfolio/sql/postgresql/dotfolio-groups-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio/sql/postgresql/dotfolio-groups-create.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio/sql/postgresql/dotfolio-groups-create.sql 14 May 2005 14:27:44 -0000 1.1
@@ -0,0 +1,17 @@
+--
+-- packages/dotfolio/sql/dotfolio-groups-create.sql
+--
+-- @author Nick Carroll (nick.c@rroll.net)
+-- @creation-date 2005-03-21
+-- @cvs-id $Id: dotfolio-groups-create.sql,v 1.1 2005/05/14 14:27:44 ncarroll Exp $
+--
+--
+
+create table dotfolio_group_adviser_map (
+ group_id integer
+ constraint dotfolio_group_adviser_map_group_fk
+ references groups(group_id),
+ adviser_id integer
+ constraint dotfolio_group_adviser_map_adviser_fk
+ references users(user_id)
+);
Index: openacs-4/packages/dotfolio/sql/postgresql/dotfolio-groups-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio/sql/postgresql/dotfolio-groups-drop.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio/sql/postgresql/dotfolio-groups-drop.sql 14 May 2005 14:27:44 -0000 1.1
@@ -0,0 +1,10 @@
+--
+-- packages/dotfolio/sql/dotfolio-create.sql
+--
+-- @author Nick Carroll (nick.c@rroll.net)
+-- @creation-date 2005-03-21
+-- @cvs-id $Id: dotfolio-groups-drop.sql,v 1.1 2005/05/14 14:27:44 ncarroll Exp $
+--
+--
+
+drop table dotfolio_group_adviser_map;
Index: openacs-4/packages/dotfolio/tcl/dotfolio-apm-callback-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio/tcl/dotfolio-apm-callback-procs.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotfolio/tcl/dotfolio-apm-callback-procs.tcl 5 May 2005 08:51:31 -0000 1.1
+++ openacs-4/packages/dotfolio/tcl/dotfolio-apm-callback-procs.tcl 14 May 2005 14:27:44 -0000 1.2
@@ -11,7 +11,7 @@
ad_proc -public after_install {
} {
- Configure kernel to use usernames instead of email for logins.
+ Configures kernel to use usernames instead of email for logins.
dotfolio relies on usernames to create portfolio spaces for users.
@return
Index: openacs-4/packages/dotfolio/tcl/dotfolio-users-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio/tcl/dotfolio-users-procs-postgresql.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotfolio/tcl/dotfolio-users-procs-postgresql.xql 5 May 2005 08:51:31 -0000 1.1
+++ openacs-4/packages/dotfolio/tcl/dotfolio-users-procs-postgresql.xql 14 May 2005 14:27:44 -0000 1.2
@@ -24,4 +24,12 @@
+
+
+ SELECT last_name || ', ' || first_names AS adviser_name,
+ user_id AS adviser_id
+ FROM dotfolio_users WHERE type = 'adviser'
+
+
+
Index: openacs-4/packages/dotfolio/tcl/dotfolio-users-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio/tcl/dotfolio-users-procs.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotfolio/tcl/dotfolio-users-procs.tcl 5 May 2005 08:51:31 -0000 1.1
+++ openacs-4/packages/dotfolio/tcl/dotfolio-users-procs.tcl 14 May 2005 14:27:44 -0000 1.2
@@ -92,4 +92,35 @@
return 0
}
-}
\ No newline at end of file
+ ad_proc html_list_of_advisers {} {
+
+ Returns a list of advisers formatted for an HTML form
+ SELECT control.
+
+ @return Returns a list of advisers formatted for an HTML form
+ SELECT control. Otherwise if there are no advisers on record,
+ then a link to the user admin page will be returned instead.
+ } {
+ set list_of_advisers ""
+ }
+
+ return $list_of_advisers
+ }
+
+}
Index: openacs-4/packages/dotfolio/www/admin/group-add-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio/www/admin/group-add-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio/www/admin/group-add-postgresql.xql 14 May 2005 14:27:44 -0000 1.1
@@ -0,0 +1,13 @@
+
+
+
+ postgresql7.4
+
+
+
+ INSERT INTO dotfolio_group_adviser_map (group_id, adviser_id)
+ VALUES (:group_id, :adviser_id)
+
+
+
+
Index: openacs-4/packages/dotfolio/www/admin/group-add.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio/www/admin/group-add.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio/www/admin/group-add.tcl 14 May 2005 14:27:44 -0000 1.1
@@ -0,0 +1,22 @@
+ad_page_contract {
+
+ Maps the specified adviser to a newly created group with the given
+ group name.
+
+ @author Nick Carroll (ncarroll@ee.usyd.edu.au)
+ @creation-date 2005-01-02
+ @version $Id: group-add.tcl,v 1.1 2005/05/14 14:27:44 ncarroll Exp $
+
+} {
+ group_name:notnull,trim
+ adviser_id:integer,notnull
+}
+
+# Create group with given group_name.
+set group_id [group::new -group_name $group_name group]
+
+# Use group_id from above and insert with adviser_id into
+# dotfolio_group_adviser_map.
+db_dml insert_group_adviser_ids {}
+
+ad_returnredirect "groups"
Index: openacs-4/packages/dotfolio/www/admin/group-del-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio/www/admin/group-del-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio/www/admin/group-del-postgresql.xql 14 May 2005 14:27:44 -0000 1.1
@@ -0,0 +1,12 @@
+
+
+
+ postgresql7.4
+
+
+
+ DELETE FROM dotfolio_group_adviser_map WHERE group_id = :group_id
+
+
+
+
Index: openacs-4/packages/dotfolio/www/admin/group-del.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio/www/admin/group-del.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio/www/admin/group-del.tcl 14 May 2005 14:27:44 -0000 1.1
@@ -0,0 +1,21 @@
+ad_page_contract {
+
+ Deletes the group matching the specified group_id.
+
+ @author Nick Carroll (ncarroll@ee.usyd.edu.au)
+ @creation-date 2005-01-02
+ @version $Id: group-del.tcl,v 1.1 2005/05/14 14:27:44 ncarroll Exp $
+
+} {
+ group_id:integer,notnull
+}
+
+db_transaction {
+ # Delete entry from dotfolio_group_adviser_map.
+ db_dml delete_group {}
+
+ # Delete group.
+ group::delete $group_id
+}
+
+ad_returnredirect "groups"
Index: openacs-4/packages/dotfolio/www/admin/groups-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio/www/admin/groups-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio/www/admin/groups-postgresql.xql 14 May 2005 14:27:44 -0000 1.1
@@ -0,0 +1,17 @@
+
+
+
+ postgresql7.4
+
+
+
+ SELECT groups.group_name,
+ dotfolio_users.last_name || ', ' ||
+ dotfolio_users.first_names AS adviser, groups.group_id
+ FROM groups, dotfolio_group_adviser_map, dotfolio_users
+ WHERE groups.group_id = dotfolio_group_adviser_map.group_id
+ AND dotfolio_group_adviser_map.adviser_id = dotfolio_users.user_id
+
+
+
+
Index: openacs-4/packages/dotfolio/www/admin/groups.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio/www/admin/groups.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio/www/admin/groups.adp 14 May 2005 14:27:44 -0000 1.1
@@ -0,0 +1,25 @@
+<%
+#
+# Copyright (C) 2005 WEG
+#
+# This file is part of dotFOLIO.
+#
+# dotFOLIO is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# dotFOLIO 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. See the GNU General Public License for more
+# details.
+#
+%>
+
+
+#dotfolio.groups#
+@context_bar;noquote@
+
+
+
+
Index: openacs-4/packages/dotfolio/www/admin/groups.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio/www/admin/groups.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotfolio/www/admin/groups.tcl 14 May 2005 14:27:44 -0000 1.1
@@ -0,0 +1,52 @@
+ad_page_contract {
+
+ Displays a list of groups. Each group must have at least one
+ adviser assigned to it.
+
+ @author Nick Carroll (ncarroll@ee.usyd.edu.au)
+ @creation-date 2005-01-02
+ @version $Id: groups.tcl,v 1.1 2005/05/14 14:27:44 ncarroll Exp $
+
+} -properties {
+ context_bar:onevalue
+}
+
+set context_bar [_ dotfolio.groups]
+
+db_multirow -extend {extra_form_part} groups select_groups {} {
+ set extra_form_part "#dotfolio.delete#"
+}
+
+template::list::create \
+ -name groups \
+ -multirow groups \
+ -no_data [_ dotfolio.no_groups_created] \
+ -elements {
+ group_name {
+ label "#dotfolio.group_name#"
+ display_template {
+ @groups.group_name;noquote@
+ }
+ }
+ adviser {
+ label "#dotfolio.adviser_role_pretty_name#"
+ display_template {
+ @groups.adviser;noquote@
+ }
+ }
+ extra_form_part {
+ display_template {
+ @groups.extra_form_part;noquote@
+ }
+ }
+ }
+
+set new_group_form_part_name "
"
+
+template::multirow append groups $new_group_form_part_name \
+ $new_group_form_part_adviser "" $new_group_form_part_button
+
+ad_return_template
Index: openacs-4/packages/dotfolio/www/admin/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotfolio/www/admin/index.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotfolio/www/admin/index.adp 5 May 2005 08:51:32 -0000 1.1
+++ openacs-4/packages/dotfolio/www/admin/index.adp 14 May 2005 14:27:44 -0000 1.2
@@ -29,6 +29,7 @@