Show More
@@ -1,202 +1,199 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 |
|
2 | |||
3 | <%inherit file="/base/base.html"/> |
|
3 | <%inherit file="/base/base.html"/> | |
4 |
|
4 | |||
5 | <%def name="title()"> |
|
5 | <%def name="title()"> | |
6 | ${_('%s Changeset') % c.repo_name} - r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} - ${c.rhodecode_name} |
|
6 | ${_('%s Changeset') % c.repo_name} - r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} - ${c.rhodecode_name} | |
7 | </%def> |
|
7 | </%def> | |
8 |
|
8 | |||
9 | <%def name="breadcrumbs_links()"> |
|
9 | <%def name="breadcrumbs_links()"> | |
10 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
|||
11 | » |
|
|||
12 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} |
|
|||
13 | » |
|
|||
14 | ${_('changeset')} - <span class='hash'>r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}</span> |
|
10 | ${_('changeset')} - <span class='hash'>r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}</span> | |
15 | </%def> |
|
11 | </%def> | |
16 |
|
12 | |||
17 | <%def name="page_nav()"> |
|
13 | <%def name="page_nav()"> | |
18 | ${self.menu('changelog')} |
|
14 | ${self.menu('changelog')} | |
19 | </%def> |
|
15 | </%def> | |
20 |
|
16 | |||
21 | <%def name="main()"> |
|
17 | <%def name="main()"> | |
|
18 | ${self.context_bar('changelog')} | |||
22 | <div class="box"> |
|
19 | <div class="box"> | |
23 | <!-- box / title --> |
|
20 | <!-- box / title --> | |
24 | <div class="title"> |
|
21 | <div class="title"> | |
25 | ${self.breadcrumbs()} |
|
22 | ${self.breadcrumbs()} | |
26 | </div> |
|
23 | </div> | |
27 | <script> |
|
24 | <script> | |
28 | var _USERS_AC_DATA = ${c.users_array|n}; |
|
25 | var _USERS_AC_DATA = ${c.users_array|n}; | |
29 | var _GROUPS_AC_DATA = ${c.users_groups_array|n}; |
|
26 | var _GROUPS_AC_DATA = ${c.users_groups_array|n}; | |
30 | AJAX_COMMENT_URL = "${url('changeset_comment',repo_name=c.repo_name,revision=c.changeset.raw_id)}"; |
|
27 | AJAX_COMMENT_URL = "${url('changeset_comment',repo_name=c.repo_name,revision=c.changeset.raw_id)}"; | |
31 | AJAX_COMMENT_DELETE_URL = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"; |
|
28 | AJAX_COMMENT_DELETE_URL = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"; | |
32 | </script> |
|
29 | </script> | |
33 | <div class="table"> |
|
30 | <div class="table"> | |
34 | <div class="diffblock"> |
|
31 | <div class="diffblock"> | |
35 | <div class="parents"> |
|
32 | <div class="parents"> | |
36 | %if c.changeset.parents: |
|
33 | %if c.changeset.parents: | |
37 | %for n, p_cs in enumerate(reversed(c.changeset.parents)): |
|
34 | %for n, p_cs in enumerate(reversed(c.changeset.parents)): | |
38 | <span class="changeset_hash">« ${h.link_to('%s:%s' % (p_cs.revision,p_cs.raw_id[:6]),h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span> |
|
35 | <span class="changeset_hash">« ${h.link_to('%s:%s' % (p_cs.revision,p_cs.raw_id[:6]),h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span> | |
39 | <br> |
|
36 | <br> | |
40 | %endfor |
|
37 | %endfor | |
41 | %else: |
|
38 | %else: | |
42 | <span>${_('No parents')}</span> |
|
39 | <span>${_('No parents')}</span> | |
43 | %endif |
|
40 | %endif | |
44 | </div> |
|
41 | </div> | |
45 | <div class="children"> |
|
42 | <div class="children"> | |
46 | %if c.changeset.children: |
|
43 | %if c.changeset.children: | |
47 | %for n, p_cs in enumerate(reversed(c.changeset.children)): |
|
44 | %for n, p_cs in enumerate(reversed(c.changeset.children)): | |
48 | <span class="changeset_hash">${h.link_to('%s:%s' % (p_cs.revision,p_cs.raw_id[:6]),h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)} »</span> |
|
45 | <span class="changeset_hash">${h.link_to('%s:%s' % (p_cs.revision,p_cs.raw_id[:6]),h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)} »</span> | |
49 | <br> |
|
46 | <br> | |
50 | %endfor |
|
47 | %endfor | |
51 | %else: |
|
48 | %else: | |
52 | <span>${_('No children')}</span> |
|
49 | <span>${_('No children')}</span> | |
53 | %endif |
|
50 | %endif | |
54 | </div> |
|
51 | </div> | |
55 | <div class="code-header banner"> |
|
52 | <div class="code-header banner"> | |
56 |
|
53 | |||
57 | <div class="hash"> |
|
54 | <div class="hash"> | |
58 | r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} |
|
55 | r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} | |
59 | </div> |
|
56 | </div> | |
60 | <div class="date"> |
|
57 | <div class="date"> | |
61 | ${h.fmt_date(c.changeset.date)} |
|
58 | ${h.fmt_date(c.changeset.date)} | |
62 | </div> |
|
59 | </div> | |
63 | <div class="changeset-status-container"> |
|
60 | <div class="changeset-status-container"> | |
64 | %if c.statuses: |
|
61 | %if c.statuses: | |
65 | <div title="${_('Changeset status')}" class="changeset-status-lbl">[${h.changeset_status_lbl(c.statuses[0])}]</div> |
|
62 | <div title="${_('Changeset status')}" class="changeset-status-lbl">[${h.changeset_status_lbl(c.statuses[0])}]</div> | |
66 | <div class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[0])}" /></div> |
|
63 | <div class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[0])}" /></div> | |
67 | %endif |
|
64 | %endif | |
68 | </div> |
|
65 | </div> | |
69 | <div class="diff-actions"> |
|
66 | <div class="diff-actions"> | |
70 | <a href="${h.url('changeset_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id)}" class="tooltip" title="${h.tooltip(_('raw diff'))}"><img class="icon" src="${h.url('/images/icons/page_white.png')}"/></a> |
|
67 | <a href="${h.url('changeset_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id)}" class="tooltip" title="${h.tooltip(_('raw diff'))}"><img class="icon" src="${h.url('/images/icons/page_white.png')}"/></a> | |
71 | <a href="${h.url('changeset_patch_home',repo_name=c.repo_name,revision=c.changeset.raw_id)}" class="tooltip" title="${h.tooltip(_('patch diff'))}"><img class="icon" src="${h.url('/images/icons/page_add.png')}"/></a> |
|
68 | <a href="${h.url('changeset_patch_home',repo_name=c.repo_name,revision=c.changeset.raw_id)}" class="tooltip" title="${h.tooltip(_('patch diff'))}"><img class="icon" src="${h.url('/images/icons/page_add.png')}"/></a> | |
72 | <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'))}"><img class="icon" src="${h.url('/images/icons/page_save.png')}"/></a> |
|
69 | <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'))}"><img class="icon" src="${h.url('/images/icons/page_save.png')}"/></a> | |
73 | ${c.ignorews_url(request.GET)} |
|
70 | ${c.ignorews_url(request.GET)} | |
74 | ${c.context_url(request.GET)} |
|
71 | ${c.context_url(request.GET)} | |
75 | </div> |
|
72 | </div> | |
76 | <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> |
|
73 | <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> | |
77 | </div> |
|
74 | </div> | |
78 | </div> |
|
75 | </div> | |
79 | <div id="changeset_content"> |
|
76 | <div id="changeset_content"> | |
80 | <div class="container"> |
|
77 | <div class="container"> | |
81 | <div class="left"> |
|
78 | <div class="left"> | |
82 | <div class="author"> |
|
79 | <div class="author"> | |
83 | <div class="gravatar"> |
|
80 | <div class="gravatar"> | |
84 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(c.changeset.author),20)}"/> |
|
81 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(c.changeset.author),20)}"/> | |
85 | </div> |
|
82 | </div> | |
86 | <span>${h.person(c.changeset.author)}</span><br/> |
|
83 | <span>${h.person(c.changeset.author)}</span><br/> | |
87 | <span><a href="mailto:${h.email_or_none(c.changeset.author)}">${h.email_or_none(c.changeset.author)}</a></span><br/> |
|
84 | <span><a href="mailto:${h.email_or_none(c.changeset.author)}">${h.email_or_none(c.changeset.author)}</a></span><br/> | |
88 | </div> |
|
85 | </div> | |
89 | <div class="message">${h.urlify_commit(c.changeset.message, c.repo_name)}</div> |
|
86 | <div class="message">${h.urlify_commit(c.changeset.message, c.repo_name)}</div> | |
90 | </div> |
|
87 | </div> | |
91 | <div class="right"> |
|
88 | <div class="right"> | |
92 | <div class="changes"> |
|
89 | <div class="changes"> | |
93 | % if (len(c.changeset.affected_files) <= c.affected_files_cut_off) or c.fulldiff: |
|
90 | % if (len(c.changeset.affected_files) <= c.affected_files_cut_off) or c.fulldiff: | |
94 | <span class="removed" title="${_('removed')}">${len(c.changeset.removed)}</span> |
|
91 | <span class="removed" title="${_('removed')}">${len(c.changeset.removed)}</span> | |
95 | <span class="changed" title="${_('changed')}">${len(c.changeset.changed)}</span> |
|
92 | <span class="changed" title="${_('changed')}">${len(c.changeset.changed)}</span> | |
96 | <span class="added" title="${_('added')}">${len(c.changeset.added)}</span> |
|
93 | <span class="added" title="${_('added')}">${len(c.changeset.added)}</span> | |
97 | % else: |
|
94 | % else: | |
98 | <span class="removed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> |
|
95 | <span class="removed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> | |
99 | <span class="changed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> |
|
96 | <span class="changed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> | |
100 | <span class="added" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> |
|
97 | <span class="added" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> | |
101 | % endif |
|
98 | % endif | |
102 | </div> |
|
99 | </div> | |
103 |
|
100 | |||
104 | <span class="logtags"> |
|
101 | <span class="logtags"> | |
105 | %if len(c.changeset.parents)>1: |
|
102 | %if len(c.changeset.parents)>1: | |
106 | <span class="merge">${_('merge')}</span> |
|
103 | <span class="merge">${_('merge')}</span> | |
107 | %endif |
|
104 | %endif | |
108 | %if c.changeset.branch: |
|
105 | %if c.changeset.branch: | |
109 | <span class="branchtag" title="${'%s %s' % (_('branch'),c.changeset.branch)}"> |
|
106 | <span class="branchtag" title="${'%s %s' % (_('branch'),c.changeset.branch)}"> | |
110 | ${h.link_to(c.changeset.branch,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))} |
|
107 | ${h.link_to(c.changeset.branch,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))} | |
111 | </span> |
|
108 | </span> | |
112 | %endif |
|
109 | %endif | |
113 | %for tag in c.changeset.tags: |
|
110 | %for tag in c.changeset.tags: | |
114 | <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> |
|
111 | <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> | |
115 | ${h.link_to(tag,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</span> |
|
112 | ${h.link_to(tag,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</span> | |
116 | %endfor |
|
113 | %endfor | |
117 | </span> |
|
114 | </span> | |
118 | </div> |
|
115 | </div> | |
119 | </div> |
|
116 | </div> | |
120 | <span> |
|
117 | <span> | |
121 | % if c.limited_diff: |
|
118 | % if c.limited_diff: | |
122 | ${ungettext('%s file changed','%s files changed',len(c.changeset.affected_files)) % (len(c.changeset.affected_files))}: |
|
119 | ${ungettext('%s file changed','%s files changed',len(c.changeset.affected_files)) % (len(c.changeset.affected_files))}: | |
123 | % else: |
|
120 | % else: | |
124 | ${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)}: |
|
121 | ${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)}: | |
125 | %endif |
|
122 | %endif | |
126 | </span> |
|
123 | </span> | |
127 | <div class="cs_files"> |
|
124 | <div class="cs_files"> | |
128 | %for FID, (cs1, cs2, change, path, diff, stats) in c.changes[c.changeset.raw_id].iteritems(): |
|
125 | %for FID, (cs1, cs2, change, path, diff, stats) in c.changes[c.changeset.raw_id].iteritems(): | |
129 | <div class="cs_${change}"> |
|
126 | <div class="cs_${change}"> | |
130 | <div class="node"> |
|
127 | <div class="node"> | |
131 | <a href="#${FID}">${h.safe_unicode(path)}</a> |
|
128 | <a href="#${FID}">${h.safe_unicode(path)}</a> | |
132 | </div> |
|
129 | </div> | |
133 | <div class="changes">${h.fancy_file_stats(stats)}</div> |
|
130 | <div class="changes">${h.fancy_file_stats(stats)}</div> | |
134 | </div> |
|
131 | </div> | |
135 | %endfor |
|
132 | %endfor | |
136 | % if c.limited_diff: |
|
133 | % if c.limited_diff: | |
137 | <h5>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h5> |
|
134 | <h5>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h5> | |
138 | % endif |
|
135 | % endif | |
139 | </div> |
|
136 | </div> | |
140 | </div> |
|
137 | </div> | |
141 |
|
138 | |||
142 | </div> |
|
139 | </div> | |
143 |
|
140 | |||
144 | ## diff block |
|
141 | ## diff block | |
145 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
142 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> | |
146 | ${diff_block.diff_block(c.changes[c.changeset.raw_id])} |
|
143 | ${diff_block.diff_block(c.changes[c.changeset.raw_id])} | |
147 |
|
144 | |||
148 | % if c.limited_diff: |
|
145 | % if c.limited_diff: | |
149 | <h4>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h4> |
|
146 | <h4>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h4> | |
150 | % endif |
|
147 | % endif | |
151 |
|
148 | |||
152 | ## template for inline comment form |
|
149 | ## template for inline comment form | |
153 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> |
|
150 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> | |
154 | ${comment.comment_inline_form()} |
|
151 | ${comment.comment_inline_form()} | |
155 |
|
152 | |||
156 | ## render comments and inlines |
|
153 | ## render comments and inlines | |
157 | ${comment.generate_comments()} |
|
154 | ${comment.generate_comments()} | |
158 |
|
155 | |||
159 | ## main comment form and it status |
|
156 | ## main comment form and it status | |
160 | ${comment.comments(h.url('changeset_comment', repo_name=c.repo_name, revision=c.changeset.raw_id), |
|
157 | ${comment.comments(h.url('changeset_comment', repo_name=c.repo_name, revision=c.changeset.raw_id), | |
161 | h.changeset_status(c.rhodecode_db_repo, c.changeset.raw_id))} |
|
158 | h.changeset_status(c.rhodecode_db_repo, c.changeset.raw_id))} | |
162 |
|
159 | |||
163 | ## FORM FOR MAKING JS ACTION AS CHANGESET COMMENTS |
|
160 | ## FORM FOR MAKING JS ACTION AS CHANGESET COMMENTS | |
164 | <script type="text/javascript"> |
|
161 | <script type="text/javascript"> | |
165 | YUE.onDOMReady(function(){ |
|
162 | YUE.onDOMReady(function(){ | |
166 | YUE.on(YUQ('.show-inline-comments'),'change',function(e){ |
|
163 | YUE.on(YUQ('.show-inline-comments'),'change',function(e){ | |
167 | var show = 'none'; |
|
164 | var show = 'none'; | |
168 | var target = e.currentTarget; |
|
165 | var target = e.currentTarget; | |
169 | if(target == null){ |
|
166 | if(target == null){ | |
170 | target = this; |
|
167 | target = this; | |
171 | } |
|
168 | } | |
172 | if(target.checked){ |
|
169 | if(target.checked){ | |
173 | var show = '' |
|
170 | var show = '' | |
174 | } |
|
171 | } | |
175 | var boxid = YUD.getAttribute(target,'id_for'); |
|
172 | var boxid = YUD.getAttribute(target,'id_for'); | |
176 | var comments = YUQ('#{0} .inline-comments'.format(boxid)); |
|
173 | var comments = YUQ('#{0} .inline-comments'.format(boxid)); | |
177 | for(c in comments){ |
|
174 | for(c in comments){ | |
178 | YUD.setStyle(comments[c],'display',show); |
|
175 | YUD.setStyle(comments[c],'display',show); | |
179 | } |
|
176 | } | |
180 | var btns = YUQ('#{0} .inline-comments-button'.format(boxid)); |
|
177 | var btns = YUQ('#{0} .inline-comments-button'.format(boxid)); | |
181 | for(c in btns){ |
|
178 | for(c in btns){ | |
182 | YUD.setStyle(btns[c],'display',show); |
|
179 | YUD.setStyle(btns[c],'display',show); | |
183 | } |
|
180 | } | |
184 | }) |
|
181 | }) | |
185 |
|
182 | |||
186 | YUE.on(YUQ('.line'),'click',function(e){ |
|
183 | YUE.on(YUQ('.line'),'click',function(e){ | |
187 | var tr = e.currentTarget; |
|
184 | var tr = e.currentTarget; | |
188 | if(tr == null){ |
|
185 | if(tr == null){ | |
189 | tr = this; |
|
186 | tr = this; | |
190 | } |
|
187 | } | |
191 | injectInlineForm(tr); |
|
188 | injectInlineForm(tr); | |
192 | }); |
|
189 | }); | |
193 |
|
190 | |||
194 | // inject comments into they proper positions |
|
191 | // inject comments into they proper positions | |
195 | var file_comments = YUQ('.inline-comment-placeholder'); |
|
192 | var file_comments = YUQ('.inline-comment-placeholder'); | |
196 | renderInlineComments(file_comments); |
|
193 | renderInlineComments(file_comments); | |
197 | }) |
|
194 | }) | |
198 |
|
195 | |||
199 | </script> |
|
196 | </script> | |
200 |
|
197 | |||
201 | </div> |
|
198 | </div> | |
202 | </%def> |
|
199 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now