##// END OF EJS Templates
repository: added better instructions for importing repositories
marcink -
r1598:2779bacf default
parent child Browse files
Show More
@@ -1,148 +1,159 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">
28 <pre>
29 - The repository must be accessible over http:// or https://
30 - For Git projects it's recommended appending .git to the end of clone url.
31 - Make sure to select proper repository type from the below selector before importing it.
32 - If your HTTP[S] repository is not publicly accessible,
33 add authentication information to the URL: https://username:password@server.company.com/repo-name.
34 - The Git LFS/Mercurial Largefiles objects will not be imported.
35 - For very large repositories, it's recommended to manually copy them into the
36 RhodeCode <a href="${h.url('admin_settings_vcs', anchor='vcs-storage-options')}">storage location</a> and run <a href="${h.url('admin_settings_mapping')}">Remap and Rescan</a>.
37 </pre>
38 </span>
28 </div>
39 </div>
29 </div>
40 </div>
30 <div class="field">
41 <div class="field">
31 <div class="label">
42 <div class="label">
32 <label for="repo_description">${_('Description')}:</label>
43 <label for="repo_description">${_('Description')}:</label>
33 </div>
44 </div>
34 <div class="textarea editor">
45 <div class="textarea editor">
35 ${h.textarea('repo_description')}
46 ${h.textarea('repo_description')}
36 <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span>
47 <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span>
37 </div>
48 </div>
38 </div>
49 </div>
39 <div class="field">
50 <div class="field">
40 <div class="label">
51 <div class="label">
41 <label for="repo_group">${_('Repository Group')}:</label>
52 <label for="repo_group">${_('Repository Group')}:</label>
42 </div>
53 </div>
43 <div class="select">
54 <div class="select">
44 ${h.select('repo_group',request.GET.get('parent_group'),c.repo_groups,class_="medium")}
55 ${h.select('repo_group',request.GET.get('parent_group'),c.repo_groups,class_="medium")}
45 % if c.personal_repo_group:
56 % if c.personal_repo_group:
46 <a class="btn" href="#" id="select_my_group" data-personal-group-id="${c.personal_repo_group.group_id}">
57 <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}}
58 ${_('Select my personal group (%(repo_group_name)s)') % {'repo_group_name': c.personal_repo_group.group_name}}
48 </a>
59 </a>
49 % endif
60 % endif
50 <span class="help-block">${_('Optionally select a group to put this repository into.')}</span>
61 <span class="help-block">${_('Optionally select a group to put this repository into.')}</span>
51 </div>
62 </div>
52 </div>
63 </div>
53 <div id="copy_perms" class="field">
64 <div id="copy_perms" class="field">
54 <div class="label label-checkbox">
65 <div class="label label-checkbox">
55 <label for="repo_copy_permissions">${_('Copy Parent Group Permissions')}:</label>
66 <label for="repo_copy_permissions">${_('Copy Parent Group Permissions')}:</label>
56 </div>
67 </div>
57 <div class="checkboxes">
68 <div class="checkboxes">
58 ${h.checkbox('repo_copy_permissions', value="True", checked="checked")}
69 ${h.checkbox('repo_copy_permissions', value="True", checked="checked")}
59 <span class="help-block">${_('Copy permission set from the parent repository group.')}</span>
70 <span class="help-block">${_('Copy permission set from the parent repository group.')}</span>
60 </div>
71 </div>
61 </div>
72 </div>
62 <div class="field">
73 <div class="field">
63 <div class="label">
74 <div class="label">
64 <label for="repo_type">${_('Type')}:</label>
75 <label for="repo_type">${_('Type')}:</label>
65 </div>
76 </div>
66 <div class="select">
77 <div class="select">
67 ${h.select('repo_type','hg',c.backends)}
78 ${h.select('repo_type','hg',c.backends)}
68 <span class="help-block">${_('Set the type of repository to create.')}</span>
79 <span class="help-block">${_('Set the type of repository to create.')}</span>
69 </div>
80 </div>
70 </div>
81 </div>
71 <div class="field">
82 <div class="field">
72 <div class="label">
83 <div class="label">
73 <label for="repo_landing_rev">${_('Landing commit')}:</label>
84 <label for="repo_landing_rev">${_('Landing commit')}:</label>
74 </div>
85 </div>
75 <div class="select">
86 <div class="select">
76 ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")}
87 ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")}
77 <span class="help-block">${_('The default commit for file pages, downloads, full text search index, and README generation.')}</span>
88 <span class="help-block">${_('The default commit for file pages, downloads, full text search index, and README generation.')}</span>
78 </div>
89 </div>
79 </div>
90 </div>
80 <div class="field">
91 <div class="field">
81 <div class="label label-checkbox">
92 <div class="label label-checkbox">
82 <label for="repo_private">${_('Private Repository')}:</label>
93 <label for="repo_private">${_('Private Repository')}:</label>
83 </div>
94 </div>
84 <div class="checkboxes">
95 <div class="checkboxes">
85 ${h.checkbox('repo_private',value="True")}
96 ${h.checkbox('repo_private',value="True")}
86 <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span>
97 <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span>
87 </div>
98 </div>
88 </div>
99 </div>
89 <div class="buttons">
100 <div class="buttons">
90 ${h.submit('save',_('Save'),class_="btn")}
101 ${h.submit('save',_('Save'),class_="btn")}
91 </div>
102 </div>
92 </div>
103 </div>
93 </div>
104 </div>
94 <script>
105 <script>
95 $(document).ready(function(){
106 $(document).ready(function(){
96 var setCopyPermsOption = function(group_val){
107 var setCopyPermsOption = function(group_val){
97 if(group_val != "-1"){
108 if(group_val != "-1"){
98 $('#copy_perms').show()
109 $('#copy_perms').show()
99 }
110 }
100 else{
111 else{
101 $('#copy_perms').hide();
112 $('#copy_perms').hide();
102 }
113 }
103 };
114 };
104
115
105 $('#remote_clone_toggle').on('click', function(e){
116 $('#remote_clone_toggle').on('click', function(e){
106 $('#remote_clone').show();
117 $('#remote_clone').show();
107 e.preventDefault();
118 e.preventDefault();
108 });
119 });
109
120
110 if($('#remote_clone input').hasClass('error')){
121 if($('#remote_clone input').hasClass('error')){
111 $('#remote_clone').show();
122 $('#remote_clone').show();
112 }
123 }
113 if($('#remote_clone input').val()){
124 if($('#remote_clone input').val()){
114 $('#remote_clone').show();
125 $('#remote_clone').show();
115 }
126 }
116
127
117 $("#repo_group").select2({
128 $("#repo_group").select2({
118 'containerCssClass': "drop-menu",
129 'containerCssClass': "drop-menu",
119 'dropdownCssClass': "drop-menu-dropdown",
130 'dropdownCssClass': "drop-menu-dropdown",
120 'dropdownAutoWidth': true,
131 'dropdownAutoWidth': true,
121 'width': "resolve"
132 'width': "resolve"
122 });
133 });
123
134
124 setCopyPermsOption($('#repo_group').val());
135 setCopyPermsOption($('#repo_group').val());
125 $("#repo_group").on("change", function(e) {
136 $("#repo_group").on("change", function(e) {
126 setCopyPermsOption(e.val)
137 setCopyPermsOption(e.val)
127 });
138 });
128
139
129 $("#repo_type").select2({
140 $("#repo_type").select2({
130 'containerCssClass': "drop-menu",
141 'containerCssClass': "drop-menu",
131 'dropdownCssClass': "drop-menu-dropdown",
142 'dropdownCssClass': "drop-menu-dropdown",
132 'minimumResultsForSearch': -1,
143 'minimumResultsForSearch': -1,
133 });
144 });
134 $("#repo_landing_rev").select2({
145 $("#repo_landing_rev").select2({
135 'containerCssClass': "drop-menu",
146 'containerCssClass': "drop-menu",
136 'dropdownCssClass': "drop-menu-dropdown",
147 'dropdownCssClass': "drop-menu-dropdown",
137 'minimumResultsForSearch': -1,
148 'minimumResultsForSearch': -1,
138 });
149 });
139 $('#repo_name').focus();
150 $('#repo_name').focus();
140
151
141 $('#select_my_group').on('click', function(e){
152 $('#select_my_group').on('click', function(e){
142 e.preventDefault();
153 e.preventDefault();
143 $("#repo_group").val($(this).data('personalGroupId')).trigger("change");
154 $("#repo_group").val($(this).data('personalGroupId')).trigger("change");
144 })
155 })
145
156
146 })
157 })
147 </script>
158 </script>
148 ${h.end_form()}
159 ${h.end_form()}
General Comments 0
You need to be logged in to leave comments. Login now