Show More
@@ -1,239 +1,239 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | <%inherit file="/base/base.html"/> |
|
4 | 4 | |
|
5 | 5 | <%def name="title()"> |
|
6 | 6 | ${_('%s Changelog') % c.repo_name} - ${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 | <% size = c.size if c.size <= c.total_cs else c.total_cs %> |
|
15 | 15 | ${_('Changelog')} - ${ungettext('showing %d out of %d revision', 'showing %d out of %d revisions', size) % (size, c.total_cs)} |
|
16 | 16 | </%def> |
|
17 | 17 | |
|
18 | 18 | <%def name="page_nav()"> |
|
19 | 19 | ${self.menu('changelog')} |
|
20 | 20 | </%def> |
|
21 | 21 | |
|
22 | 22 | <%def name="main()"> |
|
23 | 23 | <div class="box"> |
|
24 | 24 | <!-- box / title --> |
|
25 | 25 | <div class="title"> |
|
26 | 26 | ${self.breadcrumbs()} |
|
27 | 27 | </div> |
|
28 | 28 | <div class="table"> |
|
29 | 29 | % if c.pagination: |
|
30 | 30 | <div id="graph"> |
|
31 | 31 | <div id="graph_nodes"> |
|
32 | 32 | <canvas id="graph_canvas"></canvas> |
|
33 | 33 | </div> |
|
34 | 34 | <div id="graph_content"> |
|
35 | 35 | <div class="container_header"> |
|
36 | 36 | ${h.form(h.url.current(),method='get')} |
|
37 | 37 | <div class="info_box" style="float:left"> |
|
38 | 38 | ${h.submit('set',_('Show'),class_="ui-btn")} |
|
39 | 39 | ${h.text('size',size=1,value=c.size)} |
|
40 | 40 | ${_('revisions')} |
|
41 | 41 | </div> |
|
42 | 42 | ${h.end_form()} |
|
43 | 43 | <div id="rev_range_container" style="display:none"></div> |
|
44 | 44 | <div style="float:right">${h.select('branch_filter',c.branch_name,c.branch_filters)}</div> |
|
45 | 45 | </div> |
|
46 | 46 | |
|
47 | 47 | %for cnt,cs in enumerate(c.pagination): |
|
48 | 48 | <div id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}"> |
|
49 | 49 | <div class="left"> |
|
50 | 50 | <div> |
|
51 | 51 | ${h.checkbox(cs.short_id,class_="changeset_range")} |
|
52 | 52 | <span class="tooltip" title="${h.age(cs.date)}"><a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}"><span class="changeset_id">${cs.revision}:<span class="changeset_hash">${h.short_id(cs.raw_id)}</span></span></a></span> |
|
53 | 53 | </div> |
|
54 | 54 | <div class="author"> |
|
55 | 55 | <div class="gravatar"> |
|
56 | 56 | <img alt="gravatar" src="${h.gravatar_url(h.email(cs.author),16)}"/> |
|
57 | 57 | </div> |
|
58 | 58 | <div title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</div> |
|
59 | 59 | </div> |
|
60 | 60 | <div class="date">${h.fmt_date(cs.date)}</div> |
|
61 | 61 | </div> |
|
62 | 62 | <div class="mid"> |
|
63 |
<div class="message">${h.urlify_commit( |
|
|
63 | <div class="message">${h.urlify_commit(cs.message, c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div> | |
|
64 | 64 | <div class="expand"><span class="expandtext">↓ ${_('show more')} ↓</span></div> |
|
65 | 65 | </div> |
|
66 | 66 | <div class="right"> |
|
67 | 67 | <div class="changes"> |
|
68 | 68 | <div id="${cs.raw_id}" style="float:right;" class="changed_total tooltip" title="${_('Affected number of files, click to show more details')}">${len(cs.affected_files)}</div> |
|
69 | 69 | <div class="comments-container"> |
|
70 | 70 | %if len(c.comments.get(cs.raw_id,[])) > 0: |
|
71 | 71 | <div class="comments-cnt" title="${('comments')}"> |
|
72 | 72 | <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)}"> |
|
73 | 73 | <div class="comments-cnt">${len(c.comments[cs.raw_id])}</div> |
|
74 | 74 | <img src="${h.url('/images/icons/comments.png')}"> |
|
75 | 75 | </a> |
|
76 | 76 | </div> |
|
77 | 77 | %endif |
|
78 | 78 | </div> |
|
79 | 79 | </div> |
|
80 | 80 | %if cs.parents: |
|
81 | 81 | %for p_cs in reversed(cs.parents): |
|
82 | 82 | <div class="parent">${_('Parent')} |
|
83 | 83 | <span class="changeset_id">${p_cs.revision}:<span class="changeset_hash">${h.link_to(h.short_id(p_cs.raw_id), |
|
84 | 84 | h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span></span> |
|
85 | 85 | </div> |
|
86 | 86 | %endfor |
|
87 | 87 | %else: |
|
88 | 88 | <div class="parent">${_('No parents')}</div> |
|
89 | 89 | %endif |
|
90 | 90 | |
|
91 | 91 | <span class="logtags"> |
|
92 | 92 | %if len(cs.parents)>1: |
|
93 | 93 | <span class="merge">${_('merge')}</span> |
|
94 | 94 | %endif |
|
95 | 95 | %if cs.branch: |
|
96 | 96 | <span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}"> |
|
97 | 97 | ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} |
|
98 | 98 | </span> |
|
99 | 99 | %endif |
|
100 | 100 | %if h.is_hg(c.rhodecode_repo): |
|
101 | 101 | %for book in cs.bookmarks: |
|
102 | 102 | <span class="bookbook" title="${'%s %s' % (_('bookmark'),book)}"> |
|
103 | 103 | ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} |
|
104 | 104 | </span> |
|
105 | 105 | %endfor |
|
106 | 106 | %endif |
|
107 | 107 | %for tag in cs.tags: |
|
108 | 108 | <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> |
|
109 | 109 | ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span> |
|
110 | 110 | %endfor |
|
111 | 111 | </span> |
|
112 | 112 | </div> |
|
113 | 113 | </div> |
|
114 | 114 | |
|
115 | 115 | %endfor |
|
116 | 116 | <div class="pagination-wh pagination-left"> |
|
117 | 117 | ${c.pagination.pager('$link_previous ~2~ $link_next')} |
|
118 | 118 | </div> |
|
119 | 119 | </div> |
|
120 | 120 | </div> |
|
121 | 121 | |
|
122 | 122 | <script type="text/javascript" src="${h.url('/js/graph.js')}"></script> |
|
123 | 123 | <script type="text/javascript"> |
|
124 | 124 | YAHOO.util.Event.onDOMReady(function(){ |
|
125 | 125 | |
|
126 | 126 | //Monitor range checkboxes and build a link to changesets |
|
127 | 127 | //ranges |
|
128 | 128 | var checkboxes = YUD.getElementsByClassName('changeset_range'); |
|
129 | 129 | var url_tmpl = "${h.url('changeset_home',repo_name=c.repo_name,revision='__REVRANGE__')}"; |
|
130 | 130 | YUE.on(checkboxes,'click',function(e){ |
|
131 | 131 | var checked_checkboxes = []; |
|
132 | 132 | for (pos in checkboxes){ |
|
133 | 133 | if(checkboxes[pos].checked){ |
|
134 | 134 | checked_checkboxes.push(checkboxes[pos]); |
|
135 | 135 | } |
|
136 | 136 | } |
|
137 | 137 | if(checked_checkboxes.length>1){ |
|
138 | 138 | var rev_end = checked_checkboxes[0].name; |
|
139 | 139 | var rev_start = checked_checkboxes[checked_checkboxes.length-1].name; |
|
140 | 140 | |
|
141 | 141 | var url = url_tmpl.replace('__REVRANGE__', |
|
142 | 142 | rev_start+'...'+rev_end); |
|
143 | 143 | |
|
144 | 144 | var link = "<a href="+url+">${_('Show selected changes __S -> __E')}</a>" |
|
145 | 145 | link = link.replace('__S',rev_start); |
|
146 | 146 | link = link.replace('__E',rev_end); |
|
147 | 147 | YUD.get('rev_range_container').innerHTML = link; |
|
148 | 148 | YUD.setStyle('rev_range_container','display',''); |
|
149 | 149 | } |
|
150 | 150 | else{ |
|
151 | 151 | YUD.setStyle('rev_range_container','display','none'); |
|
152 | 152 | |
|
153 | 153 | } |
|
154 | 154 | }); |
|
155 | 155 | |
|
156 | 156 | var msgs = YUQ('.message'); |
|
157 | 157 | // get first element height |
|
158 | 158 | var el = YUQ('#graph_content .container')[0]; |
|
159 | 159 | var row_h = el.clientHeight; |
|
160 | 160 | for(var i=0;i<msgs.length;i++){ |
|
161 | 161 | var m = msgs[i]; |
|
162 | 162 | |
|
163 | 163 | var h = m.clientHeight; |
|
164 | 164 | var pad = YUD.getStyle(m,'padding'); |
|
165 | 165 | if(h > row_h){ |
|
166 | 166 | var offset = row_h - (h+12); |
|
167 | 167 | YUD.setStyle(m.nextElementSibling,'display','block'); |
|
168 | 168 | YUD.setStyle(m.nextElementSibling,'margin-top',offset+'px'); |
|
169 | 169 | }; |
|
170 | 170 | } |
|
171 | 171 | YUE.on(YUQ('.expand'),'click',function(e){ |
|
172 | 172 | var elem = e.currentTarget.parentNode.parentNode; |
|
173 | 173 | YUD.setStyle(e.currentTarget,'display','none'); |
|
174 | 174 | YUD.setStyle(elem,'height','auto'); |
|
175 | 175 | |
|
176 | 176 | //redraw the graph, max_w and jsdata are global vars |
|
177 | 177 | set_canvas(max_w); |
|
178 | 178 | |
|
179 | 179 | var r = new BranchRenderer(); |
|
180 | 180 | r.render(jsdata,max_w); |
|
181 | 181 | |
|
182 | 182 | }) |
|
183 | 183 | |
|
184 | 184 | // Fetch changeset details |
|
185 | 185 | YUE.on(YUD.getElementsByClassName('changed_total'),'click',function(e){ |
|
186 | 186 | var id = e.currentTarget.id |
|
187 | 187 | var url = "${h.url('changelog_details',repo_name=c.repo_name,cs='__CS__')}" |
|
188 | 188 | var url = url.replace('__CS__',id); |
|
189 | 189 | ypjax(url,id,function(){tooltip_activate()}); |
|
190 | 190 | }); |
|
191 | 191 | |
|
192 | 192 | // change branch filter |
|
193 | 193 | YUE.on(YUD.get('branch_filter'),'change',function(e){ |
|
194 | 194 | var selected_branch = e.currentTarget.options[e.currentTarget.selectedIndex].value; |
|
195 | 195 | var url_main = "${h.url('changelog_home',repo_name=c.repo_name)}"; |
|
196 | 196 | var url = "${h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__')}"; |
|
197 | 197 | var url = url.replace('__BRANCH__',selected_branch); |
|
198 | 198 | if(selected_branch != ''){ |
|
199 | 199 | window.location = url; |
|
200 | 200 | }else{ |
|
201 | 201 | window.location = url_main; |
|
202 | 202 | } |
|
203 | 203 | |
|
204 | 204 | }); |
|
205 | 205 | |
|
206 | 206 | function set_canvas(heads) { |
|
207 | 207 | var c = document.getElementById('graph_nodes'); |
|
208 | 208 | var t = document.getElementById('graph_content'); |
|
209 | 209 | canvas = document.getElementById('graph_canvas'); |
|
210 | 210 | var div_h = t.clientHeight; |
|
211 | 211 | c.style.height=div_h+'px'; |
|
212 | 212 | canvas.setAttribute('height',div_h); |
|
213 | 213 | c.style.height=max_w+'px'; |
|
214 | 214 | canvas.setAttribute('width',max_w); |
|
215 | 215 | }; |
|
216 | 216 | var heads = 1; |
|
217 | 217 | var max_heads = 0; |
|
218 | 218 | var jsdata = ${c.jsdata|n}; |
|
219 | 219 | |
|
220 | 220 | for( var i=0;i<jsdata.length;i++){ |
|
221 | 221 | var m = Math.max.apply(Math, jsdata[i][1]); |
|
222 | 222 | if (m>max_heads){ |
|
223 | 223 | max_heads = m; |
|
224 | 224 | } |
|
225 | 225 | } |
|
226 | 226 | var max_w = Math.max(100,max_heads*25); |
|
227 | 227 | set_canvas(max_w); |
|
228 | 228 | |
|
229 | 229 | var r = new BranchRenderer(); |
|
230 | 230 | r.render(jsdata,max_w); |
|
231 | 231 | |
|
232 | 232 | }); |
|
233 | 233 | </script> |
|
234 | 234 | %else: |
|
235 | 235 | ${_('There are no changes yet')} |
|
236 | 236 | %endif |
|
237 | 237 | </div> |
|
238 | 238 | </div> |
|
239 | 239 | </%def> |
@@ -1,167 +1,167 b'' | |||
|
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 | <div class="table"> |
|
28 | 28 | <div class="diffblock"> |
|
29 | 29 | <div class="code-header"> |
|
30 | 30 | <div class="hash"> |
|
31 | 31 | r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} |
|
32 | 32 | </div> |
|
33 | 33 | <div class="date"> |
|
34 | 34 | ${h.fmt_date(c.changeset.date)} |
|
35 | 35 | </div> |
|
36 | 36 | <div class="diff-actions"> |
|
37 | 37 | <a href="${h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='show')}" title="${_('raw diff')}" class="tooltip"><img class="icon" src="${h.url('/images/icons/page_white.png')}"/></a> |
|
38 | 38 | <a href="${h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='download')}" title="${_('download diff')}" class="tooltip"><img class="icon" src="${h.url('/images/icons/page_white_get.png')}"/></a> |
|
39 | 39 | ${c.ignorews_url(request.GET)} |
|
40 | 40 | ${c.context_url(request.GET)} |
|
41 | 41 | </div> |
|
42 | 42 | <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> |
|
43 | 43 | </div> |
|
44 | 44 | </div> |
|
45 | 45 | <div id="changeset_content"> |
|
46 | 46 | <div class="container"> |
|
47 | 47 | <div class="left"> |
|
48 | 48 | <div class="author"> |
|
49 | 49 | <div class="gravatar"> |
|
50 | 50 | <img alt="gravatar" src="${h.gravatar_url(h.email(c.changeset.author),20)}"/> |
|
51 | 51 | </div> |
|
52 | 52 | <span>${h.person(c.changeset.author)}</span><br/> |
|
53 | 53 | <span><a href="mailto:${h.email_or_none(c.changeset.author)}">${h.email_or_none(c.changeset.author)}</a></span><br/> |
|
54 | 54 | </div> |
|
55 |
<div class="message">${h.urlify_commit( |
|
|
55 | <div class="message">${h.urlify_commit(c.changeset.message, c.repo_name)}</div> | |
|
56 | 56 | </div> |
|
57 | 57 | <div class="right"> |
|
58 | 58 | <div class="changes"> |
|
59 | 59 | % if len(c.changeset.affected_files) <= c.affected_files_cut_off: |
|
60 | 60 | <span class="removed" title="${_('removed')}">${len(c.changeset.removed)}</span> |
|
61 | 61 | <span class="changed" title="${_('changed')}">${len(c.changeset.changed)}</span> |
|
62 | 62 | <span class="added" title="${_('added')}">${len(c.changeset.added)}</span> |
|
63 | 63 | % else: |
|
64 | 64 | <span class="removed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> |
|
65 | 65 | <span class="changed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> |
|
66 | 66 | <span class="added" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> |
|
67 | 67 | % endif |
|
68 | 68 | </div> |
|
69 | 69 | |
|
70 | 70 | %if c.changeset.parents: |
|
71 | 71 | %for p_cs in reversed(c.changeset.parents): |
|
72 | 72 | <div class="parent">${_('Parent')} |
|
73 | 73 | <span class="changeset_id">${p_cs.revision}:<span class="changeset_hash">${h.link_to(h.short_id(p_cs.raw_id), |
|
74 | 74 | h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span></span> |
|
75 | 75 | </div> |
|
76 | 76 | %endfor |
|
77 | 77 | %else: |
|
78 | 78 | <div class="parent">${_('No parents')}</div> |
|
79 | 79 | %endif |
|
80 | 80 | <span class="logtags"> |
|
81 | 81 | %if len(c.changeset.parents)>1: |
|
82 | 82 | <span class="merge">${_('merge')}</span> |
|
83 | 83 | %endif |
|
84 | 84 | %if c.changeset.branch: |
|
85 | 85 | <span class="branchtag" title="${'%s %s' % (_('branch'),c.changeset.branch)}"> |
|
86 | 86 | ${h.link_to(c.changeset.branch,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))} |
|
87 | 87 | </span> |
|
88 | 88 | %endif |
|
89 | 89 | %for tag in c.changeset.tags: |
|
90 | 90 | <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> |
|
91 | 91 | ${h.link_to(tag,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</span> |
|
92 | 92 | %endfor |
|
93 | 93 | </span> |
|
94 | 94 | </div> |
|
95 | 95 | </div> |
|
96 | 96 | <span> |
|
97 | 97 | ${_('%s files affected with %s insertions and %s deletions:') % (len(c.changeset.affected_files),c.lines_added,c.lines_deleted)} |
|
98 | 98 | </span> |
|
99 | 99 | <div class="cs_files"> |
|
100 | 100 | %for change,filenode,diff,cs1,cs2,stat in c.changes: |
|
101 | 101 | <div class="cs_${change}"> |
|
102 | 102 | <div class="node"> |
|
103 | 103 | %if change != 'removed': |
|
104 | 104 | ${h.link_to(h.safe_unicode(filenode.path),c.anchor_url(filenode.changeset.raw_id,filenode.path,request.GET)+"_target")} |
|
105 | 105 | %else: |
|
106 | 106 | ${h.link_to(h.safe_unicode(filenode.path),h.url.current(anchor=h.FID('',filenode.path)))} |
|
107 | 107 | %endif |
|
108 | 108 | </div> |
|
109 | 109 | <div class="changes">${h.fancy_file_stats(stat)}</div> |
|
110 | 110 | </div> |
|
111 | 111 | %endfor |
|
112 | 112 | % if c.cut_off: |
|
113 | 113 | ${_('Changeset was too big and was cut off...')} |
|
114 | 114 | % endif |
|
115 | 115 | </div> |
|
116 | 116 | </div> |
|
117 | 117 | |
|
118 | 118 | </div> |
|
119 | 119 | <script> |
|
120 | 120 | var _USERS_AC_DATA = ${c.users_array|n}; |
|
121 | 121 | var _GROUPS_AC_DATA = ${c.users_groups_array|n}; |
|
122 | 122 | </script> |
|
123 | 123 | ## diff block |
|
124 | 124 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
125 | 125 | ${diff_block.diff_block(c.changes)} |
|
126 | 126 | |
|
127 | 127 | ## template for inline comment form |
|
128 | 128 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> |
|
129 | 129 | ${comment.comment_inline_form(c.changeset)} |
|
130 | 130 | |
|
131 | 131 | ## render comments |
|
132 | 132 | ${comment.comments(c.changeset)} |
|
133 | 133 | <script type="text/javascript"> |
|
134 | 134 | YUE.onDOMReady(function(){ |
|
135 | 135 | AJAX_COMMENT_URL = "${url('changeset_comment',repo_name=c.repo_name,revision=c.changeset.raw_id)}"; |
|
136 | 136 | AJAX_COMMENT_DELETE_URL = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}" |
|
137 | 137 | YUE.on(YUQ('.show-inline-comments'),'change',function(e){ |
|
138 | 138 | var show = 'none'; |
|
139 | 139 | var target = e.currentTarget; |
|
140 | 140 | if(target.checked){ |
|
141 | 141 | var show = '' |
|
142 | 142 | } |
|
143 | 143 | var boxid = YUD.getAttribute(target,'id_for'); |
|
144 | 144 | var comments = YUQ('#{0} .inline-comments'.format(boxid)); |
|
145 | 145 | for(c in comments){ |
|
146 | 146 | YUD.setStyle(comments[c],'display',show); |
|
147 | 147 | } |
|
148 | 148 | var btns = YUQ('#{0} .inline-comments-button'.format(boxid)); |
|
149 | 149 | for(c in btns){ |
|
150 | 150 | YUD.setStyle(btns[c],'display',show); |
|
151 | 151 | } |
|
152 | 152 | }) |
|
153 | 153 | |
|
154 | 154 | YUE.on(YUQ('.line'),'click',function(e){ |
|
155 | 155 | var tr = e.currentTarget; |
|
156 | 156 | injectInlineForm(tr); |
|
157 | 157 | }); |
|
158 | 158 | |
|
159 | 159 | // inject comments into they proper positions |
|
160 | 160 | var file_comments = YUQ('.inline-comment-placeholder'); |
|
161 | 161 | renderInlineComments(file_comments); |
|
162 | 162 | }) |
|
163 | 163 | |
|
164 | 164 | </script> |
|
165 | 165 | |
|
166 | 166 | </div> |
|
167 | 167 | </%def> |
@@ -1,89 +1,89 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 | 5 | ${_('%s Changesets') % c.repo_name} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -> r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)} - ${c.rhodecode_name} |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | ${h.link_to(u'Home',h.url('/'))} |
|
10 | 10 | » |
|
11 | 11 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
12 | 12 | » |
|
13 | 13 | ${_('Changesets')} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -> r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)} |
|
14 | 14 | </%def> |
|
15 | 15 | |
|
16 | 16 | <%def name="page_nav()"> |
|
17 | 17 | ${self.menu('changelog')} |
|
18 | 18 | </%def> |
|
19 | 19 | |
|
20 | 20 | <%def name="main()"> |
|
21 | 21 | <div class="box"> |
|
22 | 22 | <!-- box / title --> |
|
23 | 23 | <div class="title"> |
|
24 | 24 | ${self.breadcrumbs()} |
|
25 | 25 | </div> |
|
26 | 26 | <div class="table"> |
|
27 | 27 | <div id="body" class="diffblock"> |
|
28 | 28 | <div class="code-header cv"> |
|
29 | 29 | <h3 class="code-header-title">${_('Compare View')}</h3> |
|
30 | 30 | <div> |
|
31 | 31 | ${_('Changesets')} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -> r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)} |
|
32 | 32 | </div> |
|
33 | 33 | </div> |
|
34 | 34 | </div> |
|
35 | 35 | <div id="changeset_compare_view_content"> |
|
36 | 36 | <div class="container"> |
|
37 | 37 | <table class="compare_view_commits noborder"> |
|
38 | 38 | %for cs in c.cs_ranges: |
|
39 | 39 | <tr> |
|
40 | 40 | <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(h.email(cs.author),14)}"/></div></td> |
|
41 | 41 | <td>${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</td> |
|
42 | 42 | <td><div class="author">${h.person(cs.author)}</div></td> |
|
43 | 43 | <td><span class="tooltip" title="${h.age(cs.date)}">${h.fmt_date(cs.date)}</span></td> |
|
44 |
<td><div class="message">${h.urlify_commit( |
|
|
44 | <td><div class="message">${h.urlify_commit(cs.message, c.repo_name)}</div></td> | |
|
45 | 45 | </tr> |
|
46 | 46 | %endfor |
|
47 | 47 | </table> |
|
48 | 48 | </div> |
|
49 | 49 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Files affected')}</div> |
|
50 | 50 | <div class="cs_files"> |
|
51 | 51 | %for cs in c.cs_ranges: |
|
52 | 52 | <div class="cur_cs">r${cs}</div> |
|
53 | 53 | %for change,filenode,diff,cs1,cs2,st in c.changes[cs.raw_id]: |
|
54 | 54 | <div class="cs_${change}">${h.link_to(h.safe_unicode(filenode.path),h.url.current(anchor=h.FID(cs.raw_id,filenode.path)))}</div> |
|
55 | 55 | %endfor |
|
56 | 56 | %endfor |
|
57 | 57 | </div> |
|
58 | 58 | </div> |
|
59 | 59 | |
|
60 | 60 | </div> |
|
61 | 61 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> |
|
62 | 62 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
63 | 63 | %for cs in c.cs_ranges: |
|
64 | 64 | ##${comment.comment_inline_form(cs)} |
|
65 | 65 | ## diff block |
|
66 | 66 | <h3 style="border:none;padding-top:8px;">${'r%s:%s' % (cs.revision,h.short_id(cs.raw_id))}</h3> |
|
67 | 67 | ${diff_block.diff_block(c.changes[cs.raw_id])} |
|
68 | 68 | ##${comment.comments(cs)} |
|
69 | 69 | |
|
70 | 70 | %endfor |
|
71 | 71 | <script type="text/javascript"> |
|
72 | 72 | |
|
73 | 73 | YUE.onDOMReady(function(){ |
|
74 | 74 | |
|
75 | 75 | YUE.on(YUQ('.diff-menu-activate'),'click',function(e){ |
|
76 | 76 | var act = e.currentTarget.nextElementSibling; |
|
77 | 77 | |
|
78 | 78 | if(YUD.hasClass(act,'active')){ |
|
79 | 79 | YUD.removeClass(act,'active'); |
|
80 | 80 | YUD.setStyle(act,'display','none'); |
|
81 | 81 | }else{ |
|
82 | 82 | YUD.addClass(act,'active'); |
|
83 | 83 | YUD.setStyle(act,'display',''); |
|
84 | 84 | } |
|
85 | 85 | }); |
|
86 | 86 | }) |
|
87 | 87 | </script> |
|
88 | 88 | </div> |
|
89 | 89 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now