Index: openacs-4/packages/logger/sql/postgresql/logger-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/sql/postgresql/logger-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/logger/sql/postgresql/logger-create.sql 8 Apr 2003 12:12:40 -0000 1.1 +++ openacs-4/packages/logger/sql/postgresql/logger-create.sql 7 May 2003 16:43:32 -0000 1.2 @@ -1,10 +1,10 @@ -- --- Logger Oracle data model +-- Logger Postgresql data model -- -- @author Lars Pind (lars@collaboraid.biz) -- @author Peter Marklund (peter@collaboraid.biz) --- @creation-date 2003-03-28 --- @auther Postgres Port by Dirk Gomez (openacs@dirkgomez.de) +-- @author Postgresql porting by Dirk Gomez (openacs@dirkgomez.de) +-- @creation-date 2003-05-07 \i logger-tables-create.sql \i logger-packages-create.sql Index: openacs-4/packages/logger/sql/postgresql/logger-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/sql/postgresql/logger-drop.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/logger/sql/postgresql/logger-drop.sql 8 Apr 2003 12:12:40 -0000 1.1 +++ openacs-4/packages/logger/sql/postgresql/logger-drop.sql 7 May 2003 16:43:32 -0000 1.2 @@ -1,10 +1,10 @@ -- --- Drop script for the Logger Oracle data model +-- Drop script for the Logger Postgresql data model -- -- @author Lars Pind (lars@collaboraid.biz) -- @author Peter Marklund (peter@collaboraid.biz) --- @creation-date 2003-03-31 - -- @auther Postgres Port by Dirk Gomez (openacs@dirkgomez.de) +-- @author Postgresql Porting by Dirk Gomez (openacs@dirkgomez.de) +-- @creation-date 2003-05-07 \i logger-tables-drop.sql \i logger-packages-drop.sql Index: openacs-4/packages/logger/sql/postgresql/logger-packages-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/sql/postgresql/logger-packages-create.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/logger/sql/postgresql/logger-packages-create.sql 25 Apr 2003 09:45:49 -0000 1.2 +++ openacs-4/packages/logger/sql/postgresql/logger-packages-create.sql 7 May 2003 16:43:32 -0000 1.3 @@ -1,138 +1,243 @@ -- --- Postgres packages for the Logger application +-- Postgresql packages for the Logger application -- -- @author Lars Pind (lars@collaboraid.biz) -- @author Peter Marklund (peter@collaboraid.biz) --- @creation-date 2003-04-03 --- @auther Postgres Port by Dirk Gomez (openacs@dirkgomez.de) +-- @author Postgresql porting by Dirk Gomez (openacs@dirkgomez.de) +-- @creation-date 2003-05-07 -create function logger_project__new (integer, varchar, varchar, integer, integer, varchar, integer) +----------- +-- +-- Projects +-- +----------- + +create or replace function logger_project__new (integer, + varchar, + varchar, + integer, + integer, + varchar, + integer) returns integer as ' declare - project_id alias for $1; -- default null - name alias for $2; - description alias for $3; -- default null - project_lead alias for $4; - creation_user alias for $5; - creation_ip alias for $6; -- default null - package_id alias for $7; + p_project_id alias for $1; + p_name alias for $2; + p_description alias for $3; + p_project_lead alias for $4; + p_creation_user alias for $5; + p_creation_ip alias for $6; + p_package_id alias for $7; - v_project_id integer; + v_project_id integer; begin v_project_id := acs_object__new( - project_id, + p_project_id, ''logger_project'', - package_id, - creation_ip, - creation_user + p_package_id, + p_creation_ip, + p_creation_user ); insert into logger_projects (project_id, name, description, project_lead) - values (v_project_id, name, description, project_lead); + values (v_project_id, p_name, p_description, p_project_lead); insert into logger_project_pkg_map (project_id, package_id) - values (v_project_id, logger_project.new.package_id); + values (v_project_id, p_package_id); return v_project_id; end; ' language 'plpgsql'; -create function logger_project__delete (integer) +create or replace function logger_project__del (integer) returns integer as ' declare - project_id alias for $1; + p_project_id alias for $1; + + v_rec record; begin -- Delete all entries in the project - for rec in (select entry_id - from logger_entries - where project_id = logger_project.delete.project_id - ) + for v_rec in (select entry_id + from logger_entries + where project_id = p_project_id + ) loop - logger_entry.delete(rec.entry_id); + logger_entry__del(v_rec.entry_id); end loop; -- Delete all variables only mapped to this project. - for rec in (select variable_id - from logger_variables - where exists (select 1 - from logger_project_pkg_map - where project_id = logger_project.delete.project_id - ) - and not exists (select 1 - from logger_project_pkg_map - where project_id <> logger_project.delete.project_id - ) - ) + for v_rec in (select variable_id + from logger_variables + where exists (select 1 + from logger_project_pkg_map + where project_id = p_project_id + ) + and not exists (select 1 + from logger_project_pkg_map + where project_id <> p_project_id + ) + ) loop - delete from logger_variables where variable_id = rec.variable_id; + logger_variable.del(v_rec.variable_id); end loop; -- Delete the project acs object. This will cascade the row in the logger_projects table -- as well as all projections in the project - acs_object.delete(project_id); + -- acs_object__delete should delete permissions for us but this change is not on cvs head yet + delete from acs_permissions where object_id = p_project_id; + perform acs_object__delete(p_project_id); end; ' language 'plpgsql'; -create function logger_project__name (integer) +create or replace function logger_project__name (integer) returns varchar as ' declare - project_id alias for $1; + p_project_id alias for $1; - v_name logger_projects.name%TYPE; + v_name varchar; begin select name into v_name from logger_projects - where project_id = name.project_id; + where project_id = p_project_id; return v_name; end; ' language 'plpgsql'; -create function logger_entry__new (integer, integer, integer, integer, date, varchar, integer, varchar, integer) +----------- +-- +-- Variables +-- +----------- + +create or replace function logger_variable__new(integer, + varchar, + varchar, + varchar, + integer, + integer, + integer) returns integer as ' declare - entry_id alias for $1; -- default null - project_id alias for $2; - variable_id alias for $3; - value alias for $4; - time_stamp alias for $5; - description alias for $6; -- default null - creation_user alias for $7; - creation_ip alias for $8; -- default null + p_variable_id integer alias for $1; + p_name varchar alias for $2; + p_unit varchar alias for $3; + p_type varchar alias for $4; + p_creation_user integer alias for $5; + p_creation_ip integer alias for $6; + p_package_id integer alias for $7; - v_entry_id integer; + v_variable_id integer; begin - v_entry_id := acs_object__new( - entry_id, - ''logger_entry'', - project_id, - creation_ip, - creation_user + v_variable_id := acs_object__new( + p_variable_id, + ''logger_variable'', + p_package_id, + p_creation_ip, + p_creation_user ); - - insert into logger_entries (entry_id, project_id, variable_id, value, - time_stamp, description) - values (v_entry_id, project_id, variable_id, value, time_stamp, description); - return v_entry_id; + insert into logger_variables (variable_id, name, unit, type, package_id) + values (v_variable_id, p_name, p_unit, p_type, p_package_id); + + return v_variable_id; end; ' language 'plpgsql'; -create function logger_entry__delete (integer) +create or replace function logger_variable__del (integer) returns integer as ' declare - entry_id alias for $1; -- default null + p_variable_id alias for $1; begin + -- Everything should be set up to cascade + -- acs_object__delete should delete permissions for us but this change is not on cvs head yet + delete from acs_permissions where object_id = p_variable_id; + perform acs_object__delete(p_variable_id); +end; ' language 'plpgsql'; + +create or replace function logger_variable__name (integer) +returns varchar as ' +declare + p_variable_id alias for $1; + + v_name varchar; +begin + selec name into v_name + from logger_entries + where variable_id = p_variable_id; + + return v_name; +end; ' language 'plpgsql'; + +----------- +-- +-- Entries +-- +----------- + +create or replace function logger_entry__new (integer, + integer, + integer, + real, + timestamptz, + varchar, + integer, + integer) +returns integer as ' +declare + p_entry_id alias for $1; + p_project_id alias for $2; + p_variable_id alias for $3; + p_value alias for $4; + p_time_stamp alias for $5; + p_description alias for $6; + p_creation_user alias for $7; + p_creation_ip alias for $8; + + v_entry_id integer; +begin + v_entry_id := acs_object__new( + p_entry_id, + ''logger_entry'', + p_project_id, + p_creation_ip, + p_creation_user + ); + + insert into logger_entries (entry_id, + project_id, + variable_id, + value, + time_stamp, + description) + values (v_entry_id, + p_project_id, + p_variable_id, + p_value, + p_time_stamp, + p_description); + + return v_entry_id; +end; ' language 'plpgsql'; + +create or replace function logger_entry__del (integer) +returns integer as ' +declare + p_entry_id alias for $1; +begin -- The row in the entries table will cascade - acs_object.delete(entry_id); + -- acs_object__delete should delete permissions for us but this change is not on cvs head yet + delete from acs_permissions where object_id = p_entry_id; + perform acs_object__delete(p_entry_id); end; ' language 'plpgsql'; -create function logger_entry__name (integer) +create or replace function logger_entry__name (integer) returns varchar as ' declare - v_name logger_projects.name%TYPE; - begin - -- TODO: Should we only return the say 20 first characters here? - select description into v_name - from logger_entries - where entry_id = logger_entry.name.entry_id; + p_entry_id alias for $1; - return v_name; + v_name varchar; +begin + select description into v_name + from logger_entries + where entry_id = p_entry_id; + + return v_name; end; ' language 'plpgsql'; Index: openacs-4/packages/logger/sql/postgresql/logger-packages-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/sql/postgresql/logger-packages-drop.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/logger/sql/postgresql/logger-packages-drop.sql 25 Apr 2003 09:45:49 -0000 1.2 +++ openacs-4/packages/logger/sql/postgresql/logger-packages-drop.sql 7 May 2003 16:43:32 -0000 1.3 @@ -3,11 +3,44 @@ -- -- @author Lars Pind (lars@collaboraid.biz) -- @author Peter Marklund (peter@collaboraid.biz) --- @creation-date 2003-03-28 +-- @creation-date 2003-05-07 +----------- +-- +-- Projects +-- +----------- drop function logger_project__new (integer, varchar, varchar, integer, integer, varchar, integer) ; -drop function logger_project__delete (integer) ; +drop function logger_project__del (integer) ; drop function logger_project__name (integer) ; -drop function logger_entry__new (integer, integer, integer, integer, date, varchar, integer, varchar, integer) ; -drop function logger_entry__delete (integer) ; + +----------- +-- +-- Variables +-- +----------- +drop function logger_variable__new(integer, + varchar, + varchar, + varchar, + integer, + integer, + integer); +drop function logger_variable__del (integer); +drop function logger_variable__name (integer); + +----------- +-- +-- Entries +-- +----------- +drop function logger_entry__new (integer, + integer, + integer, + real, + timestamptz, + varchar, + integer, + integer); +drop function logger_entry__del (integer) ; drop function logger_entry__name (integer) ; Index: openacs-4/packages/logger/sql/postgresql/logger-tables-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/sql/postgresql/logger-tables-create.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/logger/sql/postgresql/logger-tables-create.sql 25 Apr 2003 09:45:49 -0000 1.2 +++ openacs-4/packages/logger/sql/postgresql/logger-tables-create.sql 7 May 2003 16:43:32 -0000 1.3 @@ -1,8 +1,8 @@ --- Oracle tables for the Logger application +-- Postgresql tables for the Logger application -- -- @author Lars Pind (lars@collaboraid.biz) -- @author Peter Marklund (peter@collaboraid.biz) --- @creation-date 3:d of April 2003 +-- @creation-date 2003-05-07 create table logger_projects ( project_id integer @@ -13,12 +13,9 @@ on delete cascade, name varchar(1000), description varchar(4000), - active_p char(1) - default 't' + active_p boolean constraint logger_projects_ap_nn - not null - constraint logger_projects_ap_ck - check (active_p in ('t', 'f')), + not null, project_lead integer constraint logger_projects_pl_nn not null @@ -57,7 +54,6 @@ select inline_0 (); drop function inline_0 (); --- create table logger_project_pkg_map ( project_id integer constraint logger_project_pkg_map_pr_fk @@ -78,15 +74,21 @@ create table logger_variables ( variable_id integer constraint logger_variables_pk - primary key, + primary key + constraint logger_variables_pid_fk + references acs_objects(object_id) + on delete cascade, name varchar(200), unit varchar(200), type varchar(50) default 'additive' constraint logger_variables_type_nn not null constraint logger_variables_type_ck - check (type in ('additive', 'non-additive')) + check (type in ('additive', 'non-additive')), + package_id integer + constraint logger_project_var_map_pi_fk + references apm_packages(package_id) ); comment on column logger_variables.type is ' @@ -95,8 +97,31 @@ a project. A non-additive variable would be the amount of money in a bank account. '; -create sequence logger_variables_seq; +comment on column logger_variables.package_id is ' + The id of the package that the variable was created in. +'; +-- We make variables acs objects to be able to use permissions +create function inline_0 () +returns integer as ' +begin +PERFORM acs_object_type__create_type ( + ''logger_variable'', -- object_type + ''Logger variable'', -- pretty_name + ''Logger variables'', -- pretty_plural + ''acs_object'', -- supertype + ''logger_variables'', -- table_name + ''variable_id'', -- id_column + null, -- package_name + ''f'', -- abstract_p + null, -- type_extension_table + ''logger_variable.name'' -- name_method +); + return 0; +end;' language 'plpgsql'; +select inline_0 (); +drop function inline_0 (); + create table logger_project_var_map ( project_id integer constraint logger_project_var_map_pid_fk @@ -110,12 +135,9 @@ on delete cascade constraint logger_project_var_map_vid_nn not null, - primary_p char(1) - default 't' + primary_p boolean constraint logger_project_var_map_pp_nn - not null - constraint logger_project_var_map_pp_ck - check (primary_p in ('t', 'f')), + not null, constraint logger_project_var_map_un unique(project_id, variable_id) ); @@ -130,6 +152,8 @@ projection_id integer constraint logger_projections_pk primary key, + name varchar(1000), + description varchar(4000), project_id integer constraint logger_projections_pid_nn not null @@ -142,13 +166,13 @@ constraint logger_projections_vid_fk references logger_variables(variable_id) on delete cascade, - start_time date + start_time timestamptz constraint logger_projections_st_nn not null, - end_time date + end_time timestamptz constraint logger_projections_et_nn not null, - value integer + value real constraint logger_projections_value_nn not null ); @@ -181,11 +205,11 @@ constraint logger_entries_v_id_fk references logger_variables(variable_id) on delete cascade, - value integer + value real constraint logger_entries_value_nn not null, - time_stamp date - default now () + time_stamp timestamptz + default current_timestamp constraint logger_entries_ts_nn not null, description varchar(4000) @@ -212,13 +236,13 @@ PERFORM acs_object_type__create_type ( ''logger_entry'', -- object_type ''Logger entry'', -- pretty_name - ''Logger entries'', -- pretty_plural - ''acs_object'', -- supertype - ''logger_entries'', -- table_name + ''Logger entries'', -- pretty_plural + ''acs_object'', -- supertype + ''logger_entries'', -- table_name ''entry_id'', -- id_column - null, -- package_name - ''f'', -- abstract_p - null, -- type_extension_table + null, -- package_name + ''f'', -- abstract_p + null, -- type_extension_table ''logger_entry.name'' -- name_method ); return 0; Index: openacs-4/packages/logger/sql/postgresql/logger-tables-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/sql/postgresql/logger-tables-drop.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/logger/sql/postgresql/logger-tables-drop.sql 25 Apr 2003 09:45:49 -0000 1.2 +++ openacs-4/packages/logger/sql/postgresql/logger-tables-drop.sql 7 May 2003 16:43:32 -0000 1.3 @@ -1,12 +1,13 @@ -- Drop non-procedural data model of the Logger application. +-- -- NOTE: In general it is not a good idea to source sql drop scripts -- from the command line since such scripts may assume that any data in package instances -- has already been dropped by the APM through the before-uninstantiate callback. -- Use the /acs-admin/apm UI instead to delete packages. -- -- @author Lars Pind (lars@collaboraid.biz) -- @author Peter Marklund (peter@collaboraid.biz) --- @creation-date 3:d of April 2003 +-- @creation-date 2003-05-07 drop table logger_entries; @@ -30,8 +31,18 @@ drop table logger_variables; -drop sequence logger_variables_seq; +create function inline_0 () +returns integer as ' +begin + perform acs_object_type__drop_type ( + ''logger_variable'', ''f'' + ); + return null; +end;' language 'plpgsql'; +select inline_0(); +drop function inline_0 (); + drop table logger_project_pkg_map; drop table logger_projects; @@ -47,4 +58,3 @@ end;' language 'plpgsql'; select inline_0(); drop function inline_0 (); - Index: openacs-4/packages/logger/tcl/project-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/tcl/project-procs-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/logger/tcl/project-procs-postgresql.xql 22 Apr 2003 09:25:40 -0000 1.1 +++ openacs-4/packages/logger/tcl/project-procs-postgresql.xql 7 May 2003 16:43:36 -0000 1.2 @@ -22,7 +22,7 @@ begin - select logger_project__delete(:project_id); + select logger_project__del(:project_id); end; Index: openacs-4/packages/logger/tcl/variable-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/tcl/variable-procs-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/logger/tcl/variable-procs-postgresql.xql 7 May 2003 16:43:36 -0000 1.1 @@ -0,0 +1,30 @@ + + + + postgresql7.2 + + + + begin + select logger_variable__new ( + :variable_id, + :name, + :unit, + :type, + :creation_user, + :creation_ip, + :package_id + ); + end; + + + + + + begin + select logger_variable__del(:variable_id); + end; + + + + Index: openacs-4/packages/logger/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/index.adp,v diff -u -r1.7 -r1.8 --- openacs-4/packages/logger/www/index.adp 6 May 2003 17:36:53 -0000 1.7 +++ openacs-4/packages/logger/www/index.adp 7 May 2003 16:43:38 -0000 1.8 @@ -1,237 +1,77 @@ Logger Application - - - - - -
- - - -

+ + +
+ + + +

- - - - - + + + + + + - +
-

- Projects show all -

+
+ @filters.filter_name@ + + (clear) +
- - @projects.name@ + + +
+ @filters.name@ + @filters.name@ + + + + - - @projects.name@ - - - + -

- - -

- - - - + - - - - - - - - - - - - -
-

- Variables -

-
- - @variables.name@ (@variables.unit@) - - - @variables.name@ (@variables.unit@) - +

+ + + + + + + + + + +
+ Custom Date Range +
+ (YYYY-MM-DD) +
+ +
+

- - + - -
- No variables -
-

- - - -

- - - - - - - - - - - - - - - - - -
-

- Projections -

-
- - @projections.name@ - - - @projections.name@ - -
- No projections -
-

-
- - -

- - - - - - - - - - - - - - - - - -
-

- Users show all -

-
- - @users.first_names@ @users.last_name@ - - - - @users.first_names@ @users.last_name@ - -
- No users -
-

- - +
- - - - - - -
- - - Project: - @selected_project_name@ - - - Projects: - All - - -
- - - Variable: - @selected_variable_name@ - -
-
- - - Projection: - @selected_projection_name@ - -
-
- - - User: - @selected_user_name@ - - - Users: - All - -
- -
- -
- + start_date_ansi="@selected_start_date@" + end_date_ansi="@selected_end_date@"/>
- - - - - -

- Before anyone can start working with the Logger application an administrator needs to setup a project. -

- - -

- Since you are an administrator you may visit the admin pages to do so now. -

-
- -

- Please contact an administrator about this. Thank you. -

-
- - Index: openacs-4/packages/logger/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/index.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/logger/www/index.tcl 6 May 2003 17:36:53 -0000 1.7 +++ openacs-4/packages/logger/www/index.tcl 7 May 2003 16:43:38 -0000 1.8 @@ -9,12 +9,24 @@ {selected_variable_id:integer ""} {selected_projection_id:integer ""} {selected_user_id:integer ""} + {selected_start_date ""} + {selected_end_date ""} } set package_id [ad_conn package_id] set current_user_id [ad_conn user_id] set admin_p [permission::permission_p -object_id $package_id -privilege admin] +set filter_var_list { + selected_project_id + selected_variable_id + selected_projection_id + selected_user_id + selected_start_date + selected_end_date +} + + ########### # # Initialize project, variable, projection, and user names @@ -107,104 +119,88 @@ # Create the form set export_var_list {selected_project_id selected_variable_id selected_projection_id selected_user_id} ad_form -name time_filter -export $export_var_list -method GET -form { - - {start_date:date(date) - {label "Start day:"} + {start_date:text + {label "From"} + {html { style "font-size: 100%;" size 10 } } } - - {end_date:date(date) - {label "Start day:"} + {end_date:text + {label "To"} + {html { style "font-size: 100%;" size 10 } } } - -} -validate { - {start_date - { [template::util::date::compare $start_date $end_date] <= 0 } - "Start day must not be after end day" + {go:text(submit) + {label "Go"} + {html {style {font-size: 100%;}}} } +} -on_request { + set start_date $selected_start_date + set end_date $selected_end_date } -on_submit { - # error "on_submit" + if { ![catch { + set start_seconds [clock scan $start_date] + set end_seconds [clock scan $end_date] + }] } { + if { $start_seconds < $end_seconds } { + set selected_start_date [clock format $start_seconds -format "%Y-%m-%d"] + set selected_end_date [clock format $end_seconds -format "%Y-%m-%d"] + } else { + set selected_start_date [clock format $end_seconds -format "%Y-%m-%d"] + set selected_end_date [clock format $start_seconds -format "%Y-%m-%d"] + } + } + # Redirect so we get the dates in pretty mode + ad_returnredirect ".?[export_vars $filter_var_list]" + ad_script_abort } -########### -# -# Initialize dates -# -########### -if { [template::form is_request time_filter] } { - # Form was not submitted - if { ![empty_string_p $selected_projection_id] } { - # Projection selected - use the date range of that projection - set start_date_seconds [clock scan $projection_array(start_time)] - set end_date_seconds [clock scan $projection_array(end_time)] - } else { - # Use default date range - - # Default end date is now (today) - set end_date_seconds [clock seconds] - - # Default start date is N days back - set number_of_days_back 31 - set seconds_per_day [expr 60*60*24] - set start_date_seconds [expr $end_date_seconds - 31 * $seconds_per_day] - } - - set start_date_ansi [clock format $start_date_seconds -format "%Y-%m-%d"] - set end_date_ansi [clock format $end_date_seconds -format "%Y-%m-%d"] - - # Set the values of the start and end date in the form - regsub -all -- {-} $start_date_ansi { } start_date_list - regsub -all -- {-} $end_date_ansi { } end_date_list - element set_properties time_filter start_date \ - -value [eval template::util::date::create $start_date_list] - element set_properties time_filter end_date \ - -value [eval template::util::date::create $end_date_list] -} { - # Form was submitted - set start_date_value [template::element get_value time_filter start_date] - set end_date_value [template::element get_value time_filter end_date] - set start_date_ansi "[lindex $start_date_value 0]-[lindex $start_date_value 1]-[lindex $start_date_value 2]" - set end_date_ansi "[lindex $end_date_value 0]-[lindex $end_date_value 1]-[lindex $end_date_value 2]" -} - ########### # -# Select log entries -# -########### - -# template lib/entries-table is included - see adp - - -########### -# # Select projects # ########### -set all_projects_url "index?[export_vars {{selected_variable_id $selected_variable_id} {selected_user_id $selected_user_id}}]" +if { [exists_and_not_null selected_project_id] } { + set all_projects_url ".?[export_vars -exclude { selected_project_id } $filter_var_list]" +} else { + set all_projects_url {} +} -db_multirow -extend { url log_url } projects select_projects { - select lp.project_id, +set no_project_p 1 + +db_multirow -extend { filter_name url entry_add_url selected_p clear_url } filters select_projects { + select lp.project_id as unique_id, lp.name from logger_projects lp, logger_project_pkg_map lppm where lp.project_id = lppm.project_id and lppm.package_id = :package_id order by lp.name } { - # 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 $current_user_id] } { - lappend url_export_list selected_user_id + set filter_name "Projects" + + set url ".?[export_vars -override { { selected_project_id $unique_id } } $filter_var_list]" + set entry_add_url "log?[export_vars { { project_id $unique_id } {variable_id $selected_variable_id}}]" + set selected_p [string equal $selected_project_id $unique_id] + + set project_name_max_length 30 + if { [string length $name] > $project_name_max_length } { + set name "[string range $name 0 [expr $project_name_max_length - 4]]..." } - set url "index?[export_vars $url_export_list]" - set log_url "log?[export_vars { project_id {variable_id $selected_variable_id}}]" + + set clear_url $all_projects_url + + set no_project_p 0 } +if { $no_project_p } { + ad_return_template "no-projects" + return +} + + + ########### # # Select variables @@ -223,10 +219,9 @@ )" } -db_multirow -extend { url log_url } variables select_variables " - select lv.variable_id, - lv.name, - lv.unit +db_multirow -append -extend { filter_name url entry_add_url selected_p clear_url } filters select_variables " + select lv.variable_id as unique_id, + lv.name || ' (' || lv.unit || ')' as name from logger_variables lv, logger_projects lp, logger_project_var_map lpvm @@ -235,14 +230,17 @@ [ad_decode $where_clauses "" "" "and [join $where_clauses "\n and "]"] group by lv.variable_id, lv.name, lv.unit " { - set url "index?[export_vars {{selected_variable_id $variable_id} {selected_project_id $selected_project_id} {selected_user_id $selected_user_id}}]" + set filter_name "Variables" + set url ".?[export_vars -override { {selected_variable_id $unique_id} } $filter_var_list]" if { ![empty_string_p $selected_project_id] } { # A project is selected - enable logging - set log_url "log?[export_vars { variable_id {project_id $selected_project_id}}]" + set entry_add_url "log?[export_vars { { variable_id $unique_id } {project_id $selected_project_id}}]" } else { # No project selected - we wont enable those url:s - set log_url "" + set entry_add_url "" } + set selected_p [string equal $selected_variable_id $unique_id] + set clear_url {} } ########### @@ -251,7 +249,11 @@ # ########### -set all_users_url "index?[export_vars {{selected_variable_id $selected_variable_id} {selected_project_id $selected_project_id}}]" +if { [exists_and_not_null selected_user_id] } { + set all_users_url ".?[export_vars -exclude { selected_user_id } $filter_var_list]" +} else { + set all_users_url {} +} set where_clauses [list] if { ![empty_string_p $selected_project_id] } { @@ -268,21 +270,24 @@ )" } -db_multirow -extend { url } users select_users " - select submitter.user_id as user_id, - submitter.first_names as first_names, - submitter.last_name as last_name - from cc_users submitter, - logger_entries le, - acs_objects ao - where ao.object_id = le.entry_id - and submitter.user_id = ao.creation_user - and ([ad_decode $where_clauses "" "" "[join $where_clauses "\n and "]"] - or submitter.user_id = :current_user_id - ) - group by submitter.user_id, submitter.first_names, submitter.last_name +db_multirow -append -extend { filter_name url entry_add_url selected_p clear_url } filters select_users " + select submitter.user_id as unique_id, + submitter.first_names || ' ' || submitter.last_name as name + from cc_users submitter, + logger_entries le, + acs_objects ao + where ao.object_id = le.entry_id + and submitter.user_id = ao.creation_user + and ([ad_decode $where_clauses "" "" "[join $where_clauses "\n and "]"] + or submitter.user_id = :current_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}}]" + set filter_name "Users" + set url ".?[export_vars -override { {selected_user_id $unique_id} } $filter_var_list]" + set entry_add_url {} + set selected_p [string equal $selected_user_id $unique_id] + set clear_url $all_users_url } ########### @@ -300,6 +305,75 @@ where lpe.project_id = :selected_project_id and lpe.variable_id = :selected_variable_id } { - set url "index?[export_vars {{selected_projection_id $projection_id} {selected_user_id $selected_user_id} {selected_project_id $selected_project_id} {selected_variable_id $selected_variable_id}}]" + set url ".?[export_vars {{selected_projection_id $projection_id} {selected_user_id $selected_user_id} {selected_project_id $selected_project_id} {selected_variable_id $selected_variable_id}}]" } } + +##### +# +# Date filters +# +##### + +if { [exists_and_not_null selected_start_date] || [exists_and_not_null selected_end_date] } { + set date_clear_url ".?[export_vars -exclude { selected_start_date selected_end_date } $filter_var_list]" +} else { + set date_clear_url {} +} + +set custom_p [expr ![empty_string_p $date_clear_url]] + +set filter_name "Date" + +foreach type { this_week last_week past_7 this_month last_month past_30 } { + switch $type { + this_week { + set name "This week" + set new_start_date [clock format [clock scan "-[clock format [clock seconds] -format %w] days"] -format "%Y-%m-%d"] + set new_end_date [clock format [clock scan "[expr 6-[clock format [clock seconds] -format %w]] days"] -format "%Y-%m-%d"] + } + last_week { + set name "Last week" + set new_start_date [clock format [clock scan "[expr -7-[clock format [clock seconds] -format %w]] days"] -format "%Y-%m-%d"] + set new_end_date [clock format [clock scan "[expr -1-[clock format [clock seconds] -format %w]] days"] -format "%Y-%m-%d"] + } + past_7 { + set name "Past 7 days" + set new_start_date [clock format [clock scan "-1 week 1 day"] -format "%Y-%m-%d"] + set new_end_date [clock format [clock seconds] -format "%Y-%m-%d"] + } + this_month { + set name "This month" + set new_start_date [clock format [clock scan "[expr 1-[clock format [clock seconds] -format %d]] days"] -format "%Y-%m-%d"] + set new_end_date [clock format [clock scan "1 month -1 day" -base [clock scan $new_start_date]] -format "%Y-%m-%d"] + } + last_month { + set name "Last month" + set new_start_date [clock format [clock scan "-1 month [expr 1-[clock format [clock seconds] -format %d]] days"] -format "%Y-%m-%d"] + set new_end_date [clock format [clock scan "1 month -1 day" -base [clock scan $new_start_date]] -format "%Y-%m-%d"] + } + past_30 { + set name "Past 30 days" + set new_start_date [clock format [clock scan "-1 month 1 day"] -format "%Y-%m-%d"] + set new_end_date [clock format [clock seconds] -format "%Y-%m-%d"] + } + } + + set url ".?[export_vars -override { { selected_start_date $new_start_date } { selected_end_date $new_end_date }} $filter_var_list]" + + set selected_p [expr [string equal $selected_start_date $new_start_date] && [string equal $selected_end_date $new_end_date]] + + # if selected_p is set, we'll clear custom_p + set custom_p [expr $custom_p && !$selected_p] + + # unique_id name filter_name url entry_add_url selected_p clear_url + multirow append filters "" $name $filter_name $url "" $selected_p $date_clear_url +} + +# Custom +if { $custom_p } { + multirow append filters "" "Custom range" $filter_name "" "" $custom_p $date_clear_url +} + + + Index: openacs-4/packages/logger/www/log.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/log.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/logger/www/log.adp 6 May 2003 17:36:53 -0000 1.4 +++ openacs-4/packages/logger/www/log.adp 7 May 2003 16:43:38 -0000 1.5 @@ -1,18 +1,47 @@ @page_title@ @context@ +log_entry_form.value +
+ + + + + + + + + + + + + + +
+ Add Entry +
+ » + @variables.name@ +
+
+
+

+ » + Add new log entry +

+ -

Log History for last @log_history_n_days@ Days

+

Log history for the past @log_history_n_days@ days

+ start_date_ansi="@start_date_ansi@" + selected_entry_id="@entry_id_or_blank@" />
Index: openacs-4/packages/logger/www/log.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/log.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/logger/www/log.tcl 6 May 2003 17:36:53 -0000 1.5 +++ openacs-4/packages/logger/www/log.tcl 7 May 2003 16:43:38 -0000 1.6 @@ -41,11 +41,11 @@ # versus displaying/editing one if { [exists_and_not_null entry_id] } { # Initial request in display or edit mode or a submit of the form - set page_title "One Log Entry" - set ad_form_mode display + set page_title "Edit Log Entry" + set ad_form_mode edit } else { # Initial request in add mode - set page_title "Add a Log Entry" + set page_title "Add Log Entry" set ad_form_mode edit } @@ -207,4 +207,37 @@ set seconds_per_day [expr 60*60*24] set start_date_seconds [expr [clock seconds] - $log_history_n_days * $seconds_per_day] set start_date_ansi [clock format $start_date_seconds \ - -format "%Y-%m-%d"] \ No newline at end of file + -format "%Y-%m-%d"] + + +set add_entry_url "log?[export_vars { project_id variable_id }]" + +if { [info exists entry_id] } { + set entry_id_or_blank $entry_id +} else { + set entry_id_or_blank {} +} + + +##### +# +# Change variable +# +##### + +db_multirow -extend { url selected_p } variables select_variables { + select lv.variable_id as unique_id, + lv.name || ' (' || lv.unit || ')' as name + from logger_variables lv, + logger_projects lp, + logger_project_var_map lpvm + where lp.project_id = lpvm.project_id + and lv.variable_id = lpvm.variable_id + and lp.project_id = :project_id + group by lv.variable_id, lv.name, lv.unit +} { + set url "log?[export_vars -override { {variable_id $unique_id} } { project_id }]" + set selected_p [string equal $variable_id $unique_id] +} + + Index: openacs-4/packages/logger/www/no-projects.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/no-projects.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/logger/www/no-projects.adp 7 May 2003 16:43:38 -0000 1.1 @@ -0,0 +1,15 @@ +

+ Before anyone can start working with the Logger application an administrator needs to setup a project. +

+ + +

+ Since you are an administrator you may visit the admin pages to do so now. +

+
+ +

+ Please contact an administrator about this. Thank you. +

+
+ 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.4 -r1.5 --- openacs-4/packages/logger/www/style.css 1 May 2003 07:20:16 -0000 1.4 +++ openacs-4/packages/logger/www/style.css 7 May 2003 16:43:38 -0000 1.5 @@ -1,6 +1,8 @@ + .no_items_text { - font-style: italic; + font-style: italic; + font-family: tahoma,verdana,arial,helvetica; } .logger_explanation_text { @@ -17,15 +19,23 @@ } a.logger_navbar { color: white; + text-decoration: none; } +a.logger_navbar:visited { + color: white; +} a.logger_navbar:hover { color: white; text-decoration: underline; } -.logger_navbar_selected_link { - font-weight: bold; - color: white; +td.logger_navbar { + font-family: tahoma,verdana,arial,helvetica; + font-size: 70%; + font-weight: bold; + color: #ccccff; + text-decoration: none; } + .logger_filter_bar_header { font-weight: bold; text-align: center; @@ -38,7 +48,6 @@ .logger_filter_bar { background-color: #ddddff; vertical-align: top; - width: 25%; } .logger_filter_bar_selected_link { @@ -66,3 +75,88 @@ background-color: white; } +table.logger_listing { + font-family: tahoma, verdana, helvetica; + font-size: 85%; +} +table.logger_listing_tiny { + font-family: tahoma, verdana, helvetica; + font-size: 75%; +} +tr.logger_listing_header { + background-color: #cccccc; +} +tr.logger_listing_subheader { + background-color: #bbbbbb; + font-weight: bold; +} +tr.logger_listing_even { + background-color: #f0f0f0; +} +tr.logger_listing_spacer { + background-color: #f9f9f9; +} +tr.logger_listing_odd { + background-color: #e0e0e0; +} +td.logger_listing_narrow { + padding-left: 4px; + padding-right: 4px; +} +td.logger_listing { + padding-left: 16px; + padding-right: 16px; +} +th.logger_listing_narrow { + padding-left: 4px; + padding-right: 4px; +} +th.logger_listing { + padding-left: 16px; + padding-right: 16px; +} + +.logger_font { + font-family: tahoma,verdana,arial,helvetica; +} + +h1.logger { + font-family: verdana,arial,helvetica; +} +h2.logger { + font-family: verdana,arial,helvetica; +} +h3.logger { + font-family: verdana,arial,helvetica; +} +h4.logger { + font-family: verdana,arial,helvetica; +} + + +.logger_filter { + font-size: 70%; + font-family: tahoma,verdana,arial,helvetica; +} +tr.logger_filter_selected { + background-color: #eeeeff; +} +span.logger_filter_selected { + color: black; +} +.logger_filter_header { + font-size: 70%; + font-family: tahoma,verdana,arial,helvetica; + font-weight: bold; +} +.logger_filter_section { + font-size: 70%; + font-family: tahoma,verdana,arial,helvetica; + font-weight: bold; + background-color: #bbbbff; + padding-left: 4px; + padding-top: 4px; + padding-bottom: 4px; + margin-top: 0px; + margin-bottom: 8px; +} Index: openacs-4/packages/logger/www/admin/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/admin/index-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/logger/www/admin/index-postgresql.xql 7 May 2003 16:43:41 -0000 1.1 @@ -0,0 +1,25 @@ + + + + postgresql7.1 + + + + select lp.project_id, + lp.name, + lp.description, + lp.active_p, + lp.project_lead as project_lead_id, + cc_users.first_names || ' ' || cc_users.last_name as project_lead_name, + acs_permission__permission_p(lp.project_id, :user_id, 'admin') as admin_p + from logger_project_pkg_map lppm, + logger_projects lp, + cc_users + where lppm.project_id = lp.project_id + and lppm.package_id = :package_id + and cc_users.user_id = lp.project_lead + order by name + + + + 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.6 -r1.7 --- openacs-4/packages/logger/www/admin/index.adp 2 May 2003 08:35:23 -0000 1.6 +++ openacs-4/packages/logger/www/admin/index.adp 7 May 2003 16:43:41 -0000 1.7 @@ -2,34 +2,48 @@ @page_title@
-

Projects

+

Projects

<% # Project table header %> - - - - - - - +
 Project NameProject DescriptionActiveProject Lead
+ + + + + + + <% # Project table rows %> - - + + + + + - - - - + + + + @@ -42,31 +56,46 @@

- [ add new project ] + » Add project

-

Variables

+

Variables

-
 Project NameActiveProject LeadPermissions 
- [ permissions | - delete ] - + +
+ Edit @projects.name@ + + @projects.name@ @projects.description@yesno @projects.project_lead_name@YesNo @projects.project_lead_name@ + + Set + + + + Delete + +
- - - - - +
 NameUnitAdditive
+ + + + + + + - - + + + + + + + + + - - - @@ -78,11 +107,11 @@

- [ add new variable ] + » Add variable

-

Package

+

Package

- [ set permissions of this package ] + » Set permissions for this package

Index: openacs-4/packages/logger/www/admin/project.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/admin/project.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/logger/www/admin/project.tcl 2 May 2003 08:35:23 -0000 1.7 +++ openacs-4/packages/logger/www/admin/project.tcl 7 May 2003 16:43:41 -0000 1.8 @@ -53,11 +53,13 @@ project_id:key(acs_object_id_seq) {name:text - {html {size 50}} + {html {size 50}} + {label "Name"} } {description:text(textarea),optional {html {cols 60 rows 13}} + {label "Description"} } } -select_query { select name, Index: openacs-4/packages/logger/www/lib/entries-table.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/lib/Attic/entries-table.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/logger/www/lib/entries-table.adp 6 May 2003 17:37:28 -0000 1.2 +++ openacs-4/packages/logger/www/lib/entries-table.adp 7 May 2003 16:43:44 -0000 1.3 @@ -4,68 +4,76 @@ There are no matching log entries -
 NameUnitAdditivePermissions 
- [ permissions | + +
+ Edit + @variables.name@@variables.unit@YesNo + + Set + + + delete ] + onclick="return confirm('Are you sure you want to delete variable @variables.name@?');" + title="Delete variable">Delete @variables.name@@variables.unit@yesno
- - - - - - - - - - - - +
 ProjectUserDateVariableValueDescription
+ + + + + + + + - - - - + + - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + +
 ProjectUserDate@variable.name@Description 
@entries.action_links@@entries.project_name@
@entries.user_name@@entries.time_stamp@@entries.variable_name@@entries.value@ @entries.unit@@entries.description@
+ Edit + @entries.project_name@@entries.user_chunk@@entries.time_stamp_pretty@ + @entries.value@ + @entries.description@ + + Delete + +
Total:    @value_total@ @selected_variable_unit@ 
 Total@value_total@  
Projection:    @projection_value@ @selected_variable_unit@ 
 Projection@projection_value@  
    @variable.unit@  
Index: openacs-4/packages/logger/www/lib/entries-table.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/lib/Attic/entries-table.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/logger/www/lib/entries-table.tcl 6 May 2003 17:37:28 -0000 1.2 +++ openacs-4/packages/logger/www/lib/entries-table.tcl 7 May 2003 16:43:44 -0000 1.3 @@ -1,3 +1,14 @@ +# Displays list of log entries +# +# Expects: +# selected_project_id +# selected_variable_id +# selected_user_id +# selected_entry_id +# start_date_ansi +# end_date_ansi +# projection_value + set user_id [ad_conn user_id] set package_id [ad_conn package_id] @@ -15,9 +26,12 @@ )" } -if { ![info exists selected_variable_unit] } { - set selected_variable_unit "" -} +db_1row select_variable_info { + select name, + unit + from logger_variables + where variable_id = :selected_variable_id +} -column_array variable if { [exists_and_not_null selected_variable_id] } { lappend where_clauses "le.variable_id = :selected_variable_id" @@ -35,25 +49,27 @@ lappend where_clauses "le.time_stamp <= to_date(:end_date_ansi,'YYYY-MM-DD')" } +if { ![exists_and_not_null selected_entry_id] } { + set selected_entry_id {} +} + set value_total "0" -db_multirow -extend action_links entries select_entries " +db_multirow -extend { edit_url delete_url delete_onclick user_chunk selected_p } entries select_entries " select le.entry_id as id, acs_permission.permission_p(le.entry_id, :user_id, 'delete') as delete_p, le.time_stamp, - lv.name as variable_name, + to_char(le.time_stamp, 'fmMMfm-fmDDfm-YYYY') as time_stamp_pretty, le.value, - lv.unit, le.description, lp.name as project_name, + submitter.user_id, submitter.first_names || ' ' || submitter.last_name as user_name from logger_entries le, - logger_variables lv, logger_projects lp, acs_objects ao, cc_users submitter - where le.variable_id = lv.variable_id - and le.project_id = lp.project_id + where le.project_id = lp.project_id and ao.object_id = le.entry_id and ao.creation_user = submitter.user_id [ad_decode $where_clauses "" "" "and [join $where_clauses "\n and "]"] @@ -64,17 +80,23 @@ set description "[string range $description 0 [expr $description_max_length - 4]]..." } + set project_name_max_length 20 + if { [string length $project_name] > $project_name_max_length } { + set project_name "[string range $project_name 0 [expr $project_name_max_length - 4]]..." + } + + set selected_p [string equal $id $selected_entry_id] + set action_links_list [list] - lappend action_links_list "display" + set edit_url "log?[export_vars { { entry_id $id } }]" if { $delete_p } { - set onclick_script "return confirm('Are you sure you want to delete log entry with $value $unit $variable_name on $time_stamp?');" - lappend action_links_list "delete" - } - if { [llength $action_links_list] > 0 } { - set action_links "\[ [join $action_links_list " | "] \]" + set delete_onclick "return confirm('Are you sure you want to delete log entry with $value $variable(unit) $variable(name) on $time_stamp?');" + set delete_url "log-delete?[export_vars { { entry_id $id } }]" } else { - set action_links "" + set delete_url "" } + + set user_chunk [ad_present_user $user_id $user_name] set value_total [expr $value_total + $value] } Index: openacs-4/packages/logger/www/lib/master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/lib/Attic/master.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/logger/www/lib/master.adp 30 Apr 2003 12:21:30 -0000 1.2 +++ openacs-4/packages/logger/www/lib/master.adp 7 May 2003 16:43:44 -0000 1.3 @@ -1,7 +1,9 @@ @title@ @context@ +@focus@ + @header_stuff@ @@ -18,11 +20,3 @@ - - - - -
- Valid XHTML 1.0! -
Index: openacs-4/packages/logger/www/lib/master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/lib/Attic/master.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/logger/www/lib/master.tcl 22 Apr 2003 09:28:13 -0000 1.1 +++ openacs-4/packages/logger/www/lib/master.tcl 7 May 2003 16:43:44 -0000 1.2 @@ -1,3 +1,5 @@ if [template::util::is_nil context] { set context {}} -set package_url [ad_conn package_url] \ No newline at end of file +set package_url [ad_conn package_url] + +if { ![info exists header_stuff] } { set header_stuff {} } Index: openacs-4/packages/logger/www/lib/nav-bar.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/lib/Attic/nav-bar.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/logger/www/lib/nav-bar.adp 22 Apr 2003 09:28:13 -0000 1.1 +++ openacs-4/packages/logger/www/lib/nav-bar.adp 7 May 2003 16:43:44 -0000 1.2 @@ -4,16 +4,12 @@
-
+ - - @links.name@ - - - @links.name@ - -  |  +  |  + @links.name@ +   
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.4 -r1.5 --- openacs-4/packages/logger/www/lib/nav-bar.tcl 1 May 2003 07:21:18 -0000 1.4 +++ openacs-4/packages/logger/www/lib/nav-bar.tcl 7 May 2003 16:43:44 -0000 1.5 @@ -14,13 +14,17 @@ set index_urls [list "${package_url}" "${package_url}index"] lappend link_list $index_urls lappend link_list {} -lappend link_list "Log entries" +lappend link_list "List" # My log entrie page if { [ad_conn user_id] != 0 } { lappend link_list $index_urls lappend link_list [list [list selected_user_id $user_id]] - lappend link_list "My log entries" + lappend link_list "My Entries" + + lappend link_list [list "${package_url}log"] + lappend link_list {} + lappend link_list "Add Entry" } # The admin index page