##// END OF EJS Templates
permissions: explicitly register all permissions set for user. Fixes #4217...
permissions: explicitly register all permissions set for user. Fixes #4217 - in order to get a proper inheritance chain of permissions we'll register each step. This allows to get full inheritance chain. Final permissions will be the same becuase the only thing we change is we register each step before permissions final value. - Also display the permissions summary in a nicer way more explicitly stating what permissions overwrites which.

File last commit:

r1951:965019b0 default
r2063:8a6e9139 default
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:
data-revision="${annotation.revision}"
%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"
data-revision="${annotation.revision}"
onclick="$('[data-revision=${annotation.revision}]').toggleClass('cb-line-fresh')"
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)}">
annotations: fixed UI problems in annotation view for newer browsers.
r1412 r${annotation.revision}
</a>
</td>
% else:
<td></td>
<td class="cb-annotate-message-spacer"></td>
<td
class="cb-annotate-revision"
data-revision="${annotation.revision}"
onclick="$('[data-revision=${annotation.revision}]').toggleClass('cb-line-fresh')"
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>