Mercurial > kallithea
annotate kallithea/templates/compare/compare_cs.html @ 6667:8dd57541a2f7
pullrequests: fix graph re-drawing on 'expand' of changeset description while creating PR
Expanding would fail with
TypeError: r.render is not a function
To fix this, do all the graph drawing in compare_cs.html .
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Sun, 11 Jun 2017 15:02:08 +0200 |
parents | 62ac1470b748 |
children | b99cd2bc7540 |
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 |
6302
84eb5b7b1bac
pullrequests: prevent creation of invalid pull requests, empty or unrelated or criss cross
Mads Kiilerich <madski@unity3d.com>
parents:
6294
diff
changeset
|
7 %if c.ancestors: |
84eb5b7b1bac
pullrequests: prevent creation of invalid pull requests, empty or unrelated or criss cross
Mads Kiilerich <madski@unity3d.com>
parents:
6294
diff
changeset
|
8 <div class="ancestor"> |
84eb5b7b1bac
pullrequests: prevent creation of invalid pull requests, empty or unrelated or criss cross
Mads Kiilerich <madski@unity3d.com>
parents:
6294
diff
changeset
|
9 %if len(c.ancestors) > 1: |
84eb5b7b1bac
pullrequests: prevent creation of invalid pull requests, empty or unrelated or criss cross
Mads Kiilerich <madski@unity3d.com>
parents:
6294
diff
changeset
|
10 <div style="color:red; font-weight: bold"> |
84eb5b7b1bac
pullrequests: prevent creation of invalid pull requests, empty or unrelated or criss cross
Mads Kiilerich <madski@unity3d.com>
parents:
6294
diff
changeset
|
11 ${_('Criss cross merge situation with multiple merge ancestors detected!')} |
84eb5b7b1bac
pullrequests: prevent creation of invalid pull requests, empty or unrelated or criss cross
Mads Kiilerich <madski@unity3d.com>
parents:
6294
diff
changeset
|
12 </div> |
84eb5b7b1bac
pullrequests: prevent creation of invalid pull requests, empty or unrelated or criss cross
Mads Kiilerich <madski@unity3d.com>
parents:
6294
diff
changeset
|
13 <div style="color:red"> |
84eb5b7b1bac
pullrequests: prevent creation of invalid pull requests, empty or unrelated or criss cross
Mads Kiilerich <madski@unity3d.com>
parents:
6294
diff
changeset
|
14 ${_('Please merge the target branch to your branch before creating a pull request.')} |
84eb5b7b1bac
pullrequests: prevent creation of invalid pull requests, empty or unrelated or criss cross
Mads Kiilerich <madski@unity3d.com>
parents:
6294
diff
changeset
|
15 </div> |
84eb5b7b1bac
pullrequests: prevent creation of invalid pull requests, empty or unrelated or criss cross
Mads Kiilerich <madski@unity3d.com>
parents:
6294
diff
changeset
|
16 %endif |
84eb5b7b1bac
pullrequests: prevent creation of invalid pull requests, empty or unrelated or criss cross
Mads Kiilerich <madski@unity3d.com>
parents:
6294
diff
changeset
|
17 <div> |
84eb5b7b1bac
pullrequests: prevent creation of invalid pull requests, empty or unrelated or criss cross
Mads Kiilerich <madski@unity3d.com>
parents:
6294
diff
changeset
|
18 ${_('Merge Ancestor')}: |
84eb5b7b1bac
pullrequests: prevent creation of invalid pull requests, empty or unrelated or criss cross
Mads Kiilerich <madski@unity3d.com>
parents:
6294
diff
changeset
|
19 %for ancestor in c.ancestors: |
84eb5b7b1bac
pullrequests: prevent creation of invalid pull requests, empty or unrelated or criss cross
Mads Kiilerich <madski@unity3d.com>
parents:
6294
diff
changeset
|
20 ${h.link_to(h.short_id(ancestor),h.url('changeset_home',repo_name=c.repo_name,revision=ancestor), class_="changeset_hash")} |
84eb5b7b1bac
pullrequests: prevent creation of invalid pull requests, empty or unrelated or criss cross
Mads Kiilerich <madski@unity3d.com>
parents:
6294
diff
changeset
|
21 %endfor |
84eb5b7b1bac
pullrequests: prevent creation of invalid pull requests, empty or unrelated or criss cross
Mads Kiilerich <madski@unity3d.com>
parents:
6294
diff
changeset
|
22 </div> |
84eb5b7b1bac
pullrequests: prevent creation of invalid pull requests, empty or unrelated or criss cross
Mads Kiilerich <madski@unity3d.com>
parents:
6294
diff
changeset
|
23 </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
|
24 %endif |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4056
diff
changeset
|
25 |
4352
c733124b6262
pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents:
4351
diff
changeset
|
26 <div id="graph_nodes"> |
5385
b8734b428786
graphs: set initial canvas size to 0
Mads Kiilerich <madski@unity3d.com>
parents:
5284
diff
changeset
|
27 <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
|
28 </div> |
c733124b6262
pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents:
4351
diff
changeset
|
29 |
c733124b6262
pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents:
4351
diff
changeset
|
30 <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
|
31 |
6420
1ce4e23c2207
style: apply Bootstrap-compatible table.table class, now when the conflicting div.table styling is gone
Mads Kiilerich <mads@kiilerich.com>
parents:
6414
diff
changeset
|
32 <table class="table compare_view_commits"> |
4353
67d5afe2fa1a
pull requests: show graph when creating PR
Mads Kiilerich <madski@unity3d.com>
parents:
4352
diff
changeset
|
33 %for cnt, cs in enumerate(reversed(c.cs_ranges)): |
6289
68d3315c48d4
style: whitespace fixes in templates - make indentation more consistent and reduce future churn
Mads Kiilerich <madski@unity3d.com>
parents:
6288
diff
changeset
|
34 <tr id="chg_${cnt+1}" class="${'mergerow' if len(cs.parents) > 1 else ''}"> |
4262
f9c473b0d385
old style: adjust column widths
Mads Kiilerich <madski@unity3d.com>
parents:
4187
diff
changeset
|
35 <td style="width:50px"> |
2395
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
36 %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
|
37 <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
|
38 <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
|
39 </div> |
2395
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
40 %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
|
41 %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
|
42 <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
|
43 <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
|
44 <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
|
45 ${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
|
46 <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
|
47 </a> |
7879d8d88672
pull requests: show changeset comment and status flags in the changelog for PRs
Mads Kiilerich <madski@unity3d.com>
parents:
4354
diff
changeset
|
48 </div> |
7879d8d88672
pull requests: show changeset comment and status flags in the changelog for PRs
Mads Kiilerich <madski@unity3d.com>
parents:
4354
diff
changeset
|
49 </div> |
7879d8d88672
pull requests: show changeset comment and status flags in the changelog for PRs
Mads Kiilerich <madski@unity3d.com>
parents:
4354
diff
changeset
|
50 %endif |
2434
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2395
diff
changeset
|
51 </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
|
52 <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
|
53 <% |
6ec5fd198084
pullrequest/compare: add logical changeset index to clarify the order
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
5156
diff
changeset
|
54 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
|
55 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
|
56 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
|
57 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
|
58 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
|
59 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
|
60 else: |
6ec5fd198084
pullrequest/compare: add logical changeset index to clarify the order
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
5156
diff
changeset
|
61 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
|
62 %> |
6294
c40e567e4b82
style: use Bootstrap compatible data-toggle="tooltip" markup
Mads Kiilerich <madski@unity3d.com>
parents:
6289
diff
changeset
|
63 <span data-toggle="tooltip" title="${title}"> |
5165
6ec5fd198084
pullrequest/compare: add logical changeset index to clarify the order
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
5156
diff
changeset
|
64 ${index} |
6ec5fd198084
pullrequest/compare: add logical changeset index to clarify the order
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
5156
diff
changeset
|
65 </span> |
6ec5fd198084
pullrequest/compare: add logical changeset index to clarify the order
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
5156
diff
changeset
|
66 </td> |
6294
c40e567e4b82
style: use Bootstrap compatible data-toggle="tooltip" markup
Mads Kiilerich <madski@unity3d.com>
parents:
6289
diff
changeset
|
67 <td style="width: 140px"><span data-toggle="tooltip" title="${h.age(cs.date)}">${cs.date}</span></td> |
5896
b9688c512c63
helpers: more efficient disabling of gravatars - don't leave spacing behind
Mads Kiilerich <madski@unity3d.com>
parents:
5895
diff
changeset
|
68 %if c.visual.use_gravatar: |
6441
2aac00dc5415
template: drop spurious commit id on gravatar
Mads Kiilerich <mads@kiilerich.com>
parents:
6420
diff
changeset
|
69 <td>${h.gravatar_div(h.email_or_none(cs.author), size=14)}</td> |
5896
b9688c512c63
helpers: more efficient disabling of gravatars - don't leave spacing behind
Mads Kiilerich <madski@unity3d.com>
parents:
5895
diff
changeset
|
70 %endif |
3610
5f1f77948355
compare: reorder columns in changeset list - this feels more natural to me
Mads Kiilerich <madski@unity3d.com>
parents:
3605
diff
changeset
|
71 <td><div class="author">${h.person(cs.author)}</div></td> |
6123
12919ffab34c
pullrequests: use monospace for hashes - columns of hashes look messy when they have different lenght
Mads Kiilerich <madski@unity3d.com>
parents:
5896
diff
changeset
|
72 <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> |
3614
e8db9fe4cca3
fix branch UI issue for git repos
Marcin Kuzminski <marcin@python-works.com>
parents:
3610
diff
changeset
|
73 <td> |
e8db9fe4cca3
fix branch UI issue for git repos
Marcin Kuzminski <marcin@python-works.com>
parents:
3610
diff
changeset
|
74 %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
|
75 <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
|
76 %endif |
e8db9fe4cca3
fix branch UI issue for git repos
Marcin Kuzminski <marcin@python-works.com>
parents:
3610
diff
changeset
|
77 </td> |
6399
782db8fc95ea
templates: replace various invalid attributes with data attributes
Mads Kiilerich <mads@kiilerich.com>
parents:
6302
diff
changeset
|
78 <td class="expand_commit" data-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
|
79 <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
|
80 </td> |
5683
5fe9bb7acee6
pullrequests: show tags in lists of included and available changesets
Mads Kiilerich <madski@unity3d.com>
parents:
5385
diff
changeset
|
81 <td> |
6502
03746b8cd5c9
style: use more Bootstrap pull-left and pull-right
Mads Kiilerich <mads@kiilerich.com>
parents:
6441
diff
changeset
|
82 <div class="pull-right" style="margin-top: -4px;"> |
5683
5fe9bb7acee6
pullrequests: show tags in lists of included and available changesets
Mads Kiilerich <madski@unity3d.com>
parents:
5385
diff
changeset
|
83 %for tag in cs.tags: |
6281
d4b39ef6cadf
style: use span for tag/bookmark tags ... and make it inline-block to avoid wrapping
Mads Kiilerich <madski@unity3d.com>
parents:
6197
diff
changeset
|
84 <span class="tagtag" title="${_('Tag %s') % tag}"> |
5683
5fe9bb7acee6
pullrequests: show tags in lists of included and available changesets
Mads Kiilerich <madski@unity3d.com>
parents:
5385
diff
changeset
|
85 ${h.link_to(tag,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))} |
6281
d4b39ef6cadf
style: use span for tag/bookmark tags ... and make it inline-block to avoid wrapping
Mads Kiilerich <madski@unity3d.com>
parents:
6197
diff
changeset
|
86 </span> |
5683
5fe9bb7acee6
pullrequests: show tags in lists of included and available changesets
Mads Kiilerich <madski@unity3d.com>
parents:
5385
diff
changeset
|
87 %endfor |
5fe9bb7acee6
pullrequests: show tags in lists of included and available changesets
Mads Kiilerich <madski@unity3d.com>
parents:
5385
diff
changeset
|
88 </div> |
6180
c3892e3a6ba3
helpers: merge urlify_commit into urlify_text
Mads Kiilerich <madski@unity3d.com>
parents:
6123
diff
changeset
|
89 <div id="C-${cs.raw_id}" class="message">${h.urlify_text(cs.message, c.repo_name)}</div> |
5683
5fe9bb7acee6
pullrequests: show tags in lists of included and available changesets
Mads Kiilerich <madski@unity3d.com>
parents:
5385
diff
changeset
|
90 </td> |
6289
68d3315c48d4
style: whitespace fixes in templates - make indentation more consistent and reduce future churn
Mads Kiilerich <madski@unity3d.com>
parents:
6288
diff
changeset
|
91 </tr> |
2395
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
92 %endfor |
3486
2053053e0882
compare/pullrequest: introduce merge parameter
Mads Kiilerich <madski@unity3d.com>
parents:
3324
diff
changeset
|
93 </table> |
4352
c733124b6262
pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents:
4351
diff
changeset
|
94 |
c733124b6262
pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents:
4351
diff
changeset
|
95 </div> |
c733124b6262
pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents:
4351
diff
changeset
|
96 |
6542
62ac1470b748
pullrequests: rename "as_form" to something more descriptive
Søren Løvborg <sorenl@unity3d.com>
parents:
6532
diff
changeset
|
97 %if c.is_ajax_preview: |
6414
41dd3c2f820c
style: introduce h2 h3 h4 h5 for emphasis and drop some explicit styling
Mads Kiilerich <mads@kiilerich.com>
parents:
6399
diff
changeset
|
98 <h5> |
4460
6cb077e99873
diff: rename template values for org and other for compare and PR
Mads Kiilerich <madski@unity3d.com>
parents:
4368
diff
changeset
|
99 ## 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
|
100 ${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
|
101 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
|
102 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
|
103 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
|
104 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
|
105 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
|
106 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
|
107 )} |
6414
41dd3c2f820c
style: introduce h2 h3 h4 h5 for emphasis and drop some explicit styling
Mads Kiilerich <mads@kiilerich.com>
parents:
6399
diff
changeset
|
108 </h5> |
3486
2053053e0882
compare/pullrequest: introduce merge parameter
Mads Kiilerich <madski@unity3d.com>
parents:
3324
diff
changeset
|
109 %endif |
4297
7a5977429125
compare: show how many changesets the compared repo is behind
Mads Kiilerich <madski@unity3d.com>
parents:
4296
diff
changeset
|
110 %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
|
111 ## TODO: list actual changesets? |
7a5977429125
compare: show how many changesets the compared repo is behind
Mads Kiilerich <madski@unity3d.com>
parents:
4296
diff
changeset
|
112 <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
|
113 ${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
|
114 ${_('is')} |
7a5977429125
compare: show how many changesets the compared repo is behind
Mads Kiilerich <madski@unity3d.com>
parents:
4296
diff
changeset
|
115 <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
|
116 ${_('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
|
117 ${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
|
118 </div> |
7a5977429125
compare: show how many changesets the compared repo is behind
Mads Kiilerich <madski@unity3d.com>
parents:
4296
diff
changeset
|
119 %endif |
2395
b262e349a7a5
created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
120 %endif |
2434
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2395
diff
changeset
|
121 </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
|
122 |
6542
62ac1470b748
pullrequests: rename "as_form" to something more descriptive
Søren Løvborg <sorenl@unity3d.com>
parents:
6532
diff
changeset
|
123 %if c.is_ajax_preview: |
6532
33b71a130b16
templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents:
6502
diff
changeset
|
124 <div id="jsdata" style="display:none">${h.js(c.jsdata)}</div> |
4353
67d5afe2fa1a
pull requests: show graph when creating PR
Mads Kiilerich <madski@unity3d.com>
parents:
4352
diff
changeset
|
125 %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
|
126 <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
|
127 %endif |
c733124b6262
pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents:
4351
diff
changeset
|
128 |
c733124b6262
pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents:
4351
diff
changeset
|
129 <script type="text/javascript"> |
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 $(document).ready(function(){ |
6532
33b71a130b16
templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents:
6502
diff
changeset
|
132 var jsdata = ${h.js(c.jsdata)}; |
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
|
133 var r = new BranchRenderer('graph_canvas', 'graph_content_pr', 'chg_'); |
6288
48a96c4059df
js: set canvas width dynamically based on parent width
domruf <dominikruf@gmail.com>
parents:
6281
diff
changeset
|
134 r.render(jsdata); |
4352
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 $('.expand_commit').click(function(e){ |
6399
782db8fc95ea
templates: replace various invalid attributes with data attributes
Mads Kiilerich <mads@kiilerich.com>
parents:
6302
diff
changeset
|
137 var cid = $(this).data('commit_id'); |
4352
c733124b6262
pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents:
4351
diff
changeset
|
138 $('#C-'+cid).toggleClass('expanded'); |
6288
48a96c4059df
js: set canvas width dynamically based on parent width
domruf <dominikruf@gmail.com>
parents:
6281
diff
changeset
|
139 r.render(jsdata); |
4352
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 $('.gravatar').click(function(e){ |
6399
782db8fc95ea
templates: replace various invalid attributes with data attributes
Mads Kiilerich <mads@kiilerich.com>
parents:
6302
diff
changeset
|
143 var cid = $(this).data('commit_id'); |
4352
c733124b6262
pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents:
4351
diff
changeset
|
144 $('#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
|
145 }); |
c733124b6262
pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents:
4351
diff
changeset
|
146 }); |
c733124b6262
pull requests: show graph when displaying PR
Mads Kiilerich <madski@unity3d.com>
parents:
4351
diff
changeset
|
147 |
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
|
148 </script> |