Index: openacs-4/packages/xowiki/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/admin/index.tcl,v diff -u -r1.31 -r1.32 --- openacs-4/packages/xowiki/www/admin/index.tcl 9 May 2018 15:33:34 -0000 1.31 +++ openacs-4/packages/xowiki/www/admin/index.tcl 3 Sep 2024 15:37:55 -0000 1.32 @@ -1,23 +1,36 @@ ::xowiki::Package initialize -ad_doc { - This is the admin page for the package. It displays all of the types + This is the admin page for the package. It displays all of the types of wiki pages provides links to delete them @author Gustaf Neumann neumann@wu-wien.ac.at @cvs-id $Id$ } -parameter { - {-object_type ::xowiki::Page} + {-object_type:token ::xowiki::Page} } set context [list] set pretty_plural [$object_type set pretty_plural] set title [_ xowiki.admin_all_title] +set CSSToolkit [::xowiki::CSS toolkit] +if {$CSSToolkit eq "bootstrap"} { + template::head::add_css -href urn:ad:css:bootstrap3 +} +template::head::add_css \ + -href urn:ad:css:xowiki-$CSSToolkit + + set object_types [$object_type object_types] set return_url [ns_conn url] -set category_url [export_vars -base [$package_id package_url] { {manage-categories 1} {object_id $package_id}}] +set category_url [export_vars -base [::$package_id package_url] { {manage-categories 1} {object_id $package_id}}] +set parameter_page [parameter::get -package_id $package_id -parameter "parameter_page" -default ""] +set extra_action [expr {$parameter_page ne "" + ? [subst {Action new -label "Parameter Page" -url "[::$package_id package_url]/$parameter_page"}] + : ""}] + lang::message::lookup "" xowiki.admin " " TableWidget t1 -volatile \ -actions [subst { @@ -26,9 +39,10 @@ -url $category_url Action new -label [_ acs-subsite.Parameters] -url \ [export_vars -base /shared/parameters {package_id return_url}] + $extra_action Action new -label [_ xowiki.export] -url export Action new -label [_ xowiki.import] -url import - Action new -label [_ acs-subsite.Permissions] -url [export_vars -base permissions {package_id}] + Action new -label [_ acs-subsite.Permissions] -url permissions }] \ -columns { Field create object_type -label [_ xowiki.page_type] @@ -56,14 +70,14 @@ set add_title "" set add_href "" set pretty_plural [$object_type pretty_plural] - if {[catch {set n [db_list count [$object_type instance_select_query \ + if {[catch {set n [::xo::dc list count [$object_type instance_select_query \ -folder_id [::$package_id set folder_id] \ -count 1 -with_subtypes false]]}]} { set n - set delete_title [_ xowiki.delete_all_items] } else { set add_title [_ xotcl-core.add [list type [$object_type pretty_name]]] - set add_href [$package_id make_link -with_entities 0 $package_id edit-new object_type return_url autoname] + set add_href [::$package_id make_link -with_entities 0 $package_id edit-new object_type return_url autoname] set delete_title [_ xowiki.delete_all_instances] } t1 add \