]> git.ipfire.org Git - people/jschlag/pbs.git/blob - src/templates/modules/watchers-sidebar-table.html
Use autotools
[people/jschlag/pbs.git] / src / templates / modules / watchers-sidebar-table.html
1 <p>
2 <strong>{{ _("Watchers") }}:</strong>
3
4 <a href="#watchers" data-toggle="modal">
5 {% if current_user and current_user in watchers %}
6 {% if len(watchers) == 1 %}
7 {{ _("You.") }}
8 {% elif len(watchers) == 2 %}
9 {{ _("You and one other.") }}
10 {% else %}
11 {{ _("You and %s others.") % (len(watchers) - 1) }}
12 {% end %}
13 {% else %}
14 {{ _("One person.", "%(num)s people.", len(watchers)) % { "num" : len(watchers) } }}
15 {% end %}
16 </a>
17 </p>
18
19 <div class="modal hide fade" id="watchers">
20 <div class="modal-header">
21 <a class="close" data-dismiss="modal">&times;</a>
22 <h3>{{ _("Watchers of %s") % build.name }}</h3>
23 </div>
24
25 <div class="modal-body">
26 <p>
27 {{ _("All users who watch this build will be automatically notified about status changes and comments.") }}
28 {{ _("This is an easy way of staying up to date.") }}
29 </p>
30 <hr />
31
32 {% if watchers %}
33 <ul>
34 {% if current_user and current_user in watchers %}
35 <li>
36 <strong>{{ _("You.") }}</strong>
37 </li>
38 {% end %}
39
40 {% for watcher in [w for w in watchers if current_user and not w == current_user] %}
41 <li>
42 <a href="/user/{{ watcher.name }}">{{ watcher.realname }}</a>
43 </li>
44 {% end %}
45 </ul>
46 {% else %}
47 <p>
48 {{ _("Nobody watches this build, yet. Be the first one.") }}
49 </p>
50 {% end %}
51 </div>
52
53 <div class="modal-footer">
54 {% if current_user %}
55 {% if not current_user in watchers %}
56 <a class="btn" href="/build/{{ build.uuid }}/watch">{{ _("Watch this build") }}</a>
57 {% elif current_user.is_admin() %}
58 <a class="btn" href="/build/{{ build.uuid }}/watch">{{ _("Add a watcher") }}</a>
59 {% end %}
60 {% end %}
61
62 <a class="btn btn-primary" href="#" data-dismiss="modal">{{ _("Close") }}</a>
63 </div>
64 </div>