Index: openacs-4/packages/curriculum/lib/admin-curriculums.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum/lib/admin-curriculums.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/curriculum/lib/admin-curriculums.adp 15 Jun 2003 15:33:02 -0000 1.5 +++ openacs-4/packages/curriculum/lib/admin-curriculums.adp 17 Jun 2003 15:43:58 -0000 1.6 @@ -1,18 +1,14 @@ - -Available columns: -

@curriculums:columns@

-
- -

- I'm done now, update the bar for everyone! (Use sparingly) -

[ Package parameters | Package permissions ]

+ +

+ I'm done now, update the bar for everyone! (Use sparingly) +

@@ -22,8 +18,15 @@
NameMove
-
+
+ +# Single-curriculum notifications link. +set notification_link [curriculum::get_watch_link -curriculum_id $curriculums(curriculum_id)] +foreach { notification_url notification_label notification_title } $notification_link { + # Do nothing! +} +
@@ -40,7 +43,7 @@ @curriculums.pretty_state@ - [WF Actions] + @notification_label@ @@ -129,16 +132,17 @@
-
+
- - + +
  • No curriculums
  • -
    +
    +
  • Add a curriculum
  • -
    +
    Index: openacs-4/packages/curriculum/lib/admin-curriculums.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum/lib/admin-curriculums.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/curriculum/lib/admin-curriculums.tcl 15 Jun 2003 15:33:02 -0000 1.3 +++ openacs-4/packages/curriculum/lib/admin-curriculums.tcl 17 Jun 2003 15:43:58 -0000 1.4 @@ -49,6 +49,7 @@ set curriculum_id_export [export_vars -url curriculum_id] set element_id_export [export_vars -url element_id] + } set curriculum_count [curriculum::conn -nocache curriculum_count] Index: openacs-4/packages/curriculum/lib/curriculum-ave.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum/lib/curriculum-ave.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/curriculum/lib/curriculum-ave.tcl 15 Jun 2003 15:33:02 -0000 1.2 +++ openacs-4/packages/curriculum/lib/curriculum-ave.tcl 17 Jun 2003 15:43:58 -0000 1.3 @@ -27,6 +27,7 @@ #### permission::require_permission -object_id $package_id -privilege write + set write_p 1 set form_mode edit set title "Create Curriculum" @@ -124,7 +125,12 @@ # and then force the "edit_fields" into edit mode depending on wf status, etc. # This might be figured out by ad_form, e.g. if there exist any actions ... -ad_form -name curriculum -cancel_url $return_url -mode $form_mode -actions $actions -form { +ad_form -name curriculum \ + -cancel_url $return_url \ + -mode $form_mode \ + -actions $actions \ + -has_edit [expr !$write_p] \ + -form { curriculum_id:key {name:text {mode $element_mode} @@ -154,34 +160,26 @@ } } -if { !$new_p } { +if { !$new_p && $write_p } { - if { $write_p } { - # Extend the form with assignee widgets (only in edit or display mode). - workflow::case::role::add_assignee_widgets -case_id $case_id -form_name curriculum - - # FIXME. Get values for the role assignment widgets. - workflow::case::role::set_assignee_values -case_id $case_id -form_name curriculum - - # Set values for description field. - # Is before_html the right placement of this? Perhaps we should link - # to a different page where we show the case log? - element set_properties curriculum description \ - -before_html "[workflow::case::get_activity_html -case_id $case_id][ad_decode $action_id "" "" "

    $action_pretty_name by user_first_names user_last_name

    "]" - - } + # Extend the form with assignee widgets (only in edit or display mode). + workflow::case::role::add_assignee_widgets -case_id $case_id -form_name curriculum - # Single-curriculum notifications and "start over" link. + # FIXME. Get values for the role assignment widgets. + workflow::case::role::set_assignee_values -case_id $case_id -form_name curriculum + + # Set values for description field. + # Is before_html the right placement of this? Perhaps we should link + # to a different page where we show the case log? + element set_properties curriculum description \ + -before_html "[workflow::case::get_activity_html -case_id $case_id][ad_decode $action_id "" "" "

    $action_pretty_name by user_first_names user_last_name

    "]" + + # Single-curriculum notifications link. set notification_link [curriculum::get_watch_link -curriculum_id $curriculum_id] foreach { notification_url notification_label notification_title } $notification_link { # Do nothing! } - #set start_over_url "start-over?[export_vars -url curriculum_id]" - #set start_over_label "Restart this curriculum" - #set start_over_title "Clear all checkboxes in $curriculum_name" - - } # More fixed form elements Index: openacs-4/packages/curriculum/lib/element-ave.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum/lib/element-ave.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/curriculum/lib/element-ave.tcl 15 Jun 2003 15:33:02 -0000 1.2 +++ openacs-4/packages/curriculum/lib/element-ave.tcl 17 Jun 2003 15:43:58 -0000 1.3 @@ -26,6 +26,7 @@ #### permission::require_permission -object_id $curriculum_id -privilege write + set write_p 1 set form_mode edit set title "Add Element" Index: openacs-4/packages/curriculum/tcl/curriculum-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum/tcl/curriculum-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/curriculum/tcl/curriculum-procs.tcl 3 Jun 2003 10:28:20 -0000 1.1 +++ openacs-4/packages/curriculum/tcl/curriculum-procs.tcl 17 Jun 2003 15:43:59 -0000 1.2 @@ -73,7 +73,7 @@ -workflow_id [workflow::get_id -object_id $package_id -short_name [workflow_short_name]] \ -object_id $curriculum_id \ -comment $description \ - -comment_mime_type "text/plain" + -comment_mime_type $desc_format } return $curriculum_id @@ -308,8 +308,8 @@ edited { pretty_name "Edited" } - refused { - pretty_name "Refused" + rejected { + pretty_name "Rejected" } published { pretty_name "Published" @@ -670,11 +670,11 @@ -url $return_url \ -user_id $user_id \ -pretty_name "this curriculum"] - set label "Watch this curriculum" - set title "Request notifications for all activity on this curriculum" + set label "Watch" + set title "Request notifications for activity on this curriculum" } else { set url [notification::display::unsubscribe_url -request_id $request_id -url $return_url] - set label "Stop watching this curriculum" + set label "Stop watching" set title "Unsubscribe to notifications for activity on this curriculum" } return [list $url $label $title] Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/curriculum/www/TEST.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/curriculum/www/TODO.TXT =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum/www/Attic/TODO.TXT,v diff -u -r1.4 -r1.5 --- openacs-4/packages/curriculum/www/TODO.TXT 15 Jun 2003 15:33:25 -0000 1.4 +++ openacs-4/packages/curriculum/www/TODO.TXT 17 Jun 2003 15:44:00 -0000 1.5 @@ -1,10 +1,5 @@ TODO: -- Let the public access the curriculum-ave and element-ave - widgets, but prohibit them from adding/editing content... - Also, remove the workflow action buttons! -- Think about flushing "enabled rows" after publishing. - (maybe via a WF "side effect") - Assignees and notifications in workflow. - Documentation. - Optimize bar and admin page queries (compare with the @@ -24,7 +19,7 @@ Q: Register filter or proc upon adding of a subsite-external element to bring the current bar into the picture? -A: Maybe. +A: Nope! Solved with frames. DONE: @@ -56,3 +51,6 @@ a link instead, that the admin should hit when done admin'ing.) - Fix desc truncation and the "more" link on index page. (dbms_lob.instr() doesn't return the substr on Oracle ...) +- Let the public access the curriculum-ave and element-ave + widgets, but prohibit them from adding/editing content... + Also, remove the workflow action buttons!