##// END OF EJS Templates
pull-requests: show only selected pr version to save space....
marcink -
r1261:14af7630 default
parent child Browse files
Show More
@@ -189,68 +189,95 b''
189
189
190 </div>
190 </div>
191
191
192 <style>
193 .pr-versions {
194 position: relative;
195 top: 6px;
196 }
197 </style>
198
192 <div class="field">
199 <div class="field">
193 <div class="label-summary">
200 <div class="label-summary">
194 <label>${_('Versions')} (${len(c.versions)}):</label>
201 <label>${_('Versions')} (${len(c.versions)+1}):</label>
195 </div>
202 </div>
203
204 <div class="pr-versions">
205 % if c.show_version_changes:
206 <table>
207 ## current visible version
208 <tr class="version-pr" style="display: ${'' if c.at_version in [None, 'latest'] else 'none'}">
209 <td>
210 % if c.at_version in [None, 'latest']:
211 <i class="icon-ok link"></i>
212 % endif
213 </td>
214 <td>
215 <code>
216 % if c.versions:
217 <a href="${h.url.current(version='latest')}">${_('latest')}</a>
218 % else:
219 ${_('initial')}
220 % endif
221 </code>
222 </td>
223 <td>
224 <code>${c.pull_request_latest.source_ref_parts.commit_id[:6]}</code>
225 </td>
226 <td>${_('created')} ${h.age_component(c.pull_request_latest.updated_on)}</td>
227 <td>
228 % if c.versions and c.at_version in [None, 'latest']:
229 <span id="show-pr-versions" class="btn btn-link" onclick="$('.version-pr').show(); $(this).hide(); return false">${_('(Show all)')}</span>
230 % endif
231 </td>
232 </tr>
196
233
197 <div>
234 % for ver in reversed(c.pull_request.versions()):
198 % if c.show_version_changes:
235 <tr class="version-pr" style="display: ${'' if c.at_version == ver.pull_request_version_id else 'none'}">
199 <table>
236 <td>
200 <tr>
237 % if c.at_version == ver.pull_request_version_id:
201 <td>
238 <i class="icon-ok link"></i>
202 % if c.at_version in [None, 'latest']:
239 % endif
203 <i class="icon-ok link"></i>
240 </td>
204 % endif
241 <td><code><a href="${h.url.current(version=ver.pull_request_version_id)}">version ${ver.pull_request_version_id}</a></code></td>
205 </td>
242 <td>
206 <td><code><a href="${h.url.current(version='latest')}">latest</a></code></td>
243 <code>${ver.source_ref_parts.commit_id[:6]}</code>
207 <td>
244 </td>
208 <code>${c.pull_request_latest.source_ref_parts.commit_id[:6]}</code>
245 <td>${_('created')} ${h.age_component(ver.updated_on)}</td>
209 </td>
246 <td>
210 <td>${_('created')} ${h.age_component(c.pull_request_latest.updated_on)}</td>
247 % if c.at_version == ver.pull_request_version_id:
211 </tr>
248 <span id="show-pr-versions" class="btn btn-link" onclick="$('.version-pr').show(); $(this).hide(); return false">${_('(Show all)')}</span>
212 % for ver in reversed(c.pull_request.versions()):
249 % endif
213 <tr>
250 </td>
214 <td>
251 </tr>
215 % if c.at_version == ver.pull_request_version_id:
252 % endfor
216 <i class="icon-ok link"></i>
253 </table>
217 % endif
218 </td>
219 <td><code><a href="${h.url.current(version=ver.pull_request_version_id)}">version ${ver.pull_request_version_id}</a></code></td>
220 <td>
221 <code>${ver.source_ref_parts.commit_id[:6]}</code>
222 </td>
223 <td>${_('created')} ${h.age_component(ver.updated_on)}</td>
224 </tr>
225 % endfor
226 </table>
227
254
228 % if c.at_version:
255 % if c.at_version:
229 <pre>
256 <pre>
230 Changed commits:
257 Changed commits:
231 * added: ${len(c.changes.added)}
258 * added: ${len(c.changes.added)}
232 * removed: ${len(c.changes.removed)}
259 * removed: ${len(c.changes.removed)}
233
260
234 % if not (c.file_changes.added+c.file_changes.modified+c.file_changes.removed):
261 % if not (c.file_changes.added+c.file_changes.modified+c.file_changes.removed):
235 No file changes found
262 No file changes found
236 % else:
263 % else:
237 Changed files:
264 Changed files:
238 %for file_name in c.file_changes.added:
265 %for file_name in c.file_changes.added:
239 * A <a href="#${'a_' + h.FID('', file_name)}">${file_name}</a>
266 * A <a href="#${'a_' + h.FID('', file_name)}">${file_name}</a>
240 %endfor
267 %endfor
241 %for file_name in c.file_changes.modified:
268 %for file_name in c.file_changes.modified:
242 * M <a href="#${'a_' + h.FID('', file_name)}">${file_name}</a>
269 * M <a href="#${'a_' + h.FID('', file_name)}">${file_name}</a>
243 %endfor
270 %endfor
244 %for file_name in c.file_changes.removed:
271 %for file_name in c.file_changes.removed:
245 * R ${file_name}
272 * R ${file_name}
246 %endfor
273 %endfor
247 % endif
274 % endif
248 </pre>
275 </pre>
276 % endif
277 % else:
278 ${_('Pull request versions not available')}.
249 % endif
279 % endif
250 % else:
280 </div>
251 ${_('Pull request versions not available')}.
252 % endif
253 </div>
254 </div>
281 </div>
255
282
256 <div id="pr-save" class="field" style="display: none;">
283 <div id="pr-save" class="field" style="display: none;">
General Comments 0
You need to be logged in to leave comments. Login now