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 %> - - +
+ + @@ -17,12 +18,14 @@ <% # Project table rows %> - - + + @@ -44,15 +47,15 @@

Variables

-
  Project Name Project Description Active
@projects.name@ +
[ Delete ] - + onclick="return confirm('Are you sure you want to delete project @projects.name@?');">delete ] + @projects.name@ + @projects.description@ yesno @projects.project_lead_name@
- +
+ - + Index: openacs-4/packages/logger/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/admin/index.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/logger/www/admin/index.tcl 22 Apr 2003 09:27:03 -0000 1.1 +++ openacs-4/packages/logger/www/admin/index.tcl 1 May 2003 07:20:58 -0000 1.2 @@ -12,7 +12,9 @@ set home_url [ad_parameter -package_id [ad_acs_kernel_id] HomeURL] -db_multirow projects select_projects {} +db_multirow projects select_projects {} { + set description [string_truncate -len 50 $description] +} logger::package::variables_multirow Index: openacs-4/packages/logger/www/lib/nav-bar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/lib/Attic/nav-bar.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/logger/www/lib/nav-bar.tcl 30 Apr 2003 12:21:30 -0000 1.3 +++ openacs-4/packages/logger/www/lib/nav-bar.tcl 1 May 2003 07:21:18 -0000 1.4 @@ -1,5 +1,6 @@ # 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] @@ -9,30 +10,38 @@ # The links used in the navbar on format url1 label1 url2 label2 ... set link_list {} +# Log entries page +set index_urls [list "${package_url}" "${package_url}index"] +lappend link_list $index_urls +lappend link_list {} +lappend link_list "Log entries" + +# My log entrie page if { [ad_conn user_id] != 0 } { - lappend link_list "${package_url}" - lappend link_list "Log entries" + lappend link_list $index_urls + lappend link_list [list [list selected_user_id $user_id]] + lappend link_list "My log entries" } +# The admin index page if { $admin_p } { - lappend link_list "${package_url}admin/" + lappend link_list [list "${package_url}admin/"] + lappend link_list {} lappend link_list "Admin" } # Convert the list to a multirow and add the selected_p attribute multirow create links name url selected_p -foreach {url label} $link_list { - if { [regexp {/$} $url match] } { - # Index page - special case as we additionally need to check for a URL with - # the index word in it - set selected_p [expr [logger::ui::navbar_link_selected_p $url] || \ - [logger::ui::navbar_link_selected_p ${url}index]] - } else { - # Not an index page - set selected_p [logger::ui::navbar_link_selected_p $url] +foreach {url_list param_list label} $link_list { + set selected_p 0 + foreach url $url_list { + set selected_p [logger::ui::navbar_link_selected_p $url $param_list] + if { $selected_p } { + break + } } - multirow append links $label $url $selected_p + multirow append links $label "$url?[export_vars $param_list]" $selected_p } ad_return_template
Name Unit Additive
@variables.name@ @variables.unit@ yesno