summaryrefslogtreecommitdiffstats
path: root/tpl/contents.tpl
blob: 9e2eff6759432b279e804a119473ae6d0d84d10c (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{{{header}}}
    <div id="main">
        <div class="panel panel-default">
            <div class="panel-heading">Search the contents of packages</div>
            <div class="panel-body">
                <form class="form-inline" role="form" id="search">
                    <div class="form-group">
                        <label for="filename">Filename</label>
                        <input type="text" class="form-control" id="filename" name="filename" value="{{{filename}}}">
                    </div>
                    <div class="form-group">
                        <label for="pkgname">Package name</label>
                        <input type="text" class="form-control" id="pkgname" name="pkgname" value="{{{pkgname}}}">
                    </div>
                    <div class="form-group">
                        <label for="arch">Architecture</label>
                        <select name="arch" class="form-control" id="arch">
                            <option{{#x86}} selected {{/x86}}>x86</option>
                            <option{{#x86_64}} selected {{/x86_64}}>x86_64</option>
                            <option{{#armhf}} selected {{/armhf}}>armhf</option>
                        </select>
                    </div>
                    <button type="submit" class="btn btn-primary">Search</button>
                </form>
            </div>
            <div class="table-responsive">
                <table class="table table-striped table-bordered table-condensed" data-toggle="table">
                    <tr>
                        <th>File</th>
                        <th>Package name</th>
                        <th>Repository</th>
                        <th>Architecture</th>
                    </tr>{{#rows}}
                    <tr>
                        <td>{{{file}}}</td>
                        <td><a href="/package/{{{arch}}}/{{{pkgname}}}">{{{pkgname}}}</a></td>
                        <td>{{{repo}}}</td>
                        <td>{{{arch}}}</td>
                    </tr>{{/rows}}
                    {{{^rows}}}
                    <tr>
                        <td colspan="4">No item found...</td>
                    </tr>
                    {{{/rows}}}
                </table>
            </div>
            <div class="panel-footer text-center">{{#pager}}
                <nav>
                    <ul class="pagination">{{/pager}}{{#pager}}{{#prev}}
                        <li class=""><a href="/contents?{{{prev}}}" aria-label="Previous"><span aria-hidden="true">&laquo;</span></a></li>{{/prev}}{{/pager}}{{#pager}}{{^prev}}
                        <li class="disabled"><a href="" aria-label="Previous"><span aria-hidden="true">&laquo;</span></a></li>{{/prev}}{{/pager}}{{#pager}}
                        <li class="active"><a href="#">{{{page}}}</a></li>{{/pager}}{{#pager}}{{#next}}
                        <li><a href="/contents?{{{next}}}" aria-label="Next"><span aria-hidden="true">&raquo;</span></a></li>{{/next}}{{/pager}}{{#pager}}{{^next}}
                        <li class="disabled"><a href="#" aria-label="Next"><span aria-hidden="true">&raquo;</span></a></li>{{/next}}{{/pager}}{{#pager}}
                    </ul>
                </nav>{{/pager}}
            </div>
        </div>
    </div>
{{{footer}}}