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 -N -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 @@ f t - + OpenACS Templating library. 2021-09-15 @@ -27,7 +27,7 @@ GPL version 2 3 - + 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 -N -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 {$alt} } } + 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 -N -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 @@ f f - + OpenACS Collaborative document storage 2021-09-15 @@ -17,12 +17,12 @@ 2 #file-storage.file-storage# - + - + 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 -N -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} {