base.mako
44 lines
| 1.7 KiB
| application/x-mako
|
MakoHtmlLexer
r1282 | <%def name="refs(commit)"> | |||
r3654 | ## Build a cache of refs for selector | |||
<script> | ||||
fileTreeRefs = { | ||||
} | ||||
</script> | ||||
r1282 | %if commit.merge: | |||
<span class="mergetag tag"> | ||||
<i class="icon-merge">${_('merge')}</i> | ||||
</span> | ||||
%endif | ||||
%if h.is_hg(c.rhodecode_repo): | ||||
%for book in commit.bookmarks: | ||||
r1843 | <span class="booktag tag" title="${h.tooltip(_('Bookmark %s') % book)}"> | |||
r1927 | <a href="${h.route_path('repo_files:default_path',repo_name=c.repo_name,commit_id=commit.raw_id,_query=dict(at=book))}"><i class="icon-bookmark"></i>${h.shorter(book)}</a> | |||
r1282 | </span> | |||
r3654 | <script> | |||
r3655 | fileTreeRefs["${book}"] = {raw_id: "${commit.raw_id}", type:"book", text: "${book}"}; | |||
r3654 | </script> | |||
r1282 | %endfor | |||
%endif | ||||
%for tag in commit.tags: | ||||
r1843 | <span class="tagtag tag" title="${h.tooltip(_('Tag %s') % tag)}"> | |||
r1927 | <a href="${h.route_path('repo_files:default_path',repo_name=c.repo_name,commit_id=commit.raw_id,_query=dict(at=tag))}"><i class="icon-tag"></i>${tag}</a> | |||
r1282 | </span> | |||
r3654 | <script> | |||
r3655 | fileTreeRefs["${tag}"] = {raw_id: "${commit.raw_id}", type:"tag", text: "${tag}"}; | |||
r3654 | </script> | |||
r1282 | %endfor | |||
%if commit.branch: | ||||
r1843 | <span class="branchtag tag" title="${h.tooltip(_('Branch %s') % commit.branch)}"> | |||
r1927 | <a href="${h.route_path('repo_files:default_path',repo_name=c.repo_name,commit_id=commit.raw_id,_query=dict(at=commit.branch))}"><i class="icon-code-fork"></i>${h.shorter(commit.branch)}</a> | |||
r1282 | </span> | |||
r3654 | <script> | |||
r3655 | fileTreeRefs["${commit.branch}"] = {raw_id: "${commit.raw_id}", type:"branch", text: "${commit.branch}"}; | |||
r3654 | </script> | |||
r1282 | %endif | |||
</%def> | ||||