Show More
@@ -1,17 +1,22 b'' | |||
|
1 | ## -*- coding: utf-8 -*- | |
|
2 | ||
|
3 | 1 | ${h.form(url('repos'))} |
|
4 | <div class="form"> | |
|
2 | <div class="form"> | |
|
5 | 3 | <div class="form-group"> |
|
6 | 4 | <label class="control-label" for="repo_name">${_('Name')}:</label> |
|
7 | 5 | <div> |
|
8 | 6 | ${h.text('repo_name',class_='form-control')} |
|
9 | 7 | </div> |
|
10 | 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 | 17 | <label class="control-label" for="clone_uri">${_('Clone remote repository')}:</label> |
|
13 | 18 | <div> |
|
14 | ${h.text('clone_uri',class_='form-control')} | |
|
19 | ${h.text('clone_uri',class_='form-control', placeholder=_('Repository URL'))} | |
|
15 | 20 | <span class="help-block"> |
|
16 | 21 | ${_('Optional: URL of a remote repository. If set, the repository will be created as a clone from this URL.')} |
|
17 | 22 | </span> |
@@ -39,16 +44,9 b'' | |||
|
39 | 44 | </div> |
|
40 | 45 | </div> |
|
41 | 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 | 47 | <label class="control-label" for="repo_landing_rev">${_('Landing revision')}:</label> |
|
50 | 48 | <div> |
|
51 |
${h.select('repo_landing_rev', |
|
|
49 | ${h.select('repo_landing_rev',None,c.landing_revs,class_='form-control')} | |
|
52 | 50 | <span class="help-block">${_('Default revision for files page, downloads, full text search index and readme generation')}</span> |
|
53 | 51 | </div> |
|
54 | 52 | </div> |
@@ -64,10 +62,19 b'' | |||
|
64 | 62 | ${h.submit('add',_('Add'),class_="btn btn-default")} |
|
65 | 63 | </div> |
|
66 | 64 | </div> |
|
67 | </div> | |
|
65 | </div> | |
|
66 | ${h.end_form()} | |
|
67 | ||
|
68 | 68 | <script> |
|
69 | 69 | 'use strict'; |
|
70 | 70 | $(document).ready(function(){ |
|
71 | $('#repo_type').select2({ | |
|
72 | 'minimumResultsForSearch': -1 | |
|
73 | }); | |
|
74 | $('#repo_group').select2({ | |
|
75 | 'dropdownAutoWidth': true | |
|
76 | }); | |
|
77 | ||
|
71 | 78 | function setCopyPermsOption(group_val){ |
|
72 | 79 | if(group_val != "-1"){ |
|
73 | 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 | 87 | setCopyPermsOption($('#repo_group').val()); |
|
85 |
$( |
|
|
88 | $('#repo_group').on("change", function(e) { | |
|
86 | 89 | setCopyPermsOption(e.val); |
|
87 | 90 | }); |
|
88 | 91 | |
|
89 |
$( |
|
|
90 | 'minimumResultsForSearch': -1 | |
|
91 | }); | |
|
92 | $("#repo_landing_rev").select2({ | |
|
92 | $('#repo_landing_rev').select2({ | |
|
93 | 93 | 'minimumResultsForSearch': -1 |
|
94 | 94 | }); |
|
95 | 95 | $('#repo_name').focus(); |
|
96 | 96 | }); |
|
97 | 97 | </script> |
|
98 | ${h.end_form()} |
@@ -1,115 +1,112 b'' | |||
|
1 | 1 | ${h.form(url('update_repo', repo_name=c.repo_info.repo_name))} |
|
2 | 2 | <div class="form"> |
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
|
7 |
|
|
|
3 | <div class="form-group"> | |
|
4 | <label class="control-label" for="repo_name">${_('Name')}:</label> | |
|
5 | <div> | |
|
6 | ${h.text('repo_name',class_='form-control')} | |
|
7 | </div> | |
|
8 | </div> | |
|
9 | <div class="form-group"> | |
|
10 | <label class="control-label" for="permanent_url">${_('Permanent URL')}:</label> | |
|
11 | <div> | |
|
12 | ${h.text('permanent_url',class_='form-control', readonly='1')} | |
|
13 | <span class="help-block"> | |
|
14 | ${_('''In case this repository is renamed or moved into another group the repository URL changes. | |
|
15 | Using the above permanent URL guarantees that this repository always will be accessible on that URL. | |
|
16 | This is useful for CI systems, or any other cases that you need to hardcode the URL into a 3rd party service.''')} | |
|
17 | </span> | |
|
18 | </div> | |
|
19 | </div> | |
|
20 | <div class="form-group"> | |
|
21 | <label class="control-label" for="clone_uri">${_('Remote repository')}:</label> | |
|
22 | <div> | |
|
23 | ${h.text('clone_uri',class_='form-control', placeholder=_('Repository URL'))} | |
|
24 | ${h.hidden('clone_uri_hidden', c.repo_info.clone_uri_hidden)} | |
|
25 | <span class="help-block"> | |
|
26 | ${_('Optional: URL of a remote repository. If set, the repository can be pulled from this URL.')} | |
|
27 | </span> | |
|
28 | </div> | |
|
29 | </div> | |
|
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"> | |
|
38 | <label class="control-label" for="repo_group">${_('Repository group')}:</label> | |
|
39 | <div> | |
|
40 | ${h.select('repo_group',None,c.repo_groups,class_='form-control')} | |
|
41 | <span class="help-block">${_('Optionally select a group to put this repository into.')}</span> | |
|
8 | 42 | </div> |
|
43 | </div> | |
|
44 | <div class="form-group"> | |
|
45 | <label class="control-label" for="repo_landing_rev">${_('Landing revision')}:</label> | |
|
46 | <div> | |
|
47 | ${h.select('repo_landing_rev',None,c.landing_revs,class_='form-control')} | |
|
48 | <span class="help-block">${_('Default revision for files page, downloads, full text search index and readme generation')}</span> | |
|
49 | </div> | |
|
50 | </div> | |
|
51 | <div class="form-group"> | |
|
52 | <label class="control-label" for="owner">${_('Owner')}:</label> | |
|
53 | <div> | |
|
54 | ${h.text('owner',class_='form-control', placeholder=_('Type name of user'))} | |
|
55 | <span class="help-block">${_('Change owner of this repository.')}</span> | |
|
56 | </div> | |
|
57 | </div> | |
|
58 | <div class="form-group"> | |
|
59 | <label class="control-label" for="repo_private">${_('Private repository')}:</label> | |
|
60 | <div> | |
|
61 | ${h.checkbox('repo_private',value="True")} | |
|
62 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> | |
|
63 | </div> | |
|
64 | </div> | |
|
65 | <div class="form-group"> | |
|
66 | <label class="control-label" for="repo_enable_statistics">${_('Enable statistics')}:</label> | |
|
67 | <div> | |
|
68 | ${h.checkbox('repo_enable_statistics',value="True")} | |
|
69 | <span class="help-block">${_('Enable statistics window on summary page.')}</span> | |
|
70 | </div> | |
|
71 | </div> | |
|
72 | <div class="form-group"> | |
|
73 | <label class="control-label" for="repo_enable_downloads">${_('Enable downloads')}:</label> | |
|
74 | <div> | |
|
75 | ${h.checkbox('repo_enable_downloads',value="True")} | |
|
76 | <span class="help-block">${_('Enable download menu on summary page.')}</span> | |
|
77 | </div> | |
|
78 | </div> | |
|
79 | ||
|
80 | %if c.visual.repository_fields: | |
|
81 | ## EXTRA FIELDS | |
|
82 | %for field in c.repo_fields: | |
|
9 | 83 | <div class="form-group"> |
|
10 |
<label class="control-label" for=" |
|
|
11 | <div> | |
|
12 | ${h.text('permanent_url',class_='form-control', readonly='1')} | |
|
13 | <span class="help-block"> | |
|
14 | ${_('''In case this repository is renamed or moved into another group the repository URL changes. | |
|
15 | Using the above permanent URL guarantees that this repository always will be accessible on that URL. | |
|
16 | This is useful for CI systems, or any other cases that you need to hardcode the URL into a 3rd party service.''')} | |
|
17 | </span> | |
|
18 | </div> | |
|
19 | </div> | |
|
20 | <div class="form-group"> | |
|
21 | <label class="control-label" for="clone_uri">${_('Remote repository')}:</label> | |
|
84 | <label class="control-label" for="${field.field_key_prefixed}">${field.field_label} (${field.field_key}):</label> | |
|
22 | 85 | <div> |
|
23 | <div id="alter_clone_uri"> | |
|
24 | ${h.text('clone_uri',class_='form-control', placeholder=_('Repository URL'))} | |
|
25 | ${h.hidden('clone_uri_hidden', c.repo_info.clone_uri_hidden)} | |
|
26 |
|
|
|
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.')} | |
|
29 | </span> | |
|
30 | </div> | |
|
31 | </div> | |
|
32 | <div class="form-group"> | |
|
33 | <label class="control-label" for="repo_group">${_('Repository group')}:</label> | |
|
34 | <div> | |
|
35 | ${h.select('repo_group','',c.repo_groups,class_='form-control')} | |
|
36 | <span class="help-block">${_('Optionally select a group to put this repository into.')}</span> | |
|
37 | </div> | |
|
38 | </div> | |
|
39 | <div class="form-group"> | |
|
40 | <label class="control-label" for="repo_landing_rev">${_('Landing revision')}:</label> | |
|
41 | <div> | |
|
42 | ${h.select('repo_landing_rev','',c.landing_revs,class_='form-control')} | |
|
43 | <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span> | |
|
44 | </div> | |
|
45 | </div> | |
|
46 | <div class="form-group"> | |
|
47 | <label class="control-label" for="owner">${_('Owner')}:</label> | |
|
48 | <div> | |
|
49 | ${h.text('owner',class_='form-control', placeholder=_('Type name of user'))} | |
|
50 | <span class="help-block">${_('Change owner of this repository.')}</span> | |
|
86 | ${h.text(field.field_key_prefixed, field.field_value, class_='form-control')} | |
|
87 | %if field.field_desc: | |
|
88 | <span class="help-block">${field.field_desc}</span> | |
|
89 | %endif | |
|
51 | 90 | </div> |
|
52 | 91 | </div> |
|
53 | <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 | <label class="control-label" for="repo_private">${_('Private repository')}:</label> | |
|
63 | <div> | |
|
64 | ${h.checkbox('repo_private',value="True")} | |
|
65 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> | |
|
66 | </div> | |
|
67 | </div> | |
|
68 | <div class="form-group"> | |
|
69 | <label class="control-label" for="repo_enable_statistics">${_('Enable statistics')}:</label> | |
|
70 | <div> | |
|
71 | ${h.checkbox('repo_enable_statistics',value="True")} | |
|
72 | <span class="help-block">${_('Enable statistics window on summary page.')}</span> | |
|
73 | </div> | |
|
92 | %endfor | |
|
93 | %endif | |
|
94 | <div class="form-group"> | |
|
95 | <div class="buttons"> | |
|
96 | ${h.submit('save',_('Save'),class_="btn btn-default")} | |
|
97 | ${h.reset('reset',_('Reset'),class_="btn btn-default")} | |
|
74 | 98 | </div> |
|
75 | <div class="form-group"> | |
|
76 | <label class="control-label" for="repo_enable_downloads">${_('Enable downloads')}:</label> | |
|
77 | <div> | |
|
78 | ${h.checkbox('repo_enable_downloads',value="True")} | |
|
79 | <span class="help-block">${_('Enable download menu on summary page.')}</span> | |
|
80 | </div> | |
|
81 | </div> | |
|
82 | ||
|
83 | %if c.visual.repository_fields: | |
|
84 | ## EXTRA FIELDS | |
|
85 | %for field in c.repo_fields: | |
|
86 | <div class="form-group"> | |
|
87 | <label class="control-label" for="${field.field_key_prefixed}">${field.field_label} (${field.field_key}):</label> | |
|
88 | <div> | |
|
89 | ${h.text(field.field_key_prefixed, field.field_value, class_='form-control')} | |
|
90 | %if field.field_desc: | |
|
91 | <span class="help-block">${field.field_desc}</span> | |
|
92 | %endif | |
|
93 | </div> | |
|
94 | </div> | |
|
95 | %endfor | |
|
96 | %endif | |
|
97 | <div class="form-group"> | |
|
98 | <div class="buttons"> | |
|
99 | ${h.submit('save',_('Save'),class_="btn btn-default")} | |
|
100 | ${h.reset('reset',_('Reset'),class_="btn btn-default")} | |
|
101 | </div> | |
|
102 | </div> | |
|
99 | </div> | |
|
103 | 100 | </div> |
|
104 |
|
|
|
101 | ${h.end_form()} | |
|
105 | 102 | |
|
106 | 103 | <script> |
|
107 | 104 | 'use strict'; |
|
108 | 105 | $(document).ready(function(){ |
|
109 |
$('#repo_ |
|
|
106 | $('#repo_group').select2({ | |
|
110 | 107 | 'dropdownAutoWidth': true |
|
111 | 108 | }); |
|
112 |
$('#repo_ |
|
|
109 | $('#repo_landing_rev').select2({ | |
|
113 | 110 | 'dropdownAutoWidth': true |
|
114 | 111 | }); |
|
115 | 112 |
General Comments 0
You need to be logged in to leave comments.
Login now