blob: c2d77b5a37121572ee4f7916a24659ea3c051c10 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001{% extends "base.html" %}
2
3{% load static %}
4{% load projecttags %}
5{% load humanize %}
6
7{% block pagecontent %}
8
9
10 <div class="page-header top-air">
11 <h1>
12 {% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %}
13 {{objects.paginator.count}} project{{objects.paginator.count|pluralize}} found
14 {%elif request.GET.filter and objects.paginator.count == 0 or request.GET.search and objects.paginator.count == 0 %}
15 No projects found
16 {%else%}
17 All projects
18 {%endif%}
19 </h1>
20 </div>
21
22 {% if objects.paginator.count == 0 %}
23 <div class="row-fluid">
24 <div class="alert">
25 <form class="no-results input-append" id="searchform">
26 <input id="search" name="search" class="input-xxlarge" type="text" value="
27 {% if request.GET.search %}
28 {{request.GET.search}}
29 {% endif %}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
30 <button class="btn" type="submit" value="Search">Search</button>
31 <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all projects</button>
32 </form>
33 </div>
34 </div>
35
36 {% else %} {# We have builds to display #}
37 {% include "basetable_top.html" %}
38 {% for o in objects %}
39 <tr class="data">
40 <td><a href="{% url 'project' o.id %}">{{o.name}}</a></td>
41 <td class="updated"><a href="{% url 'project' o.id %}">{{o.updated|date:"d/m/y H:i"}}</a></td>
42 <td>
43 {% if o.release %}
44 <a href="{% url 'project' o.id %}#project-details">{{o.release.name}}</a>
45 {% else %}
46 No release available
47 {% endif %}
48 </td>
49 <td><a href="{% url 'project' o.id %}#machine-distro">{{o.get_current_machine_name}}</a></td>
50 {% if o.get_number_of_builds == 0 %}
51 <td class="muted">{{o.get_number_of_builds}}</td>
52 <td class="loutcome"></td>
53 <td class="ltarget"></td>
54 <td class="lerrors"></td>
55 <td class="lwarnings"></td>
56 <td class="limagefiles"></td>
57 {% else %}
58 <td><a href="{% url 'projectbuilds' o.id %}">{{o.get_number_of_builds}}</a></td>
59 <td class="loutcome"><a href="{% url "builddashboard" o.get_last_build_id %}">{%if o.get_last_outcome == build_SUCCEEDED%}<i class="icon-ok-sign success"></i>{%elif o.get_last_outcome == build_FAILED%}<i class="icon-minus-sign error"></i>{%else%}{%endif%}</a></td>
60 <td class="ltarget"><a href="{% url "builddashboard" o.get_last_build_id %}">{{o.get_last_target}} </a></td>
61 <td class="lerrors">{% if o.get_last_errors %}<a class="errors.count error" href="{% url "builddashboard" o.get_last_build_id %}#errors">{{o.get_last_errors}} error{{o.get_last_errors|pluralize}}</a>{%endif%}</td>
62 <td class="lwarnings">{% if o.get_last_warnings %}<a class="warnings.count warning" href="{% url "builddashboard" o.get_last_build_id %}#warnings">{{o.get_last_warnings}} warning{{o.get_last_warnings|pluralize}}</a>{%endif%}</td>
63 <td class="limagefiles">
64 {% if o.get_last_outcome == build_SUCCEEDED %}
65 <a href="{%url "builddashboard" o.get_last_build_id %}#images">{{fstypes|get_dict_value:o.id}}</a>
66 {% endif %}
67 </td>
68
69 {% endif %}
70 </tr>
71 {% endfor %}
72 {% include "basetable_bottom.html" %}
73 {% endif %} {# empty #}
74
75{% endblock %}
76
77