annotate kallithea/templates/compare/compare_cs.html @ 5683:5fe9bb7acee6

pullrequests: show tags in lists of included and available changesets Further improvement: Also show bookmarks and other names (preferably by using some helper function/template instead of duplicating code). It would perhaps also be better to avoid using floating.
author Mads Kiilerich <madski@unity3d.com>
date Mon, 01 Feb 2016 21:23:07 +0100
parents b8734b428786
children f287754980cc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2395
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
1 ## Changesets table !
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
2 <div class="container">
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
3 %if not c.cs_ranges:
3015
16af24982e30 Multiple changes for compare system
Marcin Kuzminski <marcin@python-works.com>
parents: 3011
diff changeset
4 <span class="empty_data">${_('No changesets')}</span>
2395
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
5 %else:
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4056
diff changeset
6
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4056
diff changeset
7 %if c.ancestor:
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4056
diff changeset
8 <div class="ancestor">${_('Ancestor')}:
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4056
diff changeset
9 ${h.link_to(h.short_id(c.ancestor),h.url('changeset_home',repo_name=c.repo_name,revision=c.ancestor))}
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4056
diff changeset
10 </div>
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4056
diff changeset
11 %endif
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4056
diff changeset
12
4352
c733124b6262 pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents: 4351
diff changeset
13 <div id="graph_nodes">
5385
b8734b428786 graphs: set initial canvas size to 0
Mads Kiilerich <madski@unity3d.com>
parents: 5284
diff changeset
14 <canvas id="graph_canvas" style="width:0"></canvas>
4352
c733124b6262 pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents: 4351
diff changeset
15 </div>
c733124b6262 pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents: 4351
diff changeset
16
c733124b6262 pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents: 4351
diff changeset
17 <div id="graph_content_pr" style="margin-left: 100px;">
c733124b6262 pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents: 4351
diff changeset
18
3486
2053053e0882 compare/pullrequest: introduce merge parameter
Mads Kiilerich <madski@unity3d.com>
parents: 3324
diff changeset
19 <table class="compare_view_commits noborder">
4353
67d5afe2fa1a pull requests: show graph when creating PR
Mads Kiilerich <madski@unity3d.com>
parents: 4352
diff changeset
20 %for cnt, cs in enumerate(reversed(c.cs_ranges)):
4352
c733124b6262 pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents: 4351
diff changeset
21 <tr id="chg_${cnt+1}">
4262
f9c473b0d385 old style: adjust column widths
Mads Kiilerich <madski@unity3d.com>
parents: 4187
diff changeset
22 <td style="width:50px">
2395
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
23 %if cs.raw_id in c.statuses:
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4056
diff changeset
24 <div title="${_('Changeset status: %s') % c.statuses[cs.raw_id][1]}" class="changeset-status-ico">
4625
40f65bfc04d0 flag_status: replace with icon-circle
Sean Farley <sean.michael.farley@gmail.com>
parents: 4623
diff changeset
25 <i class="icon-circle changeset-status-${c.statuses[cs.raw_id][0]}"></i>
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4056
diff changeset
26 </div>
2395
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
27 %endif
4367
7879d8d88672 pull requests: show changeset comment and status flags in the changelog for PRs
Mads Kiilerich <madski@unity3d.com>
parents: 4354
diff changeset
28 %if c.cs_comments.get(cs.raw_id):
7879d8d88672 pull requests: show changeset comment and status flags in the changelog for PRs
Mads Kiilerich <madski@unity3d.com>
parents: 4354
diff changeset
29 <div class="comments-container">
7879d8d88672 pull requests: show changeset comment and status flags in the changelog for PRs
Mads Kiilerich <madski@unity3d.com>
parents: 4354
diff changeset
30 <div class="comments-cnt" title="${_('Changeset has comments')}">
5156
b3299a079fa6 comments: introduce .url method for linking to originating PR or changeset page
Mads Kiilerich <madski@unity3d.com>
parents: 4855
diff changeset
31 <a href="${c.cs_comments[cs.raw_id][0].url()}">
4367
7879d8d88672 pull requests: show changeset comment and status flags in the changelog for PRs
Mads Kiilerich <madski@unity3d.com>
parents: 4354
diff changeset
32 ${len(c.cs_comments[cs.raw_id])}
4855
02fadbd74483 font: fix missing icon-comment-color and icon-comment-alt
Sean Farley <sean.michael.farley@gmail.com>
parents: 4795
diff changeset
33 <i class="icon-comment"></i>
4367
7879d8d88672 pull requests: show changeset comment and status flags in the changelog for PRs
Mads Kiilerich <madski@unity3d.com>
parents: 4354
diff changeset
34 </a>
7879d8d88672 pull requests: show changeset comment and status flags in the changelog for PRs
Mads Kiilerich <madski@unity3d.com>
parents: 4354
diff changeset
35 </div>
7879d8d88672 pull requests: show changeset comment and status flags in the changelog for PRs
Mads Kiilerich <madski@unity3d.com>
parents: 4354
diff changeset
36 </div>
7879d8d88672 pull requests: show changeset comment and status flags in the changelog for PRs
Mads Kiilerich <madski@unity3d.com>
parents: 4354
diff changeset
37 %endif
2434
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2395
diff changeset
38 </td>
5165
6ec5fd198084 pullrequest/compare: add logical changeset index to clarify the order
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents: 5156
diff changeset
39 <td class="changeset-logical-index">
6ec5fd198084 pullrequest/compare: add logical changeset index to clarify the order
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents: 5156
diff changeset
40 <%
6ec5fd198084 pullrequest/compare: add logical changeset index to clarify the order
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents: 5156
diff changeset
41 num_cs = len(c.cs_ranges)
6ec5fd198084 pullrequest/compare: add logical changeset index to clarify the order
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents: 5156
diff changeset
42 index = num_cs - cnt
6ec5fd198084 pullrequest/compare: add logical changeset index to clarify the order
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents: 5156
diff changeset
43 if index == 1:
6ec5fd198084 pullrequest/compare: add logical changeset index to clarify the order
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents: 5156
diff changeset
44 title = _('First (oldest) changeset in this list')
6ec5fd198084 pullrequest/compare: add logical changeset index to clarify the order
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents: 5156
diff changeset
45 elif index == num_cs:
6ec5fd198084 pullrequest/compare: add logical changeset index to clarify the order
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents: 5156
diff changeset
46 title = _('Last (most recent) changeset in this list')
6ec5fd198084 pullrequest/compare: add logical changeset index to clarify the order
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents: 5156
diff changeset
47 else:
6ec5fd198084 pullrequest/compare: add logical changeset index to clarify the order
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents: 5156
diff changeset
48 title = _('Position in this list of changesets')
6ec5fd198084 pullrequest/compare: add logical changeset index to clarify the order
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents: 5156
diff changeset
49 %>
6ec5fd198084 pullrequest/compare: add logical changeset index to clarify the order
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents: 5156
diff changeset
50 <span class="tooltip" title="${title}">
6ec5fd198084 pullrequest/compare: add logical changeset index to clarify the order
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents: 5156
diff changeset
51 ${index}
6ec5fd198084 pullrequest/compare: add logical changeset index to clarify the order
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents: 5156
diff changeset
52 </span>
6ec5fd198084 pullrequest/compare: add logical changeset index to clarify the order
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents: 5156
diff changeset
53 </td>
5284
5d161c096260 helpers: drop h.tooltip
Mads Kiilerich <madski@unity3d.com>
parents: 5165
diff changeset
54 <td style="width: 140px"><span class="tooltip" title="${h.age(cs.date)}">${cs.date}</span></td>
4795
83087ae63bd6 gravatar: use helper method to generate retina img tag
Sean Farley <sean.michael.farley@gmail.com>
parents: 4778
diff changeset
55 <td><div class="gravatar" commit_id="${cs.raw_id}">${h.gravatar(h.email_or_none(cs.author), size=14)}</div></td>
3610
5f1f77948355 compare: reorder columns in changeset list - this feels more natural to me
Mads Kiilerich <madski@unity3d.com>
parents: 3605
diff changeset
56 <td><div class="author">${h.person(cs.author)}</div></td>
4368
3136811db1af compare: introduce .cs_repo as the repo for .cs_changes - sometimes it is org, sometimes other
Mads Kiilerich <madski@unity3d.com>
parents: 4367
diff changeset
57 <td>${h.link_to(h.show_id(cs),h.url('changeset_home',repo_name=c.cs_repo.repo_name,revision=cs.raw_id))}</td>
3614
e8db9fe4cca3 fix branch UI issue for git repos
Marcin Kuzminski <marcin@python-works.com>
parents: 3610
diff changeset
58 <td>
e8db9fe4cca3 fix branch UI issue for git repos
Marcin Kuzminski <marcin@python-works.com>
parents: 3610
diff changeset
59 %if cs.branch:
4368
3136811db1af compare: introduce .cs_repo as the repo for .cs_changes - sometimes it is org, sometimes other
Mads Kiilerich <madski@unity3d.com>
parents: 4367
diff changeset
60 <span class="branchtag">${h.link_to(cs.branch,h.url('changelog_home',repo_name=c.cs_repo.repo_name,branch=cs.branch))}</span>
3614
e8db9fe4cca3 fix branch UI issue for git repos
Marcin Kuzminski <marcin@python-works.com>
parents: 3610
diff changeset
61 %endif
e8db9fe4cca3 fix branch UI issue for git repos
Marcin Kuzminski <marcin@python-works.com>
parents: 3610
diff changeset
62 </td>
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4056
diff changeset
63 <td class="expand_commit" commit_id="${cs.raw_id}" title="${_('Expand commit message')}">
4623
27c7922c745d text_align_left.png: replace icon-resize-vertical with icon-align-left
Sean Farley <sean.michael.farley@gmail.com>
parents: 4516
diff changeset
64 <i class="icon-align-left" style="color:#999"></i>
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4056
diff changeset
65 </td>
5683
5fe9bb7acee6 pullrequests: show tags in lists of included and available changesets
Mads Kiilerich <madski@unity3d.com>
parents: 5385
diff changeset
66 <td>
5fe9bb7acee6 pullrequests: show tags in lists of included and available changesets
Mads Kiilerich <madski@unity3d.com>
parents: 5385
diff changeset
67 <div style="float: right; margin-top: -4px;">
5fe9bb7acee6 pullrequests: show tags in lists of included and available changesets
Mads Kiilerich <madski@unity3d.com>
parents: 5385
diff changeset
68 %for tag in cs.tags:
5fe9bb7acee6 pullrequests: show tags in lists of included and available changesets
Mads Kiilerich <madski@unity3d.com>
parents: 5385
diff changeset
69 <div class="tagtag" title="${_('Tag %s') % tag}">
5fe9bb7acee6 pullrequests: show tags in lists of included and available changesets
Mads Kiilerich <madski@unity3d.com>
parents: 5385
diff changeset
70 ${h.link_to(tag,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}
5fe9bb7acee6 pullrequests: show tags in lists of included and available changesets
Mads Kiilerich <madski@unity3d.com>
parents: 5385
diff changeset
71 </div>
5fe9bb7acee6 pullrequests: show tags in lists of included and available changesets
Mads Kiilerich <madski@unity3d.com>
parents: 5385
diff changeset
72 %endfor
5fe9bb7acee6 pullrequests: show tags in lists of included and available changesets
Mads Kiilerich <madski@unity3d.com>
parents: 5385
diff changeset
73 </div>
5fe9bb7acee6 pullrequests: show tags in lists of included and available changesets
Mads Kiilerich <madski@unity3d.com>
parents: 5385
diff changeset
74 <div id="C-${cs.raw_id}" class="message">${h.urlify_commit(cs.message, c.repo_name)}</div>
5fe9bb7acee6 pullrequests: show tags in lists of included and available changesets
Mads Kiilerich <madski@unity3d.com>
parents: 5385
diff changeset
75 </td>
2395
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
76 </tr>
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
77 %endfor
3486
2053053e0882 compare/pullrequest: introduce merge parameter
Mads Kiilerich <madski@unity3d.com>
parents: 3324
diff changeset
78 </table>
4352
c733124b6262 pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents: 4351
diff changeset
79
c733124b6262 pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents: 4351
diff changeset
80 </div>
c733124b6262 pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents: 4351
diff changeset
81
4298
33a58b74bbc3 pull requests: include 'detailed view' and ancestor information in ajax chunk, open diff in another window
Mads Kiilerich <madski@unity3d.com>
parents: 4297
diff changeset
82 %if c.as_form:
33a58b74bbc3 pull requests: include 'detailed view' and ancestor information in ajax chunk, open diff in another window
Mads Kiilerich <madski@unity3d.com>
parents: 4297
diff changeset
83 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">
4460
6cb077e99873 diff: rename template values for org and other for compare and PR
Mads Kiilerich <madski@unity3d.com>
parents: 4368
diff changeset
84 ## links should perhaps use ('rev', c.a_rev) instead ...
4298
33a58b74bbc3 pull requests: include 'detailed view' and ancestor information in ajax chunk, open diff in another window
Mads Kiilerich <madski@unity3d.com>
parents: 4297
diff changeset
85 ${h.link_to(_('Show merge diff'),
33a58b74bbc3 pull requests: include 'detailed view' and ancestor information in ajax chunk, open diff in another window
Mads Kiilerich <madski@unity3d.com>
parents: 4297
diff changeset
86 h.url('compare_url',
4460
6cb077e99873 diff: rename template values for org and other for compare and PR
Mads Kiilerich <madski@unity3d.com>
parents: 4368
diff changeset
87 repo_name=c.a_repo.repo_name,
6cb077e99873 diff: rename template values for org and other for compare and PR
Mads Kiilerich <madski@unity3d.com>
parents: 4368
diff changeset
88 org_ref_type=c.a_ref_type, org_ref_name=c.a_ref_name,
6cb077e99873 diff: rename template values for org and other for compare and PR
Mads Kiilerich <madski@unity3d.com>
parents: 4368
diff changeset
89 other_repo=c.cs_repo.repo_name,
6cb077e99873 diff: rename template values for org and other for compare and PR
Mads Kiilerich <madski@unity3d.com>
parents: 4368
diff changeset
90 other_ref_type=c.cs_ref_type, other_ref_name=c.cs_ref_name,
4516
b3f12c354e87 javascript: remove nice trailing comma to please IE8 (Issue #39)
Mads Kiilerich <madski@unity3d.com>
parents: 4461
diff changeset
91 merge='1')
4298
33a58b74bbc3 pull requests: include 'detailed view' and ancestor information in ajax chunk, open diff in another window
Mads Kiilerich <madski@unity3d.com>
parents: 4297
diff changeset
92 )}
33a58b74bbc3 pull requests: include 'detailed view' and ancestor information in ajax chunk, open diff in another window
Mads Kiilerich <madski@unity3d.com>
parents: 4297
diff changeset
93 </div>
33a58b74bbc3 pull requests: include 'detailed view' and ancestor information in ajax chunk, open diff in another window
Mads Kiilerich <madski@unity3d.com>
parents: 4297
diff changeset
94 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">
33a58b74bbc3 pull requests: include 'detailed view' and ancestor information in ajax chunk, open diff in another window
Mads Kiilerich <madski@unity3d.com>
parents: 4297
diff changeset
95 ${_('Common ancestor')}:
33a58b74bbc3 pull requests: include 'detailed view' and ancestor information in ajax chunk, open diff in another window
Mads Kiilerich <madski@unity3d.com>
parents: 4297
diff changeset
96 %if c.ancestor:
4296
fa4ef7f0f440 compare: calculate changesets and calculate and show ancestor also for non-merge diffs
Mads Kiilerich <madski@unity3d.com>
parents: 4262
diff changeset
97 ${h.link_to(h.short_id(c.ancestor),h.url('changeset_home',repo_name=c.repo_name,revision=c.ancestor))}
4298
33a58b74bbc3 pull requests: include 'detailed view' and ancestor information in ajax chunk, open diff in another window
Mads Kiilerich <madski@unity3d.com>
parents: 4297
diff changeset
98 %else:
33a58b74bbc3 pull requests: include 'detailed view' and ancestor information in ajax chunk, open diff in another window
Mads Kiilerich <madski@unity3d.com>
parents: 4297
diff changeset
99 ${_('No common ancestor found - repositories are unrelated')}
33a58b74bbc3 pull requests: include 'detailed view' and ancestor information in ajax chunk, open diff in another window
Mads Kiilerich <madski@unity3d.com>
parents: 4297
diff changeset
100 %endif
4296
fa4ef7f0f440 compare: calculate changesets and calculate and show ancestor also for non-merge diffs
Mads Kiilerich <madski@unity3d.com>
parents: 4262
diff changeset
101 </div>
3486
2053053e0882 compare/pullrequest: introduce merge parameter
Mads Kiilerich <madski@unity3d.com>
parents: 3324
diff changeset
102 %endif
4297
7a5977429125 compare: show how many changesets the compared repo is behind
Mads Kiilerich <madski@unity3d.com>
parents: 4296
diff changeset
103 %if c.cs_ranges_org is not None:
7a5977429125 compare: show how many changesets the compared repo is behind
Mads Kiilerich <madski@unity3d.com>
parents: 4296
diff changeset
104 ## TODO: list actual changesets?
7a5977429125 compare: show how many changesets the compared repo is behind
Mads Kiilerich <madski@unity3d.com>
parents: 4296
diff changeset
105 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">
4460
6cb077e99873 diff: rename template values for org and other for compare and PR
Mads Kiilerich <madski@unity3d.com>
parents: 4368
diff changeset
106 ${h.link_to_ref(c.cs_repo.repo_name, c.cs_ref_type, c.cs_ref_name, c.cs_rev)}
4297
7a5977429125 compare: show how many changesets the compared repo is behind
Mads Kiilerich <madski@unity3d.com>
parents: 4296
diff changeset
107 ${_('is')}
7a5977429125 compare: show how many changesets the compared repo is behind
Mads Kiilerich <madski@unity3d.com>
parents: 4296
diff changeset
108 <a href="${c.swap_url}">${_('%s changesets') % (len(c.cs_ranges_org))}</a>
7a5977429125 compare: show how many changesets the compared repo is behind
Mads Kiilerich <madski@unity3d.com>
parents: 4296
diff changeset
109 ${_('behind')}
4461
d6e96730edfb diff: consistently use a=base=ancestor and b=changes in compare and PR
Mads Kiilerich <madski@unity3d.com>
parents: 4460
diff changeset
110 ${h.link_to_ref(c.a_repo.repo_name, c.a_ref_type, c.a_ref_name)}
4297
7a5977429125 compare: show how many changesets the compared repo is behind
Mads Kiilerich <madski@unity3d.com>
parents: 4296
diff changeset
111 </div>
7a5977429125 compare: show how many changesets the compared repo is behind
Mads Kiilerich <madski@unity3d.com>
parents: 4296
diff changeset
112 %endif
2395
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
113 %endif
2434
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2395
diff changeset
114 </div>
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4056
diff changeset
115
4353
67d5afe2fa1a pull requests: show graph when creating PR
Mads Kiilerich <madski@unity3d.com>
parents: 4352
diff changeset
116 %if c.as_form:
67d5afe2fa1a pull requests: show graph when creating PR
Mads Kiilerich <madski@unity3d.com>
parents: 4352
diff changeset
117 <div id="jsdata" style="display:none">${c.jsdata|n}</div>
67d5afe2fa1a pull requests: show graph when creating PR
Mads Kiilerich <madski@unity3d.com>
parents: 4352
diff changeset
118 %else:
4778
dba66b0768f4 graph: don't hardcode chg_ prefix ... and just assume canvas and table are aligned
Mads Kiilerich <madski@unity3d.com>
parents: 4625
diff changeset
119 <script type="text/javascript" src="${h.url('/js/graph.js', ver=c.kallithea_version)}"></script>
4352
c733124b6262 pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents: 4351
diff changeset
120 %endif
c733124b6262 pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents: 4351
diff changeset
121
c733124b6262 pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents: 4351
diff changeset
122 <script type="text/javascript">
c733124b6262 pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents: 4351
diff changeset
123
c733124b6262 pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents: 4351
diff changeset
124 $(document).ready(function(){
c733124b6262 pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents: 4351
diff changeset
125 %if not c.as_form:
c733124b6262 pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents: 4351
diff changeset
126 var jsdata = ${c.jsdata|n};
4778
dba66b0768f4 graph: don't hardcode chg_ prefix ... and just assume canvas and table are aligned
Mads Kiilerich <madski@unity3d.com>
parents: 4625
diff changeset
127 var r = new BranchRenderer('graph_canvas', 'graph_content_pr', 'chg_');
4352
c733124b6262 pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents: 4351
diff changeset
128 r.render(jsdata,100);
c733124b6262 pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents: 4351
diff changeset
129 %endif
c733124b6262 pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents: 4351
diff changeset
130
c733124b6262 pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents: 4351
diff changeset
131 $('.expand_commit').click(function(e){
c733124b6262 pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents: 4351
diff changeset
132 var cid = $(this).attr('commit_id');
c733124b6262 pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents: 4351
diff changeset
133 $('#C-'+cid).toggleClass('expanded');
c733124b6262 pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents: 4351
diff changeset
134 r.render(jsdata,100);
c733124b6262 pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents: 4351
diff changeset
135 });
c733124b6262 pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents: 4351
diff changeset
136
c733124b6262 pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents: 4351
diff changeset
137 $('.gravatar').click(function(e){
c733124b6262 pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents: 4351
diff changeset
138 var cid = $(this).attr('commit_id');
c733124b6262 pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents: 4351
diff changeset
139 $('#row-'+cid).toggleClass('hl', !$('#row-'+cid).hasClass('hl'));
c733124b6262 pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents: 4351
diff changeset
140 });
c733124b6262 pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents: 4351
diff changeset
141 });
c733124b6262 pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents: 4351
diff changeset
142
4368
3136811db1af compare: introduce .cs_repo as the repo for .cs_changes - sometimes it is org, sometimes other
Mads Kiilerich <madski@unity3d.com>
parents: 4367
diff changeset
143 </script>