Index: openacs-4/packages/logger/tcl/ui-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/logger/tcl/ui-procs.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/logger/tcl/ui-procs.tcl 22 Apr 2003 09:25:40 -0000 1.1
+++ openacs-4/packages/logger/tcl/ui-procs.tcl 1 May 2003 07:19:41 -0000 1.2
@@ -11,7 +11,8 @@
namespace eval logger::ui {}
ad_proc -public logger::ui::navbar_link_selected_p {
- navbar_url
+ navbar_url
+ param_list
} {
Return 1 if the navbar link with given URL (relative server URL) should be marked
@@ -20,7 +21,7 @@
A link is considered selected if the current page url starts with the url of the link
- followed by the optional slash, question mark and query string
+ and each HTML parameter in the param_list has the specified value.
@author Peter Marklund
@@ -33,7 +34,31 @@
regsub {} $selected_pattern $url_no_slash selected_pattern
set page_url [ad_conn url]
- set selected_p [regexp $selected_pattern $page_url match]
+ set url_matches_p [regexp $selected_pattern $page_url match]
+ set params_match_p 1
+ foreach {param_item} $param_list {
+ set param_name [lindex $param_item 0]
+ set param_value [lindex $param_item 1]
+
+ set actual_param_value [ns_set iget [rp_getform] $param_name]
+
+ ns_log Notice "pm debug param_name $param_name param_value $param_value actual_param_value $actual_param_value"
+ if { ![string equal $param_value $actual_param_value] } {
+ set params_match_p 0
+ break
+ }
+ }
+
+ if { [llength $param_list] == 0 && ![empty_string_p [ad_conn query]] } {
+ # The navbar link has no url parameters but there url parameters in the
+ # request. Don't consider the link selected
+ set params_match_p 0
+ }
+
+ set selected_p [expr $url_matches_p && $params_match_p]
+
+ ns_log Notice "pm debug url_no_slash $url_no_slash page_url $page_url selected_p $selected_p"
+
return $selected_p
}
Index: openacs-4/packages/logger/www/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/index.adp,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/logger/www/index.adp 30 Apr 2003 12:21:02 -0000 1.3
+++ openacs-4/packages/logger/www/index.adp 1 May 2003 07:20:16 -0000 1.4
@@ -27,7 +27,7 @@
@projects.name@
- @projects.name@
+ @projects.name@
+
@@ -52,7 +52,7 @@
- @variables.name@ (@variables.unit@)
+ @variables.name@ (@variables.unit@)
@variables.name@ (@variables.unit@)
@@ -91,7 +91,7 @@
- @users.first_names@ @users.last_name@
+ @users.first_names@ @users.last_name@
Index: openacs-4/packages/logger/www/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/index.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/logger/www/index.tcl 30 Apr 2003 12:21:02 -0000 1.3
+++ openacs-4/packages/logger/www/index.tcl 1 May 2003 07:20:16 -0000 1.4
@@ -181,7 +181,13 @@
and lppm.package_id = :package_id
order by lp.name
} {
- set url "index?[export_vars {{selected_project_id $project_id}}]"
+ # We always show the current user in the user filter so if we are showing "my entries" carry over the selected_user_id
+ # when selecting a project
+ set url_export_list {{selected_project_id $project_id}}
+ if { [string equal $selected_user_id $user_id] } {
+ lappend url_export_list selected_user_id
+ }
+ set url "index?[export_vars $url_export_list]"
set log_url "log?[export_vars { project_id {variable_id $selected_variable_id}}]"
}
@@ -257,7 +263,9 @@
acs_objects ao
where ao.object_id = le.entry_id
and submitter.user_id = ao.creation_user
- [ad_decode $where_clauses "" "" "and [join $where_clauses "\n and "]"]
+ and ([ad_decode $where_clauses "" "" "[join $where_clauses "\n and "]"]
+ or submitter.user_id = :user_id
+ )
group by submitter.user_id, submitter.first_names, submitter.last_name
" {
set url "index?[export_vars {{selected_user_id $user_id} {selected_project_id $selected_project_id} {selected_variable_id $selected_variable_id}}]"
Index: openacs-4/packages/logger/www/style.css
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/Attic/style.css,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/logger/www/style.css 30 Apr 2003 12:21:02 -0000 1.3
+++ openacs-4/packages/logger/www/style.css 1 May 2003 07:20:16 -0000 1.4
@@ -32,14 +32,19 @@
}
.logger_filter_bar_section_header {
font-weight: bold;
+ background-color: #bbbbff;
}
.logger_filter_bar {
background-color: #ddddff;
- float: left;
+ vertical-align: top;
width: 25%;
}
+.logger_filter_bar_selected_link {
+ font-weight: bold;
+}
+
.logger_body {
background-color: white;
valign: center;
Index: openacs-4/packages/logger/www/admin/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/admin/index.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/logger/www/admin/index.adp 22 Apr 2003 09:27:03 -0000 1.1
+++ openacs-4/packages/logger/www/admin/index.adp 1 May 2003 07:20:58 -0000 1.2
@@ -7,8 +7,9 @@
<% # Project table header %>
- | |