summaryrefslogtreecommitdiffstats
path: root/webui_templates/item.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'webui_templates/item.tmpl')
-rw-r--r--webui_templates/item.tmpl38
1 files changed, 38 insertions, 0 deletions
diff --git a/webui_templates/item.tmpl b/webui_templates/item.tmpl
new file mode 100644
index 0000000..e06083f
--- /dev/null
+++ b/webui_templates/item.tmpl
@@ -0,0 +1,38 @@
+#extends cobbler.webui.master
+
+#block body
+<table class="sortable">
+ <thead>
+ <caption>$caption</caption>
+ <th>Key</th>
+ <th>Value</th>
+ </thead>
+ <tbody>
+ #set $evenodd = 1
+ #for $key,$value in $item_data.items():
+
+ #if $evenodd % 2 == 0
+ #set $tr_class = "roweven"
+ #else
+ #set $tr_class = "rowodd"
+ #end if
+ #set $evenodd += 1
+
+ <tr class="$tr_class">
+ <td>$key</td>
+ <td>
+ #if isinstance($value,dict):
+ <ul style="list-style-type: none; margin: 0; padding: 0;">
+ #for $skey,$sval in $value.items():
+ <li>$skey = $sval</li>
+ #end for
+ </ul>
+ #else
+ $value
+ #end if
+ </td>
+ </tr>
+ #end for
+ </tbody>
+</table>
+#end block body