##// END OF EJS Templates
deps: bumped some libraries
deps: bumped some libraries

File last commit:

r4026:ed756817 default
r5171:146e4d44 default
Show More
source.mako
89 lines | 3.3 KiB | application/x-mako | MakoHtmlLexer
templating: use .mako as extensions for template files.
r1282 <%def name="render_line(line_num, tokens,
annotation=None,
annotations: fixed UI problems in annotation view for newer browsers.
r1412 bgcolor=None, show_annotation=None)">
templating: use .mako as extensions for template files.
r1282 <%
from rhodecode.lib.codeblocks import render_tokenstream
# avoid module lookup for performance
dan
tooltip: use consistent h.tooltip usage to set tooltips.
r1843 tooltip = h.tooltip
templating: use .mako as extensions for template files.
r1282 %>
annotations: fixed UI problems in annotation view for newer browsers.
r1412 <tr class="cb-line cb-line-fresh ${'cb-annotate' if show_annotation else ''}"
templating: use .mako as extensions for template files.
r1282 %if annotation:
core: stop using deprecated .revision
r3105 data-revision="${annotation.idx}"
templating: use .mako as extensions for template files.
r1282 %endif
>
annotations: fixed UI problems in annotation view for newer browsers.
r1412
% if annotation:
% if show_annotation:
hovercacrds: added new tooltips and hovercards to expose certain information for objects shown in UI
r4026 <td class="cb-annotate-info">
${h.gravatar_with_user(request, annotation.author, 16, tooltip=True) | n}
<div class="tooltip cb-annotate-message truncate-wrap" title="SHA: ${h.show_id(annotation)}<br/>Date: ${annotation.date}<br/>${annotation.message | entity}">${h.chop_at_smart(annotation.message, '\n', suffix_if_chopped='...')}</div>
annotations: fixed UI problems in annotation view for newer browsers.
r1412 </td>
annotation: added shortcut links to browse the annotation view with previous commits.
r1413 <td class="cb-annotate-message-spacer">
files: ported repository files controllers to pyramid views.
r1927 <a class="tooltip" href="#show-previous-annotation" onclick="return annotationController.previousAnnotation('${annotation.raw_id}', '${c.f_path}', ${line_num})" title="${tooltip(_('view annotation from before this change'))}">
annotation: added shortcut links to browse the annotation view with previous commits.
r1413 <i class="icon-left"></i>
</a>
</td>
annotations: fixed UI problems in annotation view for newer browsers.
r1412 <td
class="cb-annotate-revision"
core: stop using deprecated .revision
r3105 data-revision="${annotation.idx}"
onclick="$('[data-revision=${annotation.idx}]').toggleClass('cb-line-fresh')"
annotations: fixed UI problems in annotation view for newer browsers.
r1412 style="background: ${bgcolor}">
repo-commits: ported changeset code into pyramid views....
r1951 <a class="cb-annotate" href="${h.route_path('repo_commit',repo_name=c.repo_name,commit_id=annotation.raw_id)}">
core: stop using deprecated .revision
r3105 r${annotation.idx}
annotations: fixed UI problems in annotation view for newer browsers.
r1412 </a>
</td>
% else:
<td></td>
<td class="cb-annotate-message-spacer"></td>
<td
class="cb-annotate-revision"
core: stop using deprecated .revision
r3105 data-revision="${annotation.idx}"
onclick="$('[data-revision=${annotation.idx}]').toggleClass('cb-line-fresh')"
annotations: fixed UI problems in annotation view for newer browsers.
r1412 style="background: ${bgcolor}">
</td>
% endif
% else:
<td colspan="3"></td>
% endif
templating: use .mako as extensions for template files.
r1282 <td class="cb-lineno" id="L${line_num}">
<a data-line-no="${line_num}" href="#L${line_num}"></a>
</td>
<td class="cb-content cb-content-fresh"
%if bgcolor:
style="background: ${bgcolor}"
%endif
>
## newline at end is necessary for highlight to work when line is empty
## and for copy pasting code to work as expected
<span class="cb-code">${render_tokenstream(tokens)|n}${'\n'}</span>
</td>
</tr>
</%def>
<%def name="render_annotation_lines(annotation, lines, color_hasher)">
annotations: fixed UI problems in annotation view for newer browsers.
r1412 % for line_num, tokens in lines:
templating: use .mako as extensions for template files.
r1282 ${render_line(line_num, tokens,
bgcolor=color_hasher(annotation and annotation.raw_id or ''),
annotations: fixed UI problems in annotation view for newer browsers.
r1412 annotation=annotation, show_annotation=loop.first
templating: use .mako as extensions for template files.
r1282 )}
annotations: fixed UI problems in annotation view for newer browsers.
r1412 % endfor
annotation: added shortcut links to browse the annotation view with previous commits.
r1413 <script>
var AnnotationController = function() {
var self = this;
annotations: fixed UI problems in annotation view for newer browsers.
r1412
files: ported repository files controllers to pyramid views.
r1927 this.previousAnnotation = function(commitId, fPath, lineNo) {
annotation: added shortcut links to browse the annotation view with previous commits.
r1413 var params = {
'repo_name': templateContext.repo_name,
files: ported repository files controllers to pyramid views.
r1927 'commit_id': commitId,
'f_path': fPath,
'line_anchor': lineNo
annotation: added shortcut links to browse the annotation view with previous commits.
r1413 };
files: ported repository files controllers to pyramid views.
r1927 window.location = pyroutes.url('repo_files:annotated_previous', params);
annotation: added shortcut links to browse the annotation view with previous commits.
r1413 return false;
};
};
var annotationController = new AnnotationController();
</script>
templating: use .mako as extensions for template files.
r1282 </%def>