files_add.html
92 lines
| 3.5 KiB
| text/html
|
HtmlLexer
r1483 | <%inherit file="/base/base.html"/> | |||
<%def name="title()"> | ||||
Vincent Duvert
|
r2417 | ${_('%s Edit file') % c.repo_name} - ${c.rhodecode_name} | ||
r1483 | </%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()"> | ||||
Takumi IINO
|
r2492 | ${h.link_to(_(u'Home'),h.url('/'))} | ||
r1483 | » | |||
${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} | ||||
» | ||||
${_('add file')} @ R${c.cs.revision}:${h.short_id(c.cs.raw_id)} | ||||
</%def> | ||||
<%def name="page_nav()"> | ||||
r1888 | ${self.menu('files')} | |||
r1483 | </%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> | ||||
r1483 | </div> | |||
<div class="table"> | ||||
<div id="files_data"> | ||||
r1485 | ${h.form(h.url.current(),method='post',id='eform',enctype="multipart/form-data")} | |||
r1483 | <h3>${_('Add new file')}</h3> | |||
<div class="form"> | ||||
r1603 | <div class="fields"> | |||
<div id="filename_container" class="field file"> | ||||
<div class="label"> | ||||
<label for="filename">${_('File Name')}:</label> | ||||
</div> | ||||
<div class="input"> | ||||
<input type="text" value="" size="30" name="filename" id="filename"> | ||||
r1756 | ${_('or')} <span class="ui-btn" id="upload_file_enable">${_('Upload file')}</span> | |||
r1603 | </div> | |||
r1888 | </div> | |||
r1603 | <div id="upload_file_container" class="field" style="display:none"> | |||
<div class="label"> | ||||
<label for="location">${_('Upload file')}</label> | ||||
r1483 | </div> | |||
r1603 | <div class="file"> | |||
<input type="file" size="30" name="upload_file" id="upload_file"> | ||||
r1888 | ${_('or')} <span class="ui-btn" id="file_enable">${_('Create new file')}</span> | |||
r1603 | </div> | |||
</div> | ||||
<div class="field"> | ||||
<div class="label"> | ||||
<label for="location">${_('Location')}</label> | ||||
</div> | ||||
<div class="input"> | ||||
<input type="text" value="${c.f_path}" size="30" name="location" id="location"> | ||||
${_('use / to separate directories')} | ||||
</div> | ||||
r1888 | </div> | |||
r1603 | </div> | |||
r1888 | </div> | |||
r1483 | <div id="body" class="codeblock"> | |||
r1888 | <div id="editor_container"> | |||
r1485 | <pre id="editor_pre"></pre> | |||
<textarea id="editor" name="content" style="display:none"></textarea> | ||||
</div> | ||||
r1484 | <div style="padding: 10px;color:#666666">${_('commit message')}</div> | |||
r1485 | <textarea id="commit" name="message" style="height: 100px;width: 99%;margin-left:4px"></textarea> | |||
r1483 | </div> | |||
r1720 | <div style="text-align: l;padding-top: 5px"> | |||
r1756 | ${h.submit('commit',_('Commit changes'),class_="ui-btn")} | |||
${h.reset('reset',_('Reset'),class_="ui-btn")} | ||||
r1483 | </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.f_path)}"; | |||
r1888 | initCodeMirror('editor',reset_url); | |||
r1483 | </script> | |||
r1888 | </div> | |||
r1483 | </div> | |||
r1888 | </div> | |||
</%def> | ||||