Show More
@@ -1,148 +1,159 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | ${h.secure_form(url('repos'))} |
|
4 | 4 | <div class="form"> |
|
5 | 5 | <!-- fields --> |
|
6 | 6 | <div class="fields"> |
|
7 | 7 | <div class="field"> |
|
8 | 8 | <div class="label"> |
|
9 | 9 | <label for="repo_name">${_('Name')}:</label> |
|
10 | 10 | </div> |
|
11 | 11 | <div class="input"> |
|
12 | 12 | ${h.text('repo_name', class_="medium")} |
|
13 | 13 | <div class="info-block"> |
|
14 | 14 | <a id="remote_clone_toggle" href="#"><i class="icon-download-alt"></i> ${_('Import Existing Repository ?')}</a> |
|
15 | 15 | </div> |
|
16 | 16 | %if not c.rhodecode_user.is_admin: |
|
17 | 17 | ${h.hidden('user_created',True)} |
|
18 | 18 | %endif |
|
19 | 19 | </div> |
|
20 | 20 | </div> |
|
21 | 21 | <div id="remote_clone" class="field" style="display: none;"> |
|
22 | 22 | <div class="label"> |
|
23 | 23 | <label for="clone_uri">${_('Clone from')}:</label> |
|
24 | 24 | </div> |
|
25 | 25 | <div class="input"> |
|
26 | 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 | 39 | </div> |
|
29 | 40 | </div> |
|
30 | 41 | <div class="field"> |
|
31 | 42 | <div class="label"> |
|
32 | 43 | <label for="repo_description">${_('Description')}:</label> |
|
33 | 44 | </div> |
|
34 | 45 | <div class="textarea editor"> |
|
35 | 46 | ${h.textarea('repo_description')} |
|
36 | 47 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> |
|
37 | 48 | </div> |
|
38 | 49 | </div> |
|
39 | 50 | <div class="field"> |
|
40 | 51 | <div class="label"> |
|
41 | 52 | <label for="repo_group">${_('Repository Group')}:</label> |
|
42 | 53 | </div> |
|
43 | 54 | <div class="select"> |
|
44 | 55 | ${h.select('repo_group',request.GET.get('parent_group'),c.repo_groups,class_="medium")} |
|
45 | 56 | % if c.personal_repo_group: |
|
46 | 57 | <a class="btn" href="#" id="select_my_group" data-personal-group-id="${c.personal_repo_group.group_id}"> |
|
47 | 58 | ${_('Select my personal group (%(repo_group_name)s)') % {'repo_group_name': c.personal_repo_group.group_name}} |
|
48 | 59 | </a> |
|
49 | 60 | % endif |
|
50 | 61 | <span class="help-block">${_('Optionally select a group to put this repository into.')}</span> |
|
51 | 62 | </div> |
|
52 | 63 | </div> |
|
53 | 64 | <div id="copy_perms" class="field"> |
|
54 | 65 | <div class="label label-checkbox"> |
|
55 | 66 | <label for="repo_copy_permissions">${_('Copy Parent Group Permissions')}:</label> |
|
56 | 67 | </div> |
|
57 | 68 | <div class="checkboxes"> |
|
58 | 69 | ${h.checkbox('repo_copy_permissions', value="True", checked="checked")} |
|
59 | 70 | <span class="help-block">${_('Copy permission set from the parent repository group.')}</span> |
|
60 | 71 | </div> |
|
61 | 72 | </div> |
|
62 | 73 | <div class="field"> |
|
63 | 74 | <div class="label"> |
|
64 | 75 | <label for="repo_type">${_('Type')}:</label> |
|
65 | 76 | </div> |
|
66 | 77 | <div class="select"> |
|
67 | 78 | ${h.select('repo_type','hg',c.backends)} |
|
68 | 79 | <span class="help-block">${_('Set the type of repository to create.')}</span> |
|
69 | 80 | </div> |
|
70 | 81 | </div> |
|
71 | 82 | <div class="field"> |
|
72 | 83 | <div class="label"> |
|
73 | 84 | <label for="repo_landing_rev">${_('Landing commit')}:</label> |
|
74 | 85 | </div> |
|
75 | 86 | <div class="select"> |
|
76 | 87 | ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")} |
|
77 | 88 | <span class="help-block">${_('The default commit for file pages, downloads, full text search index, and README generation.')}</span> |
|
78 | 89 | </div> |
|
79 | 90 | </div> |
|
80 | 91 | <div class="field"> |
|
81 | 92 | <div class="label label-checkbox"> |
|
82 | 93 | <label for="repo_private">${_('Private Repository')}:</label> |
|
83 | 94 | </div> |
|
84 | 95 | <div class="checkboxes"> |
|
85 | 96 | ${h.checkbox('repo_private',value="True")} |
|
86 | 97 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> |
|
87 | 98 | </div> |
|
88 | 99 | </div> |
|
89 | 100 | <div class="buttons"> |
|
90 | 101 | ${h.submit('save',_('Save'),class_="btn")} |
|
91 | 102 | </div> |
|
92 | 103 | </div> |
|
93 | 104 | </div> |
|
94 | 105 | <script> |
|
95 | 106 | $(document).ready(function(){ |
|
96 | 107 | var setCopyPermsOption = function(group_val){ |
|
97 | 108 | if(group_val != "-1"){ |
|
98 | 109 | $('#copy_perms').show() |
|
99 | 110 | } |
|
100 | 111 | else{ |
|
101 | 112 | $('#copy_perms').hide(); |
|
102 | 113 | } |
|
103 | 114 | }; |
|
104 | 115 | |
|
105 | 116 | $('#remote_clone_toggle').on('click', function(e){ |
|
106 | 117 | $('#remote_clone').show(); |
|
107 | 118 | e.preventDefault(); |
|
108 | 119 | }); |
|
109 | 120 | |
|
110 | 121 | if($('#remote_clone input').hasClass('error')){ |
|
111 | 122 | $('#remote_clone').show(); |
|
112 | 123 | } |
|
113 | 124 | if($('#remote_clone input').val()){ |
|
114 | 125 | $('#remote_clone').show(); |
|
115 | 126 | } |
|
116 | 127 | |
|
117 | 128 | $("#repo_group").select2({ |
|
118 | 129 | 'containerCssClass': "drop-menu", |
|
119 | 130 | 'dropdownCssClass': "drop-menu-dropdown", |
|
120 | 131 | 'dropdownAutoWidth': true, |
|
121 | 132 | 'width': "resolve" |
|
122 | 133 | }); |
|
123 | 134 | |
|
124 | 135 | setCopyPermsOption($('#repo_group').val()); |
|
125 | 136 | $("#repo_group").on("change", function(e) { |
|
126 | 137 | setCopyPermsOption(e.val) |
|
127 | 138 | }); |
|
128 | 139 | |
|
129 | 140 | $("#repo_type").select2({ |
|
130 | 141 | 'containerCssClass': "drop-menu", |
|
131 | 142 | 'dropdownCssClass': "drop-menu-dropdown", |
|
132 | 143 | 'minimumResultsForSearch': -1, |
|
133 | 144 | }); |
|
134 | 145 | $("#repo_landing_rev").select2({ |
|
135 | 146 | 'containerCssClass': "drop-menu", |
|
136 | 147 | 'dropdownCssClass': "drop-menu-dropdown", |
|
137 | 148 | 'minimumResultsForSearch': -1, |
|
138 | 149 | }); |
|
139 | 150 | $('#repo_name').focus(); |
|
140 | 151 | |
|
141 | 152 | $('#select_my_group').on('click', function(e){ |
|
142 | 153 | e.preventDefault(); |
|
143 | 154 | $("#repo_group").val($(this).data('personalGroupId')).trigger("change"); |
|
144 | 155 | }) |
|
145 | 156 | |
|
146 | 157 | }) |
|
147 | 158 | </script> |
|
148 | 159 | ${h.end_form()} |
General Comments 0
You need to be logged in to leave comments.
Login now