compare_cs.html
60 lines
| 2.3 KiB
| text/html
|
HtmlLexer
r2395 | ## Changesets table ! | |||
<div class="container"> | ||||
%if not c.cs_ranges: | ||||
r3015 | <span class="empty_data">${_('No changesets')}</span> | |||
r2395 | %else: | |||
Bradley M. Kuhn
|
r4116 | |||
%if c.ancestor: | ||||
<div class="ancestor">${_('Ancestor')}: | ||||
${h.link_to(h.short_id(c.ancestor),h.url('changeset_home',repo_name=c.repo_name,revision=c.ancestor))} | ||||
</div> | ||||
%endif | ||||
Mads Kiilerich
|
r3486 | <table class="compare_view_commits noborder"> | ||
Mads Kiilerich
|
r3518 | %for cs in reversed(c.cs_ranges): | ||
Bradley M. Kuhn
|
r4116 | <tr id="row-${cs.raw_id}"> | ||
r2395 | <td> | |||
%if cs.raw_id in c.statuses: | ||||
Bradley M. Kuhn
|
r4116 | <div title="${_('Changeset status: %s') % c.statuses[cs.raw_id][1]}" class="changeset-status-ico"> | ||
<img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[cs.raw_id][0])}" /> | ||||
</div> | ||||
r2395 | %endif | |||
r2434 | </td> | |||
Bradley M. Kuhn
|
r4116 | <td style="min-width: 120px"><span class="tooltip" title="${h.tooltip(h.age(cs.date))}">${cs.date}</span></td> | ||
<td><div class="gravatar" commit_id="${cs.raw_id}"><img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),14)}"/></div></td> | ||||
Mads Kiilerich
|
r3610 | <td><div class="author">${h.person(cs.author)}</div></td> | ||
Mads Kiilerich
|
r3324 | <td>${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.other_repo.repo_name,revision=cs.raw_id))} | ||
r2434 | %if c.as_form: | |||
${h.hidden('revisions',cs.raw_id)} | ||||
%endif | ||||
</td> | ||||
r3614 | <td> | |||
%if cs.branch: | ||||
<span class="branchtag">${cs.branch}</span> | ||||
%endif | ||||
</td> | ||||
Bradley M. Kuhn
|
r4116 | <td class="expand_commit" commit_id="${cs.raw_id}" title="${_('Expand commit message')}"> | ||
<i class="icon-resize-vertical" style="color:#DDD"></i> | ||||
</td> | ||||
<td><div id="C-${cs.raw_id}" class="message" style="white-space:normal; height: 10px;width: 250px">${h.urlify_commit(cs.message, c.repo_name)}</div></td> | ||||
r2395 | </tr> | |||
%endfor | ||||
Mads Kiilerich
|
r3486 | </table> | ||
%if c.as_form: | ||||
${h.hidden('ancestor_rev',c.ancestor)} | ||||
${h.hidden('merge_rev',c.cs_ranges[-1].raw_id)} | ||||
%endif | ||||
r2395 | %endif | |||
r2434 | </div> | |||
Bradley M. Kuhn
|
r4116 | |||
<script> | ||||
$('.expand_commit').on('click',function(e){ | ||||
$(this).children('i').hide(); | ||||
var cid = $(this).attr('commit_id'); | ||||
$('#C-'+cid).css({'height': 'auto','width': 'auto', 'white-space': 'pre'}) | ||||
}); | ||||
$('.gravatar').on('click',function(e){ | ||||
var cid = $(this).attr('commit_id'); | ||||
$('#row-'+cid).toggleClass('hl', !$('#row-'+cid).hasClass('hl')); | ||||
}); | ||||
</script> | ||||