##// END OF EJS Templates
docs: updated configuration for nginx and reverse proxy.
docs: updated configuration for nginx and reverse proxy.

File last commit:

r3105:a07a1322 default
r3341:6387bcda stable
Show More
source.mako
92 lines | 3.4 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
html_escape = h.html_escape
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:
<td class="cb-annotate-info tooltip"
dan
tooltip: use consistent h.tooltip usage to set tooltips.
r1843 title="Author: ${tooltip(annotation.author) | entity}<br>Date: ${annotation.date}<br>Message: ${annotation.message | entity}"
annotations: fixed UI problems in annotation view for newer browsers.
r1412 >
renderer: remove usage of old non request PartialRenderer
r1947 ${h.gravatar_with_user(request, annotation.author, 16) | n}
annotations: fixed UI problems in annotation view for newer browsers.
r1412 <div class="cb-annotate-message truncate-wrap">${h.chop_at_smart(annotation.message, '\n', suffix_if_chopped='...')}</div>
</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>