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