##// END OF EJS Templates
release: Merge default into stable for release preparation
release: Merge default into stable for release preparation

File last commit:

r4373:702c378c stable
r4456:279b3293 merge stable
Show More
files_add.mako
116 lines | 4.0 KiB | application/x-mako | MakoHtmlLexer
templating: use .mako as extensions for template files.
r1282 <%inherit file="/base/base.mako"/>
<%def name="title()">
dan
file: new file editors...
r3754 ${_('{} Files Add').format(c.repo_name)}
templating: use .mako as extensions for template files.
r1282 %if c.rhodecode_name:
&middot; ${h.branding(c.rhodecode_name)}
%endif
</%def>
<%def name="menu_bar_nav()">
${self.menu_items(active='repositories')}
</%def>
dan
file: new file editors...
r3754 <%def name="breadcrumbs_links()"></%def>
templating: use .mako as extensions for template files.
r1282
<%def name="menu_bar_subnav()">
${self.repo_menu(active='files')}
</%def>
<%def name="main()">
dan
file: new file editors...
r3754
templating: use .mako as extensions for template files.
r1282 <div class="box">
ui: removed obsolete repo title objects
r3568
templating: use .mako as extensions for template files.
r1282 <div class="edit-file-title">
dan
file: new file editors...
r3754 <span class="title-heading">${_('Add new file')} @ <code>${h.show_id(c.commit)}</code></span>
dan
files: fixed branch icon for SVN...
r3755 % if c.commit.branch:
<span class="tag branchtag">
<i class="icon-branch"></i> ${c.commit.branch}
</span>
% endif
templating: use .mako as extensions for template files.
r1282 </div>
files: split add/upload templaates
r3710
dan
file: new file editors...
r3754 ${h.secure_form(h.route_path('repo_files_create_file', repo_name=c.repo_name, commit_id=c.commit.raw_id, f_path=c.f_path), id='eform', request=request)}
templating: use .mako as extensions for template files.
r1282 <div class="edit-file-fieldset">
dan
file: new file editors...
r3754 <div class="path-items">
<ul>
<li class="breadcrumb-path">
files: split add/upload templaates
r3710 <div>
files: use a common function to handle url-by-refs, and fix landing refs for SVN....
r4373 ${h.files_breadcrumbs(c.repo_name, c.rhodecode_db_repo.repo_type, c.commit.raw_id, c.f_path, c.rhodecode_db_repo.landing_ref_name, request.GET.get('at'), limit_items=True, hide_last_item=False, linkify_last_item=True, copy_path_icon=False)} /
templating: use .mako as extensions for template files.
r1282 </div>
dan
file: new file editors...
r3754 </li>
<li class="location-path">
dan
files: add pre-commit checks on file operations to prevent loosing content while editing when repositories change....
r4302 <input class="file-name-input input-small" type="text" value="${request.GET.get('filename')}" name="filename" id="filename" placeholder="${_('Filename e.g example.py, or docs/readme.md')}">
dan
file: new file editors...
r3754 </li>
</ul>
templating: use .mako as extensions for template files.
r1282 </div>
file-upload: allow specfing custom filename for uploaded archives.
r1683
templating: use .mako as extensions for template files.
r1282 </div>
files: split add/upload templaates
r3710
templating: use .mako as extensions for template files.
r1282 <div class="table">
ui: new commits page....
r3882 <div>
templating: use .mako as extensions for template files.
r1282 <div id="codeblock" class="codeblock">
dan
file: new file editors...
r3754 <div class="editor-items">
<div class="editor-action active show-editor pull-left" onclick="fileEditor.showEditor(); return false">
${_('Edit')}
</div>
<div class="editor-action show-preview pull-left" onclick="fileEditor.showPreview(); return false">
${_('Preview')}
</div>
templating: use .mako as extensions for template files.
r1282
dan
file: new file editors...
r3754 <div class="pull-right">
${h.dropdownmenu('line_wrap', 'off', [('on', _('Line wraps on')), ('off', _('line wraps off'))], extra_classes=['last-item'])}
</div>
<div class="pull-right">
${h.dropdownmenu('set_mode','plain',[('plain', _('plain'))], enable_filter=True)}
</div>
templating: use .mako as extensions for template files.
r1282 </div>
dan
file: new file editors...
r3754
templating: use .mako as extensions for template files.
r1282 <div id="editor_container">
<pre id="editor_pre"></pre>
<textarea id="editor" name="content" ></textarea>
<div id="editor_preview"></div>
</div>
</div>
</div>
</div>
<div class="edit-file-fieldset">
<div class="fieldset">
dan
file: new file editors...
r3754 <div class="message">
<textarea id="commit" name="message" placeholder="${c.default_message}"></textarea>
templating: use .mako as extensions for template files.
r1282 </div>
</div>
dan
file: new file editors...
r3754 <div class="pull-left">
${h.submit('commit_btn',_('Commit changes'), class_="btn btn-small btn-success")}
templating: use .mako as extensions for template files.
r1282 </div>
</div>
${h.end_form()}
</div>
dan
file: new file editors...
r3754
templating: use .mako as extensions for template files.
r1282 <script type="text/javascript">
dan
file: new file editors...
r3754 $(document).ready(function () {
var modes_select = $('#set_mode');
var filename_selector = '#filename';
fillCodeMirrorOptions(modes_select);
templating: use .mako as extensions for template files.
r1282
dan
file: new file editors...
r3754 fileEditor = new FileEditor('#editor');
templating: use .mako as extensions for template files.
r1282
dan
file: new file editors...
r3754 // on change of select field set mode
setCodeMirrorModeFromSelect(modes_select, filename_selector, fileEditor.cm, null);
templating: use .mako as extensions for template files.
r1282
dan
file: new file editors...
r3754 // on entering the new filename set mode, from given extension
setCodeMirrorModeFromInput(modes_select, filename_selector, fileEditor.cm, null);
templating: use .mako as extensions for template files.
r1282
dan
file: new file editors...
r3754 $('#filename').focus();
dan
files: add pre-commit checks on file operations to prevent loosing content while editing when repositories change....
r4302 var commit_id = "${c.commit.raw_id}";
var f_path = "${c.f_path}";
checkFileHead($('#eform'), commit_id, f_path, 'create')
templating: use .mako as extensions for template files.
r1282 });
</script>
</%def>