annotate kallithea/templates/changelog/changelog.html @ 4196:06e49be38d78 kallithea-2.2.5-rebrand

Rename rhodecode_repo to db_repo_scm_instance
author Bradley M. Kuhn <bkuhn@sfconservancy.org>
date Wed, 02 Jul 2014 19:05:00 -0400
parents 9581233e9275
children a540f7e69c82
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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()">
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
6 ${_('%s Changelog') % c.repo_name}
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
7 %if c.changelog_for_path:
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
8 /${c.changelog_for_path}
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
9 %endif
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
10 %if c.rhodecode_name:
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
11 &middot; ${c.rhodecode_name}
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
12 %endif
143
787689980bcd Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
13 </%def>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 322
diff changeset
14
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 322
diff changeset
15 <%def name="breadcrumbs_links()">
2312
f6d57d055d1e Improved i18n on changelog and user group administration pages.
Vincent Duvert <vincent@duvert.net>
parents: 2269
diff changeset
16 <% size = c.size if c.size <= c.total_cs else c.total_cs %>
3761
087b50ef7e17 changelog for file history shows that we're in different changelog view
Marcin Kuzminski <marcin@python-works.com>
parents: 3760
diff changeset
17 ${_('Changelog')}
087b50ef7e17 changelog for file history shows that we're in different changelog view
Marcin Kuzminski <marcin@python-works.com>
parents: 3760
diff changeset
18 %if c.changelog_for_path:
087b50ef7e17 changelog for file history shows that we're in different changelog view
Marcin Kuzminski <marcin@python-works.com>
parents: 3760
diff changeset
19 - /${c.changelog_for_path}
087b50ef7e17 changelog for file history shows that we're in different changelog view
Marcin Kuzminski <marcin@python-works.com>
parents: 3760
diff changeset
20 %endif
087b50ef7e17 changelog for file history shows that we're in different changelog view
Marcin Kuzminski <marcin@python-works.com>
parents: 3760
diff changeset
21 - ${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
22 </%def>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 322
diff changeset
23
143
787689980bcd Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
24 <%def name="page_nav()">
3603
eacd33e0c5b3 use valid options for the top menu: repositories, journal, search and admin
Mads Kiilerich <madski@unity3d.com>
parents: 3592
diff changeset
25 ${self.menu('repositories')}
143
787689980bcd Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
26 </%def>
787689980bcd Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
27
787689980bcd Tempaltes changes for changelog and shortlog, changed menu generation in base
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
28 <%def name="main()">
3988
072a37c44f58 templates: drop context_bar, use repo_context_bar directly
Mads Kiilerich <madski@unity3d.com>
parents: 3979
diff changeset
29 ${self.repo_context_bar('changelog')}
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 322
diff changeset
30 <div class="box">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 322
diff changeset
31 <!-- box / title -->
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 322
diff changeset
32 <div class="title">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 322
diff changeset
33 ${self.breadcrumbs()}
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 322
diff changeset
34 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 322
diff changeset
35 <div class="table">
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
36 % if c.pagination:
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
37 <div id="graph">
4149
30a683d04e77 old style: don't let changelog buttons at the top influence changelog/graph floating
Mads Kiilerich <madski@unity3d.com>
parents: 4116
diff changeset
38 <div style="overflow:auto; display:${'none' if c.changelog_for_path else ''}">
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
39 <div class="container_header">
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
40 <div style="float:right; margin: 0px 0px 0px 4px">${h.select('branch_filter',c.branch_name,c.branch_filters)}</div>
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
41 <div class="info_box" style="text-align: right; float: right">
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
42 <a href="#" class="btn btn-mini" id="rev_range_container" style="display:none"></a>
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
43 <a href="#" class="btn btn-mini" id="rev_range_clear" style="display:none">${_('Clear selection')}</a>
2973
9937afa7f093 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2934
diff changeset
44
4195
9581233e9275 Rename rhodecode_db_repo to db_repo - it stores db repo abstractions
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4187
diff changeset
45 %if c.db_repo.fork:
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
46 <a id="compare_fork"
4195
9581233e9275 Rename rhodecode_db_repo to db_repo - it stores db repo abstractions
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4187
diff changeset
47 title="${_('Compare fork with %s' % c.db_repo.fork.repo_name)}"
9581233e9275 Rename rhodecode_db_repo to db_repo - it stores db repo abstractions
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4187
diff changeset
48 href="${h.url('compare_url',repo_name=c.db_repo.fork.repo_name,org_ref_type=c.db_repo.landing_rev[0],org_ref=c.db_repo.landing_rev[1],other_repo=c.repo_name,other_ref_type='branch' if request.GET.get('branch') else c.db_repo.landing_rev[0],other_ref=request.GET.get('branch') or c.db_repo.landing_rev[1], merge=1)}"
9581233e9275 Rename rhodecode_db_repo to db_repo - it stores db repo abstractions
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4187
diff changeset
49 class="btn btn-mini"><i class="icon-loop"></i> ${_('Compare fork with Parent(%s)' % c.db_repo.fork.repo_name)}</a>
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
50 %endif
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
51 <a id="open_new_pr" href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="btn btn-mini">${_('Open new pull request')}</a>
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
52 </div>
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
53
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
54 ${h.form(h.url.current(),method='get')}
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
55 <div style="float:left">
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
56 ${h.submit('set',_('Show'),class_="btn btn-mini")}
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
57 ${h.text('size',size=1,value=c.size)}
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
58 ${_('revisions')}
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
59 </div>
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
60 ${h.end_form()}
3760
6302a1423a4e Use changelog controller for displaying history of files.
Marcin Kuzminski <marcin@python-works.com>
parents: 3707
diff changeset
61 </div>
3536
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
62 </div>
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
63 <div id="graph_nodes">
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
64 <canvas id="graph_canvas"></canvas>
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
65 </div>
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
66 <div id="graph_content" style="${'margin: 0px' if c.changelog_for_path else ''}">
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
67
3536
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
68 <table id="changesets">
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
69 <tbody>
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
70 %for cnt,cs in enumerate(c.pagination):
3536
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
71 <tr id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}">
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
72 <td class="checkbox">
3760
6302a1423a4e Use changelog controller for displaying history of files.
Marcin Kuzminski <marcin@python-works.com>
parents: 3707
diff changeset
73 %if c.changelog_for_path:
6302a1423a4e Use changelog controller for displaying history of files.
Marcin Kuzminski <marcin@python-works.com>
parents: 3707
diff changeset
74 ${h.checkbox(cs.raw_id,class_="changeset_range", disabled="disabled")}
6302a1423a4e Use changelog controller for displaying history of files.
Marcin Kuzminski <marcin@python-works.com>
parents: 3707
diff changeset
75 %else:
6302a1423a4e Use changelog controller for displaying history of files.
Marcin Kuzminski <marcin@python-works.com>
parents: 3707
diff changeset
76 ${h.checkbox(cs.raw_id,class_="changeset_range")}
6302a1423a4e Use changelog controller for displaying history of files.
Marcin Kuzminski <marcin@python-works.com>
parents: 3707
diff changeset
77 %endif
3688
6c505fe11f0f bring back review status in main changelog
Marcin Kuzminski <marcin@python-works.com>
parents: 3654
diff changeset
78 <td class="status">
6c505fe11f0f bring back review status in main changelog
Marcin Kuzminski <marcin@python-works.com>
parents: 3654
diff changeset
79 %if c.statuses.get(cs.raw_id):
6c505fe11f0f bring back review status in main changelog
Marcin Kuzminski <marcin@python-works.com>
parents: 3654
diff changeset
80 <div class="changeset-status-ico">
6c505fe11f0f bring back review status in main changelog
Marcin Kuzminski <marcin@python-works.com>
parents: 3654
diff changeset
81 %if c.statuses.get(cs.raw_id)[2]:
4076
c7e656e96c5d Use review status labels in changelog view
Marcin Kuzminski <marcin@python-works.com>
parents: 4056
diff changeset
82 <a class="tooltip" title="${_('Changeset status: %s\nClick to open associated pull request #%s') % (h.changeset_status_lbl(c.statuses.get(cs.raw_id)[0]), c.statuses.get(cs.raw_id)[2])}" href="${h.url('pullrequest_show',repo_name=c.statuses.get(cs.raw_id)[3],pull_request_id=c.statuses.get(cs.raw_id)[2])}">
3688
6c505fe11f0f bring back review status in main changelog
Marcin Kuzminski <marcin@python-works.com>
parents: 3654
diff changeset
83 <img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" />
6c505fe11f0f bring back review status in main changelog
Marcin Kuzminski <marcin@python-works.com>
parents: 3654
diff changeset
84 </a>
6c505fe11f0f bring back review status in main changelog
Marcin Kuzminski <marcin@python-works.com>
parents: 3654
diff changeset
85 %else:
4076
c7e656e96c5d Use review status labels in changelog view
Marcin Kuzminski <marcin@python-works.com>
parents: 4056
diff changeset
86 <a class="tooltip" title="${_('Changeset status: %s') % h.changeset_status_lbl(c.statuses.get(cs.raw_id)[0])}" 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)}">
4056
458fd829aa20 pull requests: add a 'Changeset status' comment on changeset status
Mads Kiilerich <madski@unity3d.com>
parents: 3992
diff changeset
87 <img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" />
458fd829aa20 pull requests: add a 'Changeset status' comment on changeset status
Mads Kiilerich <madski@unity3d.com>
parents: 3992
diff changeset
88 </a>
3688
6c505fe11f0f bring back review status in main changelog
Marcin Kuzminski <marcin@python-works.com>
parents: 3654
diff changeset
89 %endif
6c505fe11f0f bring back review status in main changelog
Marcin Kuzminski <marcin@python-works.com>
parents: 3654
diff changeset
90 </div>
6c505fe11f0f bring back review status in main changelog
Marcin Kuzminski <marcin@python-works.com>
parents: 3654
diff changeset
91 %endif
3536
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
92 </td>
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
93 <td class="author">
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
94 <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),16)}"/>
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
95 <span title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</span>
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
96 </td>
3585
acc264c649d6 adjust the width on changelog based on the show_id function output
Marcin Kuzminski <marcin@python-works.com>
parents: 3582
diff changeset
97 <td class="hash" style="width:${len(h.show_id(cs))*6.5}px">
3538
9bf927589f7a Tweaks to Changelog and Summary view, removing excess information, and improving layout.
Leonardo Carneiro <leonardo@unity3d.com>
parents: 3537
diff changeset
98 <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}">
3557
58dcef7eef03 Implemented show_id function that is a configurable way to display sha hashes in the changelog.
Marcin Kuzminski <marcin@python-works.com>
parents: 3552
diff changeset
99 <span class="changeset_hash">${h.show_id(cs)}</span>
3538
9bf927589f7a Tweaks to Changelog and Summary view, removing excess information, and improving layout.
Leonardo Carneiro <leonardo@unity3d.com>
parents: 3537
diff changeset
100 </a>
3536
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
101 </td>
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
102 <td class="date">
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
103 <div class="date">${h.age(cs.date,True)}</div>
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
104 </td>
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
105 <td class="expand_commit" commit_id="${cs.raw_id}" title="${_('Expand commit message')}">
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
106 <i class="icon-resize-vertical" style="color:#DDD"></i>
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
107 </td>
3536
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
108 <td class="mid">
3537
7f8d349bbde4 Tweaks to Changelog view, removing excess information, and improving layout.
Leonardo <leo@unity3d.com>
parents: 3536
diff changeset
109 <div class="log-container">
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
110 <div class="message" id="C-${cs.raw_id}">${h.urlify_commit(cs.message, c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div>
3537
7f8d349bbde4 Tweaks to Changelog view, removing excess information, and improving layout.
Leonardo <leo@unity3d.com>
parents: 3536
diff changeset
111 <div class="extra-container">
3765
5a8918aba869 show comments in summary changelog overview
Marcin Kuzminski <marcin@python-works.com>
parents: 3761
diff changeset
112 %if c.comments.get(cs.raw_id):
1884
0614862a20ec Added number of comments in changelog for each changeset
Marcin Kuzminski <marcin@python-works.com>
parents: 1882
diff changeset
113 <div class="comments-container">
4056
458fd829aa20 pull requests: add a 'Changeset status' comment on changeset status
Mads Kiilerich <madski@unity3d.com>
parents: 3992
diff changeset
114 <div class="comments-cnt" title="${_('Changeset has comments')}">
3538
9bf927589f7a Tweaks to Changelog and Summary view, removing excess information, and improving layout.
Leonardo Carneiro <leonardo@unity3d.com>
parents: 3537
diff changeset
115 <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)}">
9bf927589f7a Tweaks to Changelog and Summary view, removing excess information, and improving layout.
Leonardo Carneiro <leonardo@unity3d.com>
parents: 3537
diff changeset
116 ${len(c.comments[cs.raw_id])}
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
117 <i class="icon-comment-alt icon-comment-colored"></i>
3538
9bf927589f7a Tweaks to Changelog and Summary view, removing excess information, and improving layout.
Leonardo Carneiro <leonardo@unity3d.com>
parents: 3537
diff changeset
118 </a>
1885
350d95dece6f ui touch ups
Marcin Kuzminski <marcin@python-works.com>
parents: 1884
diff changeset
119 </div>
1884
0614862a20ec Added number of comments in changelog for each changeset
Marcin Kuzminski <marcin@python-works.com>
parents: 1882
diff changeset
120 </div>
3537
7f8d349bbde4 Tweaks to Changelog view, removing excess information, and improving layout.
Leonardo <leo@unity3d.com>
parents: 3536
diff changeset
121 %endif
4196
06e49be38d78 Rename rhodecode_repo to db_repo_scm_instance
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4195
diff changeset
122 %if h.is_hg(c.db_repo_scm_instance):
3544
c0a157ab9a15 codecleaner
Marcin Kuzminski <marcin@python-works.com>
parents: 3541
diff changeset
123 %for book in cs.bookmarks:
3707
93de03499097 shortlog: show all refs (bookmarks,tags,branches) in one dedicated column
Marcin Kuzminski <marcin@python-works.com>
parents: 3688
diff changeset
124 <div class="booktag" title="${_('Bookmark %s') % book}">
3544
c0a157ab9a15 codecleaner
Marcin Kuzminski <marcin@python-works.com>
parents: 3541
diff changeset
125 ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
c0a157ab9a15 codecleaner
Marcin Kuzminski <marcin@python-works.com>
parents: 3541
diff changeset
126 </div>
c0a157ab9a15 codecleaner
Marcin Kuzminski <marcin@python-works.com>
parents: 3541
diff changeset
127 %endfor
3541
8fae93880c30 fixed bookmarks error on git
Marcin Kuzminski <marcin@python-works.com>
parents: 3540
diff changeset
128 %endif
3537
7f8d349bbde4 Tweaks to Changelog view, removing excess information, and improving layout.
Leonardo <leo@unity3d.com>
parents: 3536
diff changeset
129 %for tag in cs.tags:
3654
ec6354949623 Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents: 3603
diff changeset
130 <div class="tagtag" title="${_('Tag %s') % tag}">
3537
7f8d349bbde4 Tweaks to Changelog view, removing excess information, and improving layout.
Leonardo <leo@unity3d.com>
parents: 3536
diff changeset
131 ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
132 </div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
133 %endfor
3538
9bf927589f7a Tweaks to Changelog and Summary view, removing excess information, and improving layout.
Leonardo Carneiro <leonardo@unity3d.com>
parents: 3537
diff changeset
134 %if (not c.branch_name) and cs.branch:
3654
ec6354949623 Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents: 3603
diff changeset
135 <div class="branchtag" title="${_('Branch %s' % cs.branch)}">
3538
9bf927589f7a Tweaks to Changelog and Summary view, removing excess information, and improving layout.
Leonardo Carneiro <leonardo@unity3d.com>
parents: 3537
diff changeset
136 ${h.link_to(h.shorter(cs.branch),h.url('changelog_home',repo_name=c.repo_name,branch=cs.branch))}
3537
7f8d349bbde4 Tweaks to Changelog view, removing excess information, and improving layout.
Leonardo <leo@unity3d.com>
parents: 3536
diff changeset
137 </div>
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
138 %endif
3536
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
139 </div>
3537
7f8d349bbde4 Tweaks to Changelog view, removing excess information, and improving layout.
Leonardo <leo@unity3d.com>
parents: 3536
diff changeset
140 </div>
3536
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
141 </td>
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
142 </tr>
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
143 %endfor
3536
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
144 </tbody>
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
145 </table>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
146
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
147 <div class="pagination-wh pagination-left">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
148 ${c.pagination.pager('$link_previous ~2~ $link_next')}
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
149 </div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
150 </div>
3536
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
151 </div>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
152
3536
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
153 <script type="text/javascript" src="${h.url('/js/graph.js')}"></script>
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
154 <script type="text/javascript">
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
155 YAHOO.util.Event.onDOMReady(function(){
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
156
3536
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
157 //Monitor range checkboxes and build a link to changesets
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
158 //ranges
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
159 var checkboxes = YUD.getElementsByClassName('changeset_range');
3979
04242759b61e fixed issue with formatting escaping on url used in changelog js.
Marcin Kuzminski <marcin@python-works.com>
parents: 3960
diff changeset
160 // register our routes needed for this view
04242759b61e fixed issue with formatting escaping on url used in changelog js.
Marcin Kuzminski <marcin@python-works.com>
parents: 3960
diff changeset
161 pyroutes.register('changeset_home', "${h.url('changeset_home', repo_name='%(repo_name)s', revision='%(revision)s')}", ['repo_name', 'revision']);
3464
d253f1b530c8 Bugfix: On the changelog page, its possible that some changeset is already checked out by the browser. So we check for that on page load.
Leonardo Carneiro <leonardo@unity3d.com>
parents: 3463
diff changeset
162
3552
7967d00e4692 Stylistic cleanup - mostly formatting
Mads Kiilerich <madski@unity3d.com>
parents: 3550
diff changeset
163 var checkbox_checker = function(e){
3536
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
164 var checked_checkboxes = [];
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
165 for (pos in checkboxes){
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
166 if(checkboxes[pos].checked){
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
167 checked_checkboxes.push(checkboxes[pos]);
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
168 }
3536
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
169 }
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
170 if(YUD.get('open_new_pr')){
3552
7967d00e4692 Stylistic cleanup - mostly formatting
Mads Kiilerich <madski@unity3d.com>
parents: 3550
diff changeset
171 if(checked_checkboxes.length>1){
7967d00e4692 Stylistic cleanup - mostly formatting
Mads Kiilerich <madski@unity3d.com>
parents: 3550
diff changeset
172 YUD.setStyle('open_new_pr','display','none');
7967d00e4692 Stylistic cleanup - mostly formatting
Mads Kiilerich <madski@unity3d.com>
parents: 3550
diff changeset
173 } else {
7967d00e4692 Stylistic cleanup - mostly formatting
Mads Kiilerich <madski@unity3d.com>
parents: 3550
diff changeset
174 YUD.setStyle('open_new_pr','display','');
3485
b19b1723ff10 pullrequest: pullrequest from changelog view
Mads Kiilerich <madski@unity3d.com>
parents: 3465
diff changeset
175 if(checked_checkboxes.length>0){
3552
7967d00e4692 Stylistic cleanup - mostly formatting
Mads Kiilerich <madski@unity3d.com>
parents: 3550
diff changeset
176 YUD.get('open_new_pr').innerHTML = _TM['Open new pull request for selected changesets'];
3485
b19b1723ff10 pullrequest: pullrequest from changelog view
Mads Kiilerich <madski@unity3d.com>
parents: 3465
diff changeset
177 }else{
3552
7967d00e4692 Stylistic cleanup - mostly formatting
Mads Kiilerich <madski@unity3d.com>
parents: 3550
diff changeset
178 YUD.get('open_new_pr').innerHTML = _TM['Open new pull request'];
3485
b19b1723ff10 pullrequest: pullrequest from changelog view
Mads Kiilerich <madski@unity3d.com>
parents: 3465
diff changeset
179 }
2927
58bb350bfef8 Don't allow cherry picking changesets from the changelog using checkboxes.
Marcin Kuzminski <marcin@python-works.com>
parents: 2924
diff changeset
180 }
3552
7967d00e4692 Stylistic cleanup - mostly formatting
Mads Kiilerich <madski@unity3d.com>
parents: 3550
diff changeset
181 }
2973
9937afa7f093 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2934
diff changeset
182
3536
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
183 if(checked_checkboxes.length>0){
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
184 var rev_end = checked_checkboxes[0].name;
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
185 var rev_start = checked_checkboxes[checked_checkboxes.length-1].name;
3979
04242759b61e fixed issue with formatting escaping on url used in changelog js.
Marcin Kuzminski <marcin@python-works.com>
parents: 3960
diff changeset
186 var url = pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}',
04242759b61e fixed issue with formatting escaping on url used in changelog js.
Marcin Kuzminski <marcin@python-works.com>
parents: 3960
diff changeset
187 'revision': rev_start+'...'+rev_end});
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
188
3536
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
189 var link = (rev_start == rev_end)
3592
549c73bfc206 changelog / compare: adjust titles
Mads Kiilerich <madski@unity3d.com>
parents: 3585
diff changeset
190 ? _TM['Show selected changeset __S']
549c73bfc206 changelog / compare: adjust titles
Mads Kiilerich <madski@unity3d.com>
parents: 3585
diff changeset
191 : _TM['Show selected changesets __S -> __E'];
3447
e74557f57f76 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3446
diff changeset
192
3536
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
193 link = link.replace('__S',rev_start.substr(0,6));
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
194 link = link.replace('__E',rev_end.substr(0,6));
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
195 YUD.get('rev_range_container').href = url;
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
196 YUD.get('rev_range_container').innerHTML = link;
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
197 YUD.setStyle('rev_range_container','display','');
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
198 YUD.setStyle('rev_range_clear','display','');
2973
9937afa7f093 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2934
diff changeset
199
3979
04242759b61e fixed issue with formatting escaping on url used in changelog js.
Marcin Kuzminski <marcin@python-works.com>
parents: 3960
diff changeset
200 YUD.get('open_new_pr').href = pyroutes.url('pullrequest_home',
04242759b61e fixed issue with formatting escaping on url used in changelog js.
Marcin Kuzminski <marcin@python-works.com>
parents: 3960
diff changeset
201 {'repo_name': '${c.repo_name}',
04242759b61e fixed issue with formatting escaping on url used in changelog js.
Marcin Kuzminski <marcin@python-works.com>
parents: 3960
diff changeset
202 'rev_start': rev_start,
04242759b61e fixed issue with formatting escaping on url used in changelog js.
Marcin Kuzminski <marcin@python-works.com>
parents: 3960
diff changeset
203 'rev_end': rev_end})
04242759b61e fixed issue with formatting escaping on url used in changelog js.
Marcin Kuzminski <marcin@python-works.com>
parents: 3960
diff changeset
204
3552
7967d00e4692 Stylistic cleanup - mostly formatting
Mads Kiilerich <madski@unity3d.com>
parents: 3550
diff changeset
205 YUD.setStyle('compare_fork','display','none');
7967d00e4692 Stylistic cleanup - mostly formatting
Mads Kiilerich <madski@unity3d.com>
parents: 3550
diff changeset
206 }else{
3536
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
207 YUD.setStyle('rev_range_container','display','none');
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
208 YUD.setStyle('rev_range_clear','display','none');
3813
dca89d578c70 pull requests: use branch name when creating PRs from a changelog with branch filter
Mads Kiilerich <madski@unity3d.com>
parents: 3810
diff changeset
209 %if c.branch_name:
3979
04242759b61e fixed issue with formatting escaping on url used in changelog js.
Marcin Kuzminski <marcin@python-works.com>
parents: 3960
diff changeset
210 YUD.get('open_new_pr').href = pyroutes.url('pullrequest_home',
04242759b61e fixed issue with formatting escaping on url used in changelog js.
Marcin Kuzminski <marcin@python-works.com>
parents: 3960
diff changeset
211 {'repo_name': '${c.repo_name}',
04242759b61e fixed issue with formatting escaping on url used in changelog js.
Marcin Kuzminski <marcin@python-works.com>
parents: 3960
diff changeset
212 'branch':'${c.branch_name}'});
3813
dca89d578c70 pull requests: use branch name when creating PRs from a changelog with branch filter
Mads Kiilerich <madski@unity3d.com>
parents: 3810
diff changeset
213 %else:
3979
04242759b61e fixed issue with formatting escaping on url used in changelog js.
Marcin Kuzminski <marcin@python-works.com>
parents: 3960
diff changeset
214 YUD.get('open_new_pr').href = pyroutes.url('pullrequest_home',
04242759b61e fixed issue with formatting escaping on url used in changelog js.
Marcin Kuzminski <marcin@python-works.com>
parents: 3960
diff changeset
215 {'repo_name': '${c.repo_name}'});
3813
dca89d578c70 pull requests: use branch name when creating PRs from a changelog with branch filter
Mads Kiilerich <madski@unity3d.com>
parents: 3810
diff changeset
216 %endif
3552
7967d00e4692 Stylistic cleanup - mostly formatting
Mads Kiilerich <madski@unity3d.com>
parents: 3550
diff changeset
217 YUD.setStyle('compare_fork','display','');
7967d00e4692 Stylistic cleanup - mostly formatting
Mads Kiilerich <madski@unity3d.com>
parents: 3550
diff changeset
218 }
7967d00e4692 Stylistic cleanup - mostly formatting
Mads Kiilerich <madski@unity3d.com>
parents: 3550
diff changeset
219 };
7967d00e4692 Stylistic cleanup - mostly formatting
Mads Kiilerich <madski@unity3d.com>
parents: 3550
diff changeset
220 YUE.onDOMReady(checkbox_checker);
7967d00e4692 Stylistic cleanup - mostly formatting
Mads Kiilerich <madski@unity3d.com>
parents: 3550
diff changeset
221 YUE.on(checkboxes,'click', checkbox_checker);
3464
d253f1b530c8 Bugfix: On the changelog page, its possible that some changeset is already checked out by the browser. So we check for that on page load.
Leonardo Carneiro <leonardo@unity3d.com>
parents: 3463
diff changeset
222
3536
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
223 YUE.on('rev_range_clear','click',function(e){
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
224 for (var i=0; i<checkboxes.length; i++){
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
225 var cb = checkboxes[i];
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
226 cb.checked = false;
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
227 }
3552
7967d00e4692 Stylistic cleanup - mostly formatting
Mads Kiilerich <madski@unity3d.com>
parents: 3550
diff changeset
228 checkbox_checker();
3536
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
229 YUE.preventDefault(e);
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
230 });
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
231
3536
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
232 var msgs = YUQ('.message');
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
233 // get first element height
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
234 var el = YUQ('#graph_content .container')[0];
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
235 var row_h = el.clientHeight;
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
236 for(var i=0;i<msgs.length;i++){
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
237 var m = msgs[i];
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
238
3536
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
239 var h = m.clientHeight;
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
240 var pad = YUD.getStyle(m,'padding');
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
241 if(h > row_h){
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
242 var offset = row_h - (h+12);
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
243 YUD.setStyle(m.nextElementSibling,'display','block');
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
244 YUD.setStyle(m.nextElementSibling,'margin-top',offset+'px');
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
245 };
3536
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
246 }
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
247
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
248 $('.expand_commit').on('click',function(e){
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
249 $(this).children('i').hide();
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
250 var cid = $(this).attr('commit_id');
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
251 $('#C-'+cid).css({'height': 'auto', 'margin': '4px 0px 4px 0px'})
3536
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
252 //redraw the graph, line_count and jsdata are global vars
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
253 set_canvas(100);
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
254
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
255 var r = new BranchRenderer();
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
256 r.render(jsdata,100,line_count);
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
257 });
3536
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
258
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
259 // change branch filter
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
260 YUE.on(YUD.get('branch_filter'),'change',function(e){
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
261 var selected_branch = e.currentTarget.options[e.currentTarget.selectedIndex].value;
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
262 if(selected_branch != ''){
3979
04242759b61e fixed issue with formatting escaping on url used in changelog js.
Marcin Kuzminski <marcin@python-works.com>
parents: 3960
diff changeset
263 window.location = pyroutes.url('changelog_home', {'repo_name': '${c.repo_name}',
3992
c1a1f05e680f removed encodeURIComponent, on url generation.
Marcin Kuzminski <marcin@python-works.com>
parents: 3988
diff changeset
264 'branch':selected_branch});
3536
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
265 }else{
3979
04242759b61e fixed issue with formatting escaping on url used in changelog js.
Marcin Kuzminski <marcin@python-works.com>
parents: 3960
diff changeset
266 window.location = pyroutes.url('changelog_home', {'repo_name': '${c.repo_name}'});
3536
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
267 }
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
268 });
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
269
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
270 function set_canvas(width) {
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
271 var c = document.getElementById('graph_nodes');
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
272 var t = document.getElementById('graph_content');
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
273 canvas = document.getElementById('graph_canvas');
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
274 var div_h = t.clientHeight;
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
275 canvas.setAttribute('height',div_h);
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
276 canvas.setAttribute('width',width);
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
277 };
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
278 var heads = 1;
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
279 var line_count = 0;
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
280 var jsdata = ${c.jsdata|n};
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
281
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
282 for (var i=0;i<jsdata.length;i++) {
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
283 var in_l = jsdata[i][2];
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
284 for (var j in in_l) {
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
285 var m = in_l[j][1];
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
286 if (m > line_count)
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
287 line_count = m;
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
288 }
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
289 }
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
290 set_canvas(100);
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
291
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
292 var r = new BranchRenderer();
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
293 r.render(jsdata,100,line_count);
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
294
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
295 });
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4076
diff changeset
296
3536
ed48d17836a4 WIP: Changelog view
Leonardo <leo@unity3d.com>
parents: 3532
diff changeset
297 </script>
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
298 %else:
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
299 ${_('There are no changes yet')}
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3188
diff changeset
300 %endif
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 322
diff changeset
301 </div>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1885
diff changeset
302 </div>
1865
37b3c3244bbc UI fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 1862
diff changeset
303 </%def>