files_delete.mako
92 lines
| 3.1 KiB
| application/x-mako
|
MakoHtmlLexer
r1282 | <%inherit file="/base/base.mako"/> | |||
<%def name="title()"> | ||||
r3754 | ${_('{} Files Delete').format(c.repo_name)} | |||
r1282 | %if c.rhodecode_name: | |||
· ${h.branding(c.rhodecode_name)} | ||||
%endif | ||||
</%def> | ||||
<%def name="menu_bar_nav()"> | ||||
${self.menu_items(active='repositories')} | ||||
</%def> | ||||
r3754 | <%def name="breadcrumbs_links()"></%def> | |||
r1282 | ||||
<%def name="menu_bar_subnav()"> | ||||
${self.repo_menu(active='files')} | ||||
</%def> | ||||
<%def name="main()"> | ||||
r3754 | ||||
r1282 | <div class="box"> | |||
r3754 | ||||
r1282 | <div class="edit-file-title"> | |||
r3754 | <span class="title-heading">${_('Delete file')} @ <code>${h.show_id(c.commit)}</code></span> | |||
r3755 | % if c.commit.branch: | |||
<span class="tag branchtag"> | ||||
<i class="icon-branch"></i> ${c.commit.branch} | ||||
</span> | ||||
% endif | ||||
r1282 | </div> | |||
r3754 | ||||
${h.secure_form(h.route_path('repo_files_delete_file', repo_name=c.repo_name, commit_id=c.commit.raw_id, f_path=c.f_path), id='eform', request=request)} | ||||
r1282 | <div class="edit-file-fieldset"> | |||
r3754 | <div class="path-items"> | |||
<li class="breadcrumb-path"> | ||||
<div> | ||||
r4373 | ${h.files_breadcrumbs(c.repo_name, c.rhodecode_db_repo.repo_type, c.commit.raw_id, c.file.path, c.rhodecode_db_repo.landing_ref_name, request.GET.get('at'), limit_items=True, hide_last_item=True, copy_path_icon=False)} / | |||
r3754 | </div> | |||
</li> | ||||
<li class="location-path"> | ||||
<input type="hidden" value="${c.f_path}" name="root_path"> | ||||
<input class="file-name-input input-small" type="text" value="${c.file.name}" name="filename" id="filename" disabled="disabled"> | ||||
</li> | ||||
r1282 | </div> | |||
r3754 | ||||
r1282 | </div> | |||
<div id="codeblock" class="codeblock delete-file-preview"> | ||||
<div class="code-body"> | ||||
%if c.file.is_binary: | ||||
${_('Binary file (%s)') % c.file.mimetype} | ||||
%else: | ||||
r1927 | %if c.file.size < c.visual.cut_off_limit_file: | |||
r1282 | ${h.pygmentize(c.file,linenos=True,anchorlinenos=False,cssclass="code-highlight")} | |||
%else: | ||||
r1927 | ${_('File size {} is bigger then allowed limit {}. ').format(h.format_byte_size_binary(c.file.size), h.format_byte_size_binary(c.visual.cut_off_limit_file))} ${h.link_to(_('Show as raw'), | |||
h.route_path('repo_file_raw',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))} | ||||
r1282 | %endif | |||
%endif | ||||
</div> | ||||
</div> | ||||
<div class="edit-file-fieldset"> | ||||
<div class="fieldset"> | ||||
r3754 | <div class="message"> | |||
<textarea id="commit" name="message" placeholder="${c.default_message}"></textarea> | ||||
r1282 | </div> | |||
</div> | ||||
r3754 | <div class="pull-left"> | |||
r4302 | ${h.submit('commit_btn',_('Commit changes'),class_="btn btn-small btn-danger-action")} | |||
r1282 | </div> | |||
</div> | ||||
${h.end_form()} | ||||
</div> | ||||
r3754 | ||||
<script type="text/javascript"> | ||||
$(document).ready(function () { | ||||
fileEditor = new FileEditor('#editor'); | ||||
r4302 | var commit_id = "${c.commit.raw_id}"; | |||
var f_path = "${c.f_path}"; | ||||
checkFileHead($('#eform'), commit_id, f_path, 'delete'); | ||||
r3754 | }); | |||
</script> | ||||
r1282 | </%def> | |||