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.39 -r1.66.2.40 --- openacs-4/packages/acs-templating/acs-templating.info 26 Oct 2022 14:18:10 -0000 1.66.2.39 +++ openacs-4/packages/acs-templating/acs-templating.info 28 Oct 2022 12:23:24 -0000 1.66.2.40 @@ -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/Attic/style-procs.tcl,v diff -u -N -r1.1.2.15 -r1.1.2.16 --- openacs-4/packages/acs-templating/tcl/style-procs.tcl 26 Oct 2022 14:18:10 -0000 1.1.2.15 +++ openacs-4/packages/acs-templating/tcl/style-procs.tcl 28 Oct 2022 12:23:24 -0000 1.1.2.16 @@ -101,6 +101,7 @@ {-iconset ""} {-style ""} {-title ""} + {-invisible:boolean f} } { Return a dict containing the HTML rendering and a potentially @@ -134,6 +135,9 @@ set iconset default } elseif {$name eq ""} { set iconset text + } elseif {![string match {[a-z]} [string range $name 0 0]]} { + set iconset text + set alt $name } set _class [expr {$class ne "" ? " $class" : ""} ] set title [ns_quotehtml $title] @@ -159,6 +163,9 @@ set template {$alt} } } + if {$invisible_p} { + set template "$template" + } #ns_log notice "RETURN HTML [subst -nocommands $template] cmd $cmd]" return [list HTML [subst -nocommands $template] cmd $cmd] } @@ -167,112 +174,136 @@ set ::template::icon::map { bootstrap-icons { add-new-item plus-circle + admin wrench-adjustable checkbox-checked check2-square checkbox-unchecked square check check-lg + cog gear edit pencil-square eye-closed eye-slash eye-open eye file file-earmark filetype-csv filetype-csv + folder-add folder-plus form-info-sign info-square list-alt card-heading next chevron-right + permissions lock previous chevron-left radio-checked check2-circle radio-unchecked circle reload arrow-clockwise + search search text file-earmark-text + unmount eject user person warn exclamation-triangle-fill watch eye } fa-icons { add-new-item "fa-solid fa-plus" + admin "fa-solid fa-wrench" arrow-down "fa-solid fa-arrow-down" arrow-left "fa-solid fa-arrow-left" arrow-right "fa-solid fa-arrow-right" arrow-up "fa-solid fa-arrow-up" check "fa-solid fa-check" checkbox-checked "fa-regular fa-square-check" checkbox-unchecked "fa-regular fa-square" + cog "fa-solid fa-gear" download "fa-solid fa-download" edit "fa-regular fa-pen-to-square" eye-closed "fa-regular fa-eye-slash" eye-open "fa-regular fa-eye" file "fa-regular fa-file" filetype-csv "fa-solid fa-file-csv" folder "fa-regular fa-folder" + folder-add "fa-solid fa-plus" form-info-sign "fa-solid fa-circle-info" link "fa-solid fa-link" list "fa-solid fa-list" list-alt "fa-regular fa-rectangle-list" next "fa-solid fa-chevron-right" paperclip "fa-light fa-paperclip" + permissions "fa-solid fa-lock" previous "fa-solid fa-chevron-left" user "fa-solid fa-user" radio-checked "fa-regular fa-circle-check" radio-unchecked "fa-regular fa-circle" reload "fa-solid fa-arrows-rotate" + search "fa-solid fa-magnifying-glass" text "fa-regular fa-file-lines" + unmount "fa-solid fa-eject" trash "fa-regular fa-trash-can" warn "fa-solid fa-triangle-exclamation" watch "fa-regular fa-eye" } glyphicons { + admin wrench add-new-item plus-sign checkbox-checked check checkbox-unchecked unchecked + cog cog download download-alt edit pencil eye-closed eye-close eye-open eye-open file file filetype-csv "" folder folder-open + folder-add plus-sign form-info-sign info-sign link link list-alt list-alt next menu-right paperclip paperclip + permissions lock previous menu-left radio-checked record radio-unchecked /shared/images/radio.gif reload refresh + search search text file + unmount eject user user warn alert watch eye-open } classic { add-new-item "+" + admin "" arrow-down /resources/acs-subsite/arrow-down.gif arrow-left /resources/acs-subsite/arrow-left.png arrow-right /resources/acs-subsite/arrow-right.png arrow-up /resources/acs-subsite/arrow-up.gif checkbox-checked /shared/images/checkboxchecked.gif checkbox-unchecked /shared/images/checkbox.gif check /shared/images/checkboxchecked.gif + cog " parameters" download /shared/images/download16.png edit /shared/images/Edit16.gif eye-closed /shared/images/eye-slash16.png eye-open /shared/images/eye16.png filetype-csv /shared/images/csv16.png file /shared/images/file.gif folder /shared/images/Delete16.gif + folder-add "+" form-info-sign /shared/images/info.gif link /resources/acs-subsite/url-button.gif list /shared/images/list16.png - list-alt /shared/images/Preferences16.gif - next "rlaquo;" + list-alt /resources/acs-subsite/Preferences16.gif + next "»" paperclip /resources/acs-subsite/attach.png + permissions "" previous "«" radio-checked /shared/images/radiochecked.gif radio-unchecked /shared/images/radio.gif text /shared/images/text16.png reload /shared/images/recylce16.png + search /resources/acs-subsite/Zoom16.gif trash /shared/images/Delete16.gif - user /shared/images/profile-16.png + unmount "" + user /resources/acs-subsite/profile-16.png warn /shared/images/diamond.gif watch /shared/images/eye16.png } Index: openacs-4/packages/acs-templating/tcl/tag-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/tag-init.tcl,v diff -u -N -r1.49.2.28 -r1.49.2.29 --- openacs-4/packages/acs-templating/tcl/tag-init.tcl 5 Oct 2022 09:41:20 -0000 1.49.2.28 +++ openacs-4/packages/acs-templating/tcl/tag-init.tcl 28 Oct 2022 12:23:24 -0000 1.49.2.29 @@ -1044,7 +1044,9 @@ -iconset [ns_set iget $params iconset] \ -name [ns_set iget $params name] \ -style [ns_set iget $params style] \ - -title [ns_set iget $params title]] + -title [ns_set iget $params title] \ + -invisible=[ns_set iget $params invisible f] \ + ] dict with d { template::adp_append_string $HTML if {$cmd ne ""} { Index: openacs-4/packages/acs-templating/www/sitewide-admin/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/sitewide-admin/Attic/index.adp,v diff -u -N -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/acs-templating/www/sitewide-admin/index.adp 23 Oct 2022 18:49:37 -0000 1.1.2.1 +++ openacs-4/packages/acs-templating/www/sitewide-admin/index.adp 28 Oct 2022 12:23:24 -0000 1.1.2.2 @@ -3,4 +3,57 @@ @context;literal@

@title;noquote@

+ +

Support for the adp:icon Tag

+

Font Awesome Icons can be used via adp:icons can be used on ADP pages with +

+ <adp:icon name="NAME" title="..." style="..." class="..." iconset='...' invisible='...'> +
+ +

The last three arguments are optional. +Font Awesome Icons +defines in +version 6.1.1 more than 2,000 free icons. When installing Font Awesome Icons, +all of these are usable independent of the style of the site. + +

However, when one wants to keep e.g. some subsites in Bootstrap 3 +and others in Bootstrap 5, and the classic Bootstrap 3 look-and-feel +should be kept, and the identical markup should adapt its +Look-and-Feel depending on the subsite theme, there are some +restrictions. OpenACS supports the icon sets +"classic" +(old-style gif/png images), +"glyphicons" +(Part of Bootstrap 3), +"bootstrap-icons" (usable for all +themes), and +"fa-icons" (usable +for all themes). Some of the icon names are usable via adp:icon for +all OpenACS icon sets, some of these can be used without further +mapping as replacement of the gyphicons of Bootstrap 3. + +

The names which can be used for all icon sets are called +"generic", since for these, a mapping from the specific icon set to +the generic name exists. See below for lists of names and contexts, +where these can be used. + + +

Defined generic names for adp:icons, +working with icon sets +"classic", +"glyphicons", +"bootstrap-icons", and +"fa-icons". This means that the same +name can be used in the markup. When switching the themes/iconset, +different icon sets are used without the need of rewriting any markup. +The current default icon set is @default_iconset@. + +In the listing below, the glyphicons are only rendered when running +under the bootstrap3 theme. + +

+ @genericHTML;noquote@ +
+ + Index: openacs-4/packages/acs-templating/www/sitewide-admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/sitewide-admin/Attic/index.tcl,v diff -u -N -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/acs-templating/www/sitewide-admin/index.tcl 23 Oct 2022 18:49:37 -0000 1.1.2.1 +++ openacs-4/packages/acs-templating/www/sitewide-admin/index.tcl 28 Oct 2022 12:23:24 -0000 1.1.2.2 @@ -8,6 +8,48 @@ set title "ACS Templating Package - Sitewide Admin" set context [list $title] +# +# Collect generic names +# +set generic {} +foreach iconset [dict keys $::template::icon::map] { + lappend generic {*}[dict keys [dict get $::template::icon::map $iconset]] +} + +# +# Default iconset +# +set default_iconset [::template::iconset] + +set iconsets {} +foreach iconset {bootstrap-icons fa-icons} { + if {[::template::head::can_resolve_urn urn:ad:css:$iconset]} { + template::head::add_css -href urn:ad:css:$iconset + lappend iconsets $iconset + } +} +# +# When running under bootstrap3, add the glyph iconds +# +if {[template::toolkit] eq "bootstrap"} { + lappend iconsets glyphicons +} +lappend iconsets classic + +set th "Name" +foreach iconset $iconsets { + append th "$iconset" + append td "" +} + +append genericHTML \ + {} \n \ + "$th\n" \ + [join [lmap name [lsort -unique [set generic]] { + set _ " [subst $td] " + }] \n] \ +
$name
\n + # Local variables: # mode: tcl # tcl-indent-level: 4