Show More
@@ -1,146 +1,148 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 |
|
2 | |||
3 | ${h.secure_form(url('repos'))} |
|
3 | ${h.secure_form(url('repos'))} | |
4 | <div class="form"> |
|
4 | <div class="form"> | |
5 | <!-- fields --> |
|
5 | <!-- fields --> | |
6 | <div class="fields"> |
|
6 | <div class="fields"> | |
7 | <div class="field"> |
|
7 | <div class="field"> | |
8 | <div class="label"> |
|
8 | <div class="label"> | |
9 | <label for="repo_name">${_('Name')}:</label> |
|
9 | <label for="repo_name">${_('Name')}:</label> | |
10 | </div> |
|
10 | </div> | |
11 | <div class="input"> |
|
11 | <div class="input"> | |
12 | ${h.text('repo_name', class_="medium")} |
|
12 | ${h.text('repo_name', class_="medium")} | |
13 | <div class="info-block"> |
|
13 | <div class="info-block"> | |
14 | <a id="remote_clone_toggle" href="#"><i class="icon-download-alt"></i> ${_('Import Existing Repository ?')}</a> |
|
14 | <a id="remote_clone_toggle" href="#"><i class="icon-download-alt"></i> ${_('Import Existing Repository ?')}</a> | |
15 | </div> |
|
15 | </div> | |
16 | %if not c.rhodecode_user.is_admin: |
|
16 | %if not c.rhodecode_user.is_admin: | |
17 | ${h.hidden('user_created',True)} |
|
17 | ${h.hidden('user_created',True)} | |
18 | %endif |
|
18 | %endif | |
19 | </div> |
|
19 | </div> | |
20 | </div> |
|
20 | </div> | |
21 | <div id="remote_clone" class="field" style="display: none;"> |
|
21 | <div id="remote_clone" class="field" style="display: none;"> | |
22 | <div class="label"> |
|
22 | <div class="label"> | |
23 | <label for="clone_uri">${_('Clone from')}:</label> |
|
23 | <label for="clone_uri">${_('Clone from')}:</label> | |
24 | </div> |
|
24 | </div> | |
25 | <div class="input"> |
|
25 | <div class="input"> | |
26 | ${h.text('clone_uri', class_="medium")} |
|
26 | ${h.text('clone_uri', class_="medium")} | |
27 | <span class="help-block">${_('Optional http[s] URL from which to clone a repository.')}</span> |
|
27 | <span class="help-block">${_('Optional http[s] URL from which to clone a repository.')}</span> | |
28 | </div> |
|
28 | </div> | |
29 | </div> |
|
29 | </div> | |
30 | <div class="field"> |
|
30 | <div class="field"> | |
31 | <div class="label"> |
|
31 | <div class="label"> | |
32 | <label for="repo_description">${_('Description')}:</label> |
|
32 | <label for="repo_description">${_('Description')}:</label> | |
33 | </div> |
|
33 | </div> | |
34 | <div class="textarea editor"> |
|
34 | <div class="textarea editor"> | |
35 | ${h.textarea('repo_description')} |
|
35 | ${h.textarea('repo_description')} | |
36 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> |
|
36 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> | |
37 | </div> |
|
37 | </div> | |
38 | </div> |
|
38 | </div> | |
39 | <div class="field"> |
|
39 | <div class="field"> | |
40 | <div class="label"> |
|
40 | <div class="label"> | |
41 | <label for="repo_group">${_('Repository Group')}:</label> |
|
41 | <label for="repo_group">${_('Repository Group')}:</label> | |
42 | </div> |
|
42 | </div> | |
43 | <div class="select"> |
|
43 | <div class="select"> | |
44 | ${h.select('repo_group',request.GET.get('parent_group'),c.repo_groups,class_="medium")} |
|
44 | ${h.select('repo_group',request.GET.get('parent_group'),c.repo_groups,class_="medium")} | |
45 | %if c.personal_repo_group: |
|
45 | % if c.personal_repo_group: | |
46 |
<a |
|
46 | <a class="btn" href="#" id="select_my_group" data-personal-group-id="${c.personal_repo_group.group_id}"> | |
|
47 | ${_('Select my personal group (%(repo_group_name)s)') % {'repo_group_name': c.personal_repo_group.group_name}} | |||
|
48 | </a> | |||
47 | %endif |
|
49 | % endif | |
48 | <span class="help-block">${_('Optionally select a group to put this repository into.')}</span> |
|
50 | <span class="help-block">${_('Optionally select a group to put this repository into.')}</span> | |
49 | </div> |
|
51 | </div> | |
50 | </div> |
|
52 | </div> | |
51 | <div id="copy_perms" class="field"> |
|
53 | <div id="copy_perms" class="field"> | |
52 | <div class="label label-checkbox"> |
|
54 | <div class="label label-checkbox"> | |
53 | <label for="repo_copy_permissions">${_('Copy Parent Group Permissions')}:</label> |
|
55 | <label for="repo_copy_permissions">${_('Copy Parent Group Permissions')}:</label> | |
54 | </div> |
|
56 | </div> | |
55 | <div class="checkboxes"> |
|
57 | <div class="checkboxes"> | |
56 | ${h.checkbox('repo_copy_permissions', value="True", checked="checked")} |
|
58 | ${h.checkbox('repo_copy_permissions', value="True", checked="checked")} | |
57 | <span class="help-block">${_('Copy permission set from the parent repository group.')}</span> |
|
59 | <span class="help-block">${_('Copy permission set from the parent repository group.')}</span> | |
58 | </div> |
|
60 | </div> | |
59 | </div> |
|
61 | </div> | |
60 | <div class="field"> |
|
62 | <div class="field"> | |
61 | <div class="label"> |
|
63 | <div class="label"> | |
62 | <label for="repo_type">${_('Type')}:</label> |
|
64 | <label for="repo_type">${_('Type')}:</label> | |
63 | </div> |
|
65 | </div> | |
64 | <div class="select"> |
|
66 | <div class="select"> | |
65 | ${h.select('repo_type','hg',c.backends)} |
|
67 | ${h.select('repo_type','hg',c.backends)} | |
66 | <span class="help-block">${_('Set the type of repository to create.')}</span> |
|
68 | <span class="help-block">${_('Set the type of repository to create.')}</span> | |
67 | </div> |
|
69 | </div> | |
68 | </div> |
|
70 | </div> | |
69 | <div class="field"> |
|
71 | <div class="field"> | |
70 | <div class="label"> |
|
72 | <div class="label"> | |
71 | <label for="repo_landing_rev">${_('Landing commit')}:</label> |
|
73 | <label for="repo_landing_rev">${_('Landing commit')}:</label> | |
72 | </div> |
|
74 | </div> | |
73 | <div class="select"> |
|
75 | <div class="select"> | |
74 | ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")} |
|
76 | ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")} | |
75 | <span class="help-block">${_('The default commit for file pages, downloads, full text search index, and README generation.')}</span> |
|
77 | <span class="help-block">${_('The default commit for file pages, downloads, full text search index, and README generation.')}</span> | |
76 | </div> |
|
78 | </div> | |
77 | </div> |
|
79 | </div> | |
78 | <div class="field"> |
|
80 | <div class="field"> | |
79 | <div class="label label-checkbox"> |
|
81 | <div class="label label-checkbox"> | |
80 | <label for="repo_private">${_('Private Repository')}:</label> |
|
82 | <label for="repo_private">${_('Private Repository')}:</label> | |
81 | </div> |
|
83 | </div> | |
82 | <div class="checkboxes"> |
|
84 | <div class="checkboxes"> | |
83 | ${h.checkbox('repo_private',value="True")} |
|
85 | ${h.checkbox('repo_private',value="True")} | |
84 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> |
|
86 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> | |
85 | </div> |
|
87 | </div> | |
86 | </div> |
|
88 | </div> | |
87 | <div class="buttons"> |
|
89 | <div class="buttons"> | |
88 | ${h.submit('save',_('Save'),class_="btn")} |
|
90 | ${h.submit('save',_('Save'),class_="btn")} | |
89 | </div> |
|
91 | </div> | |
90 | </div> |
|
92 | </div> | |
91 | </div> |
|
93 | </div> | |
92 | <script> |
|
94 | <script> | |
93 | $(document).ready(function(){ |
|
95 | $(document).ready(function(){ | |
94 | var setCopyPermsOption = function(group_val){ |
|
96 | var setCopyPermsOption = function(group_val){ | |
95 | if(group_val != "-1"){ |
|
97 | if(group_val != "-1"){ | |
96 | $('#copy_perms').show() |
|
98 | $('#copy_perms').show() | |
97 | } |
|
99 | } | |
98 | else{ |
|
100 | else{ | |
99 | $('#copy_perms').hide(); |
|
101 | $('#copy_perms').hide(); | |
100 | } |
|
102 | } | |
101 | }; |
|
103 | }; | |
102 |
|
104 | |||
103 | $('#remote_clone_toggle').on('click', function(e){ |
|
105 | $('#remote_clone_toggle').on('click', function(e){ | |
104 | $('#remote_clone').show(); |
|
106 | $('#remote_clone').show(); | |
105 | e.preventDefault(); |
|
107 | e.preventDefault(); | |
106 | }); |
|
108 | }); | |
107 |
|
109 | |||
108 | if($('#remote_clone input').hasClass('error')){ |
|
110 | if($('#remote_clone input').hasClass('error')){ | |
109 | $('#remote_clone').show(); |
|
111 | $('#remote_clone').show(); | |
110 | } |
|
112 | } | |
111 | if($('#remote_clone input').val()){ |
|
113 | if($('#remote_clone input').val()){ | |
112 | $('#remote_clone').show(); |
|
114 | $('#remote_clone').show(); | |
113 | } |
|
115 | } | |
114 |
|
116 | |||
115 | $("#repo_group").select2({ |
|
117 | $("#repo_group").select2({ | |
116 | 'containerCssClass': "drop-menu", |
|
118 | 'containerCssClass': "drop-menu", | |
117 | 'dropdownCssClass': "drop-menu-dropdown", |
|
119 | 'dropdownCssClass': "drop-menu-dropdown", | |
118 | 'dropdownAutoWidth': true, |
|
120 | 'dropdownAutoWidth': true, | |
119 | 'width': "resolve" |
|
121 | 'width': "resolve" | |
120 | }); |
|
122 | }); | |
121 |
|
123 | |||
122 | setCopyPermsOption($('#repo_group').val()); |
|
124 | setCopyPermsOption($('#repo_group').val()); | |
123 | $("#repo_group").on("change", function(e) { |
|
125 | $("#repo_group").on("change", function(e) { | |
124 | setCopyPermsOption(e.val) |
|
126 | setCopyPermsOption(e.val) | |
125 | }); |
|
127 | }); | |
126 |
|
128 | |||
127 | $("#repo_type").select2({ |
|
129 | $("#repo_type").select2({ | |
128 | 'containerCssClass': "drop-menu", |
|
130 | 'containerCssClass': "drop-menu", | |
129 | 'dropdownCssClass': "drop-menu-dropdown", |
|
131 | 'dropdownCssClass': "drop-menu-dropdown", | |
130 | 'minimumResultsForSearch': -1, |
|
132 | 'minimumResultsForSearch': -1, | |
131 | }); |
|
133 | }); | |
132 | $("#repo_landing_rev").select2({ |
|
134 | $("#repo_landing_rev").select2({ | |
133 | 'containerCssClass': "drop-menu", |
|
135 | 'containerCssClass': "drop-menu", | |
134 | 'dropdownCssClass': "drop-menu-dropdown", |
|
136 | 'dropdownCssClass': "drop-menu-dropdown", | |
135 | 'minimumResultsForSearch': -1, |
|
137 | 'minimumResultsForSearch': -1, | |
136 | }); |
|
138 | }); | |
137 | $('#repo_name').focus(); |
|
139 | $('#repo_name').focus(); | |
138 |
|
140 | |||
139 | $('#select_my_group').on('click', function(e){ |
|
141 | $('#select_my_group').on('click', function(e){ | |
140 | e.preventDefault(); |
|
142 | e.preventDefault(); | |
141 | $("#repo_group").val($(this).data('personalGroupId')).trigger("change"); |
|
143 | $("#repo_group").val($(this).data('personalGroupId')).trigger("change"); | |
142 | }) |
|
144 | }) | |
143 |
|
145 | |||
144 | }) |
|
146 | }) | |
145 | </script> |
|
147 | </script> | |
146 | ${h.end_form()} |
|
148 | ${h.end_form()} |
@@ -1,238 +1,240 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%namespace name="base" file="/base/base.html"/> |
|
2 | <%namespace name="base" file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <div class="panel panel-default"> |
|
4 | <div class="panel panel-default"> | |
5 | <div class="panel-heading"> |
|
5 | <div class="panel-heading"> | |
6 | <h3 class="panel-title">${_('Settings for Repository: %s') % c.repo_info.repo_name}</h3> |
|
6 | <h3 class="panel-title">${_('Settings for Repository: %s') % c.repo_info.repo_name}</h3> | |
7 | </div> |
|
7 | </div> | |
8 | <div class="panel-body"> |
|
8 | <div class="panel-body"> | |
9 | ${h.secure_form(url('repo', repo_name=c.repo_info.repo_name),method='put')} |
|
9 | ${h.secure_form(url('repo', repo_name=c.repo_info.repo_name),method='put')} | |
10 | <div class="form"> |
|
10 | <div class="form"> | |
11 | <!-- fields --> |
|
11 | <!-- fields --> | |
12 | <div class="fields"> |
|
12 | <div class="fields"> | |
13 | <div class="field"> |
|
13 | <div class="field"> | |
14 | <div class="label"> |
|
14 | <div class="label"> | |
15 | <label for="repo_name">${_('Name')}:</label> |
|
15 | <label for="repo_name">${_('Name')}:</label> | |
16 | </div> |
|
16 | </div> | |
17 | <div class="input"> |
|
17 | <div class="input"> | |
18 | ${h.text('repo_name',class_="medium")} |
|
18 | ${h.text('repo_name',class_="medium")} | |
19 | <p class="help-block">${_('Non-changeable id')}: `_${c.repo_info.repo_id}` <span><a id="show_more_clone_id" href="#">${_('what is that ?')}</a></span></p> |
|
19 | <p class="help-block">${_('Non-changeable id')}: `_${c.repo_info.repo_id}` <span><a id="show_more_clone_id" href="#">${_('what is that ?')}</a></span></p> | |
20 | <p id="clone_id" style="display:none;"> |
|
20 | <p id="clone_id" style="display:none;"> | |
21 | ${_('URL by id')}: `${c.repo_info.clone_url(with_id=True)}` </br> |
|
21 | ${_('URL by id')}: `${c.repo_info.clone_url(with_id=True)}` </br> | |
22 | ${_('''In case this repository is renamed or moved into another group the repository url changes. |
|
22 | ${_('''In case this repository is renamed or moved into another group the repository url changes. | |
23 | Using above url guarantees that this repository will always be accessible under such url. |
|
23 | Using above url guarantees that this repository will always be accessible under such url. | |
24 | Useful for CI systems, or any other cases that you need to hardcode the url into 3rd party service.''')}</p> |
|
24 | Useful for CI systems, or any other cases that you need to hardcode the url into 3rd party service.''')}</p> | |
25 | </div> |
|
25 | </div> | |
26 | </div> |
|
26 | </div> | |
27 | % if c.repo_info.repo_type != 'svn': |
|
27 | % if c.repo_info.repo_type != 'svn': | |
28 | <div class="field"> |
|
28 | <div class="field"> | |
29 | <div class="label"> |
|
29 | <div class="label"> | |
30 | <label for="clone_uri">${_('Remote uri')}:</label> |
|
30 | <label for="clone_uri">${_('Remote uri')}:</label> | |
31 | </div> |
|
31 | </div> | |
32 | <div class="input"> |
|
32 | <div class="input"> | |
33 | %if c.repo_info.clone_uri: |
|
33 | %if c.repo_info.clone_uri: | |
34 | <div id="clone_uri_hidden" class='text-as-placeholder'> |
|
34 | <div id="clone_uri_hidden" class='text-as-placeholder'> | |
35 | <span id="clone_uri_hidden_value">${c.repo_info.clone_uri_hidden}</span> |
|
35 | <span id="clone_uri_hidden_value">${c.repo_info.clone_uri_hidden}</span> | |
36 | <span class="link" id="edit_clone_uri"><i class="icon-edit"></i>${_('edit')}</span> |
|
36 | <span class="link" id="edit_clone_uri"><i class="icon-edit"></i>${_('edit')}</span> | |
37 | </div> |
|
37 | </div> | |
38 | <div id="alter_clone_uri" style="display: none"> |
|
38 | <div id="alter_clone_uri" style="display: none"> | |
39 | ${h.text('clone_uri',class_="medium", placeholder=_('new value, leave empty to remove'))} |
|
39 | ${h.text('clone_uri',class_="medium", placeholder=_('new value, leave empty to remove'))} | |
40 | ${h.hidden('clone_uri_change', 'OLD')} |
|
40 | ${h.hidden('clone_uri_change', 'OLD')} | |
41 | <span class="link" id="cancel_edit_clone_uri">${_('cancel')}</span> |
|
41 | <span class="link" id="cancel_edit_clone_uri">${_('cancel')}</span> | |
42 | </div> |
|
42 | </div> | |
43 | %else: |
|
43 | %else: | |
44 | ## not set yet, display form to set it |
|
44 | ## not set yet, display form to set it | |
45 | ${h.text('clone_uri',class_="medium")} |
|
45 | ${h.text('clone_uri',class_="medium")} | |
46 | ${h.hidden('clone_uri_change', 'NEW')} |
|
46 | ${h.hidden('clone_uri_change', 'NEW')} | |
47 | %endif |
|
47 | %endif | |
48 | <p id="alter_clone_uri_help_block" class="help-block">${_('http[s] url where from repository was imported, also used for doing remote pulls.')}</p> |
|
48 | <p id="alter_clone_uri_help_block" class="help-block">${_('http[s] url where from repository was imported, also used for doing remote pulls.')}</p> | |
49 | </div> |
|
49 | </div> | |
50 | </div> |
|
50 | </div> | |
51 | % else: |
|
51 | % else: | |
52 | ${h.hidden('clone_uri', '')} |
|
52 | ${h.hidden('clone_uri', '')} | |
53 | % endif |
|
53 | % endif | |
54 | <div class="field"> |
|
54 | <div class="field"> | |
55 | <div class="label"> |
|
55 | <div class="label"> | |
56 | <label for="repo_group">${_('Repository group')}:</label> |
|
56 | <label for="repo_group">${_('Repository group')}:</label> | |
57 | </div> |
|
57 | </div> | |
58 | <div class="select"> |
|
58 | <div class="select"> | |
59 | ${h.select('repo_group','',c.repo_groups,class_="medium")} |
|
59 | ${h.select('repo_group','',c.repo_groups,class_="medium")} | |
60 |
|
|
60 | % if c.personal_repo_group: | |
61 |
<a |
|
61 | <a class="btn" href="#" id="select_my_group" data-personal-group-id="${c.personal_repo_group.group_id}"> | |
|
62 | ${_('Select my personal group (%(repo_group_name)s)') % {'repo_group_name': c.personal_repo_group.group_name}} | |||
|
63 | </a> | |||
62 |
|
|
64 | % endif | |
63 | <p class="help-block">${_('Optional select a group to put this repository into.')}</p> |
|
65 | <p class="help-block">${_('Optional select a group to put this repository into.')}</p> | |
64 | </div> |
|
66 | </div> | |
65 | </div> |
|
67 | </div> | |
66 | <div class="field"> |
|
68 | <div class="field"> | |
67 | <div class="label"> |
|
69 | <div class="label"> | |
68 | <label for="repo_landing_rev">${_('Landing commit')}:</label> |
|
70 | <label for="repo_landing_rev">${_('Landing commit')}:</label> | |
69 | </div> |
|
71 | </div> | |
70 | <div class="select"> |
|
72 | <div class="select"> | |
71 | ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")} |
|
73 | ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")} | |
72 | <p class="help-block">${_('Default commit for files page, downloads, whoosh and readme')}</p> |
|
74 | <p class="help-block">${_('Default commit for files page, downloads, whoosh and readme')}</p> | |
73 | </div> |
|
75 | </div> | |
74 | </div> |
|
76 | </div> | |
75 |
|
77 | |||
76 | <div class="field badged-field"> |
|
78 | <div class="field badged-field"> | |
77 | <div class="label"> |
|
79 | <div class="label"> | |
78 | <label for="user">${_('Owner')}:</label> |
|
80 | <label for="user">${_('Owner')}:</label> | |
79 | </div> |
|
81 | </div> | |
80 | <div class="input"> |
|
82 | <div class="input"> | |
81 | <div class="badge-input-container"> |
|
83 | <div class="badge-input-container"> | |
82 | <div class="user-badge"> |
|
84 | <div class="user-badge"> | |
83 | ${base.gravatar_with_user(c.repo_info.user.email, show_disabled=not c.repo_info.user.active)} |
|
85 | ${base.gravatar_with_user(c.repo_info.user.email, show_disabled=not c.repo_info.user.active)} | |
84 | </div> |
|
86 | </div> | |
85 | <div class="badge-input-wrap"> |
|
87 | <div class="badge-input-wrap"> | |
86 | ${h.text('user', class_="medium", autocomplete="off")} |
|
88 | ${h.text('user', class_="medium", autocomplete="off")} | |
87 | </div> |
|
89 | </div> | |
88 | </div> |
|
90 | </div> | |
89 | <form:error name="user"/> |
|
91 | <form:error name="user"/> | |
90 | <p class="help-block">${_('Change owner of this repository.')}</p> |
|
92 | <p class="help-block">${_('Change owner of this repository.')}</p> | |
91 | </div> |
|
93 | </div> | |
92 | </div> |
|
94 | </div> | |
93 |
|
95 | |||
94 | <div class="field"> |
|
96 | <div class="field"> | |
95 | <div class="label label-textarea"> |
|
97 | <div class="label label-textarea"> | |
96 | <label for="repo_description">${_('Description')}:</label> |
|
98 | <label for="repo_description">${_('Description')}:</label> | |
97 | </div> |
|
99 | </div> | |
98 | <div class="textarea text-area editor"> |
|
100 | <div class="textarea text-area editor"> | |
99 | ${h.textarea('repo_description', )} |
|
101 | ${h.textarea('repo_description', )} | |
100 | <p class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</p> |
|
102 | <p class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</p> | |
101 | </div> |
|
103 | </div> | |
102 | </div> |
|
104 | </div> | |
103 |
|
105 | |||
104 | <div class="field"> |
|
106 | <div class="field"> | |
105 | <div class="label label-checkbox"> |
|
107 | <div class="label label-checkbox"> | |
106 | <label for="repo_private">${_('Private repository')}:</label> |
|
108 | <label for="repo_private">${_('Private repository')}:</label> | |
107 | </div> |
|
109 | </div> | |
108 | <div class="checkboxes"> |
|
110 | <div class="checkboxes"> | |
109 | ${h.checkbox('repo_private',value="True")} |
|
111 | ${h.checkbox('repo_private',value="True")} | |
110 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> |
|
112 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> | |
111 | </div> |
|
113 | </div> | |
112 | </div> |
|
114 | </div> | |
113 | <div class="field"> |
|
115 | <div class="field"> | |
114 | <div class="label label-checkbox"> |
|
116 | <div class="label label-checkbox"> | |
115 | <label for="repo_enable_statistics">${_('Enable statistics')}:</label> |
|
117 | <label for="repo_enable_statistics">${_('Enable statistics')}:</label> | |
116 | </div> |
|
118 | </div> | |
117 | <div class="checkboxes"> |
|
119 | <div class="checkboxes"> | |
118 | ${h.checkbox('repo_enable_statistics',value="True")} |
|
120 | ${h.checkbox('repo_enable_statistics',value="True")} | |
119 | <span class="help-block">${_('Enable statistics window on summary page.')}</span> |
|
121 | <span class="help-block">${_('Enable statistics window on summary page.')}</span> | |
120 | </div> |
|
122 | </div> | |
121 | </div> |
|
123 | </div> | |
122 | <div class="field"> |
|
124 | <div class="field"> | |
123 | <div class="label label-checkbox"> |
|
125 | <div class="label label-checkbox"> | |
124 | <label for="repo_enable_downloads">${_('Enable downloads')}:</label> |
|
126 | <label for="repo_enable_downloads">${_('Enable downloads')}:</label> | |
125 | </div> |
|
127 | </div> | |
126 | <div class="checkboxes"> |
|
128 | <div class="checkboxes"> | |
127 | ${h.checkbox('repo_enable_downloads',value="True")} |
|
129 | ${h.checkbox('repo_enable_downloads',value="True")} | |
128 | <span class="help-block">${_('Enable download menu on summary page.')}</span> |
|
130 | <span class="help-block">${_('Enable download menu on summary page.')}</span> | |
129 | </div> |
|
131 | </div> | |
130 | </div> |
|
132 | </div> | |
131 | <div class="field"> |
|
133 | <div class="field"> | |
132 | <div class="label label-checkbox"> |
|
134 | <div class="label label-checkbox"> | |
133 | <label for="repo_enable_locking">${_('Enable automatic locking')}:</label> |
|
135 | <label for="repo_enable_locking">${_('Enable automatic locking')}:</label> | |
134 | </div> |
|
136 | </div> | |
135 | <div class="checkboxes"> |
|
137 | <div class="checkboxes"> | |
136 | ${h.checkbox('repo_enable_locking',value="True")} |
|
138 | ${h.checkbox('repo_enable_locking',value="True")} | |
137 | <span class="help-block">${_('Enable automatic locking on repository. Pulling from this repository creates a lock that can be released by pushing back by the same user')}</span> |
|
139 | <span class="help-block">${_('Enable automatic locking on repository. Pulling from this repository creates a lock that can be released by pushing back by the same user')}</span> | |
138 | </div> |
|
140 | </div> | |
139 | </div> |
|
141 | </div> | |
140 |
|
142 | |||
141 | %if c.visual.repository_fields: |
|
143 | %if c.visual.repository_fields: | |
142 | ## EXTRA FIELDS |
|
144 | ## EXTRA FIELDS | |
143 | %for field in c.repo_fields: |
|
145 | %for field in c.repo_fields: | |
144 | <div class="field"> |
|
146 | <div class="field"> | |
145 | <div class="label"> |
|
147 | <div class="label"> | |
146 | <label for="${field.field_key_prefixed}">${field.field_label} (${field.field_key}):</label> |
|
148 | <label for="${field.field_key_prefixed}">${field.field_label} (${field.field_key}):</label> | |
147 | </div> |
|
149 | </div> | |
148 | <div class="input input-medium"> |
|
150 | <div class="input input-medium"> | |
149 | ${h.text(field.field_key_prefixed, field.field_value, class_='medium')} |
|
151 | ${h.text(field.field_key_prefixed, field.field_value, class_='medium')} | |
150 | %if field.field_desc: |
|
152 | %if field.field_desc: | |
151 | <span class="help-block">${field.field_desc}</span> |
|
153 | <span class="help-block">${field.field_desc}</span> | |
152 | %endif |
|
154 | %endif | |
153 | </div> |
|
155 | </div> | |
154 | </div> |
|
156 | </div> | |
155 | %endfor |
|
157 | %endfor | |
156 | %endif |
|
158 | %endif | |
157 | <div class="buttons"> |
|
159 | <div class="buttons"> | |
158 | ${h.submit('save',_('Save'),class_="btn")} |
|
160 | ${h.submit('save',_('Save'),class_="btn")} | |
159 | ${h.reset('reset',_('Reset'),class_="btn")} |
|
161 | ${h.reset('reset',_('Reset'),class_="btn")} | |
160 | </div> |
|
162 | </div> | |
161 | </div> |
|
163 | </div> | |
162 | </div> |
|
164 | </div> | |
163 | ${h.end_form()} |
|
165 | ${h.end_form()} | |
164 | </div> |
|
166 | </div> | |
165 | </div> |
|
167 | </div> | |
166 |
|
168 | |||
167 | <script> |
|
169 | <script> | |
168 | $(document).ready(function(){ |
|
170 | $(document).ready(function(){ | |
169 | var select2Options = { |
|
171 | var select2Options = { | |
170 | 'containerCssClass': "drop-menu", |
|
172 | 'containerCssClass': "drop-menu", | |
171 | 'dropdownCssClass': "drop-menu-dropdown", |
|
173 | 'dropdownCssClass': "drop-menu-dropdown", | |
172 | 'dropdownAutoWidth': true |
|
174 | 'dropdownAutoWidth': true | |
173 | }; |
|
175 | }; | |
174 |
|
176 | |||
175 | var cloneUrl = function() { |
|
177 | var cloneUrl = function() { | |
176 | var alterButton = $('#alter_clone_uri'); |
|
178 | var alterButton = $('#alter_clone_uri'); | |
177 | var editButton = $('#edit_clone_uri'); |
|
179 | var editButton = $('#edit_clone_uri'); | |
178 | var cancelEditButton = $('#cancel_edit_clone_uri'); |
|
180 | var cancelEditButton = $('#cancel_edit_clone_uri'); | |
179 | var hiddenUrl = $('#clone_uri_hidden'); |
|
181 | var hiddenUrl = $('#clone_uri_hidden'); | |
180 | var hiddenUrlValue = $('#clone_uri_hidden_value'); |
|
182 | var hiddenUrlValue = $('#clone_uri_hidden_value'); | |
181 | var input = $('#clone_uri'); |
|
183 | var input = $('#clone_uri'); | |
182 | var helpBlock = $('#alter_clone_uri_help_block'); |
|
184 | var helpBlock = $('#alter_clone_uri_help_block'); | |
183 | var changedFlag = $('#clone_uri_change'); |
|
185 | var changedFlag = $('#clone_uri_change'); | |
184 | var originalText = helpBlock.html(); |
|
186 | var originalText = helpBlock.html(); | |
185 | var obfuscatedUrl = hiddenUrlValue.html(); |
|
187 | var obfuscatedUrl = hiddenUrlValue.html(); | |
186 |
|
188 | |||
187 | var edit = function(e) { |
|
189 | var edit = function(e) { | |
188 | alterButton.show(); |
|
190 | alterButton.show(); | |
189 | editButton.hide(); |
|
191 | editButton.hide(); | |
190 | hiddenUrl.hide(); |
|
192 | hiddenUrl.hide(); | |
191 |
|
193 | |||
192 | //add the old value next to input for verification |
|
194 | //add the old value next to input for verification | |
193 | helpBlock.html("(" + obfuscatedUrl + ")" + "<br\>" + originalText); |
|
195 | helpBlock.html("(" + obfuscatedUrl + ")" + "<br\>" + originalText); | |
194 | changedFlag.val('MOD'); |
|
196 | changedFlag.val('MOD'); | |
195 | }; |
|
197 | }; | |
196 |
|
198 | |||
197 | var cancelEdit = function(e) { |
|
199 | var cancelEdit = function(e) { | |
198 | alterButton.hide(); |
|
200 | alterButton.hide(); | |
199 | editButton.show(); |
|
201 | editButton.show(); | |
200 | hiddenUrl.show(); |
|
202 | hiddenUrl.show(); | |
201 |
|
203 | |||
202 | helpBlock.html(originalText); |
|
204 | helpBlock.html(originalText); | |
203 | changedFlag.val('OLD'); |
|
205 | changedFlag.val('OLD'); | |
204 | input.val(''); |
|
206 | input.val(''); | |
205 | }; |
|
207 | }; | |
206 |
|
208 | |||
207 | var initEvents = function() { |
|
209 | var initEvents = function() { | |
208 | editButton.on('click', edit); |
|
210 | editButton.on('click', edit); | |
209 | cancelEditButton.on('click', cancelEdit); |
|
211 | cancelEditButton.on('click', cancelEdit); | |
210 | }; |
|
212 | }; | |
211 |
|
213 | |||
212 | var setInitialState = function() { |
|
214 | var setInitialState = function() { | |
213 | if (input.hasClass('error')) { |
|
215 | if (input.hasClass('error')) { | |
214 | alterButton.show(); |
|
216 | alterButton.show(); | |
215 | editButton.hide(); |
|
217 | editButton.hide(); | |
216 | hiddenUrl.hide(); |
|
218 | hiddenUrl.hide(); | |
217 | } |
|
219 | } | |
218 | }; |
|
220 | }; | |
219 |
|
221 | |||
220 | setInitialState(); |
|
222 | setInitialState(); | |
221 | initEvents(); |
|
223 | initEvents(); | |
222 | }(); |
|
224 | }(); | |
223 |
|
225 | |||
224 | $('#show_more_clone_id').on('click', function(e){ |
|
226 | $('#show_more_clone_id').on('click', function(e){ | |
225 | $('#clone_id').show(); |
|
227 | $('#clone_id').show(); | |
226 | e.preventDefault(); |
|
228 | e.preventDefault(); | |
227 | }); |
|
229 | }); | |
228 |
|
230 | |||
229 | $('#repo_landing_rev').select2(select2Options); |
|
231 | $('#repo_landing_rev').select2(select2Options); | |
230 | $('#repo_group').select2(select2Options); |
|
232 | $('#repo_group').select2(select2Options); | |
231 |
|
233 | |||
232 | UsersAutoComplete('user', '${c.rhodecode_user.user_id}'); |
|
234 | UsersAutoComplete('user', '${c.rhodecode_user.user_id}'); | |
233 | $('#select_my_group').on('click', function(e){ |
|
235 | $('#select_my_group').on('click', function(e){ | |
234 | e.preventDefault(); |
|
236 | e.preventDefault(); | |
235 | $("#repo_group").val($(this).data('personalGroupId')).trigger("change"); |
|
237 | $("#repo_group").val($(this).data('personalGroupId')).trigger("change"); | |
236 | }); |
|
238 | }); | |
237 | }); |
|
239 | }); | |
238 | </script> |
|
240 | </script> |
@@ -1,127 +1,129 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="/base/base.html"/> |
|
2 | <%inherit file="/base/base.html"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('Fork repository %s') % c.repo_name} |
|
5 | ${_('Fork repository %s') % c.repo_name} | |
6 | %if c.rhodecode_name: |
|
6 | %if c.rhodecode_name: | |
7 | · ${h.branding(c.rhodecode_name)} |
|
7 | · ${h.branding(c.rhodecode_name)} | |
8 | %endif |
|
8 | %endif | |
9 | </%def> |
|
9 | </%def> | |
10 |
|
10 | |||
11 | <%def name="breadcrumbs_links()"> |
|
11 | <%def name="breadcrumbs_links()"> | |
12 | ${_('New Fork')} |
|
12 | ${_('New Fork')} | |
13 | </%def> |
|
13 | </%def> | |
14 |
|
14 | |||
15 | <%def name="menu_bar_nav()"> |
|
15 | <%def name="menu_bar_nav()"> | |
16 | ${self.menu_items(active='repositories')} |
|
16 | ${self.menu_items(active='repositories')} | |
17 | </%def> |
|
17 | </%def> | |
18 |
|
18 | |||
19 | <%def name="menu_bar_subnav()"> |
|
19 | <%def name="menu_bar_subnav()"> | |
20 | ${self.repo_menu(active='options')} |
|
20 | ${self.repo_menu(active='options')} | |
21 | </%def> |
|
21 | </%def> | |
22 |
|
22 | |||
23 | <%def name="main()"> |
|
23 | <%def name="main()"> | |
24 | <div class="box"> |
|
24 | <div class="box"> | |
25 | <div class="title"> |
|
25 | <div class="title"> | |
26 | ${self.repo_page_title(c.rhodecode_db_repo)} |
|
26 | ${self.repo_page_title(c.rhodecode_db_repo)} | |
27 | ${self.breadcrumbs()} |
|
27 | ${self.breadcrumbs()} | |
28 | </div> |
|
28 | </div> | |
29 |
|
29 | |||
30 | ${h.secure_form(url('repo_fork_create_home',repo_name=c.repo_info.repo_name))} |
|
30 | ${h.secure_form(url('repo_fork_create_home',repo_name=c.repo_info.repo_name))} | |
31 | <div class="form"> |
|
31 | <div class="form"> | |
32 | <!-- fields --> |
|
32 | <!-- fields --> | |
33 | <div class="fields"> |
|
33 | <div class="fields"> | |
34 |
|
34 | |||
35 | <div class="field"> |
|
35 | <div class="field"> | |
36 | <div class="label"> |
|
36 | <div class="label"> | |
37 | <label for="repo_name">${_('Fork name')}:</label> |
|
37 | <label for="repo_name">${_('Fork name')}:</label> | |
38 | </div> |
|
38 | </div> | |
39 | <div class="input"> |
|
39 | <div class="input"> | |
40 | ${h.text('repo_name', class_="medium")} |
|
40 | ${h.text('repo_name', class_="medium")} | |
41 | ${h.hidden('repo_type',c.repo_info.repo_type)} |
|
41 | ${h.hidden('repo_type',c.repo_info.repo_type)} | |
42 | ${h.hidden('fork_parent_id',c.repo_info.repo_id)} |
|
42 | ${h.hidden('fork_parent_id',c.repo_info.repo_id)} | |
43 | </div> |
|
43 | </div> | |
44 | </div> |
|
44 | </div> | |
45 |
|
45 | |||
46 | <div class="field"> |
|
46 | <div class="field"> | |
47 | <div class="label label-textarea"> |
|
47 | <div class="label label-textarea"> | |
48 | <label for="description">${_('Description')}:</label> |
|
48 | <label for="description">${_('Description')}:</label> | |
49 | </div> |
|
49 | </div> | |
50 | <div class="textarea-repo textarea text-area editor"> |
|
50 | <div class="textarea-repo textarea text-area editor"> | |
51 | ${h.textarea('description')} |
|
51 | ${h.textarea('description')} | |
52 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> |
|
52 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> | |
53 | </div> |
|
53 | </div> | |
54 | </div> |
|
54 | </div> | |
55 |
|
55 | |||
56 | <div class="field"> |
|
56 | <div class="field"> | |
57 | <div class="label"> |
|
57 | <div class="label"> | |
58 | <label for="repo_group">${_('Repository group')}:</label> |
|
58 | <label for="repo_group">${_('Repository group')}:</label> | |
59 | </div> |
|
59 | </div> | |
60 | <div class="select"> |
|
60 | <div class="select"> | |
61 | ${h.select('repo_group','',c.repo_groups,class_="medium")} |
|
61 | ${h.select('repo_group','',c.repo_groups,class_="medium")} | |
62 | %if c.personal_repo_group: |
|
62 | % if c.personal_repo_group: | |
63 |
<a |
|
63 | <a class="btn" href="#" id="select_my_group" data-personal-group-id="${c.personal_repo_group.group_id}"> | |
|
64 | ${_('Select my personal group (%(repo_group_name)s)') % {'repo_group_name': c.personal_repo_group.group_name}} | |||
|
65 | </a> | |||
64 | %endif |
|
66 | % endif | |
65 | <span class="help-block">${_('Optionally select a group to put this repository into.')}</span> |
|
67 | <span class="help-block">${_('Optionally select a group to put this repository into.')}</span> | |
66 | </div> |
|
68 | </div> | |
67 | </div> |
|
69 | </div> | |
68 |
|
70 | |||
69 | <div class="field"> |
|
71 | <div class="field"> | |
70 | <div class="label"> |
|
72 | <div class="label"> | |
71 | <label for="landing_rev">${_('Landing commit')}:</label> |
|
73 | <label for="landing_rev">${_('Landing commit')}:</label> | |
72 | </div> |
|
74 | </div> | |
73 | <div class="select"> |
|
75 | <div class="select"> | |
74 | ${h.select('landing_rev','',c.landing_revs,class_="medium")} |
|
76 | ${h.select('landing_rev','',c.landing_revs,class_="medium")} | |
75 | <span class="help-block">${_('Default commit for files page, downloads, whoosh and readme')}</span> |
|
77 | <span class="help-block">${_('Default commit for files page, downloads, whoosh and readme')}</span> | |
76 | </div> |
|
78 | </div> | |
77 | </div> |
|
79 | </div> | |
78 |
|
80 | |||
79 | <div class="field"> |
|
81 | <div class="field"> | |
80 | <div class="label label-checkbox"> |
|
82 | <div class="label label-checkbox"> | |
81 | <label for="private">${_('Private')}:</label> |
|
83 | <label for="private">${_('Private')}:</label> | |
82 | </div> |
|
84 | </div> | |
83 | <div class="checkboxes"> |
|
85 | <div class="checkboxes"> | |
84 | ${h.checkbox('private',value="True")} |
|
86 | ${h.checkbox('private',value="True")} | |
85 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> |
|
87 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> | |
86 | </div> |
|
88 | </div> | |
87 | </div> |
|
89 | </div> | |
88 |
|
90 | |||
89 | <div class="field"> |
|
91 | <div class="field"> | |
90 | <div class="label label-checkbox"> |
|
92 | <div class="label label-checkbox"> | |
91 | <label for="private">${_('Copy permissions')}:</label> |
|
93 | <label for="private">${_('Copy permissions')}:</label> | |
92 | </div> |
|
94 | </div> | |
93 | <div class="checkboxes"> |
|
95 | <div class="checkboxes"> | |
94 | ${h.checkbox('copy_permissions',value="True", checked="checked")} |
|
96 | ${h.checkbox('copy_permissions',value="True", checked="checked")} | |
95 | <span class="help-block">${_('Copy permissions from forked repository')}</span> |
|
97 | <span class="help-block">${_('Copy permissions from forked repository')}</span> | |
96 | </div> |
|
98 | </div> | |
97 | </div> |
|
99 | </div> | |
98 |
|
100 | |||
99 | <div class="buttons"> |
|
101 | <div class="buttons"> | |
100 | ${h.submit('',_('Fork this Repository'),class_="btn")} |
|
102 | ${h.submit('',_('Fork this Repository'),class_="btn")} | |
101 | </div> |
|
103 | </div> | |
102 | </div> |
|
104 | </div> | |
103 | </div> |
|
105 | </div> | |
104 | ${h.end_form()} |
|
106 | ${h.end_form()} | |
105 | </div> |
|
107 | </div> | |
106 | <script> |
|
108 | <script> | |
107 | $(document).ready(function(){ |
|
109 | $(document).ready(function(){ | |
108 | $("#repo_group").select2({ |
|
110 | $("#repo_group").select2({ | |
109 | 'dropdownAutoWidth': true, |
|
111 | 'dropdownAutoWidth': true, | |
110 | 'containerCssClass': "drop-menu", |
|
112 | 'containerCssClass': "drop-menu", | |
111 | 'dropdownCssClass': "drop-menu-dropdown", |
|
113 | 'dropdownCssClass': "drop-menu-dropdown", | |
112 | 'width': "resolve" |
|
114 | 'width': "resolve" | |
113 | }); |
|
115 | }); | |
114 | $("#landing_rev").select2({ |
|
116 | $("#landing_rev").select2({ | |
115 | 'containerCssClass': "drop-menu", |
|
117 | 'containerCssClass': "drop-menu", | |
116 | 'dropdownCssClass': "drop-menu-dropdown", |
|
118 | 'dropdownCssClass': "drop-menu-dropdown", | |
117 | 'minimumResultsForSearch': -1 |
|
119 | 'minimumResultsForSearch': -1 | |
118 | }); |
|
120 | }); | |
119 | $('#repo_name').focus(); |
|
121 | $('#repo_name').focus(); | |
120 |
|
122 | |||
121 | $('#select_my_group').on('click', function(e){ |
|
123 | $('#select_my_group').on('click', function(e){ | |
122 | e.preventDefault(); |
|
124 | e.preventDefault(); | |
123 | $("#repo_group").val($(this).data('personalGroupId')).trigger("change"); |
|
125 | $("#repo_group").val($(this).data('personalGroupId')).trigger("change"); | |
124 | }) |
|
126 | }) | |
125 | }) |
|
127 | }) | |
126 | </script> |
|
128 | </script> | |
127 | </%def> |
|
129 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now