Mercurial > kallithea
comparison rhodecode/templates/changelog/changelog.html @ 3539:c65b440540da beta
Style clean up, and comments removal.
author | Leonardo Carneiro <leonardo@unity3d.com> |
---|---|
date | Mon, 11 Mar 2013 16:43:41 +0100 |
parents | 9bf927589f7a |
children | 6e8027c2f49c |
comparison
equal
deleted
inserted
replaced
3538:9bf927589f7a | 3539:c65b440540da |
---|---|
62 <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),16)}"/> | 62 <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),16)}"/> |
63 <span title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</span> | 63 <span title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</span> |
64 </td> | 64 </td> |
65 <td class="hash"> | 65 <td class="hash"> |
66 <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}"> | 66 <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}"> |
67 <span class="changeset_id">${cs.revision} :</span> | |
68 <span class="changeset_hash">${h.short_id(cs.raw_id)}</span> | 67 <span class="changeset_hash">${h.short_id(cs.raw_id)}</span> |
69 </a> | 68 </a> |
70 </td> | 69 </td> |
71 <td class="date"> | 70 <td class="date"> |
72 <div class="date">${h.age(cs.date,True)}</div> | 71 <div class="date">${h.age(cs.date,True)}</div> |
99 %if (not c.branch_name) and cs.branch: | 98 %if (not c.branch_name) and cs.branch: |
100 <div class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}"> | 99 <div class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}"> |
101 ${h.link_to(h.shorter(cs.branch),h.url('changelog_home',repo_name=c.repo_name,branch=cs.branch))} | 100 ${h.link_to(h.shorter(cs.branch),h.url('changelog_home',repo_name=c.repo_name,branch=cs.branch))} |
102 </div> | 101 </div> |
103 %endif | 102 %endif |
104 | |
105 <%doc> | |
106 %if (h.is_hg(c.rhodecode_repo) and cs.bookmarks) or cs.tags: | |
107 <div class="tagcontainer"> | |
108 %if h.is_hg(c.rhodecode_repo): | |
109 <ul class="logtags"> | |
110 ##%if len(cs.parents)>1: | |
111 ## <span class="merge">${_('merge')}</span> | |
112 ##%endif | |
113 | |
114 | |
115 %for book in cs.bookmarks: | |
116 <li class="bookbook" title="${'%s %s' % (_('bookmark'),book)}"> | |
117 ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} | |
118 </li> | |
119 %endfor | |
120 | |
121 </ul> | |
122 %endif | |
123 <ul class="logtags tags"> | |
124 %for tag in cs.tags: | |
125 <li class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> | |
126 ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} | |
127 </li> | |
128 %endfor | |
129 </ul> | |
130 </div> | |
131 %endif | |
132 </%doc> | |
133 </div> | 103 </div> |
134 </div> | 104 </div> |
135 </td> | 105 </td> |
136 <%doc> | |
137 <td class="right"> | |
138 <div class="changes"> | |
139 <div id="changed_total_${cs.raw_id}" style="float:right;" class="changed_total tooltip" title="${h.tooltip(_('Affected number of files, click to show more details'))}"> | |
140 ${len(cs.affected_files)} | |
141 </div> | |
142 | |
143 <div class="changeset-status-container"> | |
144 %if c.statuses.get(cs.raw_id): | |
145 <div title="${_('Changeset status')}" class="changeset-status-lbl">${c.statuses.get(cs.raw_id)[1]}</div> | |
146 <div class="changeset-status-ico"> | |
147 %if c.statuses.get(cs.raw_id)[2]: | |
148 <a class="tooltip" title="${_('Click to open associated pull request #%s' % c.statuses.get(cs.raw_id)[2])}" href="${h.url('pullrequest_show',repo_name=c.statuses.get(cs.raw_id)[3],pull_request_id=c.statuses.get(cs.raw_id)[2])}"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" /></a> | |
149 %else: | |
150 <img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" /> | |
151 %endif | |
152 </div> | |
153 %endif | |
154 </div> | |
155 </div> | |
156 %if cs.parents: | |
157 %for p_cs in reversed(cs.parents): | |
158 <div class="parent">${_('Parent')} | |
159 <span class="changeset_id">${p_cs.revision}:<span class="changeset_hash">${h.link_to(h.short_id(p_cs.raw_id), | |
160 h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span></span> | |
161 </div> | |
162 %endfor | |
163 %else: | |
164 <div class="parent">${_('No parents')}</div> | |
165 %endif | |
166 %if len(c.comments.get(cs.raw_id,[])) > 0: | |
167 <div class="comments-container"> | |
168 <div class="comments-cnt" title="${('comments')}"> | |
169 <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id,anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}"> | |
170 ${len(c.comments[cs.raw_id])} | |
171 </a> | |
172 </div> | |
173 </div> | |
174 %endif | |
175 %if (h.is_hg(c.rhodecode_repo) and cs.bookmarks) or cs.tags: | |
176 <div class="tagcontainer"> | |
177 %if h.is_hg(c.rhodecode_repo): | |
178 <ul class="logtags"> | |
179 ##%if len(cs.parents)>1: | |
180 ## <span class="merge">${_('merge')}</span> | |
181 ##%endif | |
182 | |
183 | |
184 %for book in cs.bookmarks: | |
185 <li class="bookbook" title="${'%s %s' % (_('bookmark'),book)}"> | |
186 ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} | |
187 </li> | |
188 %endfor | |
189 | |
190 </ul> | |
191 %endif | |
192 <ul class="logtags tags"> | |
193 %for tag in cs.tags: | |
194 <li class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> | |
195 ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} | |
196 </li> | |
197 %endfor | |
198 </ul> | |
199 </div> | |
200 %endif | |
201 </td> | |
202 </%doc> | |
203 </tr> | 106 </tr> |
204 %endfor | 107 %endfor |
205 </tbody> | 108 </tbody> |
206 </table> | 109 </table> |
207 | 110 |
219 //Monitor range checkboxes and build a link to changesets | 122 //Monitor range checkboxes and build a link to changesets |
220 //ranges | 123 //ranges |
221 var checkboxes = YUD.getElementsByClassName('changeset_range'); | 124 var checkboxes = YUD.getElementsByClassName('changeset_range'); |
222 var url_tmpl = "${h.url('changeset_home',repo_name=c.repo_name,revision='__REVRANGE__')}"; | 125 var url_tmpl = "${h.url('changeset_home',repo_name=c.repo_name,revision='__REVRANGE__')}"; |
223 var pr_tmpl = "${h.url('pullrequest_home',repo_name=c.repo_name)}"; | 126 var pr_tmpl = "${h.url('pullrequest_home',repo_name=c.repo_name)}"; |
224 | 127 |
225 var checkbox_checker = function(e){ | 128 var checkbox_checker = function(e){ |
226 var clicked_cb = e.currentTarget; | 129 var clicked_cb = e.currentTarget; |
227 var checked_checkboxes = []; | 130 var checked_checkboxes = []; |
228 for (pos in checkboxes){ | 131 for (pos in checkboxes){ |
229 if(checkboxes[pos].checked){ | 132 if(checkboxes[pos].checked){ |
298 set_canvas(100); | 201 set_canvas(100); |
299 | 202 |
300 var r = new BranchRenderer(); | 203 var r = new BranchRenderer(); |
301 r.render(jsdata,100,line_count); | 204 r.render(jsdata,100,line_count); |
302 | 205 |
303 }); | |
304 | |
305 // Fetch changeset details | |
306 YUE.on(YUD.getElementsByClassName('changed_total'),'click',function(e){ | |
307 var id = e.currentTarget.id; | |
308 var url = "${h.url('changelog_details',repo_name=c.repo_name,cs='__CS__')}"; | |
309 var url = url.replace('__CS__',id.replace('changed_total_','')); | |
310 ypjax(url,id,function(){tooltip_activate()}); | |
311 }); | 206 }); |
312 | 207 |
313 // change branch filter | 208 // change branch filter |
314 YUE.on(YUD.get('branch_filter'),'change',function(e){ | 209 YUE.on(YUD.get('branch_filter'),'change',function(e){ |
315 var selected_branch = e.currentTarget.options[e.currentTarget.selectedIndex].value; | 210 var selected_branch = e.currentTarget.options[e.currentTarget.selectedIndex].value; |