Index: openacs-4/packages/project-manager/lib/assignee-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/assignee-portlet.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/project-manager/lib/assignee-portlet.adp 28 Jul 2005 06:39:22 -0000 1.3 +++ openacs-4/packages/project-manager/lib/assignee-portlet.adp 28 Jul 2005 10:57:56 -0000 1.4 @@ -6,7 +6,6 @@ -   @@ -24,6 +23,5 @@ -   Index: openacs-4/packages/project-manager/lib/assignee-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/assignee-portlet.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/project-manager/lib/assignee-portlet.tcl 26 May 2005 09:34:27 -0000 1.1 +++ openacs-4/packages/project-manager/lib/assignee-portlet.tcl 28 Jul 2005 10:57:56 -0000 1.2 @@ -38,7 +38,6 @@ set assignee_edit_url [export_vars -base project-assign-edit {project_item_id return_url}] - db_multirow people project_people_query { } template::list::create \ Index: openacs-4/packages/project-manager/lib/categories-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/categories-portlet.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/project-manager/lib/categories-portlet.adp 28 Jul 2005 06:39:22 -0000 1.3 +++ openacs-4/packages/project-manager/lib/categories-portlet.adp 28 Jul 2005 10:57:56 -0000 1.4 @@ -19,7 +19,6 @@ -   \ No newline at end of file Index: openacs-4/packages/project-manager/lib/comments-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/comments-portlet.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/project-manager/lib/comments-portlet.adp 28 Jul 2005 06:39:22 -0000 1.2 +++ openacs-4/packages/project-manager/lib/comments-portlet.adp 28 Jul 2005 10:57:56 -0000 1.3 @@ -8,6 +8,5 @@
  • @comments_link;noquote@ -   \ No newline at end of file Index: openacs-4/packages/project-manager/lib/date-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/date-portlet.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/project-manager/lib/date-portlet.adp 28 Jul 2005 06:39:22 -0000 1.2 +++ openacs-4/packages/project-manager/lib/date-portlet.adp 28 Jul 2005 10:57:56 -0000 1.3 @@ -34,6 +34,5 @@ - Index: openacs-4/packages/project-manager/lib/forums-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/forums-portlet.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/project-manager/lib/forums-portlet.adp 28 Jul 2005 06:39:22 -0000 1.2 +++ openacs-4/packages/project-manager/lib/forums-portlet.adp 28 Jul 2005 10:57:56 -0000 1.3 @@ -5,7 +5,6 @@ -   \ No newline at end of file Index: openacs-4/packages/project-manager/lib/fs-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/fs-portlet.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/project-manager/lib/fs-portlet.adp 28 Jul 2005 06:39:22 -0000 1.4 +++ openacs-4/packages/project-manager/lib/fs-portlet.adp 28 Jul 2005 10:57:56 -0000 1.5 @@ -5,7 +5,6 @@ -   Index: openacs-4/packages/project-manager/lib/logger-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/logger-portlet.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/project-manager/lib/logger-portlet.adp 28 Jul 2005 06:39:22 -0000 1.2 +++ openacs-4/packages/project-manager/lib/logger-portlet.adp 28 Jul 2005 10:57:56 -0000 1.3 @@ -7,10 +7,9 @@ @variable_widget;noquote@ @variable_exports;noquote@ @day_widget;noquote@ - + -   @@ -28,6 +27,5 @@ project_manager_url="@pm_url;noquote@" return_url="@return_url;noquote@" /> -   \ No newline at end of file Index: openacs-4/packages/project-manager/lib/project-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/project-portlet.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/project-manager/lib/project-portlet.adp 28 Jul 2005 07:44:29 -0000 1.6 +++ openacs-4/packages/project-manager/lib/project-portlet.adp 28 Jul 2005 10:57:56 -0000 1.7 @@ -46,7 +46,6 @@ -   @@ -57,6 +56,5 @@ @project_links;noquote@ -   \ No newline at end of file Index: openacs-4/packages/project-manager/lib/selma-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/selma-portlet.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/project-manager/lib/selma-portlet.adp 28 Jul 2005 10:57:56 -0000 1.1 @@ -0,0 +1,12 @@ +
    +
    +
    +
    + +

    @portlet_title;noquote@

    + + +
    +
    +
    +
    Index: openacs-4/packages/project-manager/lib/subprojects.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/subprojects.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/project-manager/lib/subprojects.adp 28 Jul 2005 06:39:22 -0000 1.2 +++ openacs-4/packages/project-manager/lib/subprojects.adp 28 Jul 2005 10:57:56 -0000 1.3 @@ -6,7 +6,6 @@ -   @@ -17,6 +16,5 @@
  • -   \ No newline at end of file Index: openacs-4/packages/project-manager/lib/task-assignee-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/task-assignee-portlet.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/project-manager/lib/task-assignee-portlet.adp 28 Jul 2005 10:57:56 -0000 1.1 @@ -0,0 +1,22 @@ + +#project-manager.Assignees# + + + + + + + +
    + + +
    + +
    Index: openacs-4/packages/project-manager/lib/task-assignee-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/task-assignee-portlet.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/project-manager/lib/task-assignee-portlet.tcl 28 Jul 2005 10:57:56 -0000 1.1 @@ -0,0 +1,79 @@ +# packages/project-manager/lib/people.tcl +# +# List of assignees +# +# @author Malte Sussdorff (sussdorff@sussdorff.de) +# @creation-date 2005-05-01 +# @arch-tag: c3229143-2307-482b-9f72-e12bd256ac08 +# @cvs-id $Id: task-assignee-portlet.tcl,v 1.1 2005/07/28 10:57:56 maltes Exp $ + +foreach required_param {task_id} { + if {![info exists $required_param]} { + return -code error "[_ project-manager.lt_required_param_is_a_r]" + } +} +foreach optional_param {} { + if {![info exists $optional_param]} { + set $optional_param {} + } +} + +set user_id [auth::require_login] + +set assignee_add_self_widget "Add myself as
    [export_vars -form {{task_item_id $task_id} user_id return_url}][pm::role::task_select_list -select_name "role_id" -task_item_id $task_id -party_id $user_id]
    " + +# 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}] +} + +# People, using list-builder --------------------------------- + +template::list::create \ + -name people \ + -multirow people \ + -key item_id \ + -elements { + first_names { + label { + "[_ project-manager.Who]" + } + display_template { + @people.user_info@ + } + } + role_id { + label "[_ project-manager.Role]" + display_template "@people.one_line@" + } + } \ + -sub_class { + narrow + } \ + -filters { + party_id {} + task_id {} + orderby_depend_to {} + orderby_depend_from {} + } \ + -orderby { + default_value role_id,desc + first_names { + orderby_asc "first_names asc, last_name asc" + orderby_desc "first_names desc, last_name desc" + default_direction asc + } + role_id { + orderby_asc "role_id asc, user_info asc" + orderby_desc "role_id desc, user_info asc" + default_direction asc + } + default_value role_id,asc + } \ + -orderby_name orderby_people \ + -html { + width 100% + } + +db_multirow people task_people_query { } Index: openacs-4/packages/project-manager/lib/task-assignee-portlet.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/task-assignee-portlet.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/project-manager/lib/task-assignee-portlet.xql 28 Jul 2005 10:57:56 -0000 1.1 @@ -0,0 +1,34 @@ + + + + + + + + + + + + select + r.one_line, + u.first_names || ' ' || u.last_name as user_info, + r.role_id, + r.is_observer_p, + r.is_lead_p + from + pm_task_assignment a, + persons u, + pm_roles r + where + a.task_id = :task_id and + u.person_id = a.party_id and + a.role_id = r.role_id + and exists (select 1 from acs_object_party_privilege_map ppm + where ppm.object_id = a.task_id + and ppm.privilege = 'read' + and ppm.party_id = :user_id) + [template::list::orderby_clause -name people -orderby] + + + + \ No newline at end of file Index: openacs-4/packages/project-manager/lib/task-date-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/Attic/task-date-portlet.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/project-manager/lib/task-date-portlet.adp 28 Jul 2005 10:57:56 -0000 1.1 @@ -0,0 +1,37 @@ + +#project-manager.Dates# + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    #project-manager.Earliest_start#@task_info.earliest_start@ 
    #project-manager.Earliest_finish#@task_info.earliest_finish@
    #project-manager.Latest_start#@task_info.latest_start@
    #project-manager.Latest_finish#@task_info.latest_finish@
    #project-manager.Deadline_1#@task_info.end_date@
    +
    Index: openacs-4/packages/project-manager/lib/task-date-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/Attic/task-date-portlet.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/project-manager/lib/task-date-portlet.tcl 28 Jul 2005 10:57:56 -0000 1.1 @@ -0,0 +1,39 @@ +# packages/project-manager/lib/project-portlet.tcl +# +# Portlet for short project information +# +# @author Malte Sussdorff (sussdorff@sussdorff.de) +# @creation-date 2005-05-01 +# @arch-tag: c502a3ed-d1c0-4217-832a-6ccd86256024 +# @cvs-id $Id: task-date-portlet.tcl,v 1.1 2005/07/28 10:57:56 maltes Exp $ + +set user_id [auth::require_login] + +# terminology and other parameters +set project_term [_ project-manager.Project] +set use_goal_p [parameter::get -parameter "UseGoalP" -default "1"] +set use_project_code_p [parameter::get -parameter "UseUserProjectCodesP" -default "1"] + +# format the hours remaining section + +set task_info(hours_remaining) \ + [pm::task::hours_remaining \ + -estimated_hours_work $task_info(estimated_hours_work) \ + -estimated_hours_work_min $task_info(estimated_hours_work_min) \ + -estimated_hours_work_max $task_info(estimated_hours_work_max) \ + -percent_complete $task_info(percent_complete)] + +set task_info(days_remaining) \ + [pm::task::days_remaining \ + -estimated_hours_work $task_info(estimated_hours_work) \ + -estimated_hours_work_min $task_info(estimated_hours_work_min) \ + -estimated_hours_work_max $task_info(estimated_hours_work_max) \ + -percent_complete $task_info(percent_complete)] + +# format the dates according to the local settings +set task_info(earliest_start) [lc_time_fmt $task_info(earliest_start) "%x"] +set task_info(earliest_finish) [lc_time_fmt $task_info(earliest_finish) "%x"] +set task_info(latest_start) [lc_time_fmt $task_info(latest_start) "%x"] +set task_info(latest_finish) [lc_time_fmt $task_info(latest_finish) "%x"] +set task_info(end_date) [lc_time_fmt $task_info(end_date) "%x"] + Index: openacs-4/packages/project-manager/lib/task-dates-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/task-dates-portlet.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/project-manager/lib/task-dates-portlet.adp 28 Jul 2005 10:57:56 -0000 1.1 @@ -0,0 +1,38 @@ + +#project-manager.Dates# + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    #project-manager.Earliest_start#@task_info.earliest_start@ 
    #project-manager.Earliest_finish#@task_info.earliest_finish@
    #project-manager.Latest_start#@task_info.latest_start@
    #project-manager.Latest_finish#@task_info.latest_finish@
    #project-manager.Deadline_1#@task_info.end_date@
    +
     
    Index: openacs-4/packages/project-manager/lib/task-dependency-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/task-dependency-portlet.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/project-manager/lib/task-dependency-portlet.adp 28 Jul 2005 10:57:56 -0000 1.1 @@ -0,0 +1,21 @@ + +#project-manager.Dependencies# + + +

    + + + +

    + + + Index: openacs-4/packages/project-manager/lib/task-info-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/task-info-portlet.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/project-manager/lib/task-info-portlet.adp 28 Jul 2005 10:57:56 -0000 1.1 @@ -0,0 +1,85 @@ + + + + + + + + +
    + + + + + + + Edit + + + + Print + + + + Set permissions + + + + + + + + + + @task_term@ #@task_id@: @task_info.task_title@ + + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    #project-manager.Description#
    @task_info.description;noquote@
    @dynamic_attributes.name@
    @dynamic_attributes.value@
    -- @task_info.creation_user@
    #project-manager.Comments# +
    @comments;noquote@ +

    + @comments_link;noquote@ +

    #project-manager.Actions#
    + +
    + \ No newline at end of file Index: openacs-4/packages/project-manager/lib/task-info-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/task-info-portlet.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/project-manager/lib/task-info-portlet.tcl 28 Jul 2005 10:57:56 -0000 1.1 @@ -0,0 +1,45 @@ +# packages/project-manager/lib/project-portlet.tcl +# +# Portlet for short project information +# +# @author Malte Sussdorff (sussdorff@sussdorff.de) +# @creation-date 2005-05-01 +# @arch-tag: c502a3ed-d1c0-4217-832a-6ccd86256024 +# @cvs-id $Id: task-info-portlet.tcl,v 1.1 2005/07/28 10:57:56 maltes Exp $ + +set user_id [auth::require_login] +set urgency_threshold 8 +set task_term [_ project-manager.Task] +set task_term_lower [_ project-manager.task] + +set task_id $task_info(item_id) +set print_link "task-print?&task_id=$task_info(item_id)&project_item_id=$task_info(project_item_id)" + +# Set the link to the permissions page +set permissions_url "[site_node::closest_ancestor_package -package_key subsite]/permissions/one?[export_vars {{object_id $task_id}}]" + +# set link to comments + +set comments [general_comments_get_comments -print_content_p 1 -print_attachments_p 1 $task_id "[pm::task::get_url $task_id]"] + +set comments_link "[_ project-manager.Add_comment]" + +# ------------------ +# Dynamic Attributes +# ------------------ + +set form_attributes [list] +foreach element [dtype::form::metadata::widgets_list -object_type pm_task -exclude_static_p 1 -dform $task_info(dform)] { + lappend form_attributes [lindex $element 3] +} + +dtype::get_object -object_id $task_revision_id -object_type pm_task -array dattr -exclude_static + +multirow create dynamic_attributes name value +foreach attr [array names dattr] { + if {[lsearch -exact $form_attributes $attr] > -1} { + multirow append dynamic_attributes "[_ acs-translations.pm_task_$attr]" $dattr($attr) + } +} + + Index: openacs-4/packages/project-manager/lib/task-logger-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/task-logger-portlet.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/project-manager/lib/task-logger-portlet.adp 28 Jul 2005 10:57:56 -0000 1.1 @@ -0,0 +1,57 @@ + +#project-manager.Logger# + + + + + + + + + + + + + +
    + #project-manager.lt_Priority_task_infopri#
    + + #project-manager.lt_Days_remaining_task_i#
    +
    + + #project-manager.lt_Hours_remaining_task_#
    +
    + + #project-manager.Slack_na# + + + #project-manager.Slack# @task_info.slack_time@ +
    +
    + + #project-manager.lt_Slack_task_infoslack_#
    +
    + #project-manager.lt_Complete_task_infoper# +
     
    +
    + @variable_widget;noquote@ + @variable_exports;noquote@ + @day_widget;noquote@ + +
    +
     
    + +  
    Index: openacs-4/packages/project-manager/lib/task-logger-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/task-logger-portlet.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/project-manager/lib/task-logger-portlet.tcl 28 Jul 2005 10:57:56 -0000 1.1 @@ -0,0 +1,49 @@ +# packages/project-manager/lib/logger-portlet.tcl +# +# Portlet with logger information +# +# @author Malte Sussdorff (sussdorff@sussdorff.de) +# @creation-date 2005-05-02 +# @arch-tag: 568fcb7a-e58c-4c1a-901d-a51c9d2ffe44 +# @cvs-id $Id: task-logger-portlet.tcl,v 1.1 2005/07/28 10:57:56 maltes Exp $ + +foreach required_param {logger_project logger_days project_item_id pm_url return_url} { + if {![info exists $required_param]} { + return -code error "$required_param is a required parameter." + } +} +foreach optional_param {master} { + if {![info exists $optional_param]} { + set $optional_param {} + } +} + +set package_url [ad_conn package_url] + +# we can also get the link to the logger instance. +set logger_url [pm::util::logger_url] +set logger_project_url "$logger_url?project_id=$logger_project" + +if {![exists_and_not_null logger_variable_id]} { + set logger_variable_id [logger::project::get_primary_variable \ + -project_id $logger_project] +} + +set variable_widget [logger::ui::variable_select_widget \ + -project_id $logger_project \ + -current_variable_id $logger_variable_id \ + -select_name logger_variable_id] + +set variable_exports [export_vars -form -entire_form -exclude {logger_variable_id logger_days }] + +set log_url "${logger_url}log?project_id=$logger_project&pm_project_id=$project_item_id&return_url=$return_url&variable_id=$logger_variable_id" + + +set today_ansi [clock format [clock scan today] -format "%Y-%m-%d"] +set then_ansi [clock format [clock scan "-$logger_days days"] -format "%Y-%m-%d"] +set nextyear_ansi [clock format [clock scan "+ 365 day"] -format "%Y-%m-%d"] + +#set task_info(priority) $task_info_priority +#set task_info(hours_remaining) $task_info_hours_remaining +#set task_info(hours_remaining) $task_info_percent +set day_widget "[_ project-manager.lt_Last_input_typetext_n]" \ No newline at end of file Index: openacs-4/packages/project-manager/lib/tasks-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/tasks-portlet.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/project-manager/lib/tasks-portlet.adp 28 Jul 2005 06:39:22 -0000 1.2 +++ openacs-4/packages/project-manager/lib/tasks-portlet.adp 28 Jul 2005 10:57:56 -0000 1.3 @@ -4,14 +4,12 @@ @instance_html;noquote@ -   -   @@ -43,6 +41,5 @@ -   \ No newline at end of file Index: openacs-4/packages/project-manager/tcl/project-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/tcl/project-procs.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/project-manager/tcl/project-procs.tcl 10 Jun 2005 21:34:17 -0000 1.10 +++ openacs-4/packages/project-manager/tcl/project-procs.tcl 28 Jul 2005 10:57:56 -0000 1.11 @@ -1569,8 +1569,8 @@ @error } { - set project_id [application_data_link::get_linked -this_object_id $logger_project -to_object_type "pm_project"] - if {[empty_string_p $project_id]}�{ + set project_id [application_data_link::get_linked -from_object_id $logger_project -to_object_type "pm_project"] + if {[empty_string_p $project_id]} { return "no project" } else { return $project_id Index: openacs-4/packages/project-manager/www/one.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/one.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/project-manager/www/one.adp 6 Jun 2005 07:56:13 -0000 1.6 +++ openacs-4/packages/project-manager/www/one.adp 28 Jul 2005 10:57:56 -0000 1.7 @@ -10,77 +10,80 @@

    #project-manager.lt_not_current_set_live#

    - -

    - -

    - -

    - -

    - - -

    - - - - - -

    - -

    - -

    + + +
    - -

    - +

    - -

    - + src="/packages/project-manager/lib/date-portlet" + project_id="@project_id@" + project_item_id="@project_item_id@" + /> +

    - -

    - - - + src="/packages/project-manager/lib/assignee-portlet" + project_id="@project_id@" + project_item_id="@project_item_id@" + return_url="@return_url@" /> +

    + +

    + + +

    + + + + + +

    + +

    + +

    + + +

    + + + +

    + + + + + + \ No newline at end of file Index: openacs-4/packages/project-manager/www/task-one.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/task-one.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/project-manager/www/task-one.adp 27 Jul 2005 19:01:57 -0000 1.6 +++ openacs-4/packages/project-manager/www/task-one.adp 28 Jul 2005 10:57:56 -0000 1.7 @@ -33,105 +33,11 @@

    - - - - - - - - - - - - - - -
    - - - - - - - - - Edit - - - - Print - - - - Set permissions - - - - - - - - - @task_term@ #@task_id@: @task_info.task_title@ - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #project-manager.Description#
    @task_info.description;noquote@
    @dynamic_attributes.name@
    @dynamic_attributes.value@
    -- @task_info.creation_user@
    #project-manager.Comments# -
    @comments;noquote@ -

    - @comments_link;noquote@ -

    #project-manager.Actions#
    - -
    -
     
    +

    @@ -151,176 +57,36 @@ - - - - - - - - - - -
    - - #project-manager.Dates# - -
    - - - - - - - - - - - - - - - - - - - - + - - - - - - - -
    #project-manager.Earliest_start#@task_info.earliest_start@ 
    #project-manager.Earliest_finish#@task_info.earliest_finish@
    #project-manager.Latest_start#@task_info.latest_start@
    #project-manager.Latest_finish#@task_info.latest_finish@
    #project-manager.Deadline_1#@task_info.end_date@
    -
     

    - - - - - - - - - - - - - - - -
    - - #project-manager.Assignees# - -
    - -  
    - -  
    - -

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

    -

    - - - - - - - -
    - - #project-manager.Logger# - -
    - #project-manager.lt_Priority_task_infopri#
    - - #project-manager.lt_Days_remaining_task_i#
    -
    - - #project-manager.lt_Hours_remaining_task_#
    -
    - - #project-manager.Slack_na# - - - #project-manager.Slack# @task_info.slack_time@
    -
    - - #project-manager.lt_Slack_task_infoslack_#
    -
    - #project-manager.lt_Complete_task_infoper# -
     
    -
    - @variable_widget;noquote@ - @variable_exports;noquote@ - @day_widget;noquote@ - -
    -
     
    - -  
    +

    - - - -

    - - - -

    - - - + Index: openacs-4/packages/project-manager/www/task-one.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/task-one.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/project-manager/www/task-one.tcl 27 Jul 2005 19:01:57 -0000 1.8 +++ openacs-4/packages/project-manager/www/task-one.tcl 28 Jul 2005 10:57:56 -0000 1.9 @@ -87,8 +87,9 @@ #set write_p [permission::permission_p -object_id $task_id -privilege "write"] #set create_p [permission::permission_p -object_id $task_id -privilege "create"] +# Master for the portlets +set portlet_master "/packages/project-manager/lib/portlet" - # terminology and other parameters set task_term [_ project-manager.Task] set task_term_lower [_ project-manager.task] @@ -97,8 +98,9 @@ set project_term [_ project-manager.Project] set use_uncertain_completion_times_p [parameter::get -parameter "UseUncertainCompletionTimesP" -default "1"] + set use_days_p [parameter::get -parameter "UseDayInsteadOfHour" -default "t"] -set urgency_threshold 8 + # the unique identifier for this package set package_id [ad_conn package_id] set package_url [ad_conn package_url] @@ -118,29 +120,6 @@ db_1row task_query { } -column_array task_info -# format the hours remaining section - -set task_info(hours_remaining) \ - [pm::task::hours_remaining \ - -estimated_hours_work $task_info(estimated_hours_work) \ - -estimated_hours_work_min $task_info(estimated_hours_work_min) \ - -estimated_hours_work_max $task_info(estimated_hours_work_max) \ - -percent_complete $task_info(percent_complete)] - -set task_info(days_remaining) \ - [pm::task::days_remaining \ - -estimated_hours_work $task_info(estimated_hours_work) \ - -estimated_hours_work_min $task_info(estimated_hours_work_min) \ - -estimated_hours_work_max $task_info(estimated_hours_work_max) \ - -percent_complete $task_info(percent_complete)] - -# format the dates according to the local settings -set task_info(earliest_start) [lc_time_fmt $task_info(earliest_start) "%x"] -set task_info(earliest_finish) [lc_time_fmt $task_info(earliest_finish) "%x"] -set task_info(latest_start) [lc_time_fmt $task_info(latest_start) "%x"] -set task_info(latest_finish) [lc_time_fmt $task_info(latest_finish) "%x"] -set task_info(end_date) [lc_time_fmt $task_info(end_date) "%x"] - # we do this for the hours include portion set project_item_id $task_info(project_item_id) @@ -178,15 +157,7 @@ set process_html "" } -# set link to comments -set comments [general_comments_get_comments -print_content_p 1 -print_attachments_p 1 $task_id "[pm::task::get_url $task_id]"] - -set comments_link "[_ project-manager.Add_comment]" - -set print_link "task-print?&task_id=$task_id&project_item_id=$task_info(project_item_id)" - - # how to get back here set return_url [ad_return_url] @@ -203,18 +174,8 @@ set log_url [export_vars -base "${logger_url}log" -url {{project_id $logger_project} {pm_project_id $task_info(project_item_id)} {pm_task_id $task_id} return_url}] -set assignee_add_self_widget "Add myself as

    [export_vars -form {{task_item_id $task_id} user_id return_url}][pm::role::task_select_list -select_name "role_id" -task_item_id $task_id -party_id $user_id]
    " -# 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 the link to the permissions page -set permissions_url "[site_node::closest_ancestor_package -package_key subsite]/permissions/one?[export_vars {{object_id $task_id}}]" - -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"] set day_widget "[_ project-manager.Last] [_ project-manager.Days]" @@ -237,75 +198,7 @@ -url "[ad_conn url]?[ad_conn query]" \ ] -# ------------------ -# Dynamic Attributes -# ------------------ -set form_attributes [list] -foreach element [dtype::form::metadata::widgets_list -object_type pm_task -exclude_static_p 1 -dform $task_info(dform)] { - lappend form_attributes [lindex $element 3] -} - -dtype::get_object -object_id $task_revision_id -object_type pm_task -array dattr -exclude_static - -multirow create dynamic_attributes name value -foreach attr [array names dattr] { - if {[lsearch -exact $form_attributes $attr] > -1} { - multirow append dynamic_attributes "[_ acs-translations.pm_task_$attr]" $dattr($attr) - } -} - - -# People, using list-builder --------------------------------- - -template::list::create \ - -name people \ - -multirow people \ - -key item_id \ - -elements { - first_names { - label { - "[_ project-manager.Who]" - } - display_template { - @people.user_info@ - } - } - role_id { - label "[_ project-manager.Role]" - display_template "@people.one_line@" - } - } \ - -sub_class { - narrow - } \ - -filters { - party_id {} - task_id {} - orderby_depend_to {} - orderby_depend_from {} - } \ - -orderby { - default_value role_id,desc - first_names { - orderby_asc "first_names asc, last_name asc" - orderby_desc "first_names desc, last_name desc" - default_direction asc - } - role_id { - orderby_asc "role_id asc, user_info asc" - orderby_desc "role_id desc, user_info asc" - default_direction asc - } - default_value role_id,asc - } \ - -orderby_name orderby_people \ - -html { - width 100% - } - -db_multirow people task_people_query { } - ad_return_template # ------------------------- END OF FILE ------------------------- # Index: openacs-4/packages/project-manager/www/task-print.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/task-print.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/project-manager/www/task-print.tcl 26 May 2005 09:34:29 -0000 1.4 +++ openacs-4/packages/project-manager/www/task-print.tcl 28 Jul 2005 10:57:56 -0000 1.5 @@ -46,11 +46,13 @@ comments_link:onevalue } -validate { task_id_exists { + set user_id [ad_maybe_redirect_for_registration] if {![info exists task_id]} { set task_id [db_string get_task_id { }] } } revision_id_exists { + set user_id [ad_maybe_redirect_for_registration] if {![info exists task_revision_id]} { set task_revision_id [db_string get_revision_id { }] } @@ -60,6 +62,11 @@ # --------------------------------------------------------------- # +# the unique identifier for this package +set package_id [ad_conn package_id] +set user_id [ad_maybe_redirect_for_registration] + + # terminology set task_term [_ project-manager.Task] set task_term_lower [_ project-manager.task] @@ -71,11 +78,6 @@ set context_bar [ad_context_bar "one?project_item_id=$project_item_id $project_term" "[_ project-manager.View]"] - -# the unique identifier for this package -set package_id [ad_conn package_id] -set user_id [ad_maybe_redirect_for_registration] - set comments [general_comments_get_comments -print_content_p 1 -print_attachments_p 1 $task_id "[ad_conn url]?task_id=$task_id"] set comments_link [general_comments_create_link -object_name pm_task -link_text "Add a comment" -context_id $package_id $task_id "[ad_conn url]?task_id=$task_id"]