##// END OF EJS Templates
repository: cleanup and alignment of repository editing templates...
Mads Kiilerich -
r3600:72711920 beta
parent child Browse files
Show More
@@ -1,4 +1,7 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 ##
3 ## See also repo_settings.html
4 ##
2 <%inherit file="/base/base.html"/>
5 <%inherit file="/base/base.html"/>
3
6
4 <%def name="title()">
7 <%def name="title()">
@@ -152,13 +155,13 b''
152 <div class="input">
155 <div class="input">
153 <%include file="repo_edit_perms.html"/>
156 <%include file="repo_edit_perms.html"/>
154 </div>
157 </div>
158 </div>
155
159
156 <div class="buttons">
160 <div class="buttons">
157 ${h.submit('save',_('Save'),class_="ui-btn large")}
161 ${h.submit('save',_('Save'),class_="ui-btn large")}
158 ${h.reset('reset',_('Reset'),class_="ui-btn large")}
162 ${h.reset('reset',_('Reset'),class_="ui-btn large")}
159 </div>
160 </div>
163 </div>
161 </div>
164 </div>
162 </div>
165 </div>
163 ${h.end_form()}
166 ${h.end_form()}
164 </div>
167 </div>
@@ -168,143 +171,148 b''
168 <h5>${_('Advanced settings')}</h5>
171 <h5>${_('Advanced settings')}</h5>
169 </div>
172 </div>
170
173
171 <h3>${_('Statistics')}</h3>
174 <h3>${_('Statistics')}</h3>
172 ${h.form(url('repo_stats', repo_name=c.repo_info.repo_name),method='delete')}
175 ${h.form(url('repo_stats', repo_name=c.repo_info.repo_name),method='delete')}
173 <div class="form">
176 <div class="form">
174 <div class="fields">
177 <div class="fields">
175 ${h.submit('reset_stats_%s' % c.repo_info.repo_name,_('Reset current statistics'),class_="ui-btn",onclick="return confirm('"+_('Confirm to remove current statistics')+"');")}
178 ${h.submit('reset_stats_%s' % c.repo_info.repo_name,_('Reset current statistics'),class_="ui-btn",onclick="return confirm('"+_('Confirm to remove current statistics')+"');")}
176 <div class="field" style="border:none;color:#888">
177 <ul>
178 <li>${_('Fetched to rev')}: ${c.stats_revision}/${c.repo_last_rev}</li>
179 <li>${_('Stats gathered')}: ${c.stats_percentage}%</li>
180 </ul>
181 </div>
182 </div>
183 </div>
184 ${h.end_form()}
185
186 %if c.repo_info.clone_uri:
187 <h3>${_('Remote')}</h3>
188 ${h.form(url('repo_pull', repo_name=c.repo_info.repo_name),method='put')}
189 <div class="form">
190 <div class="fields">
191 ${h.submit('remote_pull_%s' % c.repo_info.repo_name,_('Pull changes from remote location'),class_="ui-btn",onclick="return confirm('"+_('Confirm to pull changes from remote side')+"');")}
192 <div class="field" style="border:none">
193 <ul>
194 <li><a href="${c.repo_info.clone_uri}">${c.repo_info.clone_uri}</a></li>
195 </ul>
196 </div>
197 </div>
198 </div>
199 ${h.end_form()}
200 %endif
201
202 <h3>${_('Cache')}</h3>
203 ${h.form(url('repo_cache', repo_name=c.repo_info.repo_name),method='delete')}
204 <div class="form">
205 <div class="fields">
206 ${h.submit('reset_cache_%s' % c.repo_info.repo_name,_('Invalidate repository cache'),class_="ui-btn",onclick="return confirm('"+_('Confirm to invalidate repository cache')+"');")}
207 <div class="field" style="border:none;color:#888">
208 <ul>
209 <li>${_('Manually invalidate cache for this repository. On first access repository will be cached again')}
210 </li>
211 </ul>
212 </div>
213 <div class="field" style="border:none;">
214 ${_('List of cached values')}
215 <table>
216 <tr>
217 <th>${_('Prefix')}</th>
218 <th>${_('Key')}</th>
219 <th>${_('Active')}</th>
220 </tr>
221 %for cache in c.repo_info.cache_keys:
222 <tr>
223 <td>${cache.prefix or '-'}</td>
224 <td>${cache.cache_key}</td>
225 <td>${h.bool2icon(cache.cache_active)}</td>
226 </tr>
227 %endfor
228 </table>
229 </div>
230 </div>
231 </div>
232 ${h.end_form()}
233
234 <h3>${_('Public journal')}</h3>
235 ${h.form(url('repo_public_journal', repo_name=c.repo_info.repo_name),method='put')}
236 <div class="form">
237 ${h.hidden('auth_token',str(h.get_token()))}
238 <div class="field">
239 %if c.in_public_journal:
240 ${h.submit('set_public_%s' % c.repo_info.repo_name,_('Remove from public journal'),class_="ui-btn")}
241 %else:
242 ${h.submit('set_public_%s' % c.repo_info.repo_name,_('Add to public journal'),class_="ui-btn")}
243 %endif
244 </div>
245 <div class="field" style="border:none;color:#888">
246 <ul>
247 <li>${_('All actions made on this repository will be accessible to everyone in public journal')}
248 </li>
249 </ul>
250 </div>
251 </div>
252 ${h.end_form()}
253
254 <h3>${_('Locking')}</h3>
255 ${h.form(url('repo_locking', repo_name=c.repo_info.repo_name),method='put')}
256 <div class="form">
257 <div class="fields">
258 %if c.repo_info.locked[0]:
259 ${h.submit('set_unlock' ,_('Unlock locked repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to unlock repository')+"');")}
260 ${'Locked by %s on %s' % (h.person_by_id(c.repo_info.locked[0]),h.fmt_date(h.time_to_datetime(c.repo_info.locked[1])))}
261 %else:
262 ${h.submit('set_lock',_('lock repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to lock repository')+"');")}
263 ${_('Repository is not locked')}
264 %endif
265 </div>
266 <div class="field" style="border:none;color:#888">
179 <div class="field" style="border:none;color:#888">
267 <ul>
180 <ul>
268 <li>${_('Force locking on repository. Works only when anonymous access is disabled')}
181 <li>${_('Fetched to rev')}: ${c.stats_revision}/${c.repo_last_rev}</li>
269 </li>
182 <li>${_('Stats gathered')}: ${c.stats_percentage}%</li>
183 </ul>
184 </div>
185 </div>
186 </div>
187 ${h.end_form()}
188
189 %if c.repo_info.clone_uri:
190 <h3>${_('Remote')}</h3>
191 ${h.form(url('repo_pull', repo_name=c.repo_info.repo_name),method='put')}
192 <div class="form">
193 <div class="fields">
194 ${h.submit('remote_pull_%s' % c.repo_info.repo_name,_('Pull changes from remote location'),class_="ui-btn",onclick="return confirm('"+_('Confirm to pull changes from remote side')+"');")}
195 <div class="field" style="border:none">
196 <ul>
197 <li><a href="${c.repo_info.clone_uri}">${c.repo_info.clone_uri}</a></li>
270 </ul>
198 </ul>
271 </div>
199 </div>
272 </div>
200 </div>
273 ${h.end_form()}
201 </div>
202 ${h.end_form()}
203 %endif
204
205 <h3>${_('Cache')}</h3>
206 ${h.form(url('repo_cache', repo_name=c.repo_info.repo_name),method='delete')}
207 <div class="form">
208 <div class="fields">
209 ${h.submit('reset_cache_%s' % c.repo_info.repo_name,_('Invalidate repository cache'),class_="ui-btn",onclick="return confirm('"+_('Confirm to invalidate repository cache')+"');")}
210 <div class="field" style="border:none;color:#888">
211 <ul>
212 <li>${_('Manually invalidate cache for this repository. On first access repository will be cached again')}
213 </li>
214 </ul>
215 </div>
216 <div class="field" style="border:none;">
217 ${_('List of cached values')}
218 <table>
219 <tr>
220 <th>${_('Prefix')}</th>
221 <th>${_('Key')}</th>
222 <th>${_('Active')}</th>
223 </tr>
224 %for cache in c.repo_info.cache_keys:
225 <tr>
226 <td>${cache.prefix or '-'}</td>
227 <td>${cache.cache_key}</td>
228 <td>${h.bool2icon(cache.cache_active)}</td>
229 </tr>
230 %endfor
231 </table>
232 </div>
233 </div>
234 </div>
235 ${h.end_form()}
274
236
275 <h3>${_('Set as fork of')}</h3>
237 <h3>${_('Public journal')}</h3>
276 ${h.form(url('repo_as_fork', repo_name=c.repo_info.repo_name),method='put')}
238 ${h.form(url('repo_public_journal', repo_name=c.repo_info.repo_name),method='put')}
277 <div class="form">
239 <div class="form">
278 <div class="fields">
240 ${h.hidden('auth_token',str(h.get_token()))}
279 ${h.select('id_fork_of','',c.repos_list,class_="medium")}
241 <div class="field">
280 ${h.submit('set_as_fork_%s' % c.repo_info.repo_name,_('set'),class_="ui-btn",)}
242 %if c.in_public_journal:
281 </div>
243 ${h.submit('set_public_%s' % c.repo_info.repo_name,_('Remove from public journal'),class_="ui-btn")}
282 <div class="field" style="border:none;color:#888">
244 %else:
283 <ul>
245 ${h.submit('set_public_%s' % c.repo_info.repo_name,_('Add to public journal'),class_="ui-btn")}
284 <li>${_('''Manually set this repository as a fork of another from the list''')}</li>
246 %endif
285 </ul>
247 </div>
286 </div>
248 <div class="field" style="border:none;color:#888">
287 </div>
249 <ul>
288 ${h.end_form()}
250 <li>${_('All actions made on this repository will be accessible to everyone in public journal')}
251 </li>
252 </ul>
253 </div>
254 </div>
255 ${h.end_form()}
289
256
290 <h3>${_('Delete')}</h3>
257 <h3>${_('Locking')}</h3>
291 ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='delete')}
258 ${h.form(url('repo_locking', repo_name=c.repo_info.repo_name),method='put')}
292 <div class="form">
259 <div class="form">
293 <div class="fields">
260 <div class="fields">
294 ${h.submit('remove_%s' % c.repo_info.repo_name,_('Remove this repository'),class_="ui-btn red",onclick="return confirm('"+_('Confirm to delete this repository')+"');")}
261 %if c.repo_info.locked[0]:
295 %if c.repo_info.forks.count():
262 ${h.submit('set_unlock' ,_('Unlock locked repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to unlock repository')+"');")}
296 - ${ungettext('this repository has %s fork', 'this repository has %s forks', c.repo_info.forks.count()) % c.repo_info.forks.count()}
263 ${'Locked by %s on %s' % (h.person_by_id(c.repo_info.locked[0]),h.fmt_date(h.time_to_datetime(c.repo_info.locked[1])))}
297 <input type="radio" name="forks" value="detach_forks" checked="checked"/> <label for="forks">${_('Detach forks')}</label>
264 %else:
298 <input type="radio" name="forks" value="delete_forks" /> <label for="forks">${_('Delete forks')}</label>
265 ${h.submit('set_lock',_('lock repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to lock repository')+"');")}
299 %endif
266 ${_('Repository is not locked')}
300 </div>
267 %endif
268 </div>
269 <div class="field" style="border:none;color:#888">
270 <ul>
271 <li>${_('Force locking on repository. Works only when anonymous access is disabled')}
272 </li>
273 </ul>
274 </div>
275 </div>
276 ${h.end_form()}
277
278 <h3>${_('Set as fork of')}</h3>
279 ${h.form(url('repo_as_fork', repo_name=c.repo_info.repo_name),method='put')}
280 <div class="form">
281 <div class="fields">
282 ${h.select('id_fork_of','',c.repos_list,class_="medium")}
283 ${h.submit('set_as_fork_%s' % c.repo_info.repo_name,_('set'),class_="ui-btn",)}
284 </div>
301 <div class="field" style="border:none;color:#888">
285 <div class="field" style="border:none;color:#888">
302 <ul>
286 <ul>
303 <li>${_('This repository will be renamed in a special way in order to be unaccesible for RhodeCode and VCS systems. If you need to fully delete it from file system please do it manually')}</li>
287 <li>${_('''Manually set this repository as a fork of another from the list''')}</li>
304 </ul>
288 </ul>
305 </div>
289 </div>
290 </div>
291 ${h.end_form()}
292
293 <h3>${_('Delete')}</h3>
294 ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='delete')}
295 <div class="form">
296 <div class="fields">
297 <div class="field" style="border:none;color:#888">
298 ## <div class="label">
299 ## <label for="">${_('Remove repository')}:</label>
300 ## </div>
301 <div class="checkboxes">
302 ${h.submit('remove_%s' % c.repo_info.repo_name,_('Remove this repository'),class_="ui-btn red",onclick="return confirm('"+_('Confirm to delete this repository')+"');")}
303 %if c.repo_info.forks.count():
304 - ${ungettext('this repository has %s fork', 'this repository has %s forks', c.repo_info.forks.count()) % c.repo_info.forks.count()}
305 <input type="radio" name="forks" value="detach_forks" checked="checked"/> <label for="forks">${_('Detach forks')}</label>
306 <input type="radio" name="forks" value="delete_forks" /> <label for="forks">${_('Delete forks')}</label>
307 %endif
308 <ul>
309 <li>${_('This repository will be renamed in a special way in order to be unaccesible for RhodeCode and VCS systems. If you need to fully delete it from file system please do it manually')}</li>
310 </ul>
311 </div>
312 </div>
306 </div>
313 </div>
307 ${h.end_form()}
314 </div>
315 ${h.end_form()}
308 </div>
316 </div>
309
317
310 ##TODO: this should be controlled by the VISUAL setting
318 ##TODO: this should be controlled by the VISUAL setting
@@ -1,4 +1,7 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 ##
3 ## See also repo_edit.html
4 ##
2 <%inherit file="/base/base.html"/>
5 <%inherit file="/base/base.html"/>
3
6
4 <%def name="title()">
7 <%def name="title()">
@@ -30,10 +33,10 b''
30 <div class="label">
33 <div class="label">
31 <label for="repo_name">${_('Name')}:</label>
34 <label for="repo_name">${_('Name')}:</label>
32 </div>
35 </div>
33 <div class="input input-medium">
36 <div class="input">
34 ${h.text('repo_name',class_="small")}
37 ${h.text('repo_name',class_="medium")}
35 </div>
38 </div>
36 </div>
39 </div>
37 <div class="field">
40 <div class="field">
38 <div class="label">
41 <div class="label">
39 <label for="clone_uri">${_('Clone uri')}:</label>
42 <label for="clone_uri">${_('Clone uri')}:</label>
@@ -81,25 +84,24 b''
81 </div>
84 </div>
82 </div>
85 </div>
83 %if c.visual.repository_fields:
86 %if c.visual.repository_fields:
84 ## EXTRA FIELDS
87 ## EXTRA FIELDS
85 %for field in c.repo_fields:
88 %for field in c.repo_fields:
86 <div class="field">
89 <div class="field">
87 <div class="label">
90 <div class="label">
88 <label for="${field.field_key_prefixed}">${field.field_label} (${field.field_key}):</label>
91 <label for="${field.field_key_prefixed}">${field.field_label} (${field.field_key}):</label>
89 </div>
92 </div>
90 <div class="input input-medium">
93 <div class="input input-medium">
91 ${h.text(field.field_key_prefixed, field.field_value, class_='medium')}
94 ${h.text(field.field_key_prefixed, field.field_value, class_='medium')}
92 %if field.field_desc:
95 %if field.field_desc:
93 <span class="help-block">${field.field_desc}</span>
96 <span class="help-block">${field.field_desc}</span>
94 %endif
97 %endif
95 </div>
98 </div>
96 </div>
99 </div>
97 %endfor
100 %endfor
98 %endif
101 %endif
99
102 <div class="field">
100 <div class="field">
101 <div class="label">
103 <div class="label">
102 <label for="">${_('Permissions')}:</label>
104 <label for="input">${_('Permissions')}:</label>
103 </div>
105 </div>
104 <div class="input">
106 <div class="input">
105 <%include file="../admin/repos/repo_edit_perms.html"/>
107 <%include file="../admin/repos/repo_edit_perms.html"/>
@@ -111,36 +113,28 b''
111 ${h.reset('reset',_('Reset'),class_="ui-btn large")}
113 ${h.reset('reset',_('Reset'),class_="ui-btn large")}
112 </div>
114 </div>
113
115
116 </div>
117 </div>
118 ${h.end_form()}
119
120 <h3>${_('Delete')}</h3>
121 ${h.form(url('repo_settings_delete', repo_name=c.repo_info.repo_name),method='delete')}
122 <div class="form">
123 <div class="fields">
124 <div class="field" style="border:none;color:#888">
125 <div class="label">
126 <label for="">${_('Remove repository')}:</label>
127 </div>
128 <div class="checkboxes">
129 ${h.submit('remove_%s' % c.repo_info.repo_name,_('Remove this repository'),class_="ui-btn red",onclick="return confirm('"+_('Confirm to delete this repository')+"');")}
130 <ul>
131 <li>${_('This repository will be renamed in a special way in order to be unaccesible for RhodeCode and VCS systems. If you need to fully delete it from file system please do it manually')}</li>
132 </ul>
133 </div>
134 </div>
135 </div>
114 </div>
136 </div>
115 ${h.end_form()}
137 ${h.end_form()}
116 </div>
117
118 <h3>${_('Delete repository')}</h3>
119 <div class="form">
120 <!-- fields -->
121 <div class="fields">
122
123 <div class="field">
124 <div class="label">
125 <label for="">${_('Remove repo')}:</label>
126 </div>
127 <div class="checkboxes">
128 ${h.form(url('repo_settings_delete', repo_name=c.repo_info.repo_name),method='delete')}
129 <div class="">
130 <div class="fields">
131 ${h.submit('remove_%s' % c.repo_info.repo_name,_('Remove this repository'),class_="ui-btn red",onclick="return confirm('"+_('Confirm to delete this repository')+"');")}
132 </div>
133 <div class="field" style="border:none;color:#888">
134 <ul>
135 <li>${_('This repository will be renamed in a special way in order to be unaccesible for RhodeCode and VCS systems. If you need fully delete it from file system please do it manually')}</li>
136 </ul>
137 </div>
138 </div>
139 ${h.end_form()}
140 </div>
141 </div>
142 </div>
143 </div>
144
138
145 </div>
139 </div>
146 </%def>
140 </%def>
General Comments 0
You need to be logged in to leave comments. Login now