##// END OF EJS Templates
gists: use left-sided action button
marcink -
r4123:54164c4e default
parent child Browse files
Show More
@@ -1,105 +1,103 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="/base/base.mako"/>
3 3
4 4 <%def name="title()">
5 5 ${_('New Gist')}
6 6 %if c.rhodecode_name:
7 7 &middot; ${h.branding(c.rhodecode_name)}
8 8 %endif
9 9 </%def>
10 10
11 11 <%def name="breadcrumbs_links()"></%def>
12 12
13 13 <%def name="menu_bar_nav()">
14 14 ${self.menu_items(active='gists')}
15 15 </%def>
16 16
17 17 <%def name="main()">
18 18 <div class="box">
19 19 <!-- box / title -->
20 20 <div class="title">
21 21
22 22 </div>
23 23
24 24 <div class="table">
25 25 <div id="files_data">
26 26 ${h.secure_form(h.route_path('gists_create'), id='eform', request=request)}
27 27 <div>
28 28 <span class="gist-gravatar">
29 29 ${self.gravatar(c.rhodecode_user.email, 30)}
30 30 </span>
31 31 <label for='gistid'>${_('Gist id')}</label>
32 32 ${h.text('gistid', placeholder=_('Auto generated'))}
33 33
34 34 <label for='lifetime'>${_('Gist lifetime')}</label>
35 35 ${h.dropdownmenu('lifetime', '', c.lifetime_options)}
36 36
37 37 <label for='acl_level'>${_('Private Gist access level')}</label>
38 38 ${h.dropdownmenu('gist_acl_level', '', c.acl_options)}
39 39
40 40 <textarea style="margin-top: 5px; border-color: #dbd9da" id="description" name="description" placeholder="${_('Gist description ...')}"></textarea>
41 41 </div>
42 42
43 43 <div id="codeblock" class="codeblock">
44 44 <div class="code-header">
45 45 <div class="form">
46 46 <div class="fields">
47 47 ${h.text('filename', size=30, placeholder=_('name gist file...'))}
48 48 ${h.dropdownmenu('mimetype','plain',[('plain',_('plain'))],enable_filter=True)}
49 49 </div>
50 50 </div>
51 51 </div>
52 52
53 53 <div id="editor_container">
54 54 <div id="editor_pre"></div>
55 55 <textarea id="editor" name="content" ></textarea>
56 56 </div>
57 57 </div>
58 58
59 <div class="pull-right">
60 ##<i class="tooltip icon-info" title="${_('Secret gists are hidden from listing, but accessible to anyone who knows the url.')}"></i>
61
59 <div class="pull-left">
62 60 <div class="pull-right">
63 61 ${h.submit('create',_('Create Gist'),class_="btn")}
64 62 </div>
65 63 <div class="rcform-element pull-right">
66 64 <div class="fields gist-type-fields">
67 65 <fieldset>
68 66 <div class="gist-type-fields-wrapper">
69 67
70 68 <input type="radio" id="private_gist" checked="" name="gist_type" value="private">
71 69 <label for="private_gist">${_('Private Gist')}</label>
72 70 <span class="tooltip label" title="${_('Private Gists are not listed and only accessible through their secret url.')}">${_('Private Gist')}</span>
73 71
74 72 <input type="radio" id="public_gist" name="gist_type" value="public">
75 73 <label for="public_gist">${_('Public Gist')}</label>
76 74 <span class="tooltip label" title="${_('Public Gists are accessible to anyone and listed in Gists page.')}">${_('Public Gist')}</span>
77 75 </div>
78 76 </fieldset>
79 77 </div>
80 78 </div>
81 79
82 80 </div>
83 81 ${h.end_form()}
84 82 </div>
85 83 </div>
86 84
87 85 </div>
88 86
89 87 <script type="text/javascript">
90 88 var myCodeMirror = initCodeMirror('editor', '');
91 89
92 90 var modes_select = $('#mimetype');
93 91 fillCodeMirrorOptions(modes_select);
94 92
95 93 var filename_selector = '#filename';
96 94 // on change of select field set mode
97 95 setCodeMirrorModeFromSelect(
98 96 modes_select, filename_selector, myCodeMirror, null);
99 97
100 98 // on entering the new filename set mode, from given extension
101 99 setCodeMirrorModeFromInput(
102 100 modes_select, filename_selector, myCodeMirror, null);
103 101
104 102 </script>
105 103 </%def>
General Comments 0
You need to be logged in to leave comments. Login now