summaryrefslogtreecommitdiffstats
path: root/template/en/default/admin/table.html.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'template/en/default/admin/table.html.tmpl')
-rw-r--r--template/en/default/admin/table.html.tmpl15
1 files changed, 13 insertions, 2 deletions
diff --git a/template/en/default/admin/table.html.tmpl b/template/en/default/admin/table.html.tmpl
index fd1382b14..4254f80e1 100644
--- a/template/en/default/admin/table.html.tmpl
+++ b/template/en/default/admin/table.html.tmpl
@@ -33,6 +33,12 @@
# content: If specified, the content of this variable is used
# instead of the data pulled from the current row.
# NOTE: This value is not HTML filtered at output!
+ # content_use_field: If defined and true, then each value in the
+ # column corresponds with a key in the
+ # field_descs field, and that value from the
+ # field_descs hash will be used instead of "content."
+ # See fieldvalues/select-field for an example of use.
+ # This content WILL be HTML-filtered in this case.
# align: left/center/right. Controls the horizontal alignment of the
# text in the column.
# allow_html_content: if defined, then this column allows html content
@@ -46,6 +52,8 @@
#
#%]
+[% PROCESS "global/field-descs.none.tmpl" %]
+
[%################### TABLE HEADER ######################%]
<table border="1" cellpadding="4" cellspacing="0">
@@ -77,8 +85,11 @@
<a href="[% link_uri %]">
[% END %]
- [% IF c.content %]
- [% c.content %]
+ [% IF c.content_use_field %]
+ [% colname = row.${c.name} %]
+ [% field_descs.${colname} FILTER html %]
+ [% ELSIF c.content %]
+ [% c.content %]
[% ELSE %]
[% IF c.yesno_field %]
[% IF row.${c.name} %]