summaryrefslogtreecommitdiffstats
path: root/webui_templates/ksfile_list.tmpl
blob: 292fcf9e8782ca18f9b3a307f2f90d9e8946b171 (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
#extends cobbler.webui.master

#block body
<table class="sortable">
    <thead>
        <caption>Cobbler Kickstart Files</caption>
        <tr>
            <th class="text">File</th>
            <th class="text">Edit/View</th>
        </tr>
    </thead>
    <tbody>
        #set $evenodd = 1
        #for $ksfile in $ksfiles
        #if $evenodd % 2 == 0
            #set $tr_class = "roweven"
        #else
            #set $tr_class = "rowodd"
        #end if
        #set $evenodd += 1

        <tr class="$tr_class">
            <td>$ksfile</td>
            #if $ksfile.startswith("/var/lib/cobbler/kickstarts")
                <td><a href="$base_url/ksfile_edit?name=$ksfile">edit</a></td>
            #else if $ksfile.startswith("/etc/cobbler")
                <td><a href="$base_url/ksfile_edit?name=$ksfile">edit</a></td>
            #else if $ksfile.startswith("http://")
                <td><a href="$ksfile">view</A></td>
            #else
                <td>N/A</td>
            #end if 
        </tr>
        #end for
    </tbody>
</table>
#end block body