]> git.ipfire.org Git - people/jschlag/pbs.git/blob - src/templates/search-results.html
Use autotools
[people/jschlag/pbs.git] / src / templates / search-results.html
1 {% extends "base.html" %}
2
3 {% block title %}{{ _("Search results for '%s'") % pattern }}{% end block %}
4
5 {% block body %}
6 <ul class="breadcrumb">
7 <li>
8 <a href="/">{{ _("Home") }}</a>
9 <span class="divider">/</span>
10 </li>
11 <li>
12 <a href="/search">{{ _("Search results") }}</a>
13 <span class="divider">/</span>
14 </li>
15 <li class="active">
16 <a href="/search?q={{ pattern }}">{{ pattern }}</a>
17 </li>
18 </ul>
19
20 <div class="page-header">
21 <h1>
22 {{ _("Search results for '%s'") % pattern }}
23 </h1>
24 </div>
25
26 {% if not pkgs and not files and not users %}
27 <div class="alert alert-block">
28 <h4 class="alert-heading">{{ _("No results found.") }}</h4>
29 <a href="/search">
30 {{ _("Visit the advanced search page to find about how to define your query.") }}
31 </a>
32 </div>
33 {% end %}
34
35 <div class="row">
36 <div class="span4 offset4">
37 <form class="well ac" method="GET" action="/search">
38 <div class="input-append">
39 <input type="text" class="input-large" name="q" placeholder="{{ _("Search") }}"
40 value="{{ pattern }}"><button type="submit" class="btn">{{ _("Go!") }}</button>
41 </div>
42 </form>
43 </div>
44 </div>
45
46 <hr>
47
48 {% if pkgs %}
49 <h2>
50 {{ _("Packages") }} <small>({{ len(pkgs) }})</small>
51 </h2>
52
53 <table class="table table-striped table-hover">
54 <tbody>
55 {% for pkg in pkgs %}
56 <tr>
57 <td>
58 <a href="/package/{{ pkg.name }}">
59 {{ pkg.name }}
60 </a>
61 </td>
62 <td>{{ pkg.summary }}</td>
63 </tr>
64 {% end %}
65 </tbody>
66 </table>
67 {% end %}
68
69 {% if files %}
70 <h2>
71 {{ _("Files") }} <small>({{ len(files) }})</small>
72 </h2>
73
74 <p>
75 {{ _("%s was found in the following package.", "%s was found in the following packages.", len(files)) % pattern }}
76 </p>
77
78 <table class="table table-striped table-hover">
79 <tbody>
80 {% for pkg, file in files %}
81 <tr>
82 <td>
83 <a href="/package/{{ pkg.uuid }}">{{ pkg.friendly_name }}</a>
84 </td>
85 <td>
86 <pre>{{ format_filemode(file.type, file.mode) }} {{ file.user }}:{{ file.group }} {% if file.size %}{{ format_size(file.size) }}{% else %}-{% end %} {{ file.name }}</pre>
87 </td>
88 </tr>
89 {% end %}
90 </tbody>
91 </table>
92 {% end %}
93
94 {% if users %}
95 <h2>
96 {{ _("Users") }} <small>({{ len(users) }})</small>
97 </h2>
98
99 <table class="table table-striped table-hover">
100 <tbody>
101 {% for user in users %}
102 <tr>
103 <td>
104 <a href="/user/{{ user.name }}">{{ user.realname }}
105 {% if not user.name == user.realname %}
106 ({{ user.name }})
107 {% end %}
108 </a>
109 </td>
110 <td>
111 &nbsp;
112 </td>
113 </tr>
114 {% end %}
115 </tbody>
116 </table>
117 {% end %}
118 {% end block %}