##// END OF EJS Templates
i18n: replaced fragile extraction of JS translations from an _TM variable....
i18n: replaced fragile extraction of JS translations from an _TM variable. We replaced it with similar to babel functions _gettext, and _ngettext, that will prevent UI from breaking in case of untranslated strings. This also will allow to use babel built in extractors to fetch the translations stored inside html and JS.

File last commit:

r1:854a839a default
r325:9f2e29d4 stable
Show More
new.html
86 lines | 2.7 KiB | text/html | HtmlLexer
project: added all source files and assets
r1 ## -*- coding: utf-8 -*-
<%inherit file="/base/base.html"/>
<%def name="title()">
${_('New Gist')}
%if c.rhodecode_name:
&middot; ${h.branding(c.rhodecode_name)}
%endif
</%def>
<%def name="breadcrumbs_links()">
${_('New Gist')}
</%def>
<%def name="menu_bar_nav()">
${self.menu_items(active='gists')}
</%def>
<%def name="main()">
<div class="box">
<!-- box / title -->
<div class="title">
${self.breadcrumbs()}
</div>
<div class="table">
<div id="files_data">
${h.secure_form(h.url('gists'), method='post',id='eform')}
<div>
<textarea id="description" name="description" placeholder="${_('Gist description ...')}"></textarea>
<span class="gist-gravatar">
${self.gravatar(c.rhodecode_user.email, 30)}
</span>
<label for='gistid'>${_('Gist id')}</label>
${h.text('gistid', placeholder=_('Auto generated'))}
<label for='lifetime'>${_('Gist lifetime')}</label>
${h.dropdownmenu('lifetime', '', c.lifetime_options)}
<label for='acl_level'>${_('Gist access level')}</label>
${h.dropdownmenu('acl_level', '', c.acl_options)}
</div>
<div id="codeblock" class="codeblock">
<div class="code-header">
<div class="form">
<div class="fields">
${h.text('filename', size=30, placeholder=_('name this file...'))}
${h.dropdownmenu('mimetype','plain',[('plain',_('plain'))],enable_filter=True)}
</div>
</div>
</div>
<div id="editor_container">
<div id="editor_pre"></div>
<textarea id="editor" name="content" ></textarea>
</div>
</div>
<div class="pull-right">
${h.submit('private',_('Create Private Gist'),class_="btn")}
${h.submit('public',_('Create Public Gist'),class_="btn")}
${h.reset('reset',_('Reset'),class_="btn")}
</div>
${h.end_form()}
</div>
</div>
</div>
<script type="text/javascript">
var myCodeMirror = initCodeMirror('editor', '');
var modes_select = $('#mimetype');
fillCodeMirrorOptions(modes_select);
var filename_selector = '#filename';
// on change of select field set mode
setCodeMirrorModeFromSelect(
modes_select, filename_selector, myCodeMirror, null);
// on entering the new filename set mode, from given extension
setCodeMirrorModeFromInput(
modes_select, filename_selector, myCodeMirror, null);
</script>
</%def>