Files @ 97b8db701355
Branch filter:

Location: kallithea/kallithea/templates/pullrequests/pullrequest_show.html - annotation

Mads Kiilerich
templates: replace invalid metatag attributes with data attributes

(We could also use plain classes ... but stick to the plan ...)
  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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
d1addaf7a91e
d1addaf7a91e
0ee5a36aaa99
0ee5a36aaa99
37354e1ab283
196c46444d98
37354e1ab283
d1addaf7a91e
d1addaf7a91e
196c46444d98
d1addaf7a91e
d1addaf7a91e
ec39e73be935
d1addaf7a91e
ec39e73be935
d1addaf7a91e
d1addaf7a91e
e99a33d7d7f5
d1addaf7a91e
80a15e10857a
fcd461ff2350
ee3fb2dfbcc0
fcd461ff2350
fcd461ff2350
d1addaf7a91e
2145dfdc3af3
ac91a7ba2691
96bd919192b0
96bd919192b0
96bd919192b0
96bd919192b0
96bd919192b0
96bd919192b0
2f4effc51867
96bd919192b0
2f4effc51867
96bd919192b0
fee908b9bd2d
2f4effc51867
20830dfe3ed8
96bd919192b0
d1addaf7a91e
2f4effc51867
2f4effc51867
2f4effc51867
d1addaf7a91e
96bd919192b0
fee908b9bd2d
2f4effc51867
d1923cd0521c
dd42c2ad28d7
67e53a272e1a
96bd919192b0
2f4effc51867
96bd919192b0
2f4effc51867
d1923cd0521c
cf3cc1fa4222
a79e651306e2
96bd919192b0
96bd919192b0
96bd919192b0
96bd919192b0
2f4effc51867
d1923cd0521c
dd42c2ad28d7
d1addaf7a91e
cfd9115db2a5
293066605a43
293066605a43
c40e567e4b82
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
cfd9115db2a5
293066605a43
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
96bd919192b0
2f4effc51867
d1923cd0521c
dd42c2ad28d7
d1addaf7a91e
c40e567e4b82
cfd9115db2a5
cfd9115db2a5
d1addaf7a91e
cfd9115db2a5
d1addaf7a91e
d1addaf7a91e
96bd919192b0
2f4effc51867
d1923cd0521c
dd42c2ad28d7
f295fad8adff
6cb077e99873
6cb077e99873
6cb077e99873
f295fad8adff
f295fad8adff
7d09d136ea72
96bd919192b0
2f4effc51867
d1923cd0521c
dd42c2ad28d7
43a4f3b285a6
43a4f3b285a6
43a4f3b285a6
6cb077e99873
6cb077e99873
43a4f3b285a6
205521e789ec
96bd919192b0
2f4effc51867
d1923cd0521c
dd42c2ad28d7
19e619f3cde1
7d09d136ea72
7d09d136ea72
d1addaf7a91e
7d09d136ea72
d1addaf7a91e
7d09d136ea72
d1addaf7a91e
d1addaf7a91e
19e619f3cde1
d1addaf7a91e
96bd919192b0
2f4effc51867
d1923cd0521c
dd42c2ad28d7
d1addaf7a91e
d1addaf7a91e
96bd919192b0
2f4effc51867
d1923cd0521c
dd42c2ad28d7
f287754980cc
68011c4e6f33
68011c4e6f33
205521e789ec
dd42c2ad28d7
67e53a272e1a
b9c9216d6fa7
b9c9216d6fa7
96bd919192b0
f295fad8adff
2f4effc51867
d1923cd0521c
dd42c2ad28d7
f5e3e703b186
5d5d8ec14aa7
982deaaef275
48a96c4059df
b8734b428786
5d5d8ec14aa7
5d5d8ec14aa7
5d5d8ec14aa7
9a523af15c9f
19e619f3cde1
d42d7b2a3b2f
d42d7b2a3b2f
38fa9fe39baa
d42d7b2a3b2f
d42d7b2a3b2f
fff76ceb5e21
d42d7b2a3b2f
d42d7b2a3b2f
fab4e18432ba
d42d7b2a3b2f
d42d7b2a3b2f
d42d7b2a3b2f
c40e567e4b82
12919ffab34c
5fe9bb7acee6
5fe9bb7acee6
5fe9bb7acee6
d4b39ef6cadf
5fe9bb7acee6
d4b39ef6cadf
5fe9bb7acee6
5fe9bb7acee6
c3892e3a6ba3
5fe9bb7acee6
d42d7b2a3b2f
f295fad8adff
f295fad8adff
f295fad8adff
f295fad8adff
833488c0a20a
f5e3e703b186
f5e3e703b186
f5e3e703b186
2145dfdc3af3
2f4effc51867
2f4effc51867
2f4effc51867
2f4effc51867
2f4effc51867
2f4effc51867
2f4effc51867
2f4effc51867
2f4effc51867
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
fcd461ff2350
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
69ee6a249f55
69ee6a249f55
69ee6a249f55
c859ebb3243d
d1addaf7a91e
ea284e51ec2e
ea284e51ec2e
ea284e51ec2e
d1addaf7a91e
0b51254050a2
0b51254050a2
0590e974ac35
0b51254050a2
0b51254050a2
0b51254050a2
346a56c690ff
cd6176c0634a
346a56c690ff
346a56c690ff
0b51254050a2
d1addaf7a91e
fee908b9bd2d
af5eef651c77
882f300d652e
af5eef651c77
d1addaf7a91e
0b51254050a2
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
fee908b9bd2d
d1addaf7a91e
d1addaf7a91e
a79e651306e2
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
66d6dc56479b
66d6dc56479b
66d6dc56479b
66d6dc56479b
66d6dc56479b
66d6dc56479b
66d6dc56479b
66d6dc56479b
cd6176c0634a
66d6dc56479b
66d6dc56479b
66d6dc56479b
66d6dc56479b
66d6dc56479b
66d6dc56479b
8d01c8a72bb5
66d6dc56479b
66d6dc56479b
66d6dc56479b
66d6dc56479b
66d6dc56479b
66d6dc56479b
66d6dc56479b
fcd461ff2350
2f4effc51867
2145dfdc3af3
2145dfdc3af3
fcd461ff2350
d1addaf7a91e
80a15e10857a
ee3fb2dfbcc0
fcd461ff2350
fcd461ff2350
fcd461ff2350
d1addaf7a91e
0b14eb8c690b
0ee5a36aaa99
0b14eb8c690b
d1addaf7a91e
0b14eb8c690b
0b14eb8c690b
0b14eb8c690b
d1addaf7a91e
d1addaf7a91e
205521e789ec
205521e789ec
12919ffab34c
205521e789ec
205521e789ec
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
4034992774fa
d1addaf7a91e
4034992774fa
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
4034992774fa
d1addaf7a91e
d1addaf7a91e
1cf51cd05e36
72acb38da217
dbf7341d10b1
72acb38da217
4034992774fa
dbf7341d10b1
4034992774fa
d1addaf7a91e
d1addaf7a91e
72acb38da217
72acb38da217
72acb38da217
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
329c0584cba8
d1addaf7a91e
e457b951aabe
4034992774fa
4034992774fa
d1addaf7a91e
e46de90d5554
d1addaf7a91e
329c0584cba8
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
1721c30d9cbe
d1addaf7a91e
aba28699ec41
7834f845505a
d1addaf7a91e
d1addaf7a91e
e271a8766951
2fa786ba2b2a
b9c9216d6fa7
d1addaf7a91e
99d29f43bdd1
e87baa8f1c5b
d1addaf7a91e
d1addaf7a91e
5d5d8ec14aa7
5d5d8ec14aa7
48a96c4059df
5d5d8ec14aa7
e87baa8f1c5b
348ecbd25577
d42d7b2a3b2f
d42d7b2a3b2f
d42d7b2a3b2f
d42d7b2a3b2f
d42d7b2a3b2f
2145dfdc3af3
2145dfdc3af3
b9c9216d6fa7
2145dfdc3af3
d42d7b2a3b2f
d42d7b2a3b2f
2145dfdc3af3
b845d1e94e2e
9dfd9d242728
9dfd9d242728
9dfd9d242728
9dfd9d242728
9dfd9d242728
66d6dc56479b
66d6dc56479b
66d6dc56479b
66d6dc56479b
66d6dc56479b
fee908b9bd2d
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
d1addaf7a91e
<%inherit file="/base/base.html"/>

<%namespace name="comment" file="/changeset/changeset_file_comment.html"/>

<%block name="title">
    ${_('%s Pull Request %s') % (c.repo_name, c.pull_request.nice_id())}
</%block>

<%def name="breadcrumbs_links()">
    ${_('Pull request %s from %s#%s') % (c.pull_request.nice_id(), c.pull_request.org_repo.repo_name, c.cs_branch_name)}
</%def>

<%block name="header_menu">
    ${self.menu('repositories')}
</%block>

<%def name="main()">
<% editable = not c.pull_request.is_closed() and (h.HasPermissionAny('hg.admin')() or h.HasRepoPermissionAny('repository.admin')(c.repo_name) or c.pull_request.owner_id == c.authuser.user_id) %>
${self.repo_context_bar('showpullrequest')}
<div class="panel panel-primary">
  <!-- box / title -->
  <div class="panel-heading">
    ${self.breadcrumbs()}
  </div>

  ${h.form(url('pullrequest_post', repo_name=c.repo_name, pull_request_id=c.pull_request.pull_request_id), method='post', id='pull_request_form')}
    <div class="form pr-box" style="float: left">
      <div class="pr-details-title ${'closed' if c.pull_request.is_closed() else ''}">
          ${_('Title')}: ${c.pull_request.title}
          %if c.pull_request.is_closed():
              (${_('Closed')})
          %endif
      </div>
      <div id="pr-summary" class="form-horizontal">

        <div class="pr-not-edit form-group" style="min-height:47px">
            <label>${_('Description')}:</label>
            %if editable:
            <div style="margin: 20px 0; position: absolute">
              <a class="btn btn-default btn-xs" onclick="$('.pr-do-edit').show();$('.pr-not-edit').hide()">${_("Edit")}</a>
            </div>
            %endif
            <div>
              <div class="form-control formatted-fixed">${h.urlify_text(c.pull_request.description, c.pull_request.org_repo.repo_name)}</div>
            </div>
        </div>

        %if editable:
        <div class="pr-do-edit form-group" style="display:none">
              <label for="pullrequest_title">${_('Title')}:</label>
              <div>
                  ${h.text('pullrequest_title',class_='form-control',value=c.pull_request.title,placeholder=_('Summarize the changes'))}
              </div>
        </div>

        <div class="pr-do-edit form-group" style="display:none">
              <label for="pullrequest_desc">${_('Description')}:</label>
              <div>
                  ${h.textarea('pullrequest_desc',size=30,content=c.pull_request.description,placeholder=_('Write a short description on this pull request'),class_='form-control')}
              </div>
        </div>
        %endif

        <div class="form-group">
          <label>${_('Reviewer voting result')}:</label>
          <div>
            <div class="changeset-status-container" style="float:none;clear:both">
            %if c.current_voting_result:
              <span class="changeset-status-ico" style="padding:0px 4px 0px 0px">
                  <i class="icon-circle changeset-status-${c.current_voting_result}" title="${_('Pull request status calculated from votes')}"></i></span>
              <span class="changeset-status-lbl" data-toggle="tooltip" title="${_('Pull request status calculated from votes')}">
                %if c.pull_request.is_closed():
                    ${_('Closed')},
                %endif
                ${h.changeset_status_lbl(c.current_voting_result)}
              </span>
            %endif
            </div>
          </div>
        </div>
        <div class="form-group">
          <label>${_('Still not reviewed by')}:</label>
          <div>
            % if len(c.pull_request_pending_reviewers) > 0:
                <div data-toggle="tooltip" title="${', '.join([x.username for x in c.pull_request_pending_reviewers])}">${ungettext('%d reviewer', '%d reviewers',len(c.pull_request_pending_reviewers)) % len(c.pull_request_pending_reviewers)}</div>
            % elif len(c.pull_request_reviewers) > 0:
                <div>${_('Pull request was reviewed by all reviewers')}</div>
            %else:
                <div>${_('There are no reviewers')}</div>
            %endif
          </div>
        </div>
        <div class="form-group">
          <label>${_('Origin')}:</label>
          <div>
            <div>
              ${h.link_to_ref(c.pull_request.org_repo.repo_name, c.cs_ref_type, c.cs_ref_name, c.cs_rev)}
              %if c.cs_ref_type != 'branch':
                ${_('on')} ${h.link_to_ref(c.pull_request.org_repo.repo_name, 'branch', c.cs_branch_name)}
              %endif
            </div>
          </div>
        </div>
        <div class="form-group">
          <label>${_('Target')}:</label>
          <div>
            %if c.is_range:
              ${_("This is just a range of changesets and doesn't have a target or a real merge ancestor.")}
            %else:
              ${h.link_to_ref(c.pull_request.other_repo.repo_name, c.a_ref_type, c.a_ref_name)}
              ## we don't know other rev - c.a_rev is ancestor and not necessarily on other_name_branch branch
            %endif
          </div>
        </div>
        <div class="form-group">
          <label>${_('Pull changes')}:</label>
          <div>
            %if c.cs_ranges:
              <div>
               ## TODO: use cs_ranges[-1] or org_ref_parts[1] in both cases?
               %if h.is_hg(c.pull_request.org_repo):
                 <span style="font-family: monospace">hg pull ${c.pull_request.org_repo.clone_url()} -r ${h.short_id(c.cs_ranges[-1].raw_id)}</span>
               %elif h.is_git(c.pull_request.org_repo):
                 <span style="font-family: monospace">git pull ${c.pull_request.org_repo.clone_url()} ${c.pull_request.org_ref_parts[1]}</span>
               %endif
              </div>
            %endif
          </div>
        </div>
        <div class="form-group">
          <label>${_('Created on')}:</label>
          <div>
              <div>${h.fmt_date(c.pull_request.created_on)}</div>
          </div>
        </div>
        <div class="form-group">
          <label>${_('Owner')}:</label>
          <div class="pr-not-edit">
                  ${h.gravatar_div(c.pull_request.owner.email, size=20)}
                  <span>${c.pull_request.owner.full_name_and_username}</span><br/>
                  <span><a href="mailto:${c.pull_request.owner.email}">${c.pull_request.owner.email}</a></span><br/>
          </div>
          <div class="pr-do-edit ac" style="display:none">
               ${h.text('owner', class_='form-control', value=c.pull_request.owner.username, placeholder=_('Username'))}
               <div id="owner_completion_container"></div>
          </div>
        </div>

        <div class="form-group">
          <label>${_('Next iteration')}:</label>
            <div>
              <div class="msg-div">${c.update_msg}</div>
              %if c.avail_revs:
              <div id="updaterevs" style="max-height:200px; overflow-y:auto; overflow-x:hidden; margin-bottom: 10px; padding: 1px 0">
                <div style="height:0;width:40px">
                  <canvas id="avail_graph_canvas" style="width:0"></canvas>
                </div>
                <table id="updaterevs-table" class="noborder" style="padding-left:50px">
                  %for cnt, cs in enumerate(c.avail_cs):
                    <tr id="chg_available_${cnt+1}" class="${'mergerow' if len(cs.parents) > 1 and not (editable and cs.revision in c.avail_revs) else ''}">
                      %if c.cs_ranges and cs.revision == c.cs_ranges[-1].revision:
                        <td>
                          %if editable:
                            ${h.radio(name='updaterev', value='', checked=True)}
                          %endif
                        </td>
                        <td colspan="4">${_("Current revision - no change")}</td>
                      %else:
                        <td>
                          %if editable and cs.revision in c.avail_revs:
                            ${h.radio(name='updaterev', value=cs.raw_id)}
                          %endif
                        </td>
                        <td style="width: 120px"><span data-toggle="tooltip" title="${h.age(cs.date)}">${cs.date}</span></td>
                        <td>${h.link_to(h.show_id(cs),h.url('changeset_home',repo_name=c.cs_repo.repo_name,revision=cs.raw_id), class_='changeset_hash')}</td>
                        <td>
                          <div style="float: right; margin-top: -4px;">
                            %for tag in cs.tags:
                              <span class="tagtag" title="${_('Tag %s') % tag}">
                                ${h.link_to(tag,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}
                              </span>
                            %endfor
                          </div>
                          <div class="message" style="white-space:normal; height:1.1em; max-width: 500px; padding:0">${h.urlify_text(cs.message, c.repo_name)}</div>
                        </td>
                      %endif
                    </tr>
                  %endfor
                </table>
              </div>
              <div class="msg-div">(${_("Pull request iterations do not change content once created. Select a revision and save to make a new iteration.")})</div>
              %endif
              <div class="msg-div">${c.update_msg_other}</div>
            </div>
        </div>
        %if editable:
        <div class="form-group">
          <div class="buttons">
            ${h.submit('pr-form-save',_('Save Changes'),class_="btn btn-default btn-sm")}
            ${h.submit('pr-form-clone',_('Create New Iteration with Changes'),class_="btn btn-default btn-sm",disabled='disabled')}
            ${h.reset('pr-form-reset',_('Cancel Changes'),class_="btn btn-default btn-sm")}
          </div>
        </div>
        %endif
      </div>
    </div>
    ## REVIEWERS
    <div style="float:left; border-left:1px dashed #eee">
        <div class="pr-details-title">${_('Pull Request Reviewers')}</div>
        <div id="reviewers" style="padding:0px 0px 5px 10px">
          ## members goes here !
          <div>
            %for member,status in c.pull_request_reviewers:
              <input type="hidden" value="${member.user_id}" name="org_review_members" />
            %endfor
            <ul id="review_members">
            %for member,status in c.pull_request_reviewers:
              ## WARNING: the HTML below is duplicate with
              ## kallithea/public/js/base.js
              ## If you change something here it should be reflected in the template too.
              <li id="reviewer_${member.user_id}">
                <span class="reviewers_member">
                  <span class="reviewer_status" data-toggle="tooltip" title="${h.changeset_status_lbl(status)}">
                      <i class="icon-circle changeset-status-${status}"></i>
                  </span>
                  ${h.gravatar(member.email, size=14)}
                  <span>
                    ${member.full_name_and_username}
                    %if c.pull_request.owner_id == member.user_id:
                      (${_('Owner')})
                    %endif
                  </span>
                  <input type="hidden" value="${member.user_id}" name="review_members" />
                  %if editable:
                  <a href="#" class="reviewer_member_remove" onclick="removeReviewMember(${member.user_id})" title="${_('Remove reviewer')}">
                      <i class="icon-minus-circled"></i>
                  </a>
                  %endif
                </span>
              </li>
            %endfor
            </ul>
          </div>
          %if editable:
          <div class='ac'>
            <div class="reviewer_ac">
               ${h.text('user', class_='yui-ac-input form-control',placeholder=_('Type name of reviewer to add'))}
               <div id="reviewers_container"></div>
            </div>
          </div>
          %endif
        </div>

        %if not c.pull_request_reviewers:
        <div class="pr-details-title">${_('Potential Reviewers')}</div>
        <div style="margin: 10px 0 10px 10px; max-width: 250px">
          <div>
            ${_('Click to add the repository owner as reviewer:')}
          </div>
          <ul style="margin-top: 10px">
            %for u in [c.pull_request.other_repo.owner]:
              <li>
                <a class="missing_reviewer missing_reviewer_${u.user_id}"
                  user_id="${u.user_id}"
                  fname="${u.name}"
                  lname="${u.lastname}"
                  nname="${u.username}"
                  gravatar_lnk="${h.gravatar_url(u.email, size=28, default='default')}"
                  gravatar_size="14"
                  title="Click to add reviewer to the list, then Save Changes.">${u.full_name}</a>
              </li>
            %endfor
          </ul>
        </div>
        %endif
    </div>
    <div style="clear:both">
    </div>
  ${h.end_form()}
</div>

<div class="panel panel-primary">
    <div class="panel-heading">
      <div class="breadcrumbs">${_('Pull Request Content')}</div>
    </div>
    <div class="table">
          <div id="changeset_compare_view_content">
              <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">
                  ${comment.comment_count(c.inline_cnt, len(c.comments))}
              </div>
              ##CS
              <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">
                ${ungettext('Showing %s commit','Showing %s commits', len(c.cs_ranges)) % len(c.cs_ranges)}
              </div>
              <%include file="/compare/compare_cs.html" />

              <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">
              ${_('Common ancestor')}:
              ${h.link_to(h.short_id(c.a_rev),h.url('changeset_home',repo_name=c.a_repo.repo_name,revision=c.a_rev), class_="changeset_hash")}
              </div>

              ## FILES
              <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">

              % if c.limited_diff:
                  ${ungettext('%s file changed', '%s files changed', len(c.file_diff_data)) % len(c.file_diff_data)}:
              % else:
                  ${ungettext('%s file changed with %s insertions and %s deletions','%s files changed with %s insertions and %s deletions', len(c.file_diff_data)) % (len(c.file_diff_data),c.lines_added,c.lines_deleted)}:
              %endif

              </div>
              <div class="cs_files">
                %if not c.file_diff_data:
                   <span class="empty_data">${_('No files')}</span>
                %endif
                %for fid, url_fid, op, a_path, path, diff, stats in c.file_diff_data:
                    <div class="cs_${op}">
                      <div class="node">
                          <i class="icon-diff-${op}"></i>
                          ${h.link_to(h.safe_unicode(path), '#%s' % fid)}
                      </div>
                      <div class="changes">${h.fancy_file_stats(stats)}</div>
                    </div>
                %endfor
                %if c.limited_diff:
                  <h5>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}">${_('Show full diff anyway')}</a></h5>
                %endif
              </div>
          </div>
    </div>
    <script>
    var _USERS_AC_DATA = ${c.users_array|n};
    var _GROUPS_AC_DATA = ${c.user_groups_array|n};
    // TODO: switch this to pyroutes
    AJAX_COMMENT_URL = "${url('pullrequest_comment',repo_name=c.repo_name,pull_request_id=c.pull_request.pull_request_id)}";
    AJAX_COMMENT_DELETE_URL = "${url('pullrequest_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}";

    pyroutes.register('pullrequest_comment', "${url('pullrequest_comment',repo_name='%(repo_name)s',pull_request_id='%(pull_request_id)s')}", ['repo_name', 'pull_request_id']);
    pyroutes.register('pullrequest_comment_delete', "${url('pullrequest_comment_delete',repo_name='%(repo_name)s',comment_id='%(comment_id)s')}", ['repo_name', 'comment_id']);

    </script>

    ## diff block
    <div class="commentable-diff">
    <%namespace name="diff_block" file="/changeset/diff_block.html"/>
    ${diff_block.diff_block_js()}
    ${diff_block.diff_block(c.a_repo.repo_name, c.a_ref_type, c.a_ref_name, c.a_rev,
                            c.cs_repo.repo_name, c.cs_ref_type, c.cs_ref_name, c.cs_rev, c.file_diff_data)}
    % if c.limited_diff:
      <h4>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}">${_('Show full diff anyway')}</a></h4>
    % endif
    </div>

    ## template for inline comment form
    ${comment.comment_inline_form()}

    ## render comments and inlines
    ${comment.generate_comments()}

    ## main comment form and it status
    ${comment.comments(change_status=c.allowed_to_change_status)}

    <script type="text/javascript">
      $(document).ready(function(){
          PullRequestAutoComplete($('#user'), $('#reviewers_container'), _USERS_AC_DATA);
          SimpleUserAutoComplete($('#owner'), $('#owner_completion_container'), _USERS_AC_DATA);

          $('.code-difftable').on('click', '.add-bubble', function(e){
              show_comment_form($(this));
          });

          var avail_jsdata = ${c.avail_jsdata|n};
          var avail_r = new BranchRenderer('avail_graph_canvas', 'updaterevs-table', 'chg_available_');
          avail_r.render(avail_jsdata);

          move_comments($(".comments .comments-list-chunk"));

          $('#updaterevs input').change(function(e){
              var update = !!e.target.value;
              $('#pr-form-save').prop('disabled',update);
              $('#pr-form-clone').prop('disabled',!update);
          });
          var $org_review_members = $('#review_members').clone();
          $('#pr-form-reset').click(function(e){
              $('.pr-do-edit').hide();
              $('.pr-not-edit').show();
              $('#pr-form-save').prop('disabled',false);
              $('#pr-form-clone').prop('disabled',true);
              $('#review_members').html($org_review_members);
          });

          // hack: re-navigate to target after JS is done ... if a target is set and setting href thus won't reload
          if (window.location.hash != "") {
              window.location.href = window.location.href;
          }

          $('.missing_reviewer').click(function(){
            var $this = $(this);
            addReviewMember($this.attr('user_id'), $this.attr('fname'), $this.attr('lname'), $this.attr('nname'), $this.attr('gravatar_lnk'), $this.attr('gravatar_size'));
          });
      });
    </script>

</div>

</%def>