Show More
@@ -1,5 +1,3 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
|||
2 |
|
||||
3 | ${h.form(url('repos'))} |
|
1 | ${h.form(url('repos'))} | |
4 | <div class="form"> |
|
2 | <div class="form"> | |
5 | <div class="form-group"> |
|
3 | <div class="form-group"> | |
@@ -8,10 +6,17 b'' | |||||
8 | ${h.text('repo_name',class_='form-control')} |
|
6 | ${h.text('repo_name',class_='form-control')} | |
9 | </div> |
|
7 | </div> | |
10 | </div> |
|
8 | </div> | |
11 |
<div |
|
9 | <div class="form-group"> | |
|
10 | <label class="control-label" for="repo_type">${_('Type')}:</label> | |||
|
11 | <div> | |||
|
12 | ${h.select('repo_type','hg',c.backends,class_='form-control')} | |||
|
13 | <span class="help-block">${_('Type of repository to create.')}</span> | |||
|
14 | </div> | |||
|
15 | </div> | |||
|
16 | <div class="form-group"> | |||
12 | <label class="control-label" for="clone_uri">${_('Clone remote repository')}:</label> |
|
17 | <label class="control-label" for="clone_uri">${_('Clone remote repository')}:</label> | |
13 | <div> |
|
18 | <div> | |
14 | ${h.text('clone_uri',class_='form-control')} |
|
19 | ${h.text('clone_uri',class_='form-control', placeholder=_('Repository URL'))} | |
15 | <span class="help-block"> |
|
20 | <span class="help-block"> | |
16 | ${_('Optional: URL of a remote repository. If set, the repository will be created as a clone from this URL.')} |
|
21 | ${_('Optional: URL of a remote repository. If set, the repository will be created as a clone from this URL.')} | |
17 | </span> |
|
22 | </span> | |
@@ -39,16 +44,9 b'' | |||||
39 | </div> |
|
44 | </div> | |
40 | </div> |
|
45 | </div> | |
41 | <div class="form-group"> |
|
46 | <div class="form-group"> | |
42 | <label class="control-label" for="repo_type">${_('Type')}:</label> |
|
|||
43 | <div> |
|
|||
44 | ${h.select('repo_type','hg',c.backends,class_='form-control')} |
|
|||
45 | <span class="help-block">${_('Type of repository to create.')}</span> |
|
|||
46 | </div> |
|
|||
47 | </div> |
|
|||
48 | <div class="form-group"> |
|
|||
49 | <label class="control-label" for="repo_landing_rev">${_('Landing revision')}:</label> |
|
47 | <label class="control-label" for="repo_landing_rev">${_('Landing revision')}:</label> | |
50 | <div> |
|
48 | <div> | |
51 |
${h.select('repo_landing_rev', |
|
49 | ${h.select('repo_landing_rev',None,c.landing_revs,class_='form-control')} | |
52 | <span class="help-block">${_('Default revision for files page, downloads, full text search index and readme generation')}</span> |
|
50 | <span class="help-block">${_('Default revision for files page, downloads, full text search index and readme generation')}</span> | |
53 | </div> |
|
51 | </div> | |
54 | </div> |
|
52 | </div> | |
@@ -65,9 +63,18 b'' | |||||
65 | </div> |
|
63 | </div> | |
66 | </div> |
|
64 | </div> | |
67 | </div> |
|
65 | </div> | |
|
66 | ${h.end_form()} | |||
|
67 | ||||
68 | <script> |
|
68 | <script> | |
69 | 'use strict'; |
|
69 | 'use strict'; | |
70 | $(document).ready(function(){ |
|
70 | $(document).ready(function(){ | |
|
71 | $('#repo_type').select2({ | |||
|
72 | 'minimumResultsForSearch': -1 | |||
|
73 | }); | |||
|
74 | $('#repo_group').select2({ | |||
|
75 | 'dropdownAutoWidth': true | |||
|
76 | }); | |||
|
77 | ||||
71 | function setCopyPermsOption(group_val){ |
|
78 | function setCopyPermsOption(group_val){ | |
72 | if(group_val != "-1"){ |
|
79 | if(group_val != "-1"){ | |
73 | $('#copy_perms').show(); |
|
80 | $('#copy_perms').show(); | |
@@ -77,22 +84,14 b'' | |||||
77 | } |
|
84 | } | |
78 | } |
|
85 | } | |
79 |
|
86 | |||
80 | $("#repo_group").select2({ |
|
|||
81 | 'dropdownAutoWidth': true |
|
|||
82 | }); |
|
|||
83 |
|
||||
84 | setCopyPermsOption($('#repo_group').val()); |
|
87 | setCopyPermsOption($('#repo_group').val()); | |
85 |
$( |
|
88 | $('#repo_group').on("change", function(e) { | |
86 | setCopyPermsOption(e.val); |
|
89 | setCopyPermsOption(e.val); | |
87 | }); |
|
90 | }); | |
88 |
|
91 | |||
89 |
$( |
|
92 | $('#repo_landing_rev').select2({ | |
90 | 'minimumResultsForSearch': -1 |
|
|||
91 | }); |
|
|||
92 | $("#repo_landing_rev").select2({ |
|
|||
93 | 'minimumResultsForSearch': -1 |
|
93 | 'minimumResultsForSearch': -1 | |
94 | }); |
|
94 | }); | |
95 | $('#repo_name').focus(); |
|
95 | $('#repo_name').focus(); | |
96 | }); |
|
96 | }); | |
97 | </script> |
|
97 | </script> | |
98 | ${h.end_form()} |
|
@@ -20,27 +20,32 b'' | |||||
20 |
|
|
20 | <div class="form-group"> | |
21 |
|
|
21 | <label class="control-label" for="clone_uri">${_('Remote repository')}:</label> | |
22 |
|
|
22 | <div> | |
23 | <div id="alter_clone_uri"> |
|
|||
24 |
|
|
23 | ${h.text('clone_uri',class_='form-control', placeholder=_('Repository URL'))} | |
25 |
|
|
24 | ${h.hidden('clone_uri_hidden', c.repo_info.clone_uri_hidden)} | |
26 | </div> |
|
25 | <span class="help-block"> | |
27 | <span id="alter_clone_uri_help_block" class="help-block"> |
|
|||
28 | ${_('Optional: URL of a remote repository. If set, the repository can be pulled from this URL.')} |
|
26 | ${_('Optional: URL of a remote repository. If set, the repository can be pulled from this URL.')} | |
29 |
|
|
27 | </span> | |
30 |
|
|
28 | </div> | |
31 |
|
|
29 | </div> | |
32 |
|
|
30 | <div class="form-group"> | |
|
31 | <label class="control-label" for="repo_description">${_('Description')}:</label> | |||
|
32 | <div> | |||
|
33 | ${h.textarea('repo_description',class_='form-control')} | |||
|
34 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> | |||
|
35 | </div> | |||
|
36 | </div> | |||
|
37 | <div class="form-group"> | |||
33 |
|
|
38 | <label class="control-label" for="repo_group">${_('Repository group')}:</label> | |
34 |
|
|
39 | <div> | |
35 |
|
|
40 | ${h.select('repo_group',None,c.repo_groups,class_='form-control')} | |
36 |
|
|
41 | <span class="help-block">${_('Optionally select a group to put this repository into.')}</span> | |
37 |
|
|
42 | </div> | |
38 |
|
|
43 | </div> | |
39 |
|
|
44 | <div class="form-group"> | |
40 |
|
|
45 | <label class="control-label" for="repo_landing_rev">${_('Landing revision')}:</label> | |
41 |
|
|
46 | <div> | |
42 |
|
|
47 | ${h.select('repo_landing_rev',None,c.landing_revs,class_='form-control')} | |
43 |
|
|
48 | <span class="help-block">${_('Default revision for files page, downloads, full text search index and readme generation')}</span> | |
44 |
|
|
49 | </div> | |
45 |
|
|
50 | </div> | |
46 |
|
|
51 | <div class="form-group"> | |
@@ -51,14 +56,6 b'' | |||||
51 |
|
|
56 | </div> | |
52 |
|
|
57 | </div> | |
53 |
|
|
58 | <div class="form-group"> | |
54 | <label class="control-label" for="repo_description">${_('Description')}:</label> |
|
|||
55 | <div> |
|
|||
56 | ${h.textarea('repo_description',class_='form-control')} |
|
|||
57 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> |
|
|||
58 | </div> |
|
|||
59 | </div> |
|
|||
60 |
|
||||
61 | <div class="form-group"> |
|
|||
62 |
|
|
59 | <label class="control-label" for="repo_private">${_('Private repository')}:</label> | |
63 |
|
|
60 | <div> | |
64 |
|
|
61 | ${h.checkbox('repo_private',value="True")} | |
@@ -106,10 +103,10 b'' | |||||
106 | <script> |
|
103 | <script> | |
107 | 'use strict'; |
|
104 | 'use strict'; | |
108 | $(document).ready(function(){ |
|
105 | $(document).ready(function(){ | |
109 |
$('#repo_ |
|
106 | $('#repo_group').select2({ | |
110 | 'dropdownAutoWidth': true |
|
107 | 'dropdownAutoWidth': true | |
111 | }); |
|
108 | }); | |
112 |
$('#repo_ |
|
109 | $('#repo_landing_rev').select2({ | |
113 | 'dropdownAutoWidth': true |
|
110 | 'dropdownAutoWidth': true | |
114 | }); |
|
111 | }); | |
115 |
|
112 |
General Comments 0
You need to be logged in to leave comments.
Login now