Mercurial > kallithea
annotate rhodecode/templates/changeset/changeset.html @ 4116:ffd45b185016 rhodecode-2.2.5-gpl
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
This imports changes between changesets 21af6c4eab3d and 6177597791c2 in
RhodeCode's original repository, including only changes to Python files and HTML.
RhodeCode clearly licensed its changes to these files under GPLv3
in their /LICENSE file, which states the following:
The Python code and integrated HTML are licensed under the GPLv3 license.
(See:
https://code.rhodecode.com/rhodecode/files/v2.2.5/LICENSE
or
http://web.archive.org/web/20140512193334/https://code.rhodecode.com/rhodecode/files/f3b123159901f15426d18e3dc395e8369f70ebe0/LICENSE
for an online copy of that LICENSE file)
Conservancy reviewed these changes and confirmed that they can be licensed as
a whole to the Kallithea project under GPLv3-only.
While some of the contents committed herein are clearly licensed
GPLv3-or-later, on the whole we must assume the are GPLv3-only, since the
statement above from RhodeCode indicates that they intend GPLv3-only as their
license, per GPLv3ยง14 and other relevant sections of GPLv3.
author | Bradley M. Kuhn <bkuhn@sfconservancy.org> |
---|---|
date | Wed, 02 Jul 2014 19:03:13 -0400 |
parents | 072a37c44f58 |
children |
rev | line source |
---|---|
1130
1cecc7db3106
fixed some limits in changesets and changelogs
Marcin Kuzminski <marcin@python-works.com>
parents:
1100
diff
changeset
|
1 ## -*- coding: utf-8 -*- |
1cecc7db3106
fixed some limits in changesets and changelogs
Marcin Kuzminski <marcin@python-works.com>
parents:
1100
diff
changeset
|
2 |
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:
diff
changeset
|
3 <%inherit file="/base/base.html"/> |
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:
diff
changeset
|
4 |
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:
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:
3988
diff
changeset
|
6 ${_('%s Changeset') % c.repo_name} - ${h.show_id(c.changeset)} |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
7 %if c.rhodecode_name: |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
8 · ${c.rhodecode_name} |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
9 %endif |
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:
diff
changeset
|
10 </%def> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
332
diff
changeset
|
11 |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
332
diff
changeset
|
12 <%def name="breadcrumbs_links()"> |
3602
bb1eecda3172
clean-up of breadcrumbs on pages with repo context bar
Mads Kiilerich <madski@unity3d.com>
parents:
3582
diff
changeset
|
13 ${_('Changeset')} - <span class='hash'>r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}</span> |
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:
diff
changeset
|
14 </%def> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
332
diff
changeset
|
15 |
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:
diff
changeset
|
16 <%def name="page_nav()"> |
3603
eacd33e0c5b3
use valid options for the top menu: repositories, journal, search and admin
Mads Kiilerich <madski@unity3d.com>
parents:
3602
diff
changeset
|
17 ${self.menu('repositories')} |
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:
diff
changeset
|
18 </%def> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
332
diff
changeset
|
19 |
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:
diff
changeset
|
20 <%def name="main()"> |
3988
072a37c44f58
templates: drop context_bar, use repo_context_bar directly
Mads Kiilerich <madski@unity3d.com>
parents:
3960
diff
changeset
|
21 ${self.repo_context_bar('changelog')} |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
332
diff
changeset
|
22 <div class="box"> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
332
diff
changeset
|
23 <!-- box / title --> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
332
diff
changeset
|
24 <div class="title"> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
332
diff
changeset
|
25 ${self.breadcrumbs()} |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
332
diff
changeset
|
26 </div> |
2995
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
2725
diff
changeset
|
27 <script> |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
2725
diff
changeset
|
28 var _USERS_AC_DATA = ${c.users_array|n}; |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
29 var _GROUPS_AC_DATA = ${c.user_groups_array|n}; |
2995
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
2725
diff
changeset
|
30 AJAX_COMMENT_URL = "${url('changeset_comment',repo_name=c.repo_name,revision=c.changeset.raw_id)}"; |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
2725
diff
changeset
|
31 AJAX_COMMENT_DELETE_URL = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"; |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
2725
diff
changeset
|
32 </script> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
332
diff
changeset
|
33 <div class="table"> |
3197 | 34 <div class="diffblock"> |
3078
5ba6fd9ab711
Reordered parents/children links ref #650
Marcin Kuzminski <marcin@python-works.com>
parents:
3014
diff
changeset
|
35 <div class="parents"> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
36 <div id="parent_link" class="changeset_hash"> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
37 <i style="color:#036185" class="icon-chevron-left"></i> <a href="#">${_('parent rev.')}</a> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
38 </div> |
3078
5ba6fd9ab711
Reordered parents/children links ref #650
Marcin Kuzminski <marcin@python-works.com>
parents:
3014
diff
changeset
|
39 </div> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
40 |
3078
5ba6fd9ab711
Reordered parents/children links ref #650
Marcin Kuzminski <marcin@python-works.com>
parents:
3014
diff
changeset
|
41 <div class="children"> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
42 <div id="child_link" class="changeset_hash"> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
43 <a href="#">${_('child rev.')}</a> <i style="color:#036185" class="icon-chevron-right"></i> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
44 </div> |
3149
68f9c216377d
white space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3079
diff
changeset
|
45 </div> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
46 |
3197 | 47 <div class="code-header banner"> |
2239
493e03a4d268
added changeset status into changelog view
Marcin Kuzminski <marcin@python-works.com>
parents:
2238
diff
changeset
|
48 <div class="changeset-status-container"> |
493e03a4d268
added changeset status into changelog view
Marcin Kuzminski <marcin@python-works.com>
parents:
2238
diff
changeset
|
49 %if c.statuses: |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
50 <div class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[0])}" /></div> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
51 <div title="${_('Changeset status')}" class="changeset-status-lbl">[${h.changeset_status_lbl(c.statuses[0])}]</div> |
2239
493e03a4d268
added changeset status into changelog view
Marcin Kuzminski <marcin@python-works.com>
parents:
2238
diff
changeset
|
52 %endif |
493e03a4d268
added changeset status into changelog view
Marcin Kuzminski <marcin@python-works.com>
parents:
2238
diff
changeset
|
53 </div> |
1865 | 54 <div class="diff-actions"> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
55 <a href="${h.url('changeset_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id)}" class="tooltip" title="${h.tooltip(_('Raw diff'))}"> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
56 <img class="icon" src="${h.url('/images/icons/page_white.png')}"/> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
57 </a> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
58 <a href="${h.url('changeset_patch_home',repo_name=c.repo_name,revision=c.changeset.raw_id)}" class="tooltip" title="${h.tooltip(_('Patch diff'))}"> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
59 <img class="icon" src="${h.url('/images/icons/page_add.png')}"/> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
60 </a> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
61 <a href="${h.url('changeset_download_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='download')}" class="tooltip" title="${h.tooltip(_('Download diff'))}"> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
62 <img class="icon" src="${h.url('/images/icons/page_save.png')}"/> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
63 </a> |
2161
e8c016815ab9
added hidden fulldiff GET param for disabling big diff cut off limit.
Marcin Kuzminski <marcin@python-works.com>
parents:
1963
diff
changeset
|
64 ${c.ignorews_url(request.GET)} |
e8c016815ab9
added hidden fulldiff GET param for disabling big diff cut off limit.
Marcin Kuzminski <marcin@python-works.com>
parents:
1963
diff
changeset
|
65 ${c.context_url(request.GET)} |
1865 | 66 </div> |
2310
83e4447077d3
Improved i18n for the comment count (use of ngettext for pluralisation).
Vincent Duvert <vincent@duvert.net>
parents:
2231
diff
changeset
|
67 <div class="comments-number" style="float:right;padding-right:5px">${ungettext("%d comment", "%d comments", len(c.comments)) % len(c.comments)} ${ungettext("(%d inline)", "(%d inline)", c.inline_cnt) % c.inline_cnt}</div> |
3149
68f9c216377d
white space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3079
diff
changeset
|
68 </div> |
3197 | 69 </div> |
70 <div id="changeset_content"> | |
71 <div class="container"> | |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
72 |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
73 <div class="right"> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
74 <div class="changes"> |
2996
ebe3e388bbb3
new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents:
2995
diff
changeset
|
75 % if (len(c.changeset.affected_files) <= c.affected_files_cut_off) or c.fulldiff: |
3654
ec6354949623
Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents:
3603
diff
changeset
|
76 <span class="removed" title="${_('Removed')}">${len(c.changeset.removed)}</span> |
ec6354949623
Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents:
3603
diff
changeset
|
77 <span class="changed" title="${_('Changed')}">${len(c.changeset.changed)}</span> |
ec6354949623
Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents:
3603
diff
changeset
|
78 <span class="added" title="${_('Added')}">${len(c.changeset.added)}</span> |
3197 | 79 % else: |
3654
ec6354949623
Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents:
3603
diff
changeset
|
80 <span class="removed" title="${_('Affected %s files') % len(c.changeset.affected_files)}">!</span> |
ec6354949623
Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents:
3603
diff
changeset
|
81 <span class="changed" title="${_('Affected %s files') % len(c.changeset.affected_files)}">!</span> |
ec6354949623
Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents:
3603
diff
changeset
|
82 <span class="added" title="${_('Affected %s files') % len(c.changeset.affected_files)}">!</span> |
3197 | 83 % endif |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
84 </div> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
85 |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
86 <span class="logtags"> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
87 %if len(c.changeset.parents)>1: |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
88 <span class="merge">${_('merge')}</span> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
89 %endif |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1868
diff
changeset
|
90 |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
91 %if h.is_hg(c.rhodecode_repo): |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
92 %for book in c.changeset.bookmarks: |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
93 <span class="booktag" title="${_('Bookmark %s') % book}"> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
94 ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))} |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
95 </span> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
96 %endfor |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
97 %endif |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
98 |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
99 %for tag in c.changeset.tags: |
3654
ec6354949623
Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents:
3603
diff
changeset
|
100 <span class="tagtag" title="${_('Tag %s') % tag}"> |
3197 | 101 ${h.link_to(tag,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</span> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
102 %endfor |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
103 |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
104 %if c.changeset.branch: |
3727
0cecc22285ef
#818: Bookmarks Do Not Display on Changeset View
Marcin Kuzminski <marcin@python-works.com>
parents:
3654
diff
changeset
|
105 <span class="branchtag" title="${_('Branch %s') % c.changeset.branch}"> |
0cecc22285ef
#818: Bookmarks Do Not Display on Changeset View
Marcin Kuzminski <marcin@python-works.com>
parents:
3654
diff
changeset
|
106 ${h.link_to(c.changeset.branch,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))} |
0cecc22285ef
#818: Bookmarks Do Not Display on Changeset View
Marcin Kuzminski <marcin@python-works.com>
parents:
3654
diff
changeset
|
107 </span> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
108 %endif |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
109 </span> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
110 </div> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
111 <div class="left"> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
112 <div class="author"> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
113 <div class="gravatar"> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
114 <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(c.changeset.author),20)}"/> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
115 </div> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
116 <span><b>${h.person(c.changeset.author)}</b> - ${h.age(c.changeset.date,True)} ${h.fmt_date(c.changeset.date)}</span><br/> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
117 <span>${h.email_or_none(c.changeset.author)}</span><br/> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
118 </div> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
119 <div class="message">${h.urlify_commit(c.changeset.message, c.repo_name)}</div> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
120 </div> |
3197 | 121 </div> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
122 <div class="changes_txt"> |
2995
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
2725
diff
changeset
|
123 % if c.limited_diff: |
3014
02bbd574fa14
Changed affected to changed, sounds better, and added ungettext translations for this
Marcin Kuzminski <marcin@python-works.com>
parents:
2996
diff
changeset
|
124 ${ungettext('%s file changed','%s files changed',len(c.changeset.affected_files)) % (len(c.changeset.affected_files))}: |
2995
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
2725
diff
changeset
|
125 % else: |
3197 | 126 ${ungettext('%s file changed with %s insertions and %s deletions','%s files changed with %s insertions and %s deletions', len(c.changeset.affected_files)) % (len(c.changeset.affected_files),c.lines_added,c.lines_deleted)}: |
127 %endif | |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
128 </div> |
3197 | 129 <div class="cs_files"> |
2995
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
2725
diff
changeset
|
130 %for FID, (cs1, cs2, change, path, diff, stats) in c.changes[c.changeset.raw_id].iteritems(): |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
2725
diff
changeset
|
131 <div class="cs_${change}"> |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
2725
diff
changeset
|
132 <div class="node"> |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
2725
diff
changeset
|
133 <a href="#${FID}">${h.safe_unicode(path)}</a> |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
2725
diff
changeset
|
134 </div> |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
2725
diff
changeset
|
135 <div class="changes">${h.fancy_file_stats(stats)}</div> |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
2725
diff
changeset
|
136 </div> |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
2725
diff
changeset
|
137 %endfor |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
2725
diff
changeset
|
138 % if c.limited_diff: |
3654
ec6354949623
Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents:
3603
diff
changeset
|
139 <h5>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("Showing a huge diff might take some time and resources")}')">${_('Show full diff')}</a></h5> |
2995
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
2725
diff
changeset
|
140 % endif |
3197 | 141 </div> |
142 </div> | |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1868
diff
changeset
|
143 |
218
58b46f9194c3
version bump. Made changesets work as should, but vcs had to be fixed for that.
Marcin Kuzminski <marcin@python-works.com>
parents:
193
diff
changeset
|
144 </div> |
2995
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
2725
diff
changeset
|
145 |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1868
diff
changeset
|
146 ## diff block |
1787
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1776
diff
changeset
|
147 <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
2995
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
2725
diff
changeset
|
148 ${diff_block.diff_block(c.changes[c.changeset.raw_id])} |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
2725
diff
changeset
|
149 |
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
2725
diff
changeset
|
150 % if c.limited_diff: |
3654
ec6354949623
Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents:
3603
diff
changeset
|
151 <h4>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("Showing a huge diff might take some time and resources")}')">${_('Show full diff')}</a></h4> |
2995
32471bd1f4ee
Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents:
2725
diff
changeset
|
152 % endif |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1868
diff
changeset
|
153 |
1787
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1776
diff
changeset
|
154 ## template for inline comment form |
1670
d2de0c2f02cd
#77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
1472
diff
changeset
|
155 <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> |
2489
a0adf8db1416
Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2439
diff
changeset
|
156 ${comment.comment_inline_form()} |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1868
diff
changeset
|
157 |
2608
58c529332e7e
Added option to close pull requests, in future that will be close & merge
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
158 ## render comments and inlines |
58c529332e7e
Added option to close pull requests, in future that will be close & merge
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
159 ${comment.generate_comments()} |
58c529332e7e
Added option to close pull requests, in future that will be close & merge
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
160 |
58c529332e7e
Added option to close pull requests, in future that will be close & merge
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
161 ## main comment form and it status |
2439
ad19dfcdb1cc
Refactoring of changeset_file_comments for more generic usage. In both It enables sharing code between changeset, and pull requests discussions
Marcin Kuzminski <marcin@python-works.com>
parents:
2430
diff
changeset
|
162 ${comment.comments(h.url('changeset_comment', repo_name=c.repo_name, revision=c.changeset.raw_id), |
ad19dfcdb1cc
Refactoring of changeset_file_comments for more generic usage. In both It enables sharing code between changeset, and pull requests discussions
Marcin Kuzminski <marcin@python-works.com>
parents:
2430
diff
changeset
|
163 h.changeset_status(c.rhodecode_db_repo, c.changeset.raw_id))} |
ad19dfcdb1cc
Refactoring of changeset_file_comments for more generic usage. In both It enables sharing code between changeset, and pull requests discussions
Marcin Kuzminski <marcin@python-works.com>
parents:
2430
diff
changeset
|
164 |
2489
a0adf8db1416
Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2439
diff
changeset
|
165 ## FORM FOR MAKING JS ACTION AS CHANGESET COMMENTS |
1674
6f0143e5efe5
#71 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
1670
diff
changeset
|
166 <script type="text/javascript"> |
1677
7276b170ce8b
#71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents:
1676
diff
changeset
|
167 YUE.onDOMReady(function(){ |
1787
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1776
diff
changeset
|
168 YUE.on(YUQ('.show-inline-comments'),'change',function(e){ |
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1776
diff
changeset
|
169 var show = 'none'; |
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1776
diff
changeset
|
170 var target = e.currentTarget; |
2723
04aa0ea1ddd0
fixed comment addition and deletion functionality on IE9
Dies Koper <diesk@fast.au.fujitsu.com>
parents:
2673
diff
changeset
|
171 if(target == null){ |
04aa0ea1ddd0
fixed comment addition and deletion functionality on IE9
Dies Koper <diesk@fast.au.fujitsu.com>
parents:
2673
diff
changeset
|
172 target = this; |
04aa0ea1ddd0
fixed comment addition and deletion functionality on IE9
Dies Koper <diesk@fast.au.fujitsu.com>
parents:
2673
diff
changeset
|
173 } |
1787
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1776
diff
changeset
|
174 if(target.checked){ |
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1776
diff
changeset
|
175 var show = '' |
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1776
diff
changeset
|
176 } |
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1776
diff
changeset
|
177 var boxid = YUD.getAttribute(target,'id_for'); |
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1776
diff
changeset
|
178 var comments = YUQ('#{0} .inline-comments'.format(boxid)); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1868
diff
changeset
|
179 for(c in comments){ |
1787
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1776
diff
changeset
|
180 YUD.setStyle(comments[c],'display',show); |
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1776
diff
changeset
|
181 } |
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1776
diff
changeset
|
182 var btns = YUQ('#{0} .inline-comments-button'.format(boxid)); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1868
diff
changeset
|
183 for(c in btns){ |
1772
c83d3d42ab92
- diff.css merge to main style.css
Marcin Kuzminski <marcin@python-works.com>
parents:
1705
diff
changeset
|
184 YUD.setStyle(btns[c],'display',show); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1868
diff
changeset
|
185 } |
1787
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1776
diff
changeset
|
186 }) |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1868
diff
changeset
|
187 |
1677
7276b170ce8b
#71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents:
1676
diff
changeset
|
188 YUE.on(YUQ('.line'),'click',function(e){ |
1787
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1776
diff
changeset
|
189 var tr = e.currentTarget; |
2723
04aa0ea1ddd0
fixed comment addition and deletion functionality on IE9
Dies Koper <diesk@fast.au.fujitsu.com>
parents:
2673
diff
changeset
|
190 if(tr == null){ |
04aa0ea1ddd0
fixed comment addition and deletion functionality on IE9
Dies Koper <diesk@fast.au.fujitsu.com>
parents:
2673
diff
changeset
|
191 tr = this; |
04aa0ea1ddd0
fixed comment addition and deletion functionality on IE9
Dies Koper <diesk@fast.au.fujitsu.com>
parents:
2673
diff
changeset
|
192 } |
1787
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1776
diff
changeset
|
193 injectInlineForm(tr); |
1682
1f2ba96de73e
#71 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
1681
diff
changeset
|
194 }); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1868
diff
changeset
|
195 |
1682
1f2ba96de73e
#71 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
1681
diff
changeset
|
196 // inject comments into they proper positions |
1f2ba96de73e
#71 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
1681
diff
changeset
|
197 var file_comments = YUQ('.inline-comment-placeholder'); |
2187
b61e540122f2
#415: Adding comment to changeset causes reload
Marcin Kuzminski <marcin@python-works.com>
parents:
2161
diff
changeset
|
198 renderInlineComments(file_comments); |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
199 |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
200 pyroutes.register('changeset_home', |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
201 "${h.url('changeset_home', repo_name='%(repo_name)s', revision='%(revision)s')}", |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
202 ['repo_name', 'revision']); |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
203 |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
204 //next links |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
205 $('#child_link').on('click', function(e){ |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
206 //fetch via ajax what is going to be the next link, if we have |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
207 //>1 links show them to user to choose |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
208 if(!$('#child_link').hasClass('disabled')){ |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
209 $.ajax({ |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
210 url: '${h.url('changeset_children',repo_name=c.repo_name, revision=c.changeset.raw_id)}', |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
211 success: function(data) { |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
212 if(data.results.length === 0){ |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
213 $('#child_link').addClass('disabled'); |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
214 $('#child_link').html('${_('no revisions')}'); |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
215 } |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
216 if(data.results.length === 1){ |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
217 var commit = data.results[0]; |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
218 window.location = pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}','revision': commit.raw_id}); |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
219 } |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
220 else if(data.results.length === 2){ |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
221 $('#child_link').addClass('disabled'); |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
222 $('#child_link').addClass('double'); |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
223 var _html = ''; |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
224 _html +='<a title="__title__" href="__url__">__rev__</a> <i style="color:#036185" class="icon-chevron-right"></i>' |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
225 .replace('__rev__','r{0}:{1}'.format(data.results[0].revision, data.results[0].raw_id.substr(0,6))) |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
226 .replace('__title__', data.results[0].message) |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
227 .replace('__url__', pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}','revision': data.results[0].raw_id})); |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
228 _html +='<br/>' |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
229 _html +='<a title="__title__" href="__url__">__rev__</a> <i style="color:#036185" class="icon-chevron-right"></i>' |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
230 .replace('__rev__','r{0}:{1}'.format(data.results[1].revision, data.results[1].raw_id.substr(0,6))) |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
231 .replace('__title__', data.results[1].message) |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
232 .replace('__url__', pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}','revision': data.results[1].raw_id})); |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
233 $('#child_link').html(_html); |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
234 } |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
235 }, |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
236 }); |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
237 e.preventDefault(); |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
238 } |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
239 }) |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
240 |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
241 //prev links |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
242 $('#parent_link').on('click', function(e){ |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
243 //fetch via ajax what is going to be the next link, if we have |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
244 //>1 links show them to user to choose |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
245 if(!$('#parent_link').hasClass('disabled')){ |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
246 $.ajax({ |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
247 url: '${h.url('changeset_parents',repo_name=c.repo_name, revision=c.changeset.raw_id)}', |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
248 success: function(data) { |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
249 if(data.results.length === 0){ |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
250 $('#parent_link').addClass('disabled'); |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
251 $('#parent_link').html('${_('no revisions')}'); |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
252 } |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
253 if(data.results.length === 1){ |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
254 var commit = data.results[0]; |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
255 window.location = pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}','revision': commit.raw_id}); |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
256 } |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
257 else if(data.results.length === 2){ |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
258 $('#parent_link').addClass('disabled'); |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
259 $('#parent_link').addClass('double'); |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
260 var _html = ''; |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
261 _html +='<i style="color:#036185" class="icon-chevron-left"></i> <a title="__title__" href="__url__">__rev__</a>' |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
262 .replace('__rev__','r{0}:{1}'.format(data.results[0].revision, data.results[0].raw_id.substr(0,6))) |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
263 .replace('__title__', data.results[0].message) |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
264 .replace('__url__', pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}','revision': data.results[0].raw_id})); |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
265 _html +='<br/>' |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
266 _html +='<i style="color:#036185" class="icon-chevron-left"></i> <a title="__title__" href="__url__">__rev__</a>' |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
267 .replace('__rev__','r{0}:{1}'.format(data.results[1].revision, data.results[1].raw_id.substr(0,6))) |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
268 .replace('__title__', data.results[1].message) |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
269 .replace('__url__', pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}','revision': data.results[1].raw_id})); |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
270 $('#parent_link').html(_html); |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
271 } |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
272 }, |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
273 }); |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
274 e.preventDefault(); |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
275 } |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
276 }) |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3988
diff
changeset
|
277 |
1677
7276b170ce8b
#71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents:
1676
diff
changeset
|
278 }) |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1868
diff
changeset
|
279 |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1868
diff
changeset
|
280 </script> |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1868
diff
changeset
|
281 |
1787
d4a7b6c82efe
code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
1776
diff
changeset
|
282 </div> |
1472
aaec08ad9daf
Added pt_BR localization, added i18n wrappers on some places missing, fixed css in settings screen for longer labels.
Augusto Herrmann <augusto.herrmann@planejamento.gov.br>
parents:
1257
diff
changeset
|
283 </%def> |