Index: openacs-4/contrib/packages/portal/lib/configure-subsite-integration.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/configure-subsite-integration.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/contrib/packages/portal/lib/configure-subsite-integration.tcl 24 Mar 2004 00:03:36 -0000 1.3 +++ openacs-4/contrib/packages/portal/lib/configure-subsite-integration.tcl 26 Mar 2004 02:58:57 -0000 1.4 @@ -53,14 +53,19 @@ 1 {parameter::set_value \ -parameter DefaultMaster \ -package_id [ad_conn subsite_id] \ - -value /packages/acs-subsite/www/group-master + -value /packages/portal/lib/nested-tabbed-master parameter::set_value \ -parameter OurMasterTemplate \ -package_id [ad_conn package_id] \ - -value /packages/portal/lib/plain-master + -value /packages/portal/lib/nested-tabbed-master parameter::set_value \ + -parameter SiteMasterTemplate \ + -package_id [ad_conn package_id] \ + -value /www/site-master + + parameter::set_value \ -parameter NavbarClass \ -package_id [ad_conn package_id] \ -value subnavbar Index: openacs-4/contrib/packages/portal/lib/nested-tabbed-master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/nested-tabbed-master.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/portal/lib/nested-tabbed-master.adp 26 Mar 2004 02:58:57 -0000 1.1 @@ -0,0 +1,126 @@ + + + @title;noquote@ + + + @signatory;noquote@ + + + @focus;noquote@ + + + @header_stuff;noquote@ + + + +
+ @subsite_name@ + @subsite_name@ +
+ + + + + + + + Index: openacs-4/contrib/packages/portal/lib/nested-tabbed-master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/nested-tabbed-master.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/portal/lib/nested-tabbed-master.tcl 26 Mar 2004 02:58:57 -0000 1.1 @@ -0,0 +1,84 @@ +# Expects properties: +# title +# focus +# header_stuff +# section +# subnavbar_link + +if { ![info exists section] } { + set section {} +} + +if { ![info exists header_stuff] } { + set header_stuff {} +} + +if { ![info exists subnavbar_link] } { + set subnavbar_link {} +} + +if { ![info exists title] } { + set title "" +} + +set subsite_node_id [site_node::get_node_id_from_object_id -object_id [ad_conn subsite_id]] +set portal_url [lindex [site_node::get_children -node_id $subsite_node_id -package_key portal] 0] + +set package_id [site_node::get_object_id -node_id [site_node::get_node_id -url $portal_url]] +set package_node_id [site_node::get_node_id_from_object_id -object_id $package_id] +set portal_page_p 0 + +set user_portal_id [portal::get_user_portal_id -package_id $package_id] +set which_navbar [parameter::get -package_id $package_id -parameter NavbarClass] +set portal_url [site_node::get_url_from_object_id -object_id $package_id] +array set theme [portal::theme::get -theme_id [portal::get_theme_id -portal_id $user_portal_id]] +set theme_filename $theme(filename) +set theme_resource_dir $theme(resource_dir) +set master_template [parameter::get -package_id $package_id -parameter SiteMasterTemplate] + +db_multirow -unclobber -extend {url} portal_pages select_user_portal_pages {} { + set url [export_vars -base $portal_url {portal_id page_num}] + if { [string equal $url $portal_url] } { + set portal_page_p 1 + } +} + +if { [permission::permission_p \ + -object_id [portal::get_admin_portal_id -package_id $package_id] \ + -privilege admin] } { + db_multirow -unclobber -append -extend {url} portal_pages select_admin_portal_pages {} { + set url [export_vars -base $portal_url {portal_id page_num}] + if { [string equal $url $portal_url] } { + set portal_page_p 1 + } + } +} + +array set site_node [site_node::get_from_url \ + -url [ad_conn package_url] \ + -exact] + +if { $site_node(parent_id) == $package_node_id } { + set application $site_node(instance_name) +} elseif {$site_node(object_id) == $package_id } { + set portal_page_p 1 +} + + +# This will set 'sections' and 'subsections' multirows +subsite::define_pageflow -section $section +subsite::get_section_info -array section_info + +# Find the subsite we belong to +set subsite_url [site_node_closest_ancestor_package_url] +array set subsite_sitenode [site_node::get -url $subsite_url] +set subsite_node_id $subsite_sitenode(node_id) +set subsite_name $subsite_sitenode(instance_name) + +# Where to find the stylesheet +set css_url "/resources/acs-subsite/group-master.css" + +if { [string equal [ad_conn url] $subsite_url] } { + set subsite_url {} +} + Index: openacs-4/contrib/packages/portal/lib/nested-tabbed-master.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/nested-tabbed-master.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/portal/lib/nested-tabbed-master.xql 26 Mar 2004 02:58:57 -0000 1.1 @@ -0,0 +1,23 @@ + + + + + + + select name, sort_key as page_num, portal_id + from portal_pages + where portal_id = :user_portal_id + order by sort_key + + + + + + + select name, 0 as page_num, portal_id + from portals + where owner_id = :package_id + + + + Index: openacs-4/contrib/packages/portal/lib/plain-master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/plain-master.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/contrib/packages/portal/lib/plain-master.tcl 24 Mar 2004 00:03:36 -0000 1.3 +++ openacs-4/contrib/packages/portal/lib/plain-master.tcl 26 Mar 2004 02:58:57 -0000 1.4 @@ -13,6 +13,8 @@ -package_key portal \ -include_self] +ns_log Notice "Huh? package_id: $package_id" + set show_single_button_navbar_p [parameter::get \ -package_id $package_id \ -parameter ShowSingleButtonNavbar] @@ -39,6 +41,7 @@ -url [ad_conn package_url] \ -exact] +ns_log Notice "Huh? object_id: $site_node(object_id)" if { $site_node(object_id) != $package_id } { set application $site_node(instance_name) } Index: openacs-4/contrib/packages/portal/lib/tabbed-master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/tabbed-master.adp,v diff -u -r1.4 -r1.5 --- openacs-4/contrib/packages/portal/lib/tabbed-master.adp 19 Mar 2004 00:41:22 -0000 1.4 +++ openacs-4/contrib/packages/portal/lib/tabbed-master.adp 26 Mar 2004 02:58:57 -0000 1.5 @@ -39,7 +39,7 @@ - + - - - Index: openacs-4/contrib/packages/portal/lib/tabbed-master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/tabbed-master.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/contrib/packages/portal/lib/tabbed-master.tcl 21 Mar 2004 02:39:56 -0000 1.5 +++ openacs-4/contrib/packages/portal/lib/tabbed-master.tcl 26 Mar 2004 02:58:57 -0000 1.6 @@ -57,9 +57,6 @@ array set site_node [site_node::get_from_url \ -url [ad_conn package_url] \ -exact] -set foo [site_node::get_from_url \ - -url [ad_conn package_url] \ - -exact] if { $site_node(parent_id) == $package_node_id } { set application $site_node(instance_name)