annotate rhodecode/templates/changeset/changeset.html @ 2489:a0adf8db1416 beta

Enabled inline comments in pull-requests
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 19 Jun 2012 23:07:23 +0200
parents ad19dfcdb1cc
children 79818f546538
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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()">
2417
76d156bef5a2 Better i18n for page titles.
Vincent Duvert <vincent@duvert.net>
parents: 2416
diff changeset
6 ${_('%s Changeset') % c.repo_name} - r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} - ${c.rhodecode_name}
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
7 </%def>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 332
diff changeset
8
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 332
diff changeset
9 <%def name="breadcrumbs_links()">
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 ${h.link_to(u'Home',h.url('/'))}
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 332
diff changeset
11 &raquo;
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 332
diff changeset
12 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 332
diff changeset
13 &raquo;
1956
fe64fecda0fd changeset: do not uppercase the hash in breadcrumbs
Aras Pranckevicius <aras@unity3d.com>
parents: 1955
diff changeset
14 ${_('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
15 </%def>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 332
diff changeset
16
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
17 <%def name="page_nav()">
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1868
diff changeset
18 ${self.menu('changelog')}
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
19 </%def>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 332
diff changeset
20
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
21 <%def name="main()">
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>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 332
diff changeset
27 <div class="table">
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: 816
diff changeset
28 <div class="diffblock">
468
9dd372c7166c added menu for changeset raw diff and download diff
Marcin Kuzminski <marcin@python-works.com>
parents: 387
diff changeset
29 <div class="code-header">
1949
0471cbe8b4a7 user lowercase (copy safe) hash in changeset
Marcin Kuzminski <marcin@python-works.com>
parents: 1902
diff changeset
30 <div class="hash">
0471cbe8b4a7 user lowercase (copy safe) hash in changeset
Marcin Kuzminski <marcin@python-works.com>
parents: 1902
diff changeset
31 r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}
0471cbe8b4a7 user lowercase (copy safe) hash in changeset
Marcin Kuzminski <marcin@python-works.com>
parents: 1902
diff changeset
32 </div>
1963
9bbde54232dc white space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1956
diff changeset
33 <div class="date">
2416
44f328d6f209 Added a translatable date formatter for every date displayed.
Vincent Duvert <vincent@duvert.net>
parents: 2369
diff changeset
34 ${h.fmt_date(c.changeset.date)}
1949
0471cbe8b4a7 user lowercase (copy safe) hash in changeset
Marcin Kuzminski <marcin@python-works.com>
parents: 1902
diff changeset
35 </div>
2239
493e03a4d268 added changeset status into changelog view
Marcin Kuzminski <marcin@python-works.com>
parents: 2238
diff changeset
36 <div class="changeset-status-container">
493e03a4d268 added changeset status into changelog view
Marcin Kuzminski <marcin@python-works.com>
parents: 2238
diff changeset
37 %if c.statuses:
493e03a4d268 added changeset status into changelog view
Marcin Kuzminski <marcin@python-works.com>
parents: 2238
diff changeset
38 <div title="${_('Changeset status')}" class="changeset-status-lbl">[${h.changeset_status_lbl(c.statuses[0])}]</div>
493e03a4d268 added changeset status into changelog view
Marcin Kuzminski <marcin@python-works.com>
parents: 2238
diff changeset
39 <div class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[0])}" /></div>
493e03a4d268 added changeset status into changelog view
Marcin Kuzminski <marcin@python-works.com>
parents: 2238
diff changeset
40 %endif
493e03a4d268 added changeset status into changelog view
Marcin Kuzminski <marcin@python-works.com>
parents: 2238
diff changeset
41 </div>
1865
37b3c3244bbc UI fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 1861
diff changeset
42 <div class="diff-actions">
2427
f467c75544af Added h.tooltip to all places that tooltip_title is used.
Marcin Kuzminski <marcin@python-works.com>
parents: 2426
diff changeset
43 <a href="${h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='show')}" class="tooltip" title="${h.tooltip(_('raw diff'))}"><img class="icon" src="${h.url('/images/icons/page_white.png')}"/></a>
f467c75544af Added h.tooltip to all places that tooltip_title is used.
Marcin Kuzminski <marcin@python-works.com>
parents: 2426
diff changeset
44 <a href="${h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='download')}" class="tooltip" title="${h.tooltip(_('download diff'))}"><img class="icon" src="${h.url('/images/icons/page_white_get.png')}"/></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
45 ${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
46 ${c.context_url(request.GET)}
1865
37b3c3244bbc UI fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 1861
diff changeset
47 </div>
2310
83e4447077d3 Improved i18n for the comment count (use of ngettext for pluralisation).
Vincent Duvert <vincent@duvert.net>
parents: 2231
diff changeset
48 <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>
468
9dd372c7166c added menu for changeset raw diff and download diff
Marcin Kuzminski <marcin@python-works.com>
parents: 387
diff changeset
49 </div>
9dd372c7166c added menu for changeset raw diff and download diff
Marcin Kuzminski <marcin@python-works.com>
parents: 387
diff changeset
50 </div>
529
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
51 <div id="changeset_content">
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
52 <div class="container">
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
53 <div class="left">
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
54 <div class="author">
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
55 <div class="gravatar">
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
56 <img alt="gravatar" src="${h.gravatar_url(h.email(c.changeset.author),20)}"/>
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
57 </div>
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
58 <span>${h.person(c.changeset.author)}</span><br/>
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
59 <span><a href="mailto:${h.email_or_none(c.changeset.author)}">${h.email_or_none(c.changeset.author)}</a></span><br/>
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
60 </div>
2426
b80c2f617d44 removed wrap paragraphs from commit messages as it broke formatting.
Marcin Kuzminski <marcin@python-works.com>
parents: 2417
diff changeset
61 <div class="message">${h.urlify_commit(c.changeset.message, c.repo_name)}</div>
529
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
62 </div>
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
63 <div class="right">
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
64 <div class="changes">
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1868
diff changeset
65 % if len(c.changeset.affected_files) <= c.affected_files_cut_off:
529
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
66 <span class="removed" title="${_('removed')}">${len(c.changeset.removed)}</span>
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
67 <span class="changed" title="${_('changed')}">${len(c.changeset.changed)}</span>
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
68 <span class="added" title="${_('added')}">${len(c.changeset.added)}</span>
1130
1cecc7db3106 fixed some limits in changesets and changelogs
Marcin Kuzminski <marcin@python-works.com>
parents: 1100
diff changeset
69 % else:
1cecc7db3106 fixed some limits in changesets and changelogs
Marcin Kuzminski <marcin@python-works.com>
parents: 1100
diff changeset
70 <span class="removed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
1cecc7db3106 fixed some limits in changesets and changelogs
Marcin Kuzminski <marcin@python-works.com>
parents: 1100
diff changeset
71 <span class="changed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1868
diff changeset
72 <span class="added" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1868
diff changeset
73 % endif
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1868
diff changeset
74 </div>
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1868
diff changeset
75
551
f57aaf673743 fixed initial commit missing parents div,
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
76 %if c.changeset.parents:
529
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
77 %for p_cs in reversed(c.changeset.parents):
1857
c577e8211d69 changeset: styling parents
Aras Pranckevicius <aras@unity3d.com>
parents: 1856
diff changeset
78 <div class="parent">${_('Parent')}
c577e8211d69 changeset: styling parents
Aras Pranckevicius <aras@unity3d.com>
parents: 1856
diff changeset
79 <span class="changeset_id">${p_cs.revision}:<span class="changeset_hash">${h.link_to(h.short_id(p_cs.raw_id),
c577e8211d69 changeset: styling parents
Aras Pranckevicius <aras@unity3d.com>
parents: 1856
diff changeset
80 h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span></span>
529
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
81 </div>
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
82 %endfor
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1868
diff changeset
83 %else:
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1868
diff changeset
84 <div class="parent">${_('No parents')}</div>
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1868
diff changeset
85 %endif
529
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
86 <span class="logtags">
1856
0855c64c571f css: merge/branch/tag blurbs
Aras Pranckevicius <aras@unity3d.com>
parents: 1851
diff changeset
87 %if len(c.changeset.parents)>1:
0855c64c571f css: merge/branch/tag blurbs
Aras Pranckevicius <aras@unity3d.com>
parents: 1851
diff changeset
88 <span class="merge">${_('merge')}</span>
0855c64c571f css: merge/branch/tag blurbs
Aras Pranckevicius <aras@unity3d.com>
parents: 1851
diff changeset
89 %endif
2231
2cfaf199a5a7 Fixed empty git commit message issue
Marcin Kuzminski <marcin@python-works.com>
parents: 2187
diff changeset
90 %if c.changeset.branch:
2cfaf199a5a7 Fixed empty git commit message issue
Marcin Kuzminski <marcin@python-works.com>
parents: 2187
diff changeset
91 <span class="branchtag" title="${'%s %s' % (_('branch'),c.changeset.branch)}">
2cfaf199a5a7 Fixed empty git commit message issue
Marcin Kuzminski <marcin@python-works.com>
parents: 2187
diff changeset
92 ${h.link_to(c.changeset.branch,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}
2cfaf199a5a7 Fixed empty git commit message issue
Marcin Kuzminski <marcin@python-works.com>
parents: 2187
diff changeset
93 </span>
2cfaf199a5a7 Fixed empty git commit message issue
Marcin Kuzminski <marcin@python-works.com>
parents: 2187
diff changeset
94 %endif
529
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
95 %for tag in c.changeset.tags:
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
96 <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}">
636
ffd07396d315 Fixes for raw_id, needed for git
Marcin Kuzminski <marcin@python-works.com>
parents: 619
diff changeset
97 ${h.link_to(tag,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</span>
529
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
98 %endfor
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1868
diff changeset
99 </span>
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1868
diff changeset
100 </div>
529
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
101 </div>
1858
609ec28bd2d1 changeset: styling a bit
Aras Pranckevicius <aras@unity3d.com>
parents: 1857
diff changeset
102 <span>
2161
e8c016815ab9 added hidden fulldiff GET param for disabling big diff cut off limit.
Marcin Kuzminski <marcin@python-works.com>
parents: 1963
diff changeset
103 ${_('%s files affected with %s insertions and %s deletions:') % (len(c.changeset.affected_files),c.lines_added,c.lines_deleted)}
1257
0a2a10a1912f Implemented --stat for changelog
Marcin Kuzminski <marcin@python-works.com>
parents: 1176
diff changeset
104 </span>
529
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
105 <div class="cs_files">
1257
0a2a10a1912f Implemented --stat for changelog
Marcin Kuzminski <marcin@python-works.com>
parents: 1176
diff changeset
106 %for change,filenode,diff,cs1,cs2,stat in c.changes:
0a2a10a1912f Implemented --stat for changelog
Marcin Kuzminski <marcin@python-works.com>
parents: 1176
diff changeset
107 <div class="cs_${change}">
1687
e21ec97aca1f fixed issue with new files and removed files with using inline comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1686
diff changeset
108 <div class="node">
e21ec97aca1f fixed issue with new files and removed files with using inline comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1686
diff changeset
109 %if change != 'removed':
2161
e8c016815ab9 added hidden fulldiff GET param for disabling big diff cut off limit.
Marcin Kuzminski <marcin@python-works.com>
parents: 1963
diff changeset
110 ${h.link_to(h.safe_unicode(filenode.path),c.anchor_url(filenode.changeset.raw_id,filenode.path,request.GET)+"_target")}
1687
e21ec97aca1f fixed issue with new files and removed files with using inline comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1686
diff changeset
111 %else:
1776
22333ddd1a40 implements #307, configurable diffs
Marcin Kuzminski <marcin@python-works.com>
parents: 1775
diff changeset
112 ${h.link_to(h.safe_unicode(filenode.path),h.url.current(anchor=h.FID('',filenode.path)))}
1687
e21ec97aca1f fixed issue with new files and removed files with using inline comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1686
diff changeset
113 %endif
e21ec97aca1f fixed issue with new files and removed files with using inline comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1686
diff changeset
114 </div>
1257
0a2a10a1912f Implemented --stat for changelog
Marcin Kuzminski <marcin@python-works.com>
parents: 1176
diff changeset
115 <div class="changes">${h.fancy_file_stats(stat)}</div>
0a2a10a1912f Implemented --stat for changelog
Marcin Kuzminski <marcin@python-works.com>
parents: 1176
diff changeset
116 </div>
529
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
117 %endfor
1130
1cecc7db3106 fixed some limits in changesets and changelogs
Marcin Kuzminski <marcin@python-works.com>
parents: 1100
diff changeset
118 % if c.cut_off:
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
119 ${_('Changeset was too big and was cut off...')}
1130
1cecc7db3106 fixed some limits in changesets and changelogs
Marcin Kuzminski <marcin@python-works.com>
parents: 1100
diff changeset
120 % endif
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1868
diff changeset
121 </div>
529
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
122 </div>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1868
diff changeset
123
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
124 </div>
2369
c2f131502037 Autocomplete fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 2310
diff changeset
125 <script>
c2f131502037 Autocomplete fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 2310
diff changeset
126 var _USERS_AC_DATA = ${c.users_array|n};
c2f131502037 Autocomplete fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 2310
diff changeset
127 var _GROUPS_AC_DATA = ${c.users_groups_array|n};
2489
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2439
diff changeset
128 AJAX_COMMENT_URL = "${url('changeset_comment',repo_name=c.repo_name,revision=c.changeset.raw_id)}";
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2439
diff changeset
129 AJAX_COMMENT_DELETE_URL = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}";
2369
c2f131502037 Autocomplete fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 2310
diff changeset
130 </script>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1868
diff changeset
131 ## diff block
1787
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1776
diff changeset
132 <%namespace name="diff_block" file="/changeset/diff_block.html"/>
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1776
diff changeset
133 ${diff_block.diff_block(c.changes)}
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1868
diff changeset
134
1787
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1776
diff changeset
135 ## template for inline comment form
1670
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
136 <%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
137 ${comment.comment_inline_form()}
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1868
diff changeset
138
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
139 ## render comments main comments form and it status
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
140 ${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
141 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
142
2489
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2439
diff changeset
143 ## FORM FOR MAKING JS ACTION AS CHANGESET COMMENTS
1674
6f0143e5efe5 #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1670
diff changeset
144 <script type="text/javascript">
1677
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
145 YUE.onDOMReady(function(){
1787
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1776
diff changeset
146 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
147 var show = 'none';
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1776
diff changeset
148 var target = e.currentTarget;
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1776
diff changeset
149 if(target.checked){
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1776
diff changeset
150 var show = ''
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1776
diff changeset
151 }
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1776
diff changeset
152 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
153 var comments = YUQ('#{0} .inline-comments'.format(boxid));
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1868
diff changeset
154 for(c in comments){
1787
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1776
diff changeset
155 YUD.setStyle(comments[c],'display',show);
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1776
diff changeset
156 }
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1776
diff changeset
157 var btns = YUQ('#{0} .inline-comments-button'.format(boxid));
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1868
diff changeset
158 for(c in btns){
1772
c83d3d42ab92 - diff.css merge to main style.css
Marcin Kuzminski <marcin@python-works.com>
parents: 1705
diff changeset
159 YUD.setStyle(btns[c],'display',show);
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1868
diff changeset
160 }
1787
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1776
diff changeset
161 })
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1868
diff changeset
162
1677
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
163 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
164 var tr = e.currentTarget;
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1776
diff changeset
165 injectInlineForm(tr);
1682
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
166 });
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1868
diff changeset
167
1682
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
168 // inject comments into they proper positions
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
169 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
170 renderInlineComments(file_comments);
1677
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
171 })
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1868
diff changeset
172
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1868
diff changeset
173 </script>
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1868
diff changeset
174
1787
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1776
diff changeset
175 </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
176 </%def>