Index: openacs-4/packages/project-manager/www/lib/master.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/lib/master.adp,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/project-manager/www/lib/master.adp 30 Apr 2005 06:59:35 -0000 1.2
+++ openacs-4/packages/project-manager/www/lib/master.adp 27 Jul 2005 19:01:02 -0000 1.3
@@ -13,12 +13,12 @@
-
+@navbar_list@
-
+
Index: openacs-4/packages/project-manager/www/lib/master.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/lib/master.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/project-manager/www/lib/master.tcl 30 Apr 2005 06:59:35 -0000 1.2
+++ openacs-4/packages/project-manager/www/lib/master.tcl 27 Jul 2005 19:01:02 -0000 1.3
@@ -4,4 +4,48 @@
if { ![info exists header_stuff] } { set header_stuff {} }
-if { ![info exists project_item_id] } { set project_item_id "" }
\ No newline at end of file
+if { ![info exists project_item_id] } { set project_item_id "" }
+
+# Set up links in the navbar that the user has access to
+
+set user_id [ad_conn user_id]
+set package_id [ad_conn package_id]
+set package_url [ad_conn package_url]
+set page_url [ad_conn url]
+set page_query [ad_conn query]
+
+if {[string is false [empty_string_p $page_query]]} {
+ set page_query "?$page_query"
+}
+
+set admin_p [permission::permission_p -object_id $package_id -privilege admin]
+
+# The links used in the navbar on format url1 label1 url2 label2 ...
+set link_list {}
+
+
+if { [ad_conn user_id] != 0} {
+ if { [empty_string_p $project_item_id] } {
+ lappend link_list [list "${package_url}tasks"]
+ } else {
+ lappend link_list [list [export_vars -base "${package_url}tasks" {{project_item_id}}]]
+ }
+
+ lappend link_list "[_ project-manager.Tasks]"
+
+ lappend link_list [list "${package_url}task-calendar"]
+ lappend link_list "[_ project-manager.Task_Calendar]"
+
+ lappend link_list [list "${package_url}?assignee_id=${user_id}"]
+ lappend link_list "[_ project-manager.Projects]"
+}
+
+if { $admin_p } {
+ lappend link_list [list "${package_url}admin/"]
+ lappend link_list "[_ project-manager.Admin]"
+}
+
+set navbar_list ""
+foreach {url title} $link_list {
+ lappend navbar_list [list "$url" "$title"]
+}