- - @assignee_add_self_widget;noquote@
+
+ - @assignee_add_self_widget;noquote@
+
- Remove myself
Index: openacs-4/contrib/packages/project-manager/www/one.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/one.tcl,v
diff -u -r1.30.2.15 -r1.30.2.16
--- openacs-4/contrib/packages/project-manager/www/one.tcl 17 Dec 2004 22:58:08 -0000 1.30.2.15
+++ openacs-4/contrib/packages/project-manager/www/one.tcl 20 Dec 2004 19:48:30 -0000 1.30.2.16
@@ -191,10 +191,17 @@
set log_url "${logger_url}log?project_id=$project(logger_project)&pm_project_id=$project_item_id&return_url=$return_url&variable_id=$logger_variable_id"
-set assignee_add_self_widget "Add myself as "
+# There is no point showing an empty listbox, which happens if the user assigns all roles to himself. Doing it this way avoids another trip to the database.
+set select_list_html [pm::role::project_select_list -select_name "role_id" -project_item_id $project_item_id -party_id $user_id]
+if {[string compare $select_list_html ""]} {
+ set assignee_add_self_widget "Add myself as "
+ set roles_listbox_p 1
+} else {
+ set roles_listbox_p 0
+}
# Only need a 'remove myself' link if you are already assigned
-set assigned_p [pm::project::assigned_p -project_item_id $project_item_id]
+set assigned_p [pm::project::assigned_p -project_item_id $project_item_id -party_id $user_id]
if {$assigned_p} {
set assignee_remove_self_url [export_vars -base project-assign-remove {project_item_id user_id return_url}]
}
Index: openacs-4/contrib/packages/project-manager/www/project-assign-add.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/project-assign-add.tcl,v
diff -u -r1.1.2.1 -r1.1.2.2
--- openacs-4/contrib/packages/project-manager/www/project-assign-add.tcl 2 Jul 2004 23:13:49 -0000 1.1.2.1
+++ openacs-4/contrib/packages/project-manager/www/project-assign-add.tcl 20 Dec 2004 19:48:30 -0000 1.1.2.2
@@ -1,4 +1,4 @@
-#
+#
ad_page_contract {
Index: openacs-4/contrib/packages/project-manager/www/task-one.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-one.adp,v
diff -u -r1.23.2.11 -r1.23.2.12
--- openacs-4/contrib/packages/project-manager/www/task-one.adp 25 Nov 2004 01:16:08 -0000 1.23.2.11
+++ openacs-4/contrib/packages/project-manager/www/task-one.adp 20 Dec 2004 19:48:30 -0000 1.23.2.12
@@ -198,7 +198,9 @@
|
|
|
Index: openacs-4/contrib/packages/project-manager/www/task-one.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-one.tcl,v
diff -u -r1.24.2.12 -r1.24.2.13
--- openacs-4/contrib/packages/project-manager/www/task-one.tcl 25 Nov 2004 01:16:08 -0000 1.24.2.12
+++ openacs-4/contrib/packages/project-manager/www/task-one.tcl 20 Dec 2004 19:48:30 -0000 1.24.2.13
@@ -193,11 +193,16 @@
set log_url [export_vars -base "${logger_url}log" {{return_url $return_url} {project_id $logger_project} {pm_project_id $task_info(project_item_id)} {pm_task_id $task_id}}]
-set assignee_add_self_widget "Add myself as "
+set assignee_add_self_widget "Add myself as "
-set assignee_remove_self_url [export_vars -base task-assign-remove {{task_item_id $task_id} user_id return_url}]
+# Only need a 'remove myself' link if you are already assigned
+set assigned_p [pm::task::assigned_p -task_item_id $task_id -party_id $user_id]
+if {$assigned_p} {
+ set assignee_remove_self_url [export_vars -base task-assign-remove {{task_item_id $task_id} user_id return_url}]
+}
+
set nextyear_ansi [clock format [clock scan "+ 365 day"] -format "%Y-%m-%d"]
set then_ansi [clock format [clock scan "-$logger_days days"] -format "%Y-%m-%d"]