##// END OF EJS Templates
gists: block id input for public gists....
super-admin -
r4691:52d2949f stable
parent child
Show More
@@ -27,13 +27,13
27
27
28 <ul class="button-links">
28 <ul class="button-links">
29 % if c.is_super_admin:
29 % if c.is_super_admin:
30 <li class="btn ${h.is_active('all', c.active)}"><a href="${h.route_path('gists_show', _query={'all': 1})}">${_('All gists')}</a></li>
30 <li><a class="btn ${h.is_active('all', c.active)}" href="${h.route_path('gists_show', _query={'all': 1})}">${_('All gists')}</a></li>
31 %endif
31 %endif
32 <li class="btn ${h.is_active('public', c.active)}"><a href="${h.route_path('gists_show')}">${_('All public')}</a></li>
32 <li><a class="btn ${h.is_active('public', c.active)}" href="${h.route_path('gists_show')}">${_('All public')}</a></li>
33 %if c.rhodecode_user.username != h.DEFAULT_USER:
33 %if c.rhodecode_user.username != h.DEFAULT_USER:
34 <li class="btn ${h.is_active('my_all', c.active)}"><a href="${h.route_path('gists_show', _query={'public':1, 'private': 1})}">${_('My gists')}</a></li>
34 <li><a class="btn ${h.is_active('my_all', c.active)}" href="${h.route_path('gists_show', _query={'public':1, 'private': 1})}">${_('My gists')}</a></li>
35 <li class="btn ${h.is_active('my_private', c.active)}"><a href="${h.route_path('gists_show', _query={'private': 1})}">${_('My private')}</a></li>
35 <li><a class="btn ${h.is_active('my_private', c.active)}" href="${h.route_path('gists_show', _query={'private': 1})}">${_('My private')}</a></li>
36 <li class="btn ${h.is_active('my_public', c.active)}"><a href="${h.route_path('gists_show', _query={'public': 1})}">${_('My public')}</a></li>
36 <li><a class="btn ${h.is_active('my_public', c.active)}" href="${h.route_path('gists_show', _query={'public': 1})}">${_('My public')}</a></li>
37 %endif
37 %endif
38 </ul>
38 </ul>
39
39
@@ -65,11 +65,11
65 <fieldset>
65 <fieldset>
66 <div class="gist-type-fields-wrapper">
66 <div class="gist-type-fields-wrapper">
67
67
68 <input type="radio" id="private_gist" checked="" name="gist_type" value="private">
68 <input type="radio" id="private_gist" checked="" name="gist_type" value="private" onchange="setGistId('private')">
69 <label for="private_gist">${_('Private Gist')}</label>
69 <label for="private_gist">${_('Private Gist')}</label>
70 <span class="tooltip label" title="${_('Private Gists are not listed and only accessible through their secret url.')}">${_('Private Gist')}</span>
70 <span class="tooltip label" title="${_('Private Gists are not listed and only accessible through their secret url.')}">${_('Private Gist')}</span>
71
71
72 <input type="radio" id="public_gist" name="gist_type" value="public">
72 <input type="radio" id="public_gist" name="gist_type" value="public" onchange="setGistId('public')">
73 <label for="public_gist">${_('Public Gist')}</label>
73 <label for="public_gist">${_('Public Gist')}</label>
74 <span class="tooltip label" title="${_('Public Gists are accessible to anyone and listed in Gists page.')}">${_('Public Gist')}</span>
74 <span class="tooltip label" title="${_('Public Gists are accessible to anyone and listed in Gists page.')}">${_('Public Gist')}</span>
75 </div>
75 </div>
@@ -99,5 +99,14
99 setCodeMirrorModeFromInput(
99 setCodeMirrorModeFromInput(
100 modes_select, filename_selector, myCodeMirror, null);
100 modes_select, filename_selector, myCodeMirror, null);
101
101
102 setGistId = function(gistType) {
103 if (gistType === 'private') {
104 $('#gistid').removeAttr('disabled');
105 }
106 else {
107 $('#gistid').val('');
108 $('#gistid').attr('disabled', 'disabled')
109 }
110 }
102 </script>
111 </script>
103 </%def>
112 </%def>
General Comments 1
Under Review
author

Auto status change to "Under Review"

You need to be logged in to leave comments. Login now