source: ccsweb/trunk/smarty/templates/configListing.tpl @ 938

Last change on this file since 938 was 938, checked in by mglb1, 7 years ago

Added the initial structure for the web based configuration file viewer.
The look and style of the display is taken from Trac which is BSD
licensed.

  • Property svn:keywords set to Id
File size: 3.1 KB
Line 
1{* Copyright (C) 2006  The University of Waikato
2 *
3 * This file is part of ccsweb - CRCnet Configuration System Web Interface
4 *
5 * Author:       Matt Brown <matt@crc.net.nz>
6 * Version:      $Id$
7 *
8 * ccsweb is free software; you can redistribute it and/or modify it under the
9 * terms of the GNU General Public License version 2 as published by the Free
10 * Software Foundation.
11 *
12 * ccsweb is distributed in the hope that it will be useful, but WITHOUT ANY
13 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
15 * details.
16 *
17 * You should have received a copy of the GNU General Public License along with
18 * ccsweb; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
20 *}
21<div id="configBrowser">
22{debug}
23<div id="ctxtnav" class="nav">
24 <ul>
25  <li class="last"><a href="/configs/log">Revision Log</a></li>
26 </ul>
27</div>
28
29<h1><a class="first" title="Go to root directory" href="/configs/">root</a>
30{assign var="prev" value=""}
31{assign var="parent" value=""}
32{foreach from=$path item=part}
33{if $part!=""}
34<span class="sep">/</span>
35<a title="View {$part}" href="/configs{$prev}/{$part}">{$part}</a>
36{assign var="parent" value=$prev}
37{assign var="prev" value="$prev/$part"}
38{/if}
39{/foreach}
40{assign var="pageurl" value="$prev"}
41</h1>
42
43<div id="jumprev">
44    <form action="" method="get">
45    <div>
46        <label for="rev">View revision:</label>
47        <input type="text" id="rev" name="rev" value="" size="4" />
48    </div>
49    </form>
50</div>
51
52<table class="listing" id="dirlist">
53<thead>
54<tr>
55    <th class="name asc">
56        <a title="Sort by name (descending)"
57            href="/configs{$pageurl}?order=name&amp;desc=1">Name</a>
58    </th>
59    <th class="size">
60        <a title="Sort by size"
61            href="/configs{$pageurl}?order=size">Size</a>
62    </th>
63    <th class="rev">Rev</th>
64    <th class="date">
65        <a title="Sort by date"
66            href="/configs{$pageurl}?order=date">Age</a>
67    </th>
68    <th class="change">Last Change</th>
69</tr>
70</thead>
71<tbody>
72{if $pageurl!=""}
73<tr class="even">
74    <td class="name" colspan="5">
75        <a class="parent" title="Parent Directory"
76            href="/configs{$parent}">../</a>
77    </td>
78</tr>
79{/if}
80{foreach from=$entries item=entry}
81<tr class="{cycle values="odd,even"}">
82    <td class="name">
83        <a class="{$entry.kind}" title="Browse Directory"
84            href="/configs{$pageurl}/{$entry.name}">{$entry.name}</a>
85    </td>
86    <td class="size">
87        {assign var="kbs" value=$entry.size/1024}
88        {if $entry.size>0}{$kbs|string_format:"%.1f"}&nbsp;kB{/if}
89    </td>
90    <td class="rev">
91        <a title="View Revision Log"
92            href="/configs/log{$pageurl}">{$entry.created_rev.number}</a>
93    </td>
94    <td class="age">
95        <span title="{$entry.age}">{$entry.age_rounded}</span>
96    </td>
97    <td class="change">
98        <span class="author">{$entry.last_author}:</span>
99        <span class="change">{$entry.created_rev.log}</span>
100    </td>
101</tr>
102{/foreach}
103</tbody>
104</table>
105
106</div>
Note: See TracBrowser for help on using the repository browser.