files_edit.html
78 lines
| 3.5 KiB
| text/html
|
HtmlLexer
r1305 | <%inherit file="/base/base.html"/> | |||
<%def name="title()"> | ||||
|
r2417 | ${_('%s Edit file') % c.repo_name} - ${c.rhodecode_name} | ||
r1305 | </%def> | |||
<%def name="js_extra()"> | ||||
<script type="text/javascript" src="${h.url('/js/codemirror.js')}"></script> | ||||
</%def> | ||||
<%def name="css_extra()"> | ||||
<link rel="stylesheet" type="text/css" href="${h.url('/css/codemirror.css')}"/> | ||||
</%def> | ||||
<%def name="breadcrumbs_links()"> | ||||
|
r2492 | ${h.link_to(_(u'Home'),h.url('/'))} | ||
r1305 | » | |||
${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} | ||||
» | ||||
${_('edit file')} @ R${c.cs.revision}:${h.short_id(c.cs.raw_id)} | ||||
</%def> | ||||
<%def name="page_nav()"> | ||||
r1888 | ${self.menu('files')} | |||
r1305 | </%def> | |||
<%def name="main()"> | ||||
<div class="box"> | ||||
<!-- box / title --> | ||||
<div class="title"> | ||||
${self.breadcrumbs()} | ||||
<ul class="links"> | ||||
<li> | ||||
<span style="text-transform: uppercase;"> | ||||
<a href="#">${_('branch')}: ${c.cs.branch}</a></span> | ||||
r1888 | </li> | |||
</ul> | ||||
r1305 | </div> | |||
<div class="table"> | ||||
<div id="files_data"> | ||||
<h3 class="files_location">${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cs.revision,c.file.path)}</h3> | ||||
${h.form(h.url.current(),method='post',id='eform')} | ||||
<div id="body" class="codeblock"> | ||||
r1737 | <div class="code-header"> | |||
<div class="stats"> | ||||
<div class="left"><img src="${h.url('/images/icons/file.png')}"/></div> | ||||
r2084 | <div class="left item">${h.link_to("r%s:%s" % (c.file.changeset.revision,h.short_id(c.file.changeset.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=c.file.changeset.raw_id))}</div> | |||
r1737 | <div class="left item">${h.format_byte_size(c.file.size,binary=True)}</div> | |||
<div class="left item last">${c.file.mimetype}</div> | ||||
<div class="buttons"> | ||||
r1756 | ${h.link_to(_('show annotation'),h.url('files_annotate_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} | |||
r1888 | ${h.link_to(_('show as raw'),h.url('files_raw_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} | |||
r1756 | ${h.link_to(_('download as raw'),h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} | |||
r1888 | % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): | |||
r1737 | % if not c.file.is_binary: | |||
r1756 | ${h.link_to(_('source'),h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} | |||
r1737 | % endif | |||
r1888 | % endif | |||
r1737 | </div> | |||
</div> | ||||
r2199 | <div class="commit">${_('Editing file')}: ${c.file.unicode_path}</div> | |||
r1888 | </div> | |||
r1305 | <pre id="editor_pre"></pre> | |||
r1789 | <textarea id="editor" name="content" style="display:none">${h.escape(c.file.content)|n}</textarea> | |||
r1484 | <div style="padding: 10px;color:#666666">${_('commit message')}</div> | |||
r1485 | <textarea id="commit" name="message" style="height: 60px;width: 99%;margin-left:4px"></textarea> | |||
r1305 | </div> | |||
r1720 | <div style="text-align: left;padding-top: 5px"> | |||
r1756 | ${h.submit('commit',_('Commit changes'),class_="ui-btn")} | |||
${h.reset('reset',_('Reset'),class_="ui-btn")} | ||||
r1305 | </div> | |||
${h.end_form()} | ||||
<script type="text/javascript"> | ||||
r1699 | var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.file.path)}"; | |||
initCodeMirror('editor',reset_url); | ||||
r1305 | </script> | |||
r1888 | </div> | |||
r1305 | </div> | |||
r1888 | </div> | |||
</%def> | ||||