##// END OF EJS Templates
build(deps): removed infrae.cache dependency as it's no longer used
build(deps): removed infrae.cache dependency as it's no longer used

File last commit:

r5037:bd722d6e default
r5230:2785eb92 default
Show More
gist_new.mako
111 lines | 4.0 KiB | application/x-mako | MakoHtmlLexer
gists: updated template names and synced edit with create template.
r3870 <%inherit file="/base/base.mako"/>
<%def name="title()">
${_('New Gist')}
%if c.rhodecode_name:
&middot; ${h.branding(c.rhodecode_name)}
%endif
</%def>
<%def name="breadcrumbs_links()"></%def>
<%def name="menu_bar_nav()">
${self.menu_items(active='gists')}
</%def>
<%def name="main()">
<div class="box">
<!-- box / title -->
<div class="title">
</div>
<div class="table">
<div id="files_data">
${h.secure_form(h.route_path('gists_create'), id='eform', request=request)}
<div>
<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)}
gists: bring back add button and specify access level is for private gists.
r4081 <label for='acl_level'>${_('Private Gist access level')}</label>
gists: updated template names and synced edit with create template.
r3870 ${h.dropdownmenu('gist_acl_level', '', c.acl_options)}
<textarea style="margin-top: 5px; border-color: #dbd9da" id="description" name="description" placeholder="${_('Gist description ...')}"></textarea>
</div>
<div id="codeblock" class="codeblock">
<div class="code-header">
<div class="form">
<div class="fields">
${h.text('filename', size=30, placeholder=_('name gist 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>
gists: use left-sided action button
r4123 <div class="pull-left">
gists: removed private/public gist buttons and replaced them with radio group...
r4083 <div class="pull-right">
${h.submit('create',_('Create Gist'),class_="btn")}
</div>
<div class="rcform-element pull-right">
<div class="fields gist-type-fields">
<fieldset>
<div class="gist-type-fields-wrapper">
gists: block id input for public gists....
r4691 <input type="radio" id="private_gist" checked="" name="gist_type" value="private" onchange="setGistId('private')">
gists: removed private/public gist buttons and replaced them with radio group...
r4083 <label for="private_gist">${_('Private Gist')}</label>
<span class="tooltip label" title="${_('Private Gists are not listed and only accessible through their secret url.')}">${_('Private Gist')}</span>
gists: block id input for public gists....
r4691 <input type="radio" id="public_gist" name="gist_type" value="public" onchange="setGistId('public')">
gists: removed private/public gist buttons and replaced them with radio group...
r4083 <label for="public_gist">${_('Public Gist')}</label>
<span class="tooltip label" title="${_('Public Gists are accessible to anyone and listed in Gists page.')}">${_('Public Gist')}</span>
</div>
</fieldset>
</div>
</div>
gists: updated template names and synced edit with create template.
r3870 </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);
gists: block id input for public gists....
r4691 setGistId = function(gistType) {
if (gistType === 'private') {
$('#gistid').removeAttr('disabled');
}
else {
$('#gistid').val('');
$('#gistid').attr('disabled', 'disabled')
}
}
gists: updated template names and synced edit with create template.
r3870 </script>
</%def>