Index: openacs-4/contrib/packages/portal/lib/render-portal.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/Attic/render-portal.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/portal/lib/render-portal.adp 17 Mar 2004 02:15:52 -0000 1.1 +++ openacs-4/contrib/packages/portal/lib/render-portal.adp 22 Mar 2004 01:57:35 -0000 1.2 @@ -1 +1 @@ - + Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/portal/lib/layouts/header3.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/portal/lib/layouts/header3.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/portal/lib/layouts/simple-element.adp'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/contrib/packages/portal/lib/layouts/simple1.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/layouts/Attic/simple1.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/portal/lib/layouts/simple1.adp 14 Mar 2004 01:16:30 -0000 1.1 +++ openacs-4/contrib/packages/portal/lib/layouts/simple1.adp 22 Mar 2004 01:57:37 -0000 1.2 @@ -18,23 +18,16 @@ %> - - - - - +
- -
+ + + + - -
+ + +
+
Index: openacs-4/contrib/packages/portal/lib/layouts/simple1.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/layouts/Attic/simple1.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/portal/lib/layouts/simple1.tcl 14 Mar 2004 01:16:30 -0000 1.1 +++ openacs-4/contrib/packages/portal/lib/layouts/simple1.tcl 22 Mar 2004 01:57:37 -0000 1.2 @@ -14,9 +14,11 @@ # details. # -# www/templates/simple2.tcl ad_page_contract { - @cvs_id $Id$ + This is a simple 1 column layout called from portal::render-page. + + @version $Id$ + } -properties { element_list:onevalue element_src:onevalue @@ -25,18 +27,6 @@ return_url:onevalue } -if { ![info exists action_string]} { - set action_string "" -} +array set elements $page(element_list) -if { ![info exists theme_id]} { - set theme_id "" -} - -if { ![info exists return_url]} { - set return_url "" -} - -portal::layout_elements $element_list - ad_return_template Index: openacs-4/contrib/packages/portal/lib/layouts/simple2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/layouts/Attic/simple2.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/portal/lib/layouts/simple2.adp 14 Mar 2004 01:16:30 -0000 1.1 +++ openacs-4/contrib/packages/portal/lib/layouts/simple2.adp 22 Mar 2004 01:57:37 -0000 1.2 @@ -19,38 +19,23 @@ %> - - - + +
- - -
-
-
- - -
-
-
+ + +
+
+
+ + +
+
+
Index: openacs-4/contrib/packages/portal/lib/layouts/simple2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/layouts/Attic/simple2.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/portal/lib/layouts/simple2.tcl 14 Mar 2004 01:16:30 -0000 1.1 +++ openacs-4/contrib/packages/portal/lib/layouts/simple2.tcl 22 Mar 2004 01:57:37 -0000 1.2 @@ -15,9 +15,7 @@ # ad_page_contract { - This is a simple 2 column layout called from portal::render and the like. - It laysout the elements with portal::layout_elements and hands off rendering - of the individual portlets to the template in the "element_src" var + This is a simple 2 column layout called from portal::render-page. @version $Id$ } -properties { @@ -28,18 +26,6 @@ return_url:onevalue } -if {![exists_and_not_null action_string]} { - set action_string "" -} +array set elements $page(element_list) -if {![exists_and_not_null theme_id]} { - set theme_id "" -} - -if {![exists_and_not_null return_url]} { - set return_url "" -} - -portal::layout_elements $element_list - ad_return_template Index: openacs-4/contrib/packages/portal/lib/layouts/simple3.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/layouts/Attic/simple3.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/portal/lib/layouts/simple3.adp 14 Mar 2004 01:16:30 -0000 1.1 +++ openacs-4/contrib/packages/portal/lib/layouts/simple3.adp 22 Mar 2004 01:57:37 -0000 1.2 @@ -18,54 +18,32 @@ %> - - + - - - + + +
- - -
-
-
- - -
-
-
- - -
-
-
+ + +
+
+
+ + +
+
+
+ + +
+
+
Index: openacs-4/contrib/packages/portal/lib/layouts/simple3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/layouts/Attic/simple3.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/portal/lib/layouts/simple3.tcl 14 Mar 2004 01:16:30 -0000 1.1 +++ openacs-4/contrib/packages/portal/lib/layouts/simple3.tcl 22 Mar 2004 01:57:37 -0000 1.2 @@ -15,13 +15,8 @@ # ad_page_contract { - This is a simple 3 column layout called from portal::render and the like. - It lays out the elements with portal::layout_elements and hands off - rendering of the individual portlets to the template in the - "element_src" var + This is a simple 3 column layout called from portal::render-page. - @author arjun@openforce.net - @author yon@openforce.net @version $Id$ } -properties { element_list:onevalue @@ -31,18 +26,6 @@ return_url:onevalue } -if {![exists_and_not_null action_string]} { - set action_string "" -} +array set elements $page(element_list) -if {![exists_and_not_null theme_id]} { - set theme_id "" -} - -if {![exists_and_not_null return_url]} { - set return_url "" -} - -portal::layout_elements $element_list - ad_return_template Index: openacs-4/contrib/packages/portal/lib/render-styles/all-in-one/render-element.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/render-styles/all-in-one/render-element.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/portal/lib/render-styles/all-in-one/render-element.tcl 14 Mar 2004 01:16:30 -0000 1.1 +++ openacs-4/contrib/packages/portal/lib/render-styles/all-in-one/render-element.tcl 22 Mar 2004 01:57:37 -0000 1.2 @@ -27,8 +27,6 @@ region:onevalue } -# we get element_id, action_string, theme_id, region, portal_id, - # Get all the good stuff we need to render this sucker array set element [portal::element::get_render_data -element_id $element_id] Index: openacs-4/contrib/packages/portal/lib/render-styles/all-in-one/render-page.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/render-styles/all-in-one/render-page.adp,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/portal/lib/render-styles/all-in-one/render-page.adp 21 Mar 2004 02:39:57 -0000 1.2 +++ openacs-4/contrib/packages/portal/lib/render-styles/all-in-one/render-page.adp 22 Mar 2004 01:57:37 -0000 1.3 @@ -4,11 +4,5 @@ f f - + Index: openacs-4/contrib/packages/portal/lib/render-styles/all-in-one/render-page.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/render-styles/all-in-one/render-page.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/portal/lib/render-styles/all-in-one/render-page.tcl 21 Mar 2004 02:39:57 -0000 1.2 +++ openacs-4/contrib/packages/portal/lib/render-styles/all-in-one/render-page.tcl 22 Mar 2004 01:57:37 -0000 1.3 @@ -31,7 +31,7 @@ } -array set page [portal::page::get_render_data -render_style all-in-one -page_id $page_id] +array set page [portal::page::get_render_data -render_style all-in-one -page_id $portal(page_id)] # This is a kludge for the admin portal ... themes should be a subsite not portal thin # anyway. Index: openacs-4/contrib/packages/portal/lib/render-styles/individual/render-element.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/render-styles/individual/render-element.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/portal/lib/render-styles/individual/render-element.adp 14 Mar 2004 01:16:30 -0000 1.1 +++ openacs-4/contrib/packages/portal/lib/render-styles/individual/render-element.adp 22 Mar 2004 01:57:37 -0000 1.2 @@ -19,9 +19,6 @@ %> - - - @element.name;noquote@ @element.resource_dir;noquote@ @element.element_id;noquote@ Index: openacs-4/contrib/packages/portal/lib/render-styles/individual/render-element.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/render-styles/individual/render-element.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/portal/lib/render-styles/individual/render-element.tcl 14 Mar 2004 01:16:30 -0000 1.1 +++ openacs-4/contrib/packages/portal/lib/render-styles/individual/render-element.tcl 22 Mar 2004 01:57:37 -0000 1.2 @@ -25,8 +25,4 @@ } -# we get element_id, action_string, theme_id, region, portal_id, -# edit_p, return_url, page_id, and layout_id from the layout_template - -# Get all the good stuff we need to render this sucker array set element [portal::element::get_render_data -element_id $element_id -edit_p $edit_p] Index: openacs-4/contrib/packages/portal/lib/render-styles/individual/render-page.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/render-styles/individual/render-page.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/portal/lib/render-styles/individual/render-page.adp 14 Mar 2004 01:16:30 -0000 1.1 +++ openacs-4/contrib/packages/portal/lib/render-styles/individual/render-page.adp 22 Mar 2004 01:57:37 -0000 1.2 @@ -1,9 +1,3 @@ - + Index: openacs-4/contrib/packages/portal/lib/render-styles/individual/render-page.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/render-styles/individual/render-page.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/portal/lib/render-styles/individual/render-page.tcl 14 Mar 2004 03:38:27 -0000 1.2 +++ openacs-4/contrib/packages/portal/lib/render-styles/individual/render-page.tcl 22 Mar 2004 01:57:37 -0000 1.3 @@ -23,13 +23,13 @@ This is intended to be included, not called directly, with the following parameters defined: - @param page_id The portal the page belongs to + @param portal The array describing the current portal (passed by reference) @author Don Baccus (dhogaza@pacifier.com) @creation-date 2004/01/24 @cvs_id $Id$ } -array set page [portal::page::get_render_data -render_style individual -page_id $page_id] +array set page [portal::page::get_render_data -render_style individual -page_id $portal(page_id)] set elements_exist_p [expr {[llength $page(element_list)] > 0}] Index: openacs-4/contrib/packages/portal/tcl/portal-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/tcl/portal-procs.tcl,v diff -u -r1.24 -r1.25 --- openacs-4/contrib/packages/portal/tcl/portal-procs.tcl 21 Mar 2004 02:39:57 -0000 1.24 +++ openacs-4/contrib/packages/portal/tcl/portal-procs.tcl 22 Mar 2004 01:57:38 -0000 1.25 @@ -326,35 +326,6 @@ return [array get portal] } - ad_proc -private layout_elements { - element_list - {var_stub "element_ids"} - } { - Split a list up into a bunch of variables for inserting into a - layout template. This seems pretty kludgy (probably because it is), - but a template::multirow isn't really well suited to data of this - shape. It'll setup a set of variables, $var_stub_1 - $var_stub_8 - and $var_stub_i1- $var_stub_i8, each contining the portal_ids that - belong in that region. - Ian Baker - - @param element_id_list An [array get]'d array, keys are regions, \ - values are lists of element_ids. - @param var_stub A name upon which to graft the bits that will be \ - passed to the template. - } { - array set elements $element_list - - foreach idx [list 1 2 3 4 5 6] { - upvar "${var_stub}_$idx" group - if { [info exists elements($idx) ] } { - set group $elements($idx) - } else { - set group {} - } - } - } - - ad_proc -public configure_dispatch { {-template_p f} {-portal_id:required} @@ -363,6 +334,9 @@ Dispatches the configuration operation. We get the target region number from the op. + DRB: This is only kept for the revert code at the moment, i.e. until I + get time to move it to the configure template where it belongs. + @param portal_id the portal to edit @param formdata an ns_set with all the formdata } { @@ -435,147 +409,11 @@ } } } - Rename { - portal::set_name \ - -portal_id $portal_id \ - -name [ns_set get $form new_name] - } - swap - - move { - portal::element::move \ - -element_id [ns_set get $form element_id] \ - -direction [ns_set get $form direction] - } - "Show Here" { - db_transaction { - portal::element::move_to_page \ - -page_id [ns_set get $form page_id] \ - -element_id [ns_set get $form element_id] \ - -region 1 - portal::element::set_state \ - -element_id [ns_set get $form element_id] \ - -state full - } - } - "Move to page" { - portal::element::move_to_page \ - -page_id [ns_set get $form page_id] \ - -element_id [ns_set get $form element_id] \ - -region 1 - } - hide { - set element_id_list [list] - - # iterate through the set, destructive! - while { [expr [ns_set find $form "element_id"] + 1 ] } { - lappend element_id_list [ns_set get $form "element_id"] - ns_set delkey $form "element_id" - } - - if {! [empty_string_p $element_id_list] } { - db_transaction { - foreach element_id $element_id_list { - db_dml hide_update {} - - # after hiding an element, add - # it to the _first_ page - # of the portal. - portal::element::move_to_page \ - -page_id [portal::page::get_id -portal_id $portal_id] \ - -element_id $element_id - } - } - } - } - "Change Theme" { - set_theme_id -portal_id $portal_id -theme_id [ns_set get $form theme_id] - } - "Add Page" { - set name [ns_set get $form name] - if {[empty_string_p $name]} { - ad_return_complaint 1 "You must enter a name for the new page." - } - portal::page::new -portal_id $portal_id -name $name - } - "Remove Empty Page" { - portal::page::delete -page_id [ns_set get $form page_id] - } - "Change Page Layout" { - portal::page::set_layout_id \ - -page_id [ns_set get $form page_id] \ - -layout_id [ns_set get $form layout_id] - } - "Rename Page" { - set name [ns_set get $form name] - set page_id [ns_set get $form page_id] - - if {[empty_string_p $name]} { - ad_return_complaint 1 "You must enter new name for the page." - } - portal::page::set_name -page_id $page_id -name $name - } - toggle_pinned { - set element_id [ns_set get $form element_id] - - if {[string equal [portal::element::get_state -element_id $element_id] full]} { - portal::element::pin -element_id $element_id - } else { - portal::element::unpin -element_id $element_id - } - } - toggle_shadeable { - set element_id [ns_set get $form element_id] - - if {[string equal [portal::element::get_shadeable_p -element_id $element_id] f]} { - portal::element::set_shadeable_p -element_id $element_id -shadeable_p t - } else { - portal::element::set_shadeable_p -element_id $element_id -shadeable_p f - } - } - toggle_hideable { - set element_id [ns_set get $form element_id] - - if {[string equal [portal::element::get_hideable_p -element_id $element_id] f]} { - portal::element::set_hideable_p -element_id $element_id -hideable_p t - } else { - portal::element::set_hideable_p -element_id $element_id -hideable_p f - } - } - default { - ns_log error "portal::configure_dispatch: bad op = $op!" - ad_return_complaint 1 "portal::configure_dispatch: bad op!\nop = $op" - } } } - # - # portal template procs - util and configuration - # + # DRB: This is only used by .LRN at the moment ... and oughtta disappear - ad_proc -public template_configure { - portal_id - return_url - } { - Just a wrapper for the configure proc. - - @param portal_id - @return A portal configuration page - } { - portal::configure -template_p "t" $portal_id $return_url - } - - ad_proc -public template_configure_dispatch { - portal_id - form - } { - Just a wrapper for the configure_dispatch proc - - @param portal_id - @param formdata an ns_set with all the formdata - } { - configure_dispatch -template_p "t" $portal_id $form - } - ad_proc -public navbar { {-portal_id:required} {-td_align "left"}