Mercurial > kallithea
annotate rhodecode/templates/changelog/changelog.html @ 2363:745dda7817ed codereview
Rewrote url routes to make all validations and parsing for compare view + added compare fork button into forked repos
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 30 May 2012 23:12:16 +0200 |
parents | 8fe7c1024719 |
children | 9f37281195a2 |
rev | line source |
---|---|
421
cbfb853a0a4c
fixed bug when author had " in name, thus breaking the javascript data format
Marcin Kuzminski <marcin@python-works.com>
parents:
401
diff
changeset
|
1 ## -*- coding: utf-8 -*- |
cbfb853a0a4c
fixed bug when author had " in name, thus breaking the javascript data format
Marcin Kuzminski <marcin@python-works.com>
parents:
401
diff
changeset
|
2 |
143
787689980bcd
Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
3 <%inherit file="/base/base.html"/> |
787689980bcd
Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
4 |
787689980bcd
Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
5 <%def name="title()"> |
619
a1ec653f5f95
#38 updated RhodeCode titles
Marcin Kuzminski <marcin@python-works.com>
parents:
566
diff
changeset
|
6 ${c.repo_name} ${_('Changelog')} - ${c.rhodecode_name} |
143
787689980bcd
Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
7 </%def> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
8 |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
9 <%def name="breadcrumbs_links()"> |
143
787689980bcd
Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
10 ${h.link_to(u'Home',h.url('/'))} |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
11 » |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
12 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
13 » |
2312
f6d57d055d1e
Improved i18n on changelog and user group administration pages.
Vincent Duvert <vincent@duvert.net>
parents:
2269
diff
changeset
|
14 <% size = c.size if c.size <= c.total_cs else c.total_cs %> |
f6d57d055d1e
Improved i18n on changelog and user group administration pages.
Vincent Duvert <vincent@duvert.net>
parents:
2269
diff
changeset
|
15 ${_('Changelog')} - ${ungettext('showing %d out of %d revision', 'showing %d out of %d revisions', size) % (size, c.total_cs)} |
143
787689980bcd
Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
16 </%def> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
17 |
143
787689980bcd
Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
18 <%def name="page_nav()"> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
19 ${self.menu('changelog')} |
143
787689980bcd
Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
20 </%def> |
787689980bcd
Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
21 |
787689980bcd
Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
22 <%def name="main()"> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
23 <div class="box"> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
24 <!-- box / title --> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
25 <div class="title"> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
26 ${self.breadcrumbs()} |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
27 </div> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
28 <div class="table"> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
29 % if c.pagination: |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
30 <div id="graph"> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
31 <div id="graph_nodes"> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
32 <canvas id="graph_canvas"></canvas> |
193
50a39f923f31
Added file annotation template. Bumped version to 0.6.8. Changelog and changeset are now cleaned with js, it's still very beta.
Marcin Kuzminski <marcin@python-works.com>
parents:
143
diff
changeset
|
33 </div> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
34 <div id="graph_content"> |
2363
745dda7817ed
Rewrote url routes to make all validations and parsing for compare view + added compare fork button into forked repos
Marcin Kuzminski <marcin@python-works.com>
parents:
2346
diff
changeset
|
35 <div class="info_box" style="clear: both;padding: 10px 6px;vertical-align: right;text-align: right;"> |
745dda7817ed
Rewrote url routes to make all validations and parsing for compare view + added compare fork button into forked repos
Marcin Kuzminski <marcin@python-works.com>
parents:
2346
diff
changeset
|
36 %if c.rhodecode_db_repo.fork: |
745dda7817ed
Rewrote url routes to make all validations and parsing for compare view + added compare fork button into forked repos
Marcin Kuzminski <marcin@python-works.com>
parents:
2346
diff
changeset
|
37 <a title="${_('compare fork with %s' % c.rhodecode_db_repo.fork.repo_name)}" href="${h.url('compare_url',repo_name=c.repo_name,org_ref_type='branch',org_ref='default',other_ref_type='branch',other_ref='default',repo=c.rhodecode_db_repo.fork.repo_name)}" class="ui-btn small">${_('Compare fork')}</a> |
745dda7817ed
Rewrote url routes to make all validations and parsing for compare view + added compare fork button into forked repos
Marcin Kuzminski <marcin@python-works.com>
parents:
2346
diff
changeset
|
38 %endif |
745dda7817ed
Rewrote url routes to make all validations and parsing for compare view + added compare fork button into forked repos
Marcin Kuzminski <marcin@python-works.com>
parents:
2346
diff
changeset
|
39 <a href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="ui-btn small">${_('Open new pull request')}</a> |
745dda7817ed
Rewrote url routes to make all validations and parsing for compare view + added compare fork button into forked repos
Marcin Kuzminski <marcin@python-works.com>
parents:
2346
diff
changeset
|
40 </div> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
41 <div class="container_header"> |
977
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
42 ${h.form(h.url.current(),method='get')} |
1656
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
43 <div class="info_box" style="float:left"> |
1756 | 44 ${h.submit('set',_('Show'),class_="ui-btn")} |
977
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
45 ${h.text('size',size=1,value=c.size)} |
1850
c4ff52b0d112
changelog: more commits by default; tweak top header layout
Aras Pranckevicius <aras@unity3d.com>
parents:
1849
diff
changeset
|
46 ${_('revisions')} |
977
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
47 </div> |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
48 ${h.end_form()} |
1850
c4ff52b0d112
changelog: more commits by default; tweak top header layout
Aras Pranckevicius <aras@unity3d.com>
parents:
1849
diff
changeset
|
49 <div id="rev_range_container" style="display:none"></div> |
1656
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
50 <div style="float:right">${h.select('branch_filter',c.branch_name,c.branch_filters)}</div> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
51 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
52 |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
53 %for cnt,cs in enumerate(c.pagination): |
1865 | 54 <div id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}"> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
55 <div class="left"> |
1853
8fe1a141de02
changelog: more polish
Aras Pranckevicius <aras@unity3d.com>
parents:
1850
diff
changeset
|
56 <div> |
977
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
57 ${h.checkbox(cs.short_id,class_="changeset_range")} |
1865 | 58 <span class="tooltip" title="${h.age(cs.date)}"><a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}"><span class="changeset_id">${cs.revision}:<span class="changeset_hash">${h.short_id(cs.raw_id)}</span></span></a></span> |
977
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
59 </div> |
401
b1debb6c5a09
implemented gravatars to changesets, updated styling for changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
362
diff
changeset
|
60 <div class="author"> |
b1debb6c5a09
implemented gravatars to changesets, updated styling for changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
362
diff
changeset
|
61 <div class="gravatar"> |
1463
51063deaceb9
fixed chrome DAG graph rendering issue
Marcin Kuzminski <marcin@python-works.com>
parents:
1436
diff
changeset
|
62 <img alt="gravatar" src="${h.gravatar_url(h.email(cs.author),16)}"/> |
401
b1debb6c5a09
implemented gravatars to changesets, updated styling for changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
362
diff
changeset
|
63 </div> |
2342
a15e0ddeed7f
wrap user name into shorter since super long names just break ui there
Marcin Kuzminski <marcin@python-works.com>
parents:
2312
diff
changeset
|
64 <div title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</div> |
401
b1debb6c5a09
implemented gravatars to changesets, updated styling for changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
362
diff
changeset
|
65 </div> |
1865 | 66 <div class="date">${cs.date}</div> |
1849
162300a90342
changelog: making less noisy
Aras Pranckevicius <aras@unity3d.com>
parents:
1764
diff
changeset
|
67 </div> |
162300a90342
changelog: making less noisy
Aras Pranckevicius <aras@unity3d.com>
parents:
1764
diff
changeset
|
68 <div class="mid"> |
1878
287eff9614fa
changelog: make messages be links again, and somewhat co-exist with issue tracker links (those are bold now)
Aras Pranckevicius <aras@unity3d.com>
parents:
1877
diff
changeset
|
69 <div class="message">${h.urlify_commit(h.wrap_paragraphs(cs.message),c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div> |
1882
496cfa1025e7
changelog: styling "show more" expander
Aras Pranckevicius <aras@unity3d.com>
parents:
1879
diff
changeset
|
70 <div class="expand"><span class="expandtext">↓ ${_('show more')} ↓</span></div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
71 </div> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
72 <div class="right"> |
2219
f219eb1f6bb3
fixed small issue with changeset changed files details when clicking to load details via ajax removed info about comments
Marcin Kuzminski <marcin@python-works.com>
parents:
2198
diff
changeset
|
73 <div class="changes"> |
1884
0614862a20ec
Added number of comments in changelog for each changeset
Marcin Kuzminski <marcin@python-works.com>
parents:
1882
diff
changeset
|
74 <div id="${cs.raw_id}" style="float:right;" class="changed_total tooltip" title="${_('Affected number of files, click to show more details')}">${len(cs.affected_files)}</div> |
0614862a20ec
Added number of comments in changelog for each changeset
Marcin Kuzminski <marcin@python-works.com>
parents:
1882
diff
changeset
|
75 <div class="comments-container"> |
0614862a20ec
Added number of comments in changelog for each changeset
Marcin Kuzminski <marcin@python-works.com>
parents:
1882
diff
changeset
|
76 %if len(c.comments.get(cs.raw_id,[])) > 0: |
1885 | 77 <div class="comments-cnt" title="${('comments')}"> |
78 <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id,anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}"> | |
79 <div class="comments-cnt">${len(c.comments[cs.raw_id])}</div> | |
80 <img src="${h.url('/images/icons/comments.png')}"> | |
81 </a> | |
82 </div> | |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
83 %endif |
1884
0614862a20ec
Added number of comments in changelog for each changeset
Marcin Kuzminski <marcin@python-works.com>
parents:
1882
diff
changeset
|
84 </div> |
2217
76947224bf27
Implemented initial code-review status of changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
2215
diff
changeset
|
85 <div class="changeset-status-container"> |
76947224bf27
Implemented initial code-review status of changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
2215
diff
changeset
|
86 %if c.statuses.get(cs.raw_id): |
2239
493e03a4d268
added changeset status into changelog view
Marcin Kuzminski <marcin@python-works.com>
parents:
2227
diff
changeset
|
87 <div title="${_('Changeset status')}" class="changeset-status-lbl">${c.statuses.get(cs.raw_id)[1]}</div> |
493e03a4d268
added changeset status into changelog view
Marcin Kuzminski <marcin@python-works.com>
parents:
2227
diff
changeset
|
88 <div class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" /></div> |
2217
76947224bf27
Implemented initial code-review status of changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
2215
diff
changeset
|
89 %endif |
76947224bf27
Implemented initial code-review status of changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
2215
diff
changeset
|
90 </div> |
1884
0614862a20ec
Added number of comments in changelog for each changeset
Marcin Kuzminski <marcin@python-works.com>
parents:
1882
diff
changeset
|
91 </div> |
1856
0855c64c571f
css: merge/branch/tag blurbs
Aras Pranckevicius <aras@unity3d.com>
parents:
1853
diff
changeset
|
92 %if cs.parents: |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
93 %for p_cs in reversed(cs.parents): |
1853
8fe1a141de02
changelog: more polish
Aras Pranckevicius <aras@unity3d.com>
parents:
1850
diff
changeset
|
94 <div class="parent">${_('Parent')} |
8fe1a141de02
changelog: more polish
Aras Pranckevicius <aras@unity3d.com>
parents:
1850
diff
changeset
|
95 <span class="changeset_id">${p_cs.revision}:<span class="changeset_hash">${h.link_to(h.short_id(p_cs.raw_id), |
8fe1a141de02
changelog: more polish
Aras Pranckevicius <aras@unity3d.com>
parents:
1850
diff
changeset
|
96 h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span></span> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
97 </div> |
526
804a14e086dc
added tags/branches icons in changelog and moved them to right to save some space
Marcin Kuzminski <marcin@python-works.com>
parents:
512
diff
changeset
|
98 %endfor |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
99 %else: |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
100 <div class="parent">${_('No parents')}</div> |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
101 %endif |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
102 |
526
804a14e086dc
added tags/branches icons in changelog and moved them to right to save some space
Marcin Kuzminski <marcin@python-works.com>
parents:
512
diff
changeset
|
103 <span class="logtags"> |
1856
0855c64c571f
css: merge/branch/tag blurbs
Aras Pranckevicius <aras@unity3d.com>
parents:
1853
diff
changeset
|
104 %if len(cs.parents)>1: |
0855c64c571f
css: merge/branch/tag blurbs
Aras Pranckevicius <aras@unity3d.com>
parents:
1853
diff
changeset
|
105 <span class="merge">${_('merge')}</span> |
0855c64c571f
css: merge/branch/tag blurbs
Aras Pranckevicius <aras@unity3d.com>
parents:
1853
diff
changeset
|
106 %endif |
2198
9784a54a0f5b
display current heads of branches for git in changelog and shortlog
Marcin Kuzminski <marcin@python-works.com>
parents:
2162
diff
changeset
|
107 %if cs.branch: |
527
6d44d3862ec4
fixes #36, removed username, name, lastname, minimal length restrictions,
Marcin Kuzminski <marcin@python-works.com>
parents:
526
diff
changeset
|
108 <span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}"> |
2247
99536f257644
#421 bookmarks in changlog view
Marcin Kuzminski <marcin@python-works.com>
parents:
2219
diff
changeset
|
109 ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} |
99536f257644
#421 bookmarks in changlog view
Marcin Kuzminski <marcin@python-works.com>
parents:
2219
diff
changeset
|
110 </span> |
699
52da7cba88a6
Code refactor for auth func, preparing for ldap support
Marcin Kuzminski <marcin@python-works.com>
parents:
687
diff
changeset
|
111 %endif |
2247
99536f257644
#421 bookmarks in changlog view
Marcin Kuzminski <marcin@python-works.com>
parents:
2219
diff
changeset
|
112 %if h.is_hg(c.rhodecode_repo): |
99536f257644
#421 bookmarks in changlog view
Marcin Kuzminski <marcin@python-works.com>
parents:
2219
diff
changeset
|
113 %for book in cs.bookmarks: |
99536f257644
#421 bookmarks in changlog view
Marcin Kuzminski <marcin@python-works.com>
parents:
2219
diff
changeset
|
114 <span class="bookbook" title="${'%s %s' % (_('bookmark'),book)}"> |
99536f257644
#421 bookmarks in changlog view
Marcin Kuzminski <marcin@python-works.com>
parents:
2219
diff
changeset
|
115 ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} |
2269
f1467dfcf093
small issue fixes
Marcin Kuzminski <marcin@python-works.com>
parents:
2247
diff
changeset
|
116 </span> |
f1467dfcf093
small issue fixes
Marcin Kuzminski <marcin@python-works.com>
parents:
2247
diff
changeset
|
117 %endfor |
2247
99536f257644
#421 bookmarks in changlog view
Marcin Kuzminski <marcin@python-works.com>
parents:
2219
diff
changeset
|
118 %endif |
526
804a14e086dc
added tags/branches icons in changelog and moved them to right to save some space
Marcin Kuzminski <marcin@python-works.com>
parents:
512
diff
changeset
|
119 %for tag in cs.tags: |
527
6d44d3862ec4
fixes #36, removed username, name, lastname, minimal length restrictions,
Marcin Kuzminski <marcin@python-works.com>
parents:
526
diff
changeset
|
120 <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> |
2162
04d3fae0e4c0
imported patch 2260
Marcin Kuzminski <marcin@python-works.com>
parents:
1959
diff
changeset
|
121 ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span> |
526
804a14e086dc
added tags/branches icons in changelog and moved them to right to save some space
Marcin Kuzminski <marcin@python-works.com>
parents:
512
diff
changeset
|
122 %endfor |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
123 </span> |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
124 </div> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
125 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
126 |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
127 %endfor |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
128 <div class="pagination-wh pagination-left"> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
129 ${c.pagination.pager('$link_previous ~2~ $link_next')} |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
130 </div> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
131 </div> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
132 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
133 |
1050
cabe887a9829
removed obsolete _static flag from url, and fixed urls in webhelpers
Marcin Kuzminski <marcin@python-works.com>
parents:
1048
diff
changeset
|
134 <script type="text/javascript" src="${h.url('/js/graph.js')}"></script> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
135 <script type="text/javascript"> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
136 YAHOO.util.Event.onDOMReady(function(){ |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
137 |
977
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
138 //Monitor range checkboxes and build a link to changesets |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
139 //ranges |
977
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
140 var checkboxes = YUD.getElementsByClassName('changeset_range'); |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
141 var url_tmpl = "${h.url('changeset_home',repo_name=c.repo_name,revision='__REVRANGE__')}"; |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
142 YUE.on(checkboxes,'click',function(e){ |
977
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
143 var checked_checkboxes = []; |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
144 for (pos in checkboxes){ |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
145 if(checkboxes[pos].checked){ |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
146 checked_checkboxes.push(checkboxes[pos]); |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
147 } |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
148 } |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
149 if(checked_checkboxes.length>1){ |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
150 var rev_end = checked_checkboxes[0].name; |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
151 var rev_start = checked_checkboxes[checked_checkboxes.length-1].name; |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
152 |
977
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
153 var url = url_tmpl.replace('__REVRANGE__', |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
154 rev_start+'...'+rev_end); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
155 |
977
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
156 var link = "<a href="+url+">${_('Show selected changes __S -> __E')}</a>" |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
157 link = link.replace('__S',rev_start); |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
158 link = link.replace('__E',rev_end); |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
159 YUD.get('rev_range_container').innerHTML = link; |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
160 YUD.setStyle('rev_range_container','display',''); |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
161 } |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
162 else{ |
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
163 YUD.setStyle('rev_range_container','display','none'); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
164 |
977
28524453bb76
started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
165 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
166 }); |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
167 |
1865 | 168 var msgs = YUQ('.message'); |
1879
395dfc93fe73
changelog: simplify row expansion and fix for Firefox (parentElement->parentNode)
Aras Pranckevicius <aras@unity3d.com>
parents:
1878
diff
changeset
|
169 // get first element height |
1934
af1fafcd5927
fixes expand button on changeset
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
170 var el = YUQ('#graph_content .container')[0]; |
1865 | 171 var row_h = el.clientHeight; |
172 for(var i=0;i<msgs.length;i++){ | |
173 var m = msgs[i]; | |
174 | |
175 var h = m.clientHeight; | |
176 var pad = YUD.getStyle(m,'padding'); | |
177 if(h > row_h){ | |
1934
af1fafcd5927
fixes expand button on changeset
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
178 var offset = row_h - (h+12); |
1865 | 179 YUD.setStyle(m.nextElementSibling,'display','block'); |
1934
af1fafcd5927
fixes expand button on changeset
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
180 YUD.setStyle(m.nextElementSibling,'margin-top',offset+'px'); |
1865 | 181 }; |
182 } | |
183 YUE.on(YUQ('.expand'),'click',function(e){ | |
1879
395dfc93fe73
changelog: simplify row expansion and fix for Firefox (parentElement->parentNode)
Aras Pranckevicius <aras@unity3d.com>
parents:
1878
diff
changeset
|
184 var elem = e.currentTarget.parentNode.parentNode; |
1865 | 185 YUD.setStyle(e.currentTarget,'display','none'); |
1879
395dfc93fe73
changelog: simplify row expansion and fix for Firefox (parentElement->parentNode)
Aras Pranckevicius <aras@unity3d.com>
parents:
1878
diff
changeset
|
186 YUD.setStyle(elem,'height','auto'); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
187 |
1879
395dfc93fe73
changelog: simplify row expansion and fix for Firefox (parentElement->parentNode)
Aras Pranckevicius <aras@unity3d.com>
parents:
1878
diff
changeset
|
188 //redraw the graph, max_w and jsdata are global vars |
1865 | 189 set_canvas(max_w); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
190 |
1865 | 191 var r = new BranchRenderer(); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
192 r.render(jsdata,max_w); |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
193 |
1865 | 194 }) |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
195 |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
196 // Fetch changeset details |
1431
d5d7c40e8591
changelog uses lazy loading of affected files details, in some scenarios this can improve speed
Marcin Kuzminski <marcin@python-works.com>
parents:
1429
diff
changeset
|
197 YUE.on(YUD.getElementsByClassName('changed_total'),'click',function(e){ |
d5d7c40e8591
changelog uses lazy loading of affected files details, in some scenarios this can improve speed
Marcin Kuzminski <marcin@python-works.com>
parents:
1429
diff
changeset
|
198 var id = e.currentTarget.id |
d5d7c40e8591
changelog uses lazy loading of affected files details, in some scenarios this can improve speed
Marcin Kuzminski <marcin@python-works.com>
parents:
1429
diff
changeset
|
199 var url = "${h.url('changelog_details',repo_name=c.repo_name,cs='__CS__')}" |
d5d7c40e8591
changelog uses lazy loading of affected files details, in some scenarios this can improve speed
Marcin Kuzminski <marcin@python-works.com>
parents:
1429
diff
changeset
|
200 var url = url.replace('__CS__',id); |
2219
f219eb1f6bb3
fixed small issue with changeset changed files details when clicking to load details via ajax removed info about comments
Marcin Kuzminski <marcin@python-works.com>
parents:
2198
diff
changeset
|
201 ypjax(url,id,function(){tooltip_activate()}); |
1431
d5d7c40e8591
changelog uses lazy loading of affected files details, in some scenarios this can improve speed
Marcin Kuzminski <marcin@python-works.com>
parents:
1429
diff
changeset
|
202 }); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
203 |
1656
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
204 // change branch filter |
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
205 YUE.on(YUD.get('branch_filter'),'change',function(e){ |
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
206 var selected_branch = e.currentTarget.options[e.currentTarget.selectedIndex].value; |
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
207 var url_main = "${h.url('changelog_home',repo_name=c.repo_name)}"; |
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
208 var url = "${h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__')}"; |
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
209 var url = url.replace('__BRANCH__',selected_branch); |
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
210 if(selected_branch != ''){ |
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
211 window.location = url; |
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
212 }else{ |
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
213 window.location = url_main; |
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
214 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
215 |
1656
833f9dec0a06
implemented #44 - branch filtering in changelog, aka branch browser
Marcin Kuzminski <marcin@python-works.com>
parents:
1463
diff
changeset
|
216 }); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
217 |
1429
864e4daef963
improved rendering of dag (they are not trimmed anymore when number of heads exceeds 5)
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
218 function set_canvas(heads) { |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
219 var c = document.getElementById('graph_nodes'); |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
220 var t = document.getElementById('graph_content'); |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
221 canvas = document.getElementById('graph_canvas'); |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
222 var div_h = t.clientHeight; |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
223 c.style.height=div_h+'px'; |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
224 canvas.setAttribute('height',div_h); |
1429
864e4daef963
improved rendering of dag (they are not trimmed anymore when number of heads exceeds 5)
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
225 c.style.height=max_w+'px'; |
864e4daef963
improved rendering of dag (they are not trimmed anymore when number of heads exceeds 5)
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
226 canvas.setAttribute('width',max_w); |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
227 }; |
1429
864e4daef963
improved rendering of dag (they are not trimmed anymore when number of heads exceeds 5)
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
228 var heads = 1; |
864e4daef963
improved rendering of dag (they are not trimmed anymore when number of heads exceeds 5)
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
229 var max_heads = 0; |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
230 var jsdata = ${c.jsdata|n}; |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
231 |
1429
864e4daef963
improved rendering of dag (they are not trimmed anymore when number of heads exceeds 5)
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
232 for( var i=0;i<jsdata.length;i++){ |
864e4daef963
improved rendering of dag (they are not trimmed anymore when number of heads exceeds 5)
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
233 var m = Math.max.apply(Math, jsdata[i][1]); |
864e4daef963
improved rendering of dag (they are not trimmed anymore when number of heads exceeds 5)
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
234 if (m>max_heads){ |
864e4daef963
improved rendering of dag (they are not trimmed anymore when number of heads exceeds 5)
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
235 max_heads = m; |
864e4daef963
improved rendering of dag (they are not trimmed anymore when number of heads exceeds 5)
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
236 } |
864e4daef963
improved rendering of dag (they are not trimmed anymore when number of heads exceeds 5)
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
237 } |
864e4daef963
improved rendering of dag (they are not trimmed anymore when number of heads exceeds 5)
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
238 var max_w = Math.max(100,max_heads*25); |
864e4daef963
improved rendering of dag (they are not trimmed anymore when number of heads exceeds 5)
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
239 set_canvas(max_w); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
240 |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
241 var r = new BranchRenderer(); |
1429
864e4daef963
improved rendering of dag (they are not trimmed anymore when number of heads exceeds 5)
Marcin Kuzminski <marcin@python-works.com>
parents:
1304
diff
changeset
|
242 r.render(jsdata,max_w); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
243 |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
244 }); |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
245 </script> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
246 %else: |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
247 ${_('There are no changes yet')} |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
248 %endif |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
322
diff
changeset
|
249 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1885
diff
changeset
|
250 </div> |
1865 | 251 </%def> |