summaryrefslogtreecommitdiffstats
path: root/webui_templates/item.tmpl
blob: e06083f97f40c3dfdc0b709a5aa90f2c42c182a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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