Index: openacs-4/packages/categories/www/categories-browse.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/categories/www/categories-browse.adp,v
diff -u -r1.4.2.1 -r1.4.2.2
--- openacs-4/packages/categories/www/categories-browse.adp 11 Sep 2013 18:40:25 -0000 1.4.2.1
+++ openacs-4/packages/categories/www/categories-browse.adp 8 Aug 2014 13:53:25 -0000 1.4.2.2
@@ -53,5 +53,4 @@
@dimension_bar;noquote@
-@items;noquote@
-
+
Index: openacs-4/packages/categories/www/categories-browse.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/categories/www/categories-browse.tcl,v
diff -u -r1.9.4.7 -r1.9.4.8
--- openacs-4/packages/categories/www/categories-browse.tcl 29 Jul 2014 10:56:36 -0000 1.9.4.7
+++ openacs-4/packages/categories/www/categories-browse.tcl 8 Aug 2014 13:53:25 -0000 1.9.4.8
@@ -2,7 +2,7 @@
Multi-dimensional browsing of selected category trees.
Shows a list of all objects mapped to selected categories
- using ad_table, ad_dimensional and paginator.
+ using list template, ad_dimensional and paginator.
@author Timo Hentschel (timo@timohentschel.de)
@cvs-id $Id:
@@ -64,14 +64,35 @@
}
}
-set table_def {
- {object_name "Object Name" {upper(n.object_name) $order} {
$object_name | }}
- {instance_name "Package" {} {$instance_name | }}
- {package_type "Package Type" {} r}
- {creation_date "Creation Date" {} r}
-}
+template::list::create -name items_list -multirow items \
+ -html {align center} \
+ -elements {
+ object_name {
+ label "Object Name"
+ display_template {
+ @items.object_name@
+ }
+ orderby {n.object_name}
+ }
+ instance_name {
+ label "Package"
+ display_template {
+ @items.instance_name@
+ }
+ html {align right}
+ }
+ package_type {
+ label "Package Type"
+ html {align right}
+ }
+ creation_date {
+ label "Creation Date"
+ html {align right}
+ }
+ } \
+ -filters {subtree_p {} letter {} tree_ids {}}
-set order_by_clause [ad_order_by_from_sort_spec $orderby $table_def]
+set order_by_clause [template::list::orderby_clause -orderby -name items_list]
set dimensional_def {
{subtree_p "Categorization" f {
@@ -145,7 +166,7 @@
set last_row [paginator get_row_last $p_name $page]
# execute query to get the objects on current page
- set items [ad_table -Torderby $orderby get_categorized_objects "" $table_def]
+ db_multirow items get_categorized_objects {} {}
}
db_dml delete_tmp_category_trees ""
Index: openacs-4/packages/categories/www/cadmin/category-usage.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/categories/www/cadmin/category-usage.adp,v
diff -u -r1.3 -r1.3.2.1
--- openacs-4/packages/categories/www/cadmin/category-usage.adp 20 May 2011 10:41:11 -0000 1.3
+++ openacs-4/packages/categories/www/cadmin/category-usage.adp 8 Aug 2014 13:53:25 -0000 1.3.2.1
@@ -36,5 +36,4 @@
-@items;noquote@
-
+
Index: openacs-4/packages/categories/www/cadmin/category-usage.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/categories/www/cadmin/category-usage.tcl,v
diff -u -r1.6.12.2 -r1.6.12.3
--- openacs-4/packages/categories/www/cadmin/category-usage.tcl 5 Aug 2014 13:23:45 -0000 1.6.12.2
+++ openacs-4/packages/categories/www/cadmin/category-usage.tcl 8 Aug 2014 13:53:25 -0000 1.6.12.3
@@ -39,14 +39,35 @@
set context_bar [category::context_bar $tree_id $locale [value_if_exists object_id]]
lappend context_bar "\"$category_name\" Usage"
-set table_def {
- {object_name "Object Name" {upper(n.object_name) $order} {
$object_name | }}
- {instance_name "Package" {} {$instance_name | }}
- {package_type "Package Type" {} r}
- {creation_date "Creation Date" {} r}
-}
+template::list::create -name items_list -multirow items \
+ -html {align center} \
+ -elements {
+ object_name {
+ label "Object Name"
+ display_template {
+ @items.object_name@
+ }
+ orderby {n.object_name}
+ }
+ instance_name {
+ label "Package"
+ display_template {
+ @items.instance_name@
+ }
+ html {align right}
+ }
+ package_type {
+ label "Package Type"
+ html {align right}
+ }
+ creation_date {
+ label "Creation Date"
+ html {align right}
+ }
+ } \
+ -filters {tree_id {} category_id {}}
-set order_by_clause [ad_order_by_from_sort_spec $orderby $table_def]
+set order_by_clause [template::list::orderby_clause -orderby -name items_list]
set p_name "category-usage"
request create
@@ -59,7 +80,7 @@
set last_row [paginator get_row_last $p_name $page]
# execute query to get the objects on current page
-set items [ad_table -Torderby $orderby get_objects_using_category "" $table_def]
+db_multirow items get_objects_using_category {} {}
paginator get_display_info $p_name info $page
set group [paginator get_group $p_name $page]