Index: openacs-4/packages/acs-templating/acs-templating.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/acs-templating.info,v
diff -u -r1.66.2.35 -r1.66.2.36
--- openacs-4/packages/acs-templating/acs-templating.info	5 Oct 2022 09:41:20 -0000	1.66.2.35
+++ openacs-4/packages/acs-templating/acs-templating.info	22 Oct 2022 17:47:18 -0000	1.66.2.36
@@ -9,7 +9,7 @@
     <implements-subsite-p>f</implements-subsite-p>
     <inherit-templates-p>t</inherit-templates-p>
 
-    <version name="5.10.1d17" url="http://openacs.org/repository/download/apm/acs-templating-5.10.1d17.apm">
+    <version name="5.10.1d18" url="http://openacs.org/repository/download/apm/acs-templating-5.10.1d18.apm">
         <owner url="http://openacs.org">OpenACS</owner>
         <summary>Templating library.</summary>
         <release-date>2021-09-15</release-date>
@@ -27,7 +27,7 @@
         <license>GPL version 2</license>
         <maturity>3</maturity>
 
-        <provides url="acs-templating" version="5.10.1d17"/>
+        <provides url="acs-templating" version="5.10.1d18"/>
         <requires url="acs-kernel" version="5.10.0"/>
         <requires url="acs-tcl" version="5.10.1d21"/>
 
Index: openacs-4/packages/acs-templating/tcl/style-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/style-procs.tcl,v
diff -u -r1.1.2.10 -r1.1.2.11
--- openacs-4/packages/acs-templating/tcl/style-procs.tcl	21 Oct 2022 08:40:22 -0000	1.1.2.10
+++ openacs-4/packages/acs-templating/tcl/style-procs.tcl	22 Oct 2022 17:47:18 -0000	1.1.2.11
@@ -28,6 +28,29 @@
     return $toolkit
 }
 
+ad_proc ::template::icon::name {-iconset name} {
+
+    Return for the provided generic name the name in the specified or
+    current iconset the name mapping. This function is necessary in
+    boundary cases, where e.g. a display_template passes the generic
+    name of the icon via template variables which have to be
+    @-substituted before adp-tag resolution, which performs the
+    regular icon name mapping (otherwise, the tag resolver receives
+    e.g. ...name=@icon@...)
+
+    @param iconset
+    @param name
+    @return mapped icon name or the passed in generic name
+} {
+    if {![info exists iconset]} {
+        set iconset [template::iconset]
+    }
+    if {[dict exists $::template::icon::map $iconset $name]} {
+        set name [dict get $::template::icon::map $iconset $name]
+    }
+    return $name
+}
+
 ad_proc -private template::iconset {-subsite_id} {
 
     Return the configured or derived icon set.  Potential results are
@@ -135,13 +158,14 @@
             set template {<img class='$class' src='$name' height='16' width='16' title='$title' alt='$alt' style='border:0; $styleAtt'>}
         }
     }
+    ns_log notice "RETURN  HTML [subst -nocommands $template] cmd $cmd]"
     return [list HTML [subst -nocommands $template] cmd $cmd]
 }
 
 namespace eval ::template::icon {
     set ::template::icon::map {
         bootstrap-icons {
-            add-new-item plus-circle
+            add-new-item         plus-circle
             checkbox-checked     check2-square
             checkbox-unchecked   square
             edit                 pencil-square
Index: openacs-4/packages/file-storage/file-storage.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/file-storage.info,v
diff -u -r1.60.2.23 -r1.60.2.24
--- openacs-4/packages/file-storage/file-storage.info	26 Jun 2022 19:28:27 -0000	1.60.2.23
+++ openacs-4/packages/file-storage/file-storage.info	22 Oct 2022 17:47:18 -0000	1.60.2.24
@@ -7,7 +7,7 @@
     <initial-install-p>f</initial-install-p>
     <singleton-p>f</singleton-p>
 
-    <version name="5.10.1d2" url="http://openacs.org/repository/download/apm/file-storage-5.10.1d2.apm">
+    <version name="5.10.1d3" url="http://openacs.org/repository/download/apm/file-storage-5.10.1d3.apm">
         <owner url="http://openacs.org">OpenACS</owner>
         <summary>Collaborative document storage</summary>
         <release-date>2021-09-15</release-date>
@@ -17,12 +17,12 @@
         <maturity>2</maturity>
         <package_instance_name>#file-storage.file-storage#</package_instance_name>
 
-        <provides url="file-storage" version="5.10.1d2"/>
+        <provides url="file-storage" version="5.10.1d3"/>
         <requires url="acs-kernel" version="5.10.0"/>
         <requires url="acs-tcl" version="5.10.1d9"/>
         <requires url="acs-content-repository" version="5.10.0"/>
         <requires url="acs-automated-testing" version="5.10.1d2"/>
-        <requires url="acs-templating" version="5.10.0"/>
+        <requires url="acs-templating" version="5.10.1d18"/>
         <requires url="acs-lang" version="5.10.0"/>
 
         <requires url="categories" version="1.1.3"/>
Index: openacs-4/packages/file-storage/www/folder-chunk.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/folder-chunk.tcl,v
diff -u -r1.61.2.14 -r1.61.2.15
--- openacs-4/packages/file-storage/www/folder-chunk.tcl	20 Oct 2022 19:08:00 -0000	1.61.2.14
+++ openacs-4/packages/file-storage/www/folder-chunk.tcl	22 Oct 2022 17:47:18 -0000	1.61.2.15
@@ -368,7 +368,7 @@
             set properties_url ""
             set new_version_link {}
             set new_version_url {}
-            set icon folder
+            set icon [::template::icon::name folder]
             set alt_icon #file-storage.folder#
             set file_url [export_vars -base "${fs_url}index" {{folder_id $object_id}}]
             set download_link [_ file-storage.Download]
@@ -379,7 +379,7 @@
             set properties_url [export_vars -base "${fs_url}simple" {object_id}]
             set new_version_link [_ acs-kernel.common_New]
             set new_version_url [export_vars -base "${fs_url}file-add" {{file_id $object_id}}]
-            set icon link
+            set icon [::template::icon::name link]
             # DRB: This alt text somewhat sucks, but the message key already exists in
             # the language catalog files we care most about and we want to avoid a new
             # round of translation work for this minor release if possible ...
@@ -418,7 +418,7 @@
             set properties_url [export_vars -base ${fs_url}file {{file_id $object_id}}]
             set new_version_link [_ acs-kernel.common_New]
             set new_version_url [export_vars -base ${fs_url}file-add {{file_id $object_id}}]
-            set icon file
+            set icon [::template::icon::name file]
             set alt_icon #file-storage.file#
             set download_link [_ file-storage.Download]
             if {$like_filesystem_p} {
@@ -437,7 +437,7 @@
                 set new_version_link [_ acs-kernel.common_New]
                 set new_version_url [export_vars -base ${fs_url}file-add {{file_id $object_id}}]
             }
-            set icon file
+            set icon [::template::icon::name file]
             set alt_icon #file-storage.file#
             set download_link [_ file-storage.Download]
             if {$like_filesystem_p} {