##// END OF EJS Templates
pull-request-api: updated logic of closing a PR via API call....
pull-request-api: updated logic of closing a PR via API call. - consistent logic via web and API - updated events - updated proper close checks.

File last commit:

r1593:31d11ad7 default
r1792:a62f3dac default
Show More
files_source.mako
91 lines | 4.6 KiB | application/x-mako | MakoHtmlLexer
templating: use .mako as extensions for template files.
r1282 <%namespace name="sourceblock" file="/codeblocks/source.mako"/>
<div id="codeblock" class="codeblock">
<div class="codeblock-header">
<div class="stats">
<span> <strong>${c.file}</strong></span>
largefiles: enabled download of largefiles for git and mercurial from web interface....
r1577 % if c.lf_node:
<span title="${_('This file is a pointer to large binary file')}"> | ${_('LargeFile')} ${h.format_byte_size_binary(c.lf_node.size)} </span>
% endif
templating: use .mako as extensions for template files.
r1282 <span> | ${c.file.lines()[0]} ${ungettext('line', 'lines', c.file.lines()[0])}</span>
<span> | ${h.format_byte_size_binary(c.file.size)}</span>
<span> | ${c.file.mimetype} </span>
<span class="item last"> | ${h.get_lexer_for_filenode(c.file).__class__.__name__}</span>
</div>
<div class="buttons">
<a id="file_history_overview" href="#">
${_('History')}
</a>
<a id="file_history_overview_full" style="display: none" href="${h.url('changelog_file_home',repo_name=c.repo_name, revision=c.commit.raw_id, f_path=c.f_path)}">
${_('Show Full History')}
</a> |
%if c.annotate:
${h.link_to(_('Source'), h.url('files_home', repo_name=c.repo_name,revision=c.commit.raw_id,f_path=c.f_path))}
%else:
${h.link_to(_('Annotation'), h.url('files_annotate_home',repo_name=c.repo_name,revision=c.commit.raw_id,f_path=c.f_path))}
%endif
| ${h.link_to(_('Raw'), h.url('files_raw_home',repo_name=c.repo_name,revision=c.commit.raw_id,f_path=c.f_path))}
largefiles: enabled download of largefiles for git and mercurial from web interface....
r1577 |
% if c.lf_node:
<a href="${h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.commit.raw_id,f_path=c.f_path, lf=1)}">
${_('Download largefile')}
</a>
% else:
<a href="${h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.commit.raw_id,f_path=c.f_path)}">
${_('Download')}
</a>
% endif
templating: use .mako as extensions for template files.
r1282
%if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name):
|
%if c.on_branch_head and c.branch_or_raw_id and not c.file.is_binary:
<a href="${h.url('files_edit_home',repo_name=c.repo_name,revision=c.branch_or_raw_id,f_path=c.f_path, anchor='edit')}">
files: fixed editing of files for branches with `/` in the name....
r1593 ${_('Edit on Branch:%s') % c.branch_name}
templating: use .mako as extensions for template files.
r1282 </a>
| <a class="btn-danger btn-link" href="${h.url('files_delete_home',repo_name=c.repo_name,revision=c.branch_or_raw_id,f_path=c.f_path, anchor='edit')}">${_('Delete')}
</a>
%elif c.on_branch_head and c.branch_or_raw_id and c.file.is_binary:
${h.link_to(_('Edit'), '#', class_="btn btn-link disabled tooltip", title=_('Editing binary files not allowed'))}
| ${h.link_to(_('Delete'), h.url('files_delete_home',repo_name=c.repo_name,revision=c.branch_or_raw_id,f_path=c.f_path, anchor='edit'),class_="btn-danger btn-link")}
%else:
${h.link_to(_('Edit'), '#', class_="btn btn-link disabled tooltip", title=_('Editing files allowed only when on branch head commit'))}
| ${h.link_to(_('Delete'), '#', class_="btn btn-danger btn-link disabled tooltip", title=_('Deleting files allowed only when on branch head commit'))}
%endif
%endif
</div>
</div>
<div id="file_history_container"></div>
<div class="code-body">
largefiles: enabled download of largefiles for git and mercurial from web interface....
r1577 %if c.file.is_binary:
files: render images inside the file view....
r1580 <% rendered_binary = h.render_binary(c.repo_name, c.file)%>
% if rendered_binary:
${rendered_binary}
% else:
<div>
${_('Binary file (%s)') % c.file.mimetype}
</div>
% endif
largefiles: enabled download of largefiles for git and mercurial from web interface....
r1577 %else:
templating: use .mako as extensions for template files.
r1282 % if c.file.size < c.cut_off_limit:
%if c.renderer and not c.annotate:
markup-rendering: added relative image support....
r1527 ${h.render(c.file.content, renderer=c.renderer, relative_url=h.url('files_raw_home',repo_name=c.repo_name,revision=c.commit.raw_id,f_path=c.f_path))}
templating: use .mako as extensions for template files.
r1282 %else:
<table class="cb codehilite">
%if c.annotate:
<% color_hasher = h.color_hasher() %>
%for annotation, lines in c.annotated_lines:
${sourceblock.render_annotation_lines(annotation, lines, color_hasher)}
%endfor
%else:
%for line_num, tokens in enumerate(c.lines, 1):
${sourceblock.render_line(line_num, tokens)}
%endfor
%endif
</table>
%endif
%else:
${_('File is too big to display')} ${h.link_to(_('Show as raw'),
h.url('files_raw_home',repo_name=c.repo_name,revision=c.commit.raw_id,f_path=c.f_path))}
%endif
%endif
</div>
</div>