summaryrefslogtreecommitdiff
path: root/pgcommitfest/commitfest/templates/commitfest.html
blob: 63f793a6b58cd17a2e5467dfc7d43b80faafaf2d (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
{%extends "base.html"%}
{%load commitfest %}
{%block contents%}

<button type="button" class="btn btn-default{%if has_filter%} active{%endif%}" id="filterButton" onClick="togglePatchFilterButton('filterButton', 'collapseFilters')">Search/filter</button>
<div class="btn-group">
  <a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="#">Shortcuts <span class="caret"></span></a>
  <ul class="dropdown-menu">
    <li><a href="?reviewer=-2">Patches with no reviewers</a></li>
    <li><a href="?author=-3">Patches where you are author</a></li>
    <li><a href="?reviewer=-3">Patches where you are reviewer</a></li>
  </ul>
</div>
{%if cf.isopen or user.is_staff %}
<a class="btn btn-default" href="new/">New patch</a>
{%endif%}
<div id="collapseFilters" class="collapse {%if has_filter%}in{%endif%}">
    <form id="filterform" method="GET" action="." style="margin-bottom: 0px">
      <table class="table table-condensed" style="margin-bottom: 0px">
	<thead>
	  <tr>
{%for f in form%}
         {%if not f.is_hidden%}
            <td>{{f.label}}</td>
	 {%else%}
	    <td></td>
	 {%endif%}
{%endfor%}
	    {%comment%} Add one extra for buttons {%endcomment%}
	    <td></td>
	  </tr>
	</thead>
	<tbody>
	  <tr>
{%for f in form%}
            <td>{{f|field_class:"form-control"}}</td>
{%endfor%}
	    <td>
	      <input type="submit" class="btn btn-default" value="Filter">
	      <a class="btn btn-default" href=".">Clear</a>
	    </td>
	  </tr>
	</tbody>
      </table>
    </form>
</div>

<p>
<br/>
<b>Status summary: </b>{%for id,title,num in statussummary%}<a href="?status={{id}}">{{title}}</a>: {{num}}. {%endfor%}
</p>

{%for p in patches %}
{%ifchanged p.is_open%}
{%if not forloop.first%}
 </tbody>
</table>
{%endif%}
<h3>{{p.is_open|yesno:"Active patches,Closed patches"}}</h3>
<table class="table table-striped table-bordered table-hover table-condensed">
 <thead>
  <tr>
   <th>{%if p.is_open%}<a href="#" style="color:#333333;" onclick="return sortpatches(0);">Patch</a>{%if sortkey == 0%}<div style="float:right;"><i class="glyphicon glyphicon-arrow-down"></i></div>{%endif%}{%endif%}</th>
   <th>Status</th>
   <th>Ver</th>
   <th>Author</th>
   <th>Reviewers</th>
   <th>Committer</th>
   <th>{%if p.is_open%}<a href="#" style="color:#333333;" onclick="return sortpatches(3);">Num cfs</a>{%if sortkey == 3%}<div style="float:right;"><i class="glyphicon glyphicon-arrow-down"></i></div>{%endif%}{%else%}Num cfs{%endif%}</th>
   <th>{%if p.is_open%}<a href="#" style="color:#333333;" onclick="return sortpatches(1);">Latest activity</a>{%if sortkey == 1%}<div style="float:right;"><i class="glyphicon glyphicon-arrow-down"></i></div>{%endif%}{%else%}Latest activity{%endif%}</th>
   <th>{%if p.is_open%}<a href="#" style="color:#333333;" onclick="return sortpatches(2);">Latest mail</a>{%if sortkey == 2%}<div style="float:right;"><i class="glyphicon glyphicon-arrow-down"></i></div>{%endif%}{%else%}Latest mail{%endif%}</th>
{%if user.is_staff%}
   <th>Select</th>
{%endif%}
  </tr>
 </thead>
 <tbody>
{%endifchanged%}

{%if grouping%}
{%ifchanged p.topic%}
  <tr><th colspan="{%if user.is_staff%}10{%else%}9{%endif%}">{{p.topic}}</th></tr>
{%endifchanged%} 
{%endif%}
  <tr>
   <td><a href="{{p.id}}/">{{p.name}}</a></td>
   <td><span class="label label-{{p.status|patchstatuslabel}}">{{p.status|patchstatusstring}}</span></td>
   <td>{%if p.targetversion%}<span class="label label-default">{{p.targetversion}}</span>{%endif%}</td>
   <td>{{p.author_names|default:''}}</td>
   <td>{{p.reviewer_names|default:''}}</td>
   <td>{{p.committer|default:''}}</td>
   <td>{{p.num_cfs}}</td>
   <td style="white-space: nowrap;">{{p.modified|date:"Y-m-d"}}<br/>{{p.modified|date:"H:i"}}</td>
   <td style="white-space: nowrap;">{{p.lastmail|date:"Y-m-d"}}<br/>{{p.lastmail|date:"H:i"}}</td>
{%if user.is_staff%}
   <td style="white-space: nowrap;"><input type="checkbox" class="sender_checkbox" id="send_authors_{{p.id}}">Author<br/><input type="checkbox" class="sender_checkbox" id="send_reviewers_{{p.id}}">Reviewer</td>
{%endif%}
  </tr>
{%if forloop.last%}
 </tbody>
</table>
{%endif%}
{%endfor%}

<div>
{%if cf.isopen or user.is_staff %}
<a class="btn btn-default" href="new/">New patch</a>
{%endif%}
{%if user.is_staff%}
 <div class="btn-group dropup">
  <button type="button" class="btn btn-default dropdown-toggle " data-toggle="dropdown" href="#">Send private mail <span class="caret"></span></button>
  <ul class="dropdown-menu">
    <li><a href="javascript:send_selected()">Selected</a></li>
    <li><a href="send_email/?reviewers={{openpatchids|join:","}}">All reviewers (open patches)</a></li>
    <li><a href="send_email/?authors={{openpatchids|join:","}}">All authors (open patches)</a></li>
    <li><a href="send_email/?authors={{openpatchids|join:","}}&reviewers={{openpatchids|join:","}}">All authors and reviewers (open patches)</a></li>
  </ul>
 </div>

 <div class="btn-group dropup">
   <button type="button" class="btn btn-default dropdown-toggle " data-toggle="dropdown" href="#">Reports <span class="caret"></span></button>
   <ul class="dropdown-menu">
     <li><a href="reports/authorstats/">Author stats</a></li>
   </ul>
 </div>
{%endif%}
</div>
{%endblock%}

{%block morescript%}
<script>
{%if user.is_staff%}
   function send_selected() {
      var authors = [];
      var reviewers = [];
      $('input.sender_checkbox').each(function(index, el) {
         if (el.checked) {
            if (el.id.indexOf('send_authors_') == 0) {
               authors.push(el.id.substring(13));
            } else {
               reviewers.push(el.id.substring(15));
            }
         }
      });
      if (authors.length==0 && reviewers.length==0) {
         alert('Nothing to send.');
         return;
      }
      document.location.href = 'send_email/?authors=' + authors.join(',') + '&reviewers=' + reviewers.join(',');
   }
{%endif%}
</script>
{%endblock%}