Index: openacs-4/packages/acs-subsite/acs-subsite.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/acs-subsite.info,v
diff -u -r1.117.2.23 -r1.117.2.24
--- openacs-4/packages/acs-subsite/acs-subsite.info 23 Jan 2017 13:16:26 -0000 1.117.2.23
+++ openacs-4/packages/acs-subsite/acs-subsite.info 24 Jan 2017 09:35:26 -0000 1.117.2.24
@@ -9,7 +9,7 @@
t
t
-
+
OpenACS
Subsite
2015-10-04
@@ -18,7 +18,7 @@
GPL
3
-
+
Index: openacs-4/packages/acs-subsite/catalog/acs-subsite.en_US.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/catalog/acs-subsite.en_US.ISO-8859-1.xml,v
diff -u -r1.92.6.4 -r1.92.6.5
--- openacs-4/packages/acs-subsite/catalog/acs-subsite.en_US.ISO-8859-1.xml 23 Jan 2017 13:16:26 -0000 1.92.6.4
+++ openacs-4/packages/acs-subsite/catalog/acs-subsite.en_US.ISO-8859-1.xml 24 Jan 2017 09:35:26 -0000 1.92.6.5
@@ -582,6 +582,7 @@
Upload Portrait
URL
URL folder name
+ Usage
User name
User Portrait
User Portraits
Index: openacs-4/packages/acs-subsite/www/admin/themes/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/themes/index.tcl,v
diff -u -r1.1.2.1 -r1.1.2.2
--- openacs-4/packages/acs-subsite/www/admin/themes/index.tcl 23 Jan 2017 13:16:26 -0000 1.1.2.1
+++ openacs-4/packages/acs-subsite/www/admin/themes/index.tcl 24 Jan 2017 09:35:26 -0000 1.1.2.2
@@ -26,15 +26,22 @@
name {
label "[_ acs-subsite.Name]"
}
+ usage_count {
+ label "[_ acs-subsite.Usage]"
+ html {style "text-align: center;"}
+
+ }
active_p {
label "[_ acs-subsite.Active_theme]"
display_template {
-
+
-
+
}
@@ -54,7 +61,8 @@
-
+
Save new
@@ -63,7 +71,7 @@
delete {
sub_class narrow
display_template {
-
+
}
@@ -86,7 +94,9 @@
streaming_head StreamingHead
}
-db_multirow -extend {active_p modified_p} themes select_themes {} {
+set package_keys '[join [subsite::package_keys] ',']'
+
+db_multirow -extend {active_p modified_p delete_p usage_count} themes select_themes {} {
set active_p [expr {$currentThemeKey eq $key}]
set modified_p 0
if {$active_p} {
@@ -97,6 +107,14 @@
}
}
}
+ set usage_count [db_string count_theme_usages [subst {
+ select count(*)
+ from apm_parameters p, apm_parameter_values v
+ where p.parameter_name = 'ThemeKey'
+ and p.package_key in ($package_keys)
+ and p.parameter_id = v.parameter_id
+ and v.attr_value = :key
+ }]]
}