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