summaryrefslogtreecommitdiffstats
path: root/template/en/default/admin/table.html.tmpl
diff options
context:
space:
mode:
authorjocuri%softhome.net <>2004-07-31 07:16:36 +0200
committerjocuri%softhome.net <>2004-07-31 07:16:36 +0200
commite0779526883e06fdd418557d7f5928b3ec443e43 (patch)
tree4cb03ee0cd71a09faef0a265340993dc037b154d /template/en/default/admin/table.html.tmpl
parentd0b82de8afb79809f8ecc3d39c337b2bcf46b0bc (diff)
downloadbugzilla-e0779526883e06fdd418557d7f5928b3ec443e43.tar.gz
bugzilla-e0779526883e06fdd418557d7f5928b3ec443e43.tar.xz
Patch for bug 190220: templatize editcomponents.cgi; patch by GavinS <bugzilla@chimpychompy.org>; r=jouni, a=justdave.
Diffstat (limited to 'template/en/default/admin/table.html.tmpl')
-rw-r--r--template/en/default/admin/table.html.tmpl23
1 files changed, 18 insertions, 5 deletions
diff --git a/template/en/default/admin/table.html.tmpl b/template/en/default/admin/table.html.tmpl
index 8647aea76..ac4e5a666 100644
--- a/template/en/default/admin/table.html.tmpl
+++ b/template/en/default/admin/table.html.tmpl
@@ -28,13 +28,15 @@
# name: Name of the field in the data param
# heading: The text to print at the header cell
# contentlink: URI to which the content of a data cell shall be linked to.
- # Expressions of format %xxx% are replaced with value
+ # Expressions of format %%xxx%% are replaced with value
# with the key xxx in data hash of the current row.
# 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!
# 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
+ # so it will not be filtered
#
# data:
# array of hashes representing the data for the table.
@@ -65,9 +67,11 @@
[% IF c.contentlink %]
[% link_uri = c.contentlink %]
- [% FOREACH m = link_uri.match('%(.+?)%'); %]
- [% replacement_value = FILTER url_quote; row.$m; END %]
- [% link_uri = link_uri.replace("%$m%", replacement_value) %]
+ [% FOREACH m = link_uri.match('%%(.+?)%%'); %]
+ [% IF row.$m %]
+ [% replacement_value = FILTER url_quote; row.$m; END %]
+ [% link_uri = link_uri.replace("%%$m%%", replacement_value) %]
+ [% END %]
[% END %]
<a href="[% link_uri %]">
[% END %]
@@ -75,7 +79,11 @@
[% IF c.content %]
[% c.content %]
[% ELSE %]
- [% row.${c.name} FILTER html %]
+ [% IF c.allow_html_content %]
+ [% row.${c.name} FILTER none %]
+ [% ELSE %]
+ [% row.${c.name} FILTER html %]
+ [% END %]
[% END %]
[% IF c.contentlink %]
@@ -87,6 +95,11 @@
</tr>
[% END %]
+[% IF data.size == 0 %]
+ <tr><td colspan="[% columns.size %]" align="center"><i>&lt;none&gt;</i></td></tr>
+[% END %]
+
+
[%################### TABLE FOOTER ######################%]
</table>