Index: openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl,v diff -u -r1.263 -r1.264 --- openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 18 May 2010 08:10:47 -0000 1.263 +++ openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 29 May 2010 10:47:43 -0000 1.264 @@ -113,13 +113,72 @@ #my msg "--after render" } + # + # set up template variables + # + set autoname [$page_package_id get_parameter autoname 0] + set object_type [$page_package_id get_parameter object_type [my info class]] + set rev_link [$page_package_id make_link -with_entities 0 [self] revisions] + + if {[$context_package_id query_parameter m ""] eq "edit"} { + set view_link [$page_package_id make_link -with_entities 0 [self] view return_url] + set edit_link "" + } else { + set edit_link [$page_package_id make_link -with_entities 0 [self] edit return_url] + set view_link "" + } + set delete_link [$page_package_id make_link -with_entities 0 [self] delete return_url] + if {[my exists __link(new)]} { + set new_link [my set __link(new)] + } else { + set new_link [my new_link $page_package_id] + } + + set admin_link [$context_package_id make_link -privilege admin -link admin/ $context_package_id {} {}] + set index_link [$context_package_id make_link -privilege public -link "" $context_package_id {} {}] + + # the menubar is work in progress + set mb "" + if {$mb ne ""} { + # + # Define menubar + # + + set mb [::xowiki::Menubar create ::__xowiki__MenuBar -id menubar] + $mb add_menu -name Package -label xowiki + $mb add_menu -name File + $mb add_menu -name Edit + $mb add_menu_item -menu Package -name Startpage -item [list text #xowiki.index# url $index_link] + $mb add_menu_item -menu Package -name Admin -item [list text #xowiki.admin# url $admin_link] + $mb add_menu_item -menu File -name New -item [list text #xowiki.new# url $new_link] + $mb add_menu_item -menu File -name Delete -item [list text #xowiki.delete# url $delete_link] + $mb add_menu_item -menu Edit -name EditPage -item [list text #xowiki.edit# url $edit_link] + $mb add_menu_item -menu Edit -name Revisions -item [list text #xowiki.revisions# url $rev_link] + + my msg "$mb created" + } + + # + # setup top includeletes and footers + # + set footer [my htmlFooter -content $content] set top_includelets "" set vp [string trim [$context_package_id get_parameter "top_includelet" ""]] if {$vp ne "" && $vp ne "none"} { set top_includelets [my include $vp] } + + if {$mb ne ""} { + #set content [$mb render-yui]$content + append top_includelets \n [$mb render-yui] + set left_side "