Show More
@@ -1,382 +1,378 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | ## |
|
3 | 3 | ## See also repo_settings.html |
|
4 | 4 | ## |
|
5 | 5 | <%inherit file="/base/base.html"/> |
|
6 | 6 | |
|
7 | 7 | <%def name="title()"> |
|
8 | 8 | ${_('Edit repository')} ${c.repo_info.repo_name} · ${c.rhodecode_name} |
|
9 | 9 | </%def> |
|
10 | 10 | |
|
11 | 11 | <%def name="breadcrumbs_links()"> |
|
12 | ${h.link_to(_(u'Home'),h.url('/'))} | |
|
13 | » | |
|
14 | ${h.link_to(c.repo_info.repo_name,h.url('summary_home',repo_name=c.repo_info.repo_name))} | |
|
15 | » | |
|
16 | 12 | ${_('Settings')} |
|
17 | 13 | </%def> |
|
18 | 14 | |
|
19 | 15 | <%def name="page_nav()"> |
|
20 | 16 | ${self.menu('options')} |
|
21 | 17 | </%def> |
|
22 | 18 | |
|
23 | 19 | <%def name="main()"> |
|
24 | 20 | ${self.context_bar('options')} |
|
25 | 21 | <div class="box box-left"> |
|
26 | 22 | <!-- box / title --> |
|
27 | 23 | <div class="title"> |
|
28 | 24 | ${self.breadcrumbs()} |
|
29 | 25 | </div> |
|
30 | 26 | ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='put')} |
|
31 | 27 | <div class="form"> |
|
32 | 28 | <!-- fields --> |
|
33 | 29 | <div class="fields"> |
|
34 | 30 | <div class="field"> |
|
35 | 31 | <div class="label"> |
|
36 | 32 | <label for="repo_name">${_('Name')}:</label> |
|
37 | 33 | </div> |
|
38 | 34 | <div class="input"> |
|
39 | 35 | ${h.text('repo_name',class_="medium")} |
|
40 | 36 | </div> |
|
41 | 37 | </div> |
|
42 | 38 | <div class="field"> |
|
43 | 39 | <div class="label"> |
|
44 | 40 | <label for="clone_uri">${_('Clone uri')}:</label> |
|
45 | 41 | </div> |
|
46 | 42 | <div class="input"> |
|
47 | 43 | ${h.text('clone_uri',class_="medium")} |
|
48 | 44 | <span class="help-block">${_('Optional http[s] url from which repository should be cloned.')}</span> |
|
49 | 45 | </div> |
|
50 | 46 | </div> |
|
51 | 47 | <div class="field"> |
|
52 | 48 | <div class="label"> |
|
53 | 49 | <label for="repo_group">${_('Repository group')}:</label> |
|
54 | 50 | </div> |
|
55 | 51 | <div class="input"> |
|
56 | 52 | ${h.select('repo_group','',c.repo_groups,class_="medium")} |
|
57 | 53 | <span class="help-block">${_('Optional select a group to put this repository into.')}</span> |
|
58 | 54 | </div> |
|
59 | 55 | </div> |
|
60 | 56 | <div class="field"> |
|
61 | 57 | <div class="label"> |
|
62 | 58 | <label for="repo_type">${_('Type')}:</label> |
|
63 | 59 | </div> |
|
64 | 60 | <div class="input"> |
|
65 | 61 | ${h.select('repo_type','hg',c.backends,class_="medium")} |
|
66 | 62 | </div> |
|
67 | 63 | </div> |
|
68 | 64 | <div class="field"> |
|
69 | 65 | <div class="label"> |
|
70 | 66 | <label for="repo_landing_rev">${_('Landing revision')}:</label> |
|
71 | 67 | </div> |
|
72 | 68 | <div class="input"> |
|
73 | 69 | ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")} |
|
74 | 70 | <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span> |
|
75 | 71 | </div> |
|
76 | 72 | </div> |
|
77 | 73 | <div class="field"> |
|
78 | 74 | <div class="label label-textarea"> |
|
79 | 75 | <label for="repo_description">${_('Description')}:</label> |
|
80 | 76 | </div> |
|
81 | 77 | <div class="textarea text-area editor"> |
|
82 | 78 | ${h.textarea('repo_description')} |
|
83 | 79 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> |
|
84 | 80 | </div> |
|
85 | 81 | </div> |
|
86 | 82 | |
|
87 | 83 | <div class="field"> |
|
88 | 84 | <div class="label label-checkbox"> |
|
89 | 85 | <label for="repo_private">${_('Private repository')}:</label> |
|
90 | 86 | </div> |
|
91 | 87 | <div class="checkboxes"> |
|
92 | 88 | ${h.checkbox('repo_private',value="True")} |
|
93 | 89 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> |
|
94 | 90 | </div> |
|
95 | 91 | </div> |
|
96 | 92 | <div class="field"> |
|
97 | 93 | <div class="label label-checkbox"> |
|
98 | 94 | <label for="repo_enable_statistics">${_('Enable statistics')}:</label> |
|
99 | 95 | </div> |
|
100 | 96 | <div class="checkboxes"> |
|
101 | 97 | ${h.checkbox('repo_enable_statistics',value="True")} |
|
102 | 98 | <span class="help-block">${_('Enable statistics window on summary page.')}</span> |
|
103 | 99 | </div> |
|
104 | 100 | </div> |
|
105 | 101 | <div class="field"> |
|
106 | 102 | <div class="label label-checkbox"> |
|
107 | 103 | <label for="repo_enable_downloads">${_('Enable downloads')}:</label> |
|
108 | 104 | </div> |
|
109 | 105 | <div class="checkboxes"> |
|
110 | 106 | ${h.checkbox('repo_enable_downloads',value="True")} |
|
111 | 107 | <span class="help-block">${_('Enable download menu on summary page.')}</span> |
|
112 | 108 | </div> |
|
113 | 109 | </div> |
|
114 | 110 | <div class="field"> |
|
115 | 111 | <div class="label label-checkbox"> |
|
116 | 112 | <label for="repo_enable_locking">${_('Enable locking')}:</label> |
|
117 | 113 | </div> |
|
118 | 114 | <div class="checkboxes"> |
|
119 | 115 | ${h.checkbox('repo_enable_locking',value="True")} |
|
120 | 116 | <span class="help-block">${_('Enable lock-by-pulling on repository.')}</span> |
|
121 | 117 | </div> |
|
122 | 118 | </div> |
|
123 | 119 | <div class="field"> |
|
124 | 120 | <div class="label"> |
|
125 | 121 | <label for="user">${_('Owner')}:</label> |
|
126 | 122 | </div> |
|
127 | 123 | <div class="input input-medium ac"> |
|
128 | 124 | <div class="perm_ac"> |
|
129 | 125 | ${h.text('user',class_='yui-ac-input')} |
|
130 | 126 | <span class="help-block">${_('Change owner of this repository.')}</span> |
|
131 | 127 | <div id="owner_container"></div> |
|
132 | 128 | </div> |
|
133 | 129 | </div> |
|
134 | 130 | </div> |
|
135 | 131 | %if c.visual.repository_fields: |
|
136 | 132 | ## EXTRA FIELDS |
|
137 | 133 | %for field in c.repo_fields: |
|
138 | 134 | <div class="field"> |
|
139 | 135 | <div class="label"> |
|
140 | 136 | <label for="${field.field_key_prefixed}">${field.field_label} (${field.field_key}):</label> |
|
141 | 137 | </div> |
|
142 | 138 | <div class="input input-medium"> |
|
143 | 139 | ${h.text(field.field_key_prefixed, field.field_value, class_='medium')} |
|
144 | 140 | %if field.field_desc: |
|
145 | 141 | <span class="help-block">${field.field_desc}</span> |
|
146 | 142 | %endif |
|
147 | 143 | </div> |
|
148 | 144 | </div> |
|
149 | 145 | %endfor |
|
150 | 146 | %endif |
|
151 | 147 | <div class="field"> |
|
152 | 148 | <div class="label"> |
|
153 | 149 | <label for="input">${_('Permissions')}:</label> |
|
154 | 150 | </div> |
|
155 | 151 | <div class="input"> |
|
156 | 152 | <%include file="repo_edit_perms.html"/> |
|
157 | 153 | </div> |
|
158 | 154 | </div> |
|
159 | 155 | |
|
160 | 156 | <div class="buttons"> |
|
161 | 157 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
162 | 158 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
163 | 159 | </div> |
|
164 | 160 | </div> |
|
165 | 161 | </div> |
|
166 | 162 | ${h.end_form()} |
|
167 | 163 | </div> |
|
168 | 164 | |
|
169 | 165 | <div class="box box-right"> |
|
170 | 166 | <div class="title"> |
|
171 | 167 | <h5>${_('Advanced settings')}</h5> |
|
172 | 168 | </div> |
|
173 | 169 | |
|
174 | 170 | <h3>${_('Statistics')}</h3> |
|
175 | 171 | ${h.form(url('repo_stats', repo_name=c.repo_info.repo_name),method='delete')} |
|
176 | 172 | <div class="form"> |
|
177 | 173 | <div class="fields"> |
|
178 | 174 | ${h.submit('reset_stats_%s' % c.repo_info.repo_name,_('Reset current statistics'),class_="ui-btn",onclick="return confirm('"+_('Confirm to remove current statistics')+"');")} |
|
179 | 175 | <div class="field" style="border:none;color:#888"> |
|
180 | 176 | <ul> |
|
181 | 177 | <li>${_('Fetched to rev')}: ${c.stats_revision}/${c.repo_last_rev}</li> |
|
182 | 178 | <li>${_('Stats gathered')}: ${c.stats_percentage}%</li> |
|
183 | 179 | </ul> |
|
184 | 180 | </div> |
|
185 | 181 | </div> |
|
186 | 182 | </div> |
|
187 | 183 | ${h.end_form()} |
|
188 | 184 | |
|
189 | 185 | %if c.repo_info.clone_uri: |
|
190 | 186 | <h3>${_('Remote')}</h3> |
|
191 | 187 | ${h.form(url('repo_pull', repo_name=c.repo_info.repo_name),method='put')} |
|
192 | 188 | <div class="form"> |
|
193 | 189 | <div class="fields"> |
|
194 | 190 | ${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 | 191 | <div class="field" style="border:none"> |
|
196 | 192 | <ul> |
|
197 | 193 | <li><a href="${c.repo_info.clone_uri}">${c.repo_info.clone_uri}</a></li> |
|
198 | 194 | </ul> |
|
199 | 195 | </div> |
|
200 | 196 | </div> |
|
201 | 197 | </div> |
|
202 | 198 | ${h.end_form()} |
|
203 | 199 | %endif |
|
204 | 200 | |
|
205 | 201 | <h3>${_('Cache')}</h3> |
|
206 | 202 | ${h.form(url('repo_cache', repo_name=c.repo_info.repo_name),method='delete')} |
|
207 | 203 | <div class="form"> |
|
208 | 204 | <div class="fields"> |
|
209 | 205 | ${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 | 206 | <div class="field" style="border:none;color:#888"> |
|
211 | 207 | <ul> |
|
212 | 208 | <li>${_('Manually invalidate cache for this repository. On first access repository will be cached again')} |
|
213 | 209 | </li> |
|
214 | 210 | </ul> |
|
215 | 211 | </div> |
|
216 | 212 | <div class="field" style="border:none;"> |
|
217 | 213 | ${_('List of cached values')} |
|
218 | 214 | <table> |
|
219 | 215 | <tr> |
|
220 | 216 | <th>${_('Prefix')}</th> |
|
221 | 217 | <th>${_('Key')}</th> |
|
222 | 218 | <th>${_('Active')}</th> |
|
223 | 219 | </tr> |
|
224 | 220 | %for cache in c.repo_info.cache_keys: |
|
225 | 221 | <tr> |
|
226 | 222 | <td>${cache.prefix or '-'}</td> |
|
227 | 223 | <td>${cache.cache_key}</td> |
|
228 | 224 | <td>${h.bool2icon(cache.cache_active)}</td> |
|
229 | 225 | </tr> |
|
230 | 226 | %endfor |
|
231 | 227 | </table> |
|
232 | 228 | </div> |
|
233 | 229 | </div> |
|
234 | 230 | </div> |
|
235 | 231 | ${h.end_form()} |
|
236 | 232 | |
|
237 | 233 | <h3>${_('Public journal')}</h3> |
|
238 | 234 | ${h.form(url('repo_public_journal', repo_name=c.repo_info.repo_name),method='put')} |
|
239 | 235 | <div class="form"> |
|
240 | 236 | ${h.hidden('auth_token',str(h.get_token()))} |
|
241 | 237 | <div class="field"> |
|
242 | 238 | %if c.in_public_journal: |
|
243 | 239 | ${h.submit('set_public_%s' % c.repo_info.repo_name,_('Remove from public journal'),class_="ui-btn")} |
|
244 | 240 | %else: |
|
245 | 241 | ${h.submit('set_public_%s' % c.repo_info.repo_name,_('Add to public journal'),class_="ui-btn")} |
|
246 | 242 | %endif |
|
247 | 243 | </div> |
|
248 | 244 | <div class="field" style="border:none;color:#888"> |
|
249 | 245 | <ul> |
|
250 | 246 | <li>${_('All actions made on this repository will be accessible to everyone in public journal')} |
|
251 | 247 | </li> |
|
252 | 248 | </ul> |
|
253 | 249 | </div> |
|
254 | 250 | </div> |
|
255 | 251 | ${h.end_form()} |
|
256 | 252 | |
|
257 | 253 | <h3>${_('Locking')}</h3> |
|
258 | 254 | ${h.form(url('repo_locking', repo_name=c.repo_info.repo_name),method='put')} |
|
259 | 255 | <div class="form"> |
|
260 | 256 | <div class="fields"> |
|
261 | 257 | %if c.repo_info.locked[0]: |
|
262 | 258 | ${h.submit('set_unlock' ,_('Unlock locked repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to unlock repository')+"');")} |
|
263 | 259 | ${'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])))} |
|
264 | 260 | %else: |
|
265 | 261 | ${h.submit('set_lock',_('lock repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to lock repository')+"');")} |
|
266 | 262 | ${_('Repository is not locked')} |
|
267 | 263 | %endif |
|
268 | 264 | </div> |
|
269 | 265 | <div class="field" style="border:none;color:#888"> |
|
270 | 266 | <ul> |
|
271 | 267 | <li>${_('Force locking on repository. Works only when anonymous access is disabled')} |
|
272 | 268 | </li> |
|
273 | 269 | </ul> |
|
274 | 270 | </div> |
|
275 | 271 | </div> |
|
276 | 272 | ${h.end_form()} |
|
277 | 273 | |
|
278 | 274 | <h3>${_('Set as fork of')}</h3> |
|
279 | 275 | ${h.form(url('repo_as_fork', repo_name=c.repo_info.repo_name),method='put')} |
|
280 | 276 | <div class="form"> |
|
281 | 277 | <div class="fields"> |
|
282 | 278 | ${h.select('id_fork_of','',c.repos_list,class_="medium")} |
|
283 | 279 | ${h.submit('set_as_fork_%s' % c.repo_info.repo_name,_('set'),class_="ui-btn",)} |
|
284 | 280 | </div> |
|
285 | 281 | <div class="field" style="border:none;color:#888"> |
|
286 | 282 | <ul> |
|
287 | 283 | <li>${_('''Manually set this repository as a fork of another from the list''')}</li> |
|
288 | 284 | </ul> |
|
289 | 285 | </div> |
|
290 | 286 | </div> |
|
291 | 287 | ${h.end_form()} |
|
292 | 288 | |
|
293 | 289 | <h3>${_('Delete')}</h3> |
|
294 | 290 | ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='delete')} |
|
295 | 291 | <div class="form"> |
|
296 | 292 | <div class="fields"> |
|
297 | 293 | <div class="field" style="border:none;color:#888"> |
|
298 | 294 | ## <div class="label"> |
|
299 | 295 | ## <label for="">${_('Remove repository')}:</label> |
|
300 | 296 | ## </div> |
|
301 | 297 | <div class="checkboxes"> |
|
302 | 298 | ${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 | 299 | %if c.repo_info.forks.count(): |
|
304 | 300 | - ${ungettext('this repository has %s fork', 'this repository has %s forks', c.repo_info.forks.count()) % c.repo_info.forks.count()} |
|
305 | 301 | <input type="radio" name="forks" value="detach_forks" checked="checked"/> <label for="forks">${_('Detach forks')}</label> |
|
306 | 302 | <input type="radio" name="forks" value="delete_forks" /> <label for="forks">${_('Delete forks')}</label> |
|
307 | 303 | %endif |
|
308 | 304 | <ul> |
|
309 | 305 | <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 | 306 | </ul> |
|
311 | 307 | </div> |
|
312 | 308 | </div> |
|
313 | 309 | </div> |
|
314 | 310 | </div> |
|
315 | 311 | ${h.end_form()} |
|
316 | 312 | </div> |
|
317 | 313 | |
|
318 | 314 | ##TODO: this should be controlled by the VISUAL setting |
|
319 | 315 | %if c.visual.repository_fields: |
|
320 | 316 | <div class="box box-left" style="clear:left"> |
|
321 | 317 | <!-- box / title --> |
|
322 | 318 | <div class="title"> |
|
323 | 319 | <h5>${_('Extra fields')}</h5> |
|
324 | 320 | </div> |
|
325 | 321 | |
|
326 | 322 | <div class="emails_wrap"> |
|
327 | 323 | <table class="noborder"> |
|
328 | 324 | %for field in c.repo_fields: |
|
329 | 325 | <tr> |
|
330 | 326 | <td>${field.field_label} (${field.field_key})</td> |
|
331 | 327 | <td>${field.field_type}</td> |
|
332 | 328 | <td> |
|
333 | 329 | ${h.form(url('delete_repo_fields', repo_name=c.repo_info.repo_name, field_id=field.repo_field_id),method='delete')} |
|
334 | 330 | ${h.submit('remove_%s' % field.repo_field_id, _('delete'), id="remove_field_%s" % field.repo_field_id, |
|
335 | 331 | class_="delete_icon action_button", onclick="return confirm('"+_('Confirm to delete this field: %s') % field.field_key+"');")} |
|
336 | 332 | ${h.end_form()} |
|
337 | 333 | </td> |
|
338 | 334 | </tr> |
|
339 | 335 | %endfor |
|
340 | 336 | </table> |
|
341 | 337 | </div> |
|
342 | 338 | |
|
343 | 339 | ${h.form(url('create_repo_fields', repo_name=c.repo_info.repo_name),method='put')} |
|
344 | 340 | <div class="form"> |
|
345 | 341 | <!-- fields --> |
|
346 | 342 | <div class="fields"> |
|
347 | 343 | <div class="field"> |
|
348 | 344 | <div class="label"> |
|
349 | 345 | <label for="new_field_key">${_('New field key')}:</label> |
|
350 | 346 | </div> |
|
351 | 347 | <div class="input"> |
|
352 | 348 | ${h.text('new_field_key', class_='small')} |
|
353 | 349 | </div> |
|
354 | 350 | </div> |
|
355 | 351 | <div class="field"> |
|
356 | 352 | <div class="label"> |
|
357 | 353 | <label for="new_field_label">${_('New field label')}:</label> |
|
358 | 354 | </div> |
|
359 | 355 | <div class="input"> |
|
360 | 356 | ${h.text('new_field_label', class_='small', placeholder=_('Enter short label'))} |
|
361 | 357 | </div> |
|
362 | 358 | </div> |
|
363 | 359 | |
|
364 | 360 | <div class="field"> |
|
365 | 361 | <div class="label"> |
|
366 | 362 | <label for="new_field_desc">${_('New field description')}:</label> |
|
367 | 363 | </div> |
|
368 | 364 | <div class="input"> |
|
369 | 365 | ${h.text('new_field_desc', class_='small', placeholder=_('Enter description of a field'))} |
|
370 | 366 | </div> |
|
371 | 367 | </div> |
|
372 | 368 | |
|
373 | 369 | <div class="buttons"> |
|
374 | 370 | ${h.submit('save',_('Add'),class_="ui-btn large")} |
|
375 | 371 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
376 | 372 | </div> |
|
377 | 373 | </div> |
|
378 | 374 | </div> |
|
379 | 375 | ${h.end_form()} |
|
380 | 376 | </div> |
|
381 | 377 | %endif |
|
382 | 378 | </%def> |
@@ -1,199 +1,199 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | <%inherit file="/base/base.html"/> |
|
4 | 4 | |
|
5 | 5 | <%def name="title()"> |
|
6 | 6 | ${_('%s Changeset') % c.repo_name} - ${h.show_id(c.changeset)} · ${c.rhodecode_name} |
|
7 | 7 | </%def> |
|
8 | 8 | |
|
9 | 9 | <%def name="breadcrumbs_links()"> |
|
10 |
${_(' |
|
|
10 | ${_('Changeset')} - <span class='hash'>r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}</span> | |
|
11 | 11 | </%def> |
|
12 | 12 | |
|
13 | 13 | <%def name="page_nav()"> |
|
14 | 14 | ${self.menu('changelog')} |
|
15 | 15 | </%def> |
|
16 | 16 | |
|
17 | 17 | <%def name="main()"> |
|
18 | 18 | ${self.context_bar('changelog')} |
|
19 | 19 | <div class="box"> |
|
20 | 20 | <!-- box / title --> |
|
21 | 21 | <div class="title"> |
|
22 | 22 | ${self.breadcrumbs()} |
|
23 | 23 | </div> |
|
24 | 24 | <script> |
|
25 | 25 | var _USERS_AC_DATA = ${c.users_array|n}; |
|
26 | 26 | var _GROUPS_AC_DATA = ${c.users_groups_array|n}; |
|
27 | 27 | AJAX_COMMENT_URL = "${url('changeset_comment',repo_name=c.repo_name,revision=c.changeset.raw_id)}"; |
|
28 | 28 | AJAX_COMMENT_DELETE_URL = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"; |
|
29 | 29 | </script> |
|
30 | 30 | <div class="table"> |
|
31 | 31 | <div class="diffblock"> |
|
32 | 32 | <div class="parents"> |
|
33 | 33 | %if c.changeset.parents: |
|
34 | 34 | %for n, p_cs in enumerate(reversed(c.changeset.parents)): |
|
35 | 35 | <span class="changeset_hash">« ${h.link_to('%s:%s' % (p_cs.revision,p_cs.raw_id[:6]),h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}</span> |
|
36 | 36 | <br> |
|
37 | 37 | %endfor |
|
38 | 38 | %else: |
|
39 | 39 | <span>${_('No parents')}</span> |
|
40 | 40 | %endif |
|
41 | 41 | </div> |
|
42 | 42 | <div class="children"> |
|
43 | 43 | %if c.changeset.children: |
|
44 | 44 | %for n, p_cs in enumerate(reversed(c.changeset.children)): |
|
45 | 45 | <span class="changeset_hash">${h.link_to('%s:%s' % (p_cs.revision,p_cs.raw_id[:6]),h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)} »</span> |
|
46 | 46 | <br> |
|
47 | 47 | %endfor |
|
48 | 48 | %else: |
|
49 | 49 | <span>${_('No children')}</span> |
|
50 | 50 | %endif |
|
51 | 51 | </div> |
|
52 | 52 | <div class="code-header banner"> |
|
53 | 53 | |
|
54 | 54 | <div class="hash"> |
|
55 | 55 | r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} |
|
56 | 56 | </div> |
|
57 | 57 | <div class="date"> |
|
58 | 58 | ${h.fmt_date(c.changeset.date)} |
|
59 | 59 | </div> |
|
60 | 60 | <div class="changeset-status-container"> |
|
61 | 61 | %if c.statuses: |
|
62 | 62 | <div title="${_('Changeset status')}" class="changeset-status-lbl">[${h.changeset_status_lbl(c.statuses[0])}]</div> |
|
63 | 63 | <div class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[0])}" /></div> |
|
64 | 64 | %endif |
|
65 | 65 | </div> |
|
66 | 66 | <div class="diff-actions"> |
|
67 | 67 | <a href="${h.url('changeset_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id)}" class="tooltip" title="${h.tooltip(_('raw diff'))}"><img class="icon" src="${h.url('/images/icons/page_white.png')}"/></a> |
|
68 | 68 | <a href="${h.url('changeset_patch_home',repo_name=c.repo_name,revision=c.changeset.raw_id)}" class="tooltip" title="${h.tooltip(_('patch diff'))}"><img class="icon" src="${h.url('/images/icons/page_add.png')}"/></a> |
|
69 | 69 | <a href="${h.url('changeset_download_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='download')}" class="tooltip" title="${h.tooltip(_('download diff'))}"><img class="icon" src="${h.url('/images/icons/page_save.png')}"/></a> |
|
70 | 70 | ${c.ignorews_url(request.GET)} |
|
71 | 71 | ${c.context_url(request.GET)} |
|
72 | 72 | </div> |
|
73 | 73 | <div class="comments-number" style="float:right;padding-right:5px">${ungettext("%d comment", "%d comments", len(c.comments)) % len(c.comments)} ${ungettext("(%d inline)", "(%d inline)", c.inline_cnt) % c.inline_cnt}</div> |
|
74 | 74 | </div> |
|
75 | 75 | </div> |
|
76 | 76 | <div id="changeset_content"> |
|
77 | 77 | <div class="container"> |
|
78 | 78 | <div class="left"> |
|
79 | 79 | <div class="author"> |
|
80 | 80 | <div class="gravatar"> |
|
81 | 81 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(c.changeset.author),20)}"/> |
|
82 | 82 | </div> |
|
83 | 83 | <span>${h.person(c.changeset.author)}</span><br/> |
|
84 | 84 | <span><a href="mailto:${h.email_or_none(c.changeset.author)}">${h.email_or_none(c.changeset.author)}</a></span><br/> |
|
85 | 85 | </div> |
|
86 | 86 | <div class="message">${h.urlify_commit(c.changeset.message, c.repo_name)}</div> |
|
87 | 87 | </div> |
|
88 | 88 | <div class="right"> |
|
89 | 89 | <div class="changes"> |
|
90 | 90 | % if (len(c.changeset.affected_files) <= c.affected_files_cut_off) or c.fulldiff: |
|
91 | 91 | <span class="removed" title="${_('removed')}">${len(c.changeset.removed)}</span> |
|
92 | 92 | <span class="changed" title="${_('changed')}">${len(c.changeset.changed)}</span> |
|
93 | 93 | <span class="added" title="${_('added')}">${len(c.changeset.added)}</span> |
|
94 | 94 | % else: |
|
95 | 95 | <span class="removed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> |
|
96 | 96 | <span class="changed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> |
|
97 | 97 | <span class="added" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span> |
|
98 | 98 | % endif |
|
99 | 99 | </div> |
|
100 | 100 | |
|
101 | 101 | <span class="logtags"> |
|
102 | 102 | %if len(c.changeset.parents)>1: |
|
103 | 103 | <span class="merge">${_('merge')}</span> |
|
104 | 104 | %endif |
|
105 | 105 | %if c.changeset.branch: |
|
106 | 106 | <span class="branchtag" title="${'%s %s' % (_('branch'),c.changeset.branch)}"> |
|
107 | 107 | ${h.link_to(c.changeset.branch,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))} |
|
108 | 108 | </span> |
|
109 | 109 | %endif |
|
110 | 110 | %for tag in c.changeset.tags: |
|
111 | 111 | <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> |
|
112 | 112 | ${h.link_to(tag,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</span> |
|
113 | 113 | %endfor |
|
114 | 114 | </span> |
|
115 | 115 | </div> |
|
116 | 116 | </div> |
|
117 | 117 | <span> |
|
118 | 118 | % if c.limited_diff: |
|
119 | 119 | ${ungettext('%s file changed','%s files changed',len(c.changeset.affected_files)) % (len(c.changeset.affected_files))}: |
|
120 | 120 | % else: |
|
121 | 121 | ${ungettext('%s file changed with %s insertions and %s deletions','%s files changed with %s insertions and %s deletions', len(c.changeset.affected_files)) % (len(c.changeset.affected_files),c.lines_added,c.lines_deleted)}: |
|
122 | 122 | %endif |
|
123 | 123 | </span> |
|
124 | 124 | <div class="cs_files"> |
|
125 | 125 | %for FID, (cs1, cs2, change, path, diff, stats) in c.changes[c.changeset.raw_id].iteritems(): |
|
126 | 126 | <div class="cs_${change}"> |
|
127 | 127 | <div class="node"> |
|
128 | 128 | <a href="#${FID}">${h.safe_unicode(path)}</a> |
|
129 | 129 | </div> |
|
130 | 130 | <div class="changes">${h.fancy_file_stats(stats)}</div> |
|
131 | 131 | </div> |
|
132 | 132 | %endfor |
|
133 | 133 | % if c.limited_diff: |
|
134 | 134 | <h5>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h5> |
|
135 | 135 | % endif |
|
136 | 136 | </div> |
|
137 | 137 | </div> |
|
138 | 138 | |
|
139 | 139 | </div> |
|
140 | 140 | |
|
141 | 141 | ## diff block |
|
142 | 142 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
143 | 143 | ${diff_block.diff_block(c.changes[c.changeset.raw_id])} |
|
144 | 144 | |
|
145 | 145 | % if c.limited_diff: |
|
146 | 146 | <h4>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h4> |
|
147 | 147 | % endif |
|
148 | 148 | |
|
149 | 149 | ## template for inline comment form |
|
150 | 150 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> |
|
151 | 151 | ${comment.comment_inline_form()} |
|
152 | 152 | |
|
153 | 153 | ## render comments and inlines |
|
154 | 154 | ${comment.generate_comments()} |
|
155 | 155 | |
|
156 | 156 | ## main comment form and it status |
|
157 | 157 | ${comment.comments(h.url('changeset_comment', repo_name=c.repo_name, revision=c.changeset.raw_id), |
|
158 | 158 | h.changeset_status(c.rhodecode_db_repo, c.changeset.raw_id))} |
|
159 | 159 | |
|
160 | 160 | ## FORM FOR MAKING JS ACTION AS CHANGESET COMMENTS |
|
161 | 161 | <script type="text/javascript"> |
|
162 | 162 | YUE.onDOMReady(function(){ |
|
163 | 163 | YUE.on(YUQ('.show-inline-comments'),'change',function(e){ |
|
164 | 164 | var show = 'none'; |
|
165 | 165 | var target = e.currentTarget; |
|
166 | 166 | if(target == null){ |
|
167 | 167 | target = this; |
|
168 | 168 | } |
|
169 | 169 | if(target.checked){ |
|
170 | 170 | var show = '' |
|
171 | 171 | } |
|
172 | 172 | var boxid = YUD.getAttribute(target,'id_for'); |
|
173 | 173 | var comments = YUQ('#{0} .inline-comments'.format(boxid)); |
|
174 | 174 | for(c in comments){ |
|
175 | 175 | YUD.setStyle(comments[c],'display',show); |
|
176 | 176 | } |
|
177 | 177 | var btns = YUQ('#{0} .inline-comments-button'.format(boxid)); |
|
178 | 178 | for(c in btns){ |
|
179 | 179 | YUD.setStyle(btns[c],'display',show); |
|
180 | 180 | } |
|
181 | 181 | }) |
|
182 | 182 | |
|
183 | 183 | YUE.on(YUQ('.line'),'click',function(e){ |
|
184 | 184 | var tr = e.currentTarget; |
|
185 | 185 | if(tr == null){ |
|
186 | 186 | tr = this; |
|
187 | 187 | } |
|
188 | 188 | injectInlineForm(tr); |
|
189 | 189 | }); |
|
190 | 190 | |
|
191 | 191 | // inject comments into they proper positions |
|
192 | 192 | var file_comments = YUQ('.inline-comment-placeholder'); |
|
193 | 193 | renderInlineComments(file_comments); |
|
194 | 194 | }) |
|
195 | 195 | |
|
196 | 196 | </script> |
|
197 | 197 | |
|
198 | 198 | </div> |
|
199 | 199 | </%def> |
@@ -1,124 +1,120 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 | 5 | ${_('%s Changesets') % c.repo_name} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -> r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)} · ${c.rhodecode_name} |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | ${h.link_to(_(u'Home'),h.url('/'))} | |
|
10 | » | |
|
11 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} | |
|
12 | » | |
|
13 | 9 | ${_('Changesets')} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -> r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)} |
|
14 | 10 | </%def> |
|
15 | 11 | |
|
16 | 12 | <%def name="page_nav()"> |
|
17 | 13 | ${self.menu('changelog')} |
|
18 | 14 | </%def> |
|
19 | 15 | |
|
20 | 16 | <%def name="main()"> |
|
21 | 17 | ${self.context_bar('changelog')} |
|
22 | 18 | <div class="box"> |
|
23 | 19 | <!-- box / title --> |
|
24 | 20 | <div class="title"> |
|
25 | 21 | ${self.breadcrumbs()} |
|
26 | 22 | </div> |
|
27 | 23 | <div class="table"> |
|
28 | 24 | <div id="body" class="diffblock"> |
|
29 | 25 | <div class="code-header"> |
|
30 | 26 | <div> |
|
31 | 27 | ${h.link_to('r%s:%s -> r%s:%s' % (c.cs_ranges[0].revision, h.short_id(c.cs_ranges[0].raw_id), c.cs_ranges[-1].revision, h.short_id(c.cs_ranges[-1].raw_id)), |
|
32 | 28 | h.url('compare_url',repo_name=c.repo_name,org_ref_type='rev',org_ref=getattr(c.cs_ranges[0].parents[0] if c.cs_ranges[0].parents else h.EmptyChangeset(),'raw_id'),other_ref_type='rev',other_ref=c.cs_ranges[-1].raw_id) |
|
33 | 29 | )} |
|
34 | 30 | </div> |
|
35 | 31 | </div> |
|
36 | 32 | </div> |
|
37 | 33 | <div id="changeset_compare_view_content"> |
|
38 | 34 | <div class="container"> |
|
39 | 35 | <table class="compare_view_commits noborder"> |
|
40 | 36 | %for cnt,cs in enumerate(c.cs_ranges): |
|
41 | 37 | <tr> |
|
42 | 38 | <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),14)}"/></div></td> |
|
43 | 39 | <td>${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</td> |
|
44 | 40 | <td><div class="author">${h.person(cs.author)}</div></td> |
|
45 | 41 | <td><span class="tooltip" title="${h.age(cs.date)}">${cs.date}</span></td> |
|
46 | 42 | <td> |
|
47 | 43 | %if c.statuses: |
|
48 | 44 | <div title="${h.tooltip(_('Changeset status'))}" class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[cnt])}" /></div> |
|
49 | 45 | %endif |
|
50 | 46 | </td> |
|
51 | 47 | <td><div class="message">${h.urlify_commit(h.wrap_paragraphs(cs.message),c.repo_name)}</div></td> |
|
52 | 48 | </tr> |
|
53 | 49 | %endfor |
|
54 | 50 | </table> |
|
55 | 51 | </div> |
|
56 | 52 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Files affected')}</div> |
|
57 | 53 | <div class="cs_files"> |
|
58 | 54 | %for cs in c.cs_ranges: |
|
59 | 55 | <div class="cur_cs">${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div> |
|
60 | 56 | %for FID, (cs1, cs2, change, path, diff, stats) in c.changes[cs.raw_id].iteritems(): |
|
61 | 57 | <div class="cs_${change}">${h.link_to(h.safe_unicode(path),h.url.current(anchor=FID))}</div> |
|
62 | 58 | %endfor |
|
63 | 59 | %endfor |
|
64 | 60 | </div> |
|
65 | 61 | </div> |
|
66 | 62 | |
|
67 | 63 | </div> |
|
68 | 64 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> |
|
69 | 65 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
70 | 66 | %for cs in c.cs_ranges: |
|
71 | 67 | ##${comment.comment_inline_form(cs)} |
|
72 | 68 | ## diff block |
|
73 | 69 | <div class="h3"> |
|
74 | 70 | <a class="tooltip" title="${h.tooltip(cs.message)}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}">${'r%s:%s' % (cs.revision,h.short_id(cs.raw_id))}</a> |
|
75 | 71 | <div class="gravatar"> |
|
76 | 72 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),20)}"/> |
|
77 | 73 | </div> |
|
78 | 74 | <div class="right"> |
|
79 | 75 | <span class="logtags"> |
|
80 | 76 | %if len(cs.parents)>1: |
|
81 | 77 | <span class="merge">${_('merge')}</span> |
|
82 | 78 | %endif |
|
83 | 79 | %if cs.branch: |
|
84 | 80 | <span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}"> |
|
85 | 81 | ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} |
|
86 | 82 | </span> |
|
87 | 83 | %endif |
|
88 | 84 | %if h.is_hg(c.rhodecode_repo): |
|
89 | 85 | %for book in cs.bookmarks: |
|
90 | 86 | <span class="bookbook" title="${'%s %s' % (_('bookmark'),book)}"> |
|
91 | 87 | ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} |
|
92 | 88 | </span> |
|
93 | 89 | %endfor |
|
94 | 90 | %endif |
|
95 | 91 | %for tag in cs.tags: |
|
96 | 92 | <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> |
|
97 | 93 | ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span> |
|
98 | 94 | %endfor |
|
99 | 95 | </span> |
|
100 | 96 | </div> |
|
101 | 97 | </div> |
|
102 | 98 | ${diff_block.diff_block(c.changes[cs.raw_id])} |
|
103 | 99 | ##${comment.comments(cs)} |
|
104 | 100 | |
|
105 | 101 | %endfor |
|
106 | 102 | <script type="text/javascript"> |
|
107 | 103 | |
|
108 | 104 | YUE.onDOMReady(function(){ |
|
109 | 105 | |
|
110 | 106 | YUE.on(YUQ('.diff-menu-activate'),'click',function(e){ |
|
111 | 107 | var act = e.currentTarget.nextElementSibling; |
|
112 | 108 | |
|
113 | 109 | if(YUD.hasClass(act,'active')){ |
|
114 | 110 | YUD.removeClass(act,'active'); |
|
115 | 111 | YUD.setStyle(act,'display','none'); |
|
116 | 112 | }else{ |
|
117 | 113 | YUD.addClass(act,'active'); |
|
118 | 114 | YUD.setStyle(act,'display',''); |
|
119 | 115 | } |
|
120 | 116 | }); |
|
121 | 117 | }) |
|
122 | 118 | </script> |
|
123 | 119 | </div> |
|
124 | 120 | </%def> |
@@ -1,93 +1,89 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 | 5 | ${_('%s Compare') % c.repo_name} - ${'%s@%s' % (c.org_repo.repo_name, c.org_ref)} -> ${'%s@%s' % (c.other_repo.repo_name, c.other_ref)} · ${c.rhodecode_name} |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | ${h.link_to(_(u'Home'),h.url('/'))} | |
|
10 | » | |
|
11 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
|
12 | » | |
|
13 | ${_('compare')} | |
|
9 | ${_('Compare revisions')} | |
|
14 | 10 | </%def> |
|
15 | 11 | |
|
16 | 12 | <%def name="page_nav()"> |
|
17 | 13 | ${self.menu('changelog')} |
|
18 | 14 | </%def> |
|
19 | 15 | |
|
20 | 16 | <%def name="main()"> |
|
21 | 17 | ${self.context_bar('changelog')} |
|
22 | 18 | <div class="box"> |
|
23 | 19 | <!-- box / title --> |
|
24 | 20 | <div class="title"> |
|
25 | 21 | ${self.breadcrumbs()} |
|
26 | 22 | </div> |
|
27 | 23 | <div class="table"> |
|
28 | 24 | <div id="body" class="diffblock"> |
|
29 | 25 | <div class="code-header"> |
|
30 | 26 | <div> |
|
31 | 27 | ${'%s@%s' % (c.org_repo.repo_name, c.org_ref)} -> ${'%s@%s' % (c.other_repo.repo_name, c.other_ref)} <a href="${c.swap_url}">[swap]</a> |
|
32 | 28 | </div> |
|
33 | 29 | </div> |
|
34 | 30 | </div> |
|
35 | 31 | <div id="changeset_compare_view_content"> |
|
36 | 32 | ##CS |
|
37 | 33 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${ungettext('Showing %s commit','Showing %s commits', len(c.cs_ranges)) % len(c.cs_ranges)}</div> |
|
38 | 34 | <%include file="compare_cs.html" /> |
|
39 | 35 | |
|
40 | 36 | ## FILES |
|
41 | 37 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px"> |
|
42 | 38 | |
|
43 | 39 | % if c.limited_diff: |
|
44 | 40 | ${ungettext('%s file changed', '%s files changed', len(c.files)) % len(c.files)} |
|
45 | 41 | % else: |
|
46 | 42 | ${ungettext('%s file changed with %s insertions and %s deletions','%s files changed with %s insertions and %s deletions', len(c.files)) % (len(c.files),c.lines_added,c.lines_deleted)}: |
|
47 | 43 | %endif |
|
48 | 44 | |
|
49 | 45 | </div> |
|
50 | 46 | <div class="cs_files"> |
|
51 | 47 | %if not c.files: |
|
52 | 48 | <span class="empty_data">${_('No files')}</span> |
|
53 | 49 | %endif |
|
54 | 50 | %for fid, change, f, stat in c.files: |
|
55 | 51 | <div class="cs_${change}"> |
|
56 | 52 | <div class="node">${h.link_to(h.safe_unicode(f),h.url.current(anchor=fid, **request.GET.mixed()))}</div> |
|
57 | 53 | <div class="changes">${h.fancy_file_stats(stat)}</div> |
|
58 | 54 | </div> |
|
59 | 55 | %endfor |
|
60 | 56 | </div> |
|
61 | 57 | % if c.limited_diff: |
|
62 | 58 | <h5>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h5> |
|
63 | 59 | % endif |
|
64 | 60 | </div> |
|
65 | 61 | </div> |
|
66 | 62 | |
|
67 | 63 | ## diff block |
|
68 | 64 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
69 | 65 | %for fid, change, f, stat in c.files: |
|
70 | 66 | ${diff_block.diff_block_simple([c.changes[fid]])} |
|
71 | 67 | %endfor |
|
72 | 68 | % if c.limited_diff: |
|
73 | 69 | <h4>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h4> |
|
74 | 70 | % endif |
|
75 | 71 | <script type="text/javascript"> |
|
76 | 72 | |
|
77 | 73 | YUE.onDOMReady(function(){ |
|
78 | 74 | |
|
79 | 75 | YUE.on(YUQ('.diff-menu-activate'),'click',function(e){ |
|
80 | 76 | var act = e.currentTarget.nextElementSibling; |
|
81 | 77 | |
|
82 | 78 | if(YUD.hasClass(act,'active')){ |
|
83 | 79 | YUD.removeClass(act,'active'); |
|
84 | 80 | YUD.setStyle(act,'display','none'); |
|
85 | 81 | }else{ |
|
86 | 82 | YUD.addClass(act,'active'); |
|
87 | 83 | YUD.setStyle(act,'display',''); |
|
88 | 84 | } |
|
89 | 85 | }); |
|
90 | 86 | }) |
|
91 | 87 | </script> |
|
92 | 88 | </div> |
|
93 | 89 | </%def> |
@@ -1,50 +1,46 b'' | |||
|
1 | 1 | <%inherit file="/base/base.html"/> |
|
2 | 2 | |
|
3 | 3 | <%def name="title()"> |
|
4 | 4 | ${_('%s File Diff') % c.repo_name} · ${c.rhodecode_name} |
|
5 | 5 | </%def> |
|
6 | 6 | |
|
7 | 7 | <%def name="breadcrumbs_links()"> |
|
8 | ${h.link_to(_(u'Home'),h.url('/'))} | |
|
9 | » | |
|
10 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} | |
|
11 | » | |
|
12 | 8 | ${_('File diff')} r${c.changeset_1.revision}:${h.short_id(c.changeset_1.raw_id)} → r${c.changeset_2.revision}:${h.short_id(c.changeset_2.raw_id)} |
|
13 | 9 | </%def> |
|
14 | 10 | |
|
15 | 11 | <%def name="page_nav()"> |
|
16 | 12 | ${self.menu('files')} |
|
17 | 13 | </%def> |
|
18 | 14 | |
|
19 | 15 | <%def name="main()"> |
|
20 | 16 | ${self.context_bar('files')} |
|
21 | 17 | <div class="box"> |
|
22 | 18 | <!-- box / title --> |
|
23 | 19 | <div class="title"> |
|
24 | 20 | ${self.breadcrumbs()} |
|
25 | 21 | </div> |
|
26 | 22 | <div> |
|
27 | 23 | ## diff block |
|
28 | 24 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
29 | 25 | ${diff_block.diff_block(c.changes)} |
|
30 | 26 | </div> |
|
31 | 27 | </div> |
|
32 | 28 | |
|
33 | 29 | <script> |
|
34 | 30 | YUE.onDOMReady(function(){ |
|
35 | 31 | |
|
36 | 32 | YUE.on(YUQ('.diff-menu-activate'),'click',function(e){ |
|
37 | 33 | var act = e.currentTarget.nextElementSibling; |
|
38 | 34 | |
|
39 | 35 | if(YUD.hasClass(act,'active')){ |
|
40 | 36 | YUD.removeClass(act,'active'); |
|
41 | 37 | YUD.setStyle(act,'display','none'); |
|
42 | 38 | }else{ |
|
43 | 39 | YUD.addClass(act,'active'); |
|
44 | 40 | YUD.setStyle(act,'display',''); |
|
45 | 41 | } |
|
46 | 42 | }); |
|
47 | 43 | |
|
48 | 44 | }) |
|
49 | 45 | </script> |
|
50 | 46 | </%def> |
@@ -1,90 +1,86 b'' | |||
|
1 | 1 | <%inherit file="/base/base.html"/> |
|
2 | 2 | |
|
3 | 3 | <%def name="title()"> |
|
4 | 4 | ${_('%s Files Add') % c.repo_name} · ${c.rhodecode_name} |
|
5 | 5 | </%def> |
|
6 | 6 | |
|
7 | 7 | <%def name="js_extra()"> |
|
8 | 8 | <script type="text/javascript" src="${h.url('/js/codemirror.js')}"></script> |
|
9 | 9 | </%def> |
|
10 | 10 | <%def name="css_extra()"> |
|
11 | 11 | <link rel="stylesheet" type="text/css" href="${h.url('/css/codemirror.css')}"/> |
|
12 | 12 | </%def> |
|
13 | 13 | |
|
14 | 14 | <%def name="breadcrumbs_links()"> |
|
15 | ${h.link_to(_(u'Home'),h.url('/'))} | |
|
16 | » | |
|
17 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} | |
|
18 | » | |
|
19 | ${_('add file')} @ ${h.show_id(c.cs)} | |
|
15 | ${_('Add file')} @ ${h.show_id(c.cs)} | |
|
20 | 16 | </%def> |
|
21 | 17 | |
|
22 | 18 | <%def name="main()"> |
|
23 | 19 | ${self.context_bar('files')} |
|
24 | 20 | <div class="box"> |
|
25 | 21 | <!-- box / title --> |
|
26 | 22 | <div class="title"> |
|
27 | 23 | ${self.breadcrumbs()} |
|
28 | 24 | <ul class="links"> |
|
29 | 25 | <li> |
|
30 | 26 | <span style="text-transform: uppercase;"> |
|
31 | 27 | <a href="#">${_('branch')}: ${c.cs.branch}</a></span> |
|
32 | 28 | </li> |
|
33 | 29 | </ul> |
|
34 | 30 | </div> |
|
35 | 31 | <div class="table"> |
|
36 | 32 | <div id="files_data"> |
|
37 | 33 | ${h.form(h.url.current(),method='post',id='eform',enctype="multipart/form-data")} |
|
38 | 34 | <h3>${_('Add new file')}</h3> |
|
39 | 35 | <div class="form"> |
|
40 | 36 | <div class="fields"> |
|
41 | 37 | <div id="filename_container" class="field file"> |
|
42 | 38 | <div class="label"> |
|
43 | 39 | <label for="filename">${_('File Name')}:</label> |
|
44 | 40 | </div> |
|
45 | 41 | <div class="input"> |
|
46 | 42 | <input type="text" value="" size="30" name="filename" id="filename"> |
|
47 | 43 | ${_('or')} <span class="ui-btn" id="upload_file_enable">${_('Upload file')}</span> |
|
48 | 44 | </div> |
|
49 | 45 | </div> |
|
50 | 46 | <div id="upload_file_container" class="field" style="display:none"> |
|
51 | 47 | <div class="label"> |
|
52 | 48 | <label for="upload_file_container">${_('Upload file')}</label> |
|
53 | 49 | </div> |
|
54 | 50 | <div class="file"> |
|
55 | 51 | <input type="file" size="30" name="upload_file" id="upload_file"> |
|
56 | 52 | ${_('or')} <span class="ui-btn" id="file_enable">${_('Create new file')}</span> |
|
57 | 53 | </div> |
|
58 | 54 | </div> |
|
59 | 55 | <div class="field"> |
|
60 | 56 | <div class="label"> |
|
61 | 57 | <label for="location">${_('Location')}</label> |
|
62 | 58 | </div> |
|
63 | 59 | <div class="input"> |
|
64 | 60 | <input type="text" value="${c.f_path}" size="30" name="location" id="location"> |
|
65 | 61 | ${_('use / to separate directories')} |
|
66 | 62 | </div> |
|
67 | 63 | </div> |
|
68 | 64 | </div> |
|
69 | 65 | </div> |
|
70 | 66 | <div id="body" class="codeblock"> |
|
71 | 67 | <div id="editor_container"> |
|
72 | 68 | <pre id="editor_pre"></pre> |
|
73 | 69 | <textarea id="editor" name="content" style="display:none"></textarea> |
|
74 | 70 | </div> |
|
75 | 71 | <div style="padding: 10px;color:#666666">${_('commit message')}</div> |
|
76 | 72 | <textarea id="commit" name="message" style="height: 100px;width: 99%;margin-left:4px" placeholder="${c.default_message}"></textarea> |
|
77 | 73 | </div> |
|
78 | 74 | <div style="text-align: l;padding-top: 5px"> |
|
79 | 75 | ${h.submit('commit',_('Commit changes'),class_="ui-btn")} |
|
80 | 76 | ${h.reset('reset',_('Reset'),class_="ui-btn")} |
|
81 | 77 | </div> |
|
82 | 78 | ${h.end_form()} |
|
83 | 79 | <script type="text/javascript"> |
|
84 | 80 | var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path)}"; |
|
85 | 81 | initCodeMirror('editor',reset_url); |
|
86 | 82 | </script> |
|
87 | 83 | </div> |
|
88 | 84 | </div> |
|
89 | 85 | </div> |
|
90 | 86 | </%def> |
@@ -1,76 +1,72 b'' | |||
|
1 | 1 | <%inherit file="/base/base.html"/> |
|
2 | 2 | |
|
3 | 3 | <%def name="title()"> |
|
4 | 4 | ${_('%s Files Edit') % c.repo_name} · ${c.rhodecode_name} |
|
5 | 5 | </%def> |
|
6 | 6 | |
|
7 | 7 | <%def name="js_extra()"> |
|
8 | 8 | <script type="text/javascript" src="${h.url('/js/codemirror.js')}"></script> |
|
9 | 9 | </%def> |
|
10 | 10 | <%def name="css_extra()"> |
|
11 | 11 | <link rel="stylesheet" type="text/css" href="${h.url('/css/codemirror.css')}"/> |
|
12 | 12 | </%def> |
|
13 | 13 | |
|
14 | 14 | <%def name="breadcrumbs_links()"> |
|
15 | ${h.link_to(_(u'Home'),h.url('/'))} | |
|
16 | » | |
|
17 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} | |
|
18 | » | |
|
19 | ${_('edit file')} @ ${h.show_id(c.cs)} | |
|
15 | ${_('Edit file')} @ ${h.show_id(c.cs)} | |
|
20 | 16 | </%def> |
|
21 | 17 | |
|
22 | 18 | <%def name="main()"> |
|
23 | 19 | ${self.context_bar('files')} |
|
24 | 20 | <div class="box"> |
|
25 | 21 | <!-- box / title --> |
|
26 | 22 | <div class="title"> |
|
27 | 23 | ${self.breadcrumbs()} |
|
28 | 24 | <ul class="links"> |
|
29 | 25 | <li> |
|
30 | 26 | <span style="text-transform: uppercase;"> |
|
31 | 27 | <a href="#">${_('branch')}: ${c.cs.branch}</a></span> |
|
32 | 28 | </li> |
|
33 | 29 | </ul> |
|
34 | 30 | </div> |
|
35 | 31 | <div class="table"> |
|
36 | 32 | <div id="files_data"> |
|
37 | 33 | <h3 class="files_location">${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cs.revision,c.file.path)}</h3> |
|
38 | 34 | ${h.form(h.url.current(),method='post',id='eform')} |
|
39 | 35 | <div id="body" class="codeblock"> |
|
40 | 36 | <div class="code-header"> |
|
41 | 37 | <div class="stats"> |
|
42 | 38 | <div class="left"><img src="${h.url('/images/icons/file.png')}"/></div> |
|
43 | 39 | <div class="left item">${h.link_to("r%s:%s" % (c.file.changeset.revision,h.short_id(c.file.changeset.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=c.file.changeset.raw_id))}</div> |
|
44 | 40 | <div class="left item">${h.format_byte_size(c.file.size,binary=True)}</div> |
|
45 | 41 | <div class="left item last">${c.file.mimetype}</div> |
|
46 | 42 | <div class="buttons"> |
|
47 | 43 | ${h.link_to(_('show annotation'),h.url('files_annotate_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} |
|
48 | 44 | ${h.link_to(_('show as raw'),h.url('files_raw_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} |
|
49 | 45 | ${h.link_to(_('download as raw'),h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} |
|
50 | 46 | % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): |
|
51 | 47 | % if not c.file.is_binary: |
|
52 | 48 | ${h.link_to(_('source'),h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-btn")} |
|
53 | 49 | % endif |
|
54 | 50 | % endif |
|
55 | 51 | </div> |
|
56 | 52 | </div> |
|
57 | 53 | <div class="commit">${_('Editing file')}: ${c.file.unicode_path}</div> |
|
58 | 54 | </div> |
|
59 | 55 | <pre id="editor_pre"></pre> |
|
60 | 56 | <textarea id="editor" name="content" style="display:none">${h.escape(c.file.content)|n}</textarea> |
|
61 | 57 | <div style="padding: 10px;color:#666666">${_('commit message')}</div> |
|
62 | 58 | <textarea id="commit" name="message" style="height: 60px;width: 99%;margin-left:4px" placeholder="${c.default_message}"></textarea> |
|
63 | 59 | </div> |
|
64 | 60 | <div style="text-align: left;padding-top: 5px"> |
|
65 | 61 | ${h.submit('commit',_('Commit changes'),class_="ui-btn")} |
|
66 | 62 | ${h.reset('reset',_('Reset'),class_="ui-btn")} |
|
67 | 63 | </div> |
|
68 | 64 | ${h.end_form()} |
|
69 | 65 | <script type="text/javascript"> |
|
70 | 66 | var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.file.path)}"; |
|
71 | 67 | initCodeMirror('editor',reset_url); |
|
72 | 68 | </script> |
|
73 | 69 | </div> |
|
74 | 70 | </div> |
|
75 | 71 | </div> |
|
76 | 72 | </%def> |
@@ -1,100 +1,96 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 | 5 | ${_('%s Fork') % c.repo_name} · ${c.rhodecode_name} |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | ${h.link_to(_(u'Home'),h.url('/'))} | |
|
10 | » | |
|
11 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
|
12 | » | |
|
13 | ${_('fork')} | |
|
9 | ${_('Fork')} | |
|
14 | 10 | </%def> |
|
15 | 11 | |
|
16 | 12 | <%def name="main()"> |
|
17 | 13 | ${self.context_bar('showforks')} |
|
18 | 14 | <div class="box"> |
|
19 | 15 | <!-- box / title --> |
|
20 | 16 | <div class="title"> |
|
21 | 17 | ${self.breadcrumbs()} |
|
22 | 18 | </div> |
|
23 | 19 | ${h.form(url('repo_fork_create_home',repo_name=c.repo_info.repo_name))} |
|
24 | 20 | <div class="form"> |
|
25 | 21 | <!-- fields --> |
|
26 | 22 | <div class="fields"> |
|
27 | 23 | <div class="field"> |
|
28 | 24 | <div class="label"> |
|
29 | 25 | <label for="repo_name">${_('Fork name')}:</label> |
|
30 | 26 | </div> |
|
31 | 27 | <div class="input"> |
|
32 | 28 | ${h.text('repo_name',class_="small")} |
|
33 | 29 | ${h.hidden('repo_type',c.repo_info.repo_type)} |
|
34 | 30 | ${h.hidden('fork_parent_id',c.repo_info.repo_id)} |
|
35 | 31 | </div> |
|
36 | 32 | </div> |
|
37 | 33 | <div class="field"> |
|
38 | 34 | <div class="label"> |
|
39 | 35 | <label for="landing_rev">${_('Landing revision')}:</label> |
|
40 | 36 | </div> |
|
41 | 37 | <div class="input"> |
|
42 | 38 | ${h.select('landing_rev','',c.landing_revs,class_="medium")} |
|
43 | 39 | <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span> |
|
44 | 40 | </div> |
|
45 | 41 | </div> |
|
46 | 42 | <div class="field"> |
|
47 | 43 | <div class="label"> |
|
48 | 44 | <label for="repo_group">${_('Repository group')}:</label> |
|
49 | 45 | </div> |
|
50 | 46 | <div class="input"> |
|
51 | 47 | ${h.select('repo_group','',c.repo_groups,class_="medium")} |
|
52 | 48 | <span class="help-block">${_('Optionaly select a group to put this repository into.')}</span> |
|
53 | 49 | </div> |
|
54 | 50 | </div> |
|
55 | 51 | <div class="field"> |
|
56 | 52 | <div class="label label-textarea"> |
|
57 | 53 | <label for="description">${_('Description')}:</label> |
|
58 | 54 | </div> |
|
59 | 55 | <div class="textarea text-area editor"> |
|
60 | 56 | ${h.textarea('description',cols=23,rows=5)} |
|
61 | 57 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> |
|
62 | 58 | </div> |
|
63 | 59 | </div> |
|
64 | 60 | <div class="field"> |
|
65 | 61 | <div class="label label-checkbox"> |
|
66 | 62 | <label for="private">${_('Private')}:</label> |
|
67 | 63 | </div> |
|
68 | 64 | <div class="checkboxes"> |
|
69 | 65 | ${h.checkbox('private',value="True")} |
|
70 | 66 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> |
|
71 | 67 | </div> |
|
72 | 68 | </div> |
|
73 | 69 | <div class="field"> |
|
74 | 70 | <div class="label label-checkbox"> |
|
75 | 71 | <label for="private">${_('Copy permissions')}:</label> |
|
76 | 72 | </div> |
|
77 | 73 | <div class="checkboxes"> |
|
78 | 74 | ${h.checkbox('copy_permissions',value="True", checked="checked")} |
|
79 | 75 | <span class="help-block">${_('Copy permissions from forked repository')}</span> |
|
80 | 76 | </div> |
|
81 | 77 | </div> |
|
82 | 78 | %if c.can_update: |
|
83 | 79 | <div class="field"> |
|
84 | 80 | <div class="label label-checkbox"> |
|
85 | 81 | <label for="private">${_('Update after clone')}:</label> |
|
86 | 82 | </div> |
|
87 | 83 | <div class="checkboxes"> |
|
88 | 84 | ${h.checkbox('update_after_clone',value="True")} |
|
89 | 85 | <span class="help-block">${_('Checkout source after making a clone')}</span> |
|
90 | 86 | </div> |
|
91 | 87 | </div> |
|
92 | 88 | %endif |
|
93 | 89 | <div class="buttons"> |
|
94 | 90 | ${h.submit('',_('Fork this repository'),class_="ui-btn large")} |
|
95 | 91 | </div> |
|
96 | 92 | </div> |
|
97 | 93 | </div> |
|
98 | 94 | ${h.end_form()} |
|
99 | 95 | </div> |
|
100 | 96 | </%def> |
@@ -1,209 +1,205 b'' | |||
|
1 | 1 | <%inherit file="/base/base.html"/> |
|
2 | 2 | |
|
3 | 3 | <%def name="title()"> |
|
4 | 4 | ${c.repo_name} ${_('New pull request')} |
|
5 | 5 | </%def> |
|
6 | 6 | |
|
7 | 7 | <%def name="breadcrumbs_links()"> |
|
8 | ${h.link_to(_(u'Home'),h.url('/'))} | |
|
9 | » | |
|
10 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
|
11 | » | |
|
12 | ${_('new pull request')} | |
|
8 | ${_('New pull request')} | |
|
13 | 9 | </%def> |
|
14 | 10 | |
|
15 | 11 | <%def name="main()"> |
|
16 | 12 | ${self.context_bar('showpullrequest')} |
|
17 | 13 | <div class="box"> |
|
18 | 14 | <!-- box / title --> |
|
19 | 15 | <div class="title"> |
|
20 | 16 | ${self.breadcrumbs()} |
|
21 | 17 | </div> |
|
22 | 18 | ${h.form(url('pullrequest', repo_name=c.repo_name), method='post', id='pull_request_form')} |
|
23 | 19 | <div style="float:left;padding:0px 30px 30px 30px"> |
|
24 | 20 | ##ORG |
|
25 | 21 | <div style="float:left"> |
|
26 | 22 | <div> |
|
27 | 23 | <span style="font-size: 20px"> |
|
28 | 24 | ${h.select('org_repo','',c.org_repos,class_='refs')}:${h.select('org_ref',c.default_org_ref,c.org_refs,class_='refs')} |
|
29 | 25 | </span> |
|
30 | 26 | <div style="padding:5px 3px 3px 20px;">${c.rhodecode_db_repo.description}</div> |
|
31 | 27 | </div> |
|
32 | 28 | <div style="clear:both;padding-top: 10px"></div> |
|
33 | 29 | </div> |
|
34 | 30 | <div style="float:left;font-size:24px;padding:0px 20px"> |
|
35 | 31 | <img height=32 width=32 src="${h.url('/images/arrow_right_64.png')}"/> |
|
36 | 32 | </div> |
|
37 | 33 | |
|
38 | 34 | ##OTHER, most Probably the PARENT OF THIS FORK |
|
39 | 35 | <div style="float:left"> |
|
40 | 36 | <div> |
|
41 | 37 | <span style="font-size: 20px"> |
|
42 | 38 | ${h.select('other_repo',c.default_other_repo,c.other_repos,class_='refs')}:${c.default_other_repo_info['revs']} |
|
43 | 39 | </span> |
|
44 | 40 | <div id="other_repo_desc" style="padding:5px 3px 3px 20px;"></div> |
|
45 | 41 | </div> |
|
46 | 42 | <div style="clear:both;padding-top: 10px"></div> |
|
47 | 43 | </div> |
|
48 | 44 | <div style="clear:both;padding-top: 10px"></div> |
|
49 | 45 | ## overview pulled by ajax |
|
50 | 46 | <div style="float:left" id="pull_request_overview"></div> |
|
51 | 47 | <div style="float:left;clear:both;padding:10px 10px 10px 0px;display:none"> |
|
52 | 48 | <a id="pull_request_overview_url" href="#">${_('Detailed compare view')}</a> |
|
53 | 49 | </div> |
|
54 | 50 | </div> |
|
55 | 51 | <div style="float:left; border-left:1px dashed #eee"> |
|
56 | 52 | <h4>${_('Pull request reviewers')}</h4> |
|
57 | 53 | <div id="reviewers" style="padding:0px 0px 0px 15px"> |
|
58 | 54 | ## members goes here ! |
|
59 | 55 | <div class="group_members_wrap"> |
|
60 | 56 | <ul id="review_members" class="group_members"> |
|
61 | 57 | %for member in [c.default_other_repo_info['user']]: |
|
62 | 58 | <li id="reviewer_${member['user_id']}"> |
|
63 | 59 | <div class="reviewers_member"> |
|
64 | 60 | <div class="gravatar"><img alt="gravatar" src="${member['gravatar_link']}"/> </div> |
|
65 | 61 | <div style="float:left">${member['firstname']} ${member['lastname']} (${_('owner')})</div> |
|
66 | 62 | <input type="hidden" value="${member['user_id']}" name="review_members" /> |
|
67 | 63 | <span class="delete_icon action_button" onclick="removeReviewMember(${member['user_id']})"></span> |
|
68 | 64 | </div> |
|
69 | 65 | </li> |
|
70 | 66 | %endfor |
|
71 | 67 | </ul> |
|
72 | 68 | </div> |
|
73 | 69 | |
|
74 | 70 | <div class='ac'> |
|
75 | 71 | <div class="reviewer_ac"> |
|
76 | 72 | ${h.text('user', class_='yui-ac-input')} |
|
77 | 73 | <span class="help-block">${_('Add reviewer to this pull request.')}</span> |
|
78 | 74 | <div id="reviewers_container"></div> |
|
79 | 75 | </div> |
|
80 | 76 | </div> |
|
81 | 77 | </div> |
|
82 | 78 | </div> |
|
83 | 79 | <h3>${_('Create new pull request')}</h3> |
|
84 | 80 | |
|
85 | 81 | <div class="form"> |
|
86 | 82 | <!-- fields --> |
|
87 | 83 | |
|
88 | 84 | <div class="fields"> |
|
89 | 85 | |
|
90 | 86 | <div class="field"> |
|
91 | 87 | <div class="label"> |
|
92 | 88 | <label for="pullrequest_title">${_('Title')}:</label> |
|
93 | 89 | </div> |
|
94 | 90 | <div class="input"> |
|
95 | 91 | ${h.text('pullrequest_title',size=30)} |
|
96 | 92 | </div> |
|
97 | 93 | </div> |
|
98 | 94 | |
|
99 | 95 | <div class="field"> |
|
100 | 96 | <div class="label label-textarea"> |
|
101 | 97 | <label for="pullrequest_desc">${_('Description')}:</label> |
|
102 | 98 | </div> |
|
103 | 99 | <div class="textarea text-area editor"> |
|
104 | 100 | ${h.textarea('pullrequest_desc',size=30)} |
|
105 | 101 | </div> |
|
106 | 102 | </div> |
|
107 | 103 | |
|
108 | 104 | <div class="buttons"> |
|
109 | 105 | ${h.submit('save',_('Send pull request'),class_="ui-btn large")} |
|
110 | 106 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
111 | 107 | </div> |
|
112 | 108 | </div> |
|
113 | 109 | </div> |
|
114 | 110 | ${h.end_form()} |
|
115 | 111 | |
|
116 | 112 | </div> |
|
117 | 113 | |
|
118 | 114 | <script type="text/javascript"> |
|
119 | 115 | var _USERS_AC_DATA = ${c.users_array|n}; |
|
120 | 116 | var _GROUPS_AC_DATA = ${c.users_groups_array|n}; |
|
121 | 117 | PullRequestAutoComplete('user', 'reviewers_container', _USERS_AC_DATA, _GROUPS_AC_DATA); |
|
122 | 118 | |
|
123 | 119 | var other_repos_info = ${c.other_repos_info|n}; |
|
124 | 120 | |
|
125 | 121 | var otherrepoChanged = function(){ |
|
126 | 122 | var sel_box = YUQ('#pull_request_form #other_repo')[0]; |
|
127 | 123 | var repo_name = sel_box.options[sel_box.selectedIndex].value; |
|
128 | 124 | |
|
129 | 125 | YUD.get('other_repo_desc').innerHTML = other_repos_info[repo_name]['description']; |
|
130 | 126 | // replace options of other_ref with the ones for the current other_repo |
|
131 | 127 | var other_ref_selector = YUD.get('other_ref'); |
|
132 | 128 | var new_select = YUD.createElementFromMarkup(other_repos_info[repo_name]['revs']); |
|
133 | 129 | var new_selectedIndex = new_select.selectedIndex; |
|
134 | 130 | other_ref_selector.innerHTML = ""; // clear old options |
|
135 | 131 | while (new_select.length > 0){ // children will be popped when appened to other_ref_selector |
|
136 | 132 | other_ref_selector.appendChild(new_select.children[0]); |
|
137 | 133 | } |
|
138 | 134 | // browsers lost track of selected when appendChild was used |
|
139 | 135 | other_ref_selector.selectedIndex = new_selectedIndex; |
|
140 | 136 | |
|
141 | 137 | // reset && add the reviewer based on selected repo |
|
142 | 138 | var _data = other_repos_info[repo_name]; |
|
143 | 139 | YUD.get('review_members').innerHTML = ''; |
|
144 | 140 | addReviewMember(_data.user.user_id, _data.user.firstname, |
|
145 | 141 | _data.user.lastname, _data.user.username, |
|
146 | 142 | _data.user.gravatar_link); |
|
147 | 143 | } |
|
148 | 144 | |
|
149 | 145 | var loadPreview = function(){ |
|
150 | 146 | //url template |
|
151 | 147 | var url = "${h.url('compare_url', |
|
152 | 148 | repo_name='__other_repo__', |
|
153 | 149 | org_ref_type='__other_ref_type__', |
|
154 | 150 | org_ref='__other_ref__', |
|
155 | 151 | other_repo='__org_repo__', |
|
156 | 152 | other_ref_type='__org_ref_type__', |
|
157 | 153 | other_ref='__org_ref__', |
|
158 | 154 | as_form=True, |
|
159 | 155 | merge=True, |
|
160 | 156 | )}"; |
|
161 | 157 | var org_repo = YUQ('#pull_request_form #org_repo')[0].value; |
|
162 | 158 | var org_ref = YUQ('#pull_request_form #org_ref')[0].value.split(':'); |
|
163 | 159 | |
|
164 | 160 | var other_repo = YUQ('#pull_request_form #other_repo')[0].value; |
|
165 | 161 | var other_ref = YUQ('#pull_request_form #other_ref')[0].value.split(':'); |
|
166 | 162 | |
|
167 | 163 | var select_refs = YUQ('#pull_request_form select.refs') |
|
168 | 164 | var rev_data = { |
|
169 | 165 | 'org_repo': org_repo, |
|
170 | 166 | 'org_ref': org_ref[2], |
|
171 | 167 | 'org_ref_type': 'rev', |
|
172 | 168 | 'other_repo': other_repo, |
|
173 | 169 | 'other_ref': other_ref[2], |
|
174 | 170 | 'other_ref_type': 'rev', |
|
175 | 171 | }; // gather the org/other ref and repo here |
|
176 | 172 | |
|
177 | 173 | for (k in rev_data){ |
|
178 | 174 | url = url.replace('__'+k+'__',rev_data[k]); |
|
179 | 175 | } |
|
180 | 176 | |
|
181 | 177 | YUD.get('pull_request_overview').innerHTML = "${_('Loading ...')}"; |
|
182 | 178 | ypjax(url,'pull_request_overview'); |
|
183 | 179 | |
|
184 | 180 | YUD.get('pull_request_overview_url').href = url; // shouldn't have as_form ... but ... |
|
185 | 181 | YUD.setStyle(YUD.get('pull_request_overview_url').parentElement,'display',''); |
|
186 | 182 | } |
|
187 | 183 | |
|
188 | 184 | ## refresh automatically when something changes (org_repo can't change) |
|
189 | 185 | |
|
190 | 186 | YUE.on('org_ref', 'change', function(e){ |
|
191 | 187 | loadPreview(); |
|
192 | 188 | }); |
|
193 | 189 | |
|
194 | 190 | YUE.on('other_repo', 'change', function(e){ |
|
195 | 191 | otherrepoChanged(); |
|
196 | 192 | loadPreview(); |
|
197 | 193 | }); |
|
198 | 194 | |
|
199 | 195 | YUE.on('other_ref', 'change', function(e){ |
|
200 | 196 | loadPreview(); |
|
201 | 197 | }); |
|
202 | 198 | |
|
203 | 199 | otherrepoChanged(); |
|
204 | 200 | //lazy load overview after 0.5s |
|
205 | 201 | setTimeout(loadPreview, 500); |
|
206 | 202 | |
|
207 | 203 | </script> |
|
208 | 204 | |
|
209 | 205 | </%def> |
@@ -1,248 +1,244 b'' | |||
|
1 | 1 | <%inherit file="/base/base.html"/> |
|
2 | 2 | |
|
3 | 3 | <%def name="title()"> |
|
4 | 4 | ${_('%s Pull Request #%s') % (c.repo_name, c.pull_request.pull_request_id)} · ${c.rhodecode_name} |
|
5 | 5 | </%def> |
|
6 | 6 | |
|
7 | 7 | <%def name="breadcrumbs_links()"> |
|
8 | ${h.link_to(_(u'Home'),h.url('/'))} | |
|
9 | » | |
|
10 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} | |
|
11 | » | |
|
12 | 8 | ${_('Pull request #%s') % c.pull_request.pull_request_id} |
|
13 | 9 | </%def> |
|
14 | 10 | |
|
15 | 11 | <%def name="main()"> |
|
16 | 12 | ${self.context_bar('showpullrequest')} |
|
17 | 13 | <div class="box"> |
|
18 | 14 | <!-- box / title --> |
|
19 | 15 | <div class="title"> |
|
20 | 16 | ${self.breadcrumbs()} |
|
21 | 17 | </div> |
|
22 | 18 | %if c.pull_request.is_closed(): |
|
23 | 19 | <div style="padding:10px; font-size:22px;width:100%;text-align: center; color:#88D882">${_('Closed %s') % (h.age(c.pull_request.updated_on))} ${_('with status %s') % h.changeset_status_lbl(c.current_changeset_status)}</div> |
|
24 | 20 | %endif |
|
25 | 21 | <h3> |
|
26 | 22 | %if c.pull_request.is_closed(): |
|
27 | 23 | <img src="${h.url('/images/icons/lock_go.png')}" title="${_('Closed')}"/> |
|
28 | 24 | %endif |
|
29 | 25 | <img src="${h.url('/images/icons/flag_status_%s.png' % str(c.pull_request.last_review_status))}" /> |
|
30 | 26 | ${_('Title')}: ${c.pull_request.title}</h3> |
|
31 | 27 | |
|
32 | 28 | <div class="form"> |
|
33 | 29 | <div id="summary" class="fields"> |
|
34 | 30 | <div class="field"> |
|
35 | 31 | <div class="label-summary"> |
|
36 | 32 | <label>${_('Review status')}:</label> |
|
37 | 33 | </div> |
|
38 | 34 | <div class="input"> |
|
39 | 35 | <div class="changeset-status-container" style="float:none;clear:both"> |
|
40 | 36 | %if c.current_changeset_status: |
|
41 | 37 | <div title="${_('Pull request status')}" class="changeset-status-lbl">${h.changeset_status_lbl(c.current_changeset_status)}</div> |
|
42 | 38 | <div class="changeset-status-ico" style="padding:1px 4px"><img src="${h.url('/images/icons/flag_status_%s.png' % c.current_changeset_status)}" /></div> |
|
43 | 39 | %endif |
|
44 | 40 | </div> |
|
45 | 41 | </div> |
|
46 | 42 | </div> |
|
47 | 43 | <div class="field"> |
|
48 | 44 | <div class="label-summary"> |
|
49 | 45 | <label>${_('Still not reviewed by')}:</label> |
|
50 | 46 | </div> |
|
51 | 47 | <div class="input"> |
|
52 | 48 | % if len(c.pull_request_pending_reviewers) > 0: |
|
53 | 49 | <div class="tooltip" title="${h.tooltip(','.join([x.username for x in c.pull_request_pending_reviewers]))}">${ungettext('%d reviewer', '%d reviewers',len(c.pull_request_pending_reviewers)) % len(c.pull_request_pending_reviewers)}</div> |
|
54 | 50 | %else: |
|
55 | 51 | <div>${_('pull request was reviewed by all reviewers')}</div> |
|
56 | 52 | %endif |
|
57 | 53 | </div> |
|
58 | 54 | </div> |
|
59 | 55 | <div class="field"> |
|
60 | 56 | <div class="label-summary"> |
|
61 | 57 | <label>${_('Origin repository')}:</label> |
|
62 | 58 | </div> |
|
63 | 59 | <div class="input"> |
|
64 | 60 | <div> |
|
65 | 61 | ##%if h.is_hg(c.pull_request.org_repo): |
|
66 | 62 | ## <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/> |
|
67 | 63 | ##%elif h.is_git(c.pull_request.org_repo): |
|
68 | 64 | ## <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/> |
|
69 | 65 | ##%endif |
|
70 | 66 | <span class="spantag">${c.pull_request.org_ref_parts[0]}: ${c.pull_request.org_ref_parts[1]}</span> |
|
71 | 67 | <span><a href="${h.url('summary_home', repo_name=c.pull_request.org_repo.repo_name)}">${c.pull_request.org_repo.clone_url()}</a></span> |
|
72 | 68 | </div> |
|
73 | 69 | </div> |
|
74 | 70 | </div> |
|
75 | 71 | <div class="field"> |
|
76 | 72 | <div class="label-summary"> |
|
77 | 73 | <label>${_('Summary')}:</label> |
|
78 | 74 | </div> |
|
79 | 75 | <div class="input"> |
|
80 | 76 | <div style="white-space:pre-wrap">${h.literal(c.pull_request.description)}</div> |
|
81 | 77 | </div> |
|
82 | 78 | </div> |
|
83 | 79 | <div class="field"> |
|
84 | 80 | <div class="label-summary"> |
|
85 | 81 | <label>${_('Created on')}:</label> |
|
86 | 82 | </div> |
|
87 | 83 | <div class="input"> |
|
88 | 84 | <div>${h.fmt_date(c.pull_request.created_on)}</div> |
|
89 | 85 | </div> |
|
90 | 86 | </div> |
|
91 | 87 | </div> |
|
92 | 88 | </div> |
|
93 | 89 | |
|
94 | 90 | <div style="overflow: auto;"> |
|
95 | 91 | ##DIFF |
|
96 | 92 | <div class="table" style="float:left;clear:none"> |
|
97 | 93 | <div id="body" class="diffblock"> |
|
98 | 94 | <div style="white-space:pre-wrap;padding:5px">${_('Compare view')}</div> |
|
99 | 95 | </div> |
|
100 | 96 | <div id="changeset_compare_view_content"> |
|
101 | 97 | ##CS |
|
102 | 98 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${ungettext('Showing %s commit','Showing %s commits', len(c.cs_ranges)) % len(c.cs_ranges)}</div> |
|
103 | 99 | <%include file="/compare/compare_cs.html" /> |
|
104 | 100 | |
|
105 | 101 | ## FILES |
|
106 | 102 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px"> |
|
107 | 103 | |
|
108 | 104 | % if c.limited_diff: |
|
109 | 105 | ${ungettext('%s file changed', '%s files changed', len(c.files)) % len(c.files)} |
|
110 | 106 | % else: |
|
111 | 107 | ${ungettext('%s file changed with %s insertions and %s deletions','%s files changed with %s insertions and %s deletions', len(c.files)) % (len(c.files),c.lines_added,c.lines_deleted)}: |
|
112 | 108 | %endif |
|
113 | 109 | |
|
114 | 110 | </div> |
|
115 | 111 | <div class="cs_files"> |
|
116 | 112 | %if not c.files: |
|
117 | 113 | <span class="empty_data">${_('No files')}</span> |
|
118 | 114 | %endif |
|
119 | 115 | %for fid, change, f, stat in c.files: |
|
120 | 116 | <div class="cs_${change}"> |
|
121 | 117 | <div class="node">${h.link_to(h.safe_unicode(f),h.url.current(anchor=fid))}</div> |
|
122 | 118 | <div class="changes">${h.fancy_file_stats(stat)}</div> |
|
123 | 119 | </div> |
|
124 | 120 | %endfor |
|
125 | 121 | </div> |
|
126 | 122 | % if c.limited_diff: |
|
127 | 123 | <h5>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h5> |
|
128 | 124 | % endif |
|
129 | 125 | </div> |
|
130 | 126 | </div> |
|
131 | 127 | ## REVIEWERS |
|
132 | 128 | <div style="float:left; border-left:1px dashed #eee"> |
|
133 | 129 | <h4>${_('Pull request reviewers')}</h4> |
|
134 | 130 | <div id="reviewers" style="padding:0px 0px 5px 10px"> |
|
135 | 131 | ## members goes here ! |
|
136 | 132 | <div class="group_members_wrap" style="min-height:45px"> |
|
137 | 133 | <ul id="review_members" class="group_members"> |
|
138 | 134 | %for member,status in c.pull_request_reviewers: |
|
139 | 135 | <li id="reviewer_${member.user_id}"> |
|
140 | 136 | <div class="reviewers_member"> |
|
141 | 137 | <div style="float:left;padding:0px 3px 0px 0px" class="tooltip" title="${h.tooltip(h.changeset_status_lbl(status[0][1].status if status else 'not_reviewed'))}"> |
|
142 | 138 | <img src="${h.url(str('/images/icons/flag_status_%s.png' % (status[0][1].status if status else 'not_reviewed')))}"/> |
|
143 | 139 | </div> |
|
144 | 140 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(member.email,14)}"/> </div> |
|
145 | 141 | <div style="float:left">${member.full_name} (${_('owner') if c.pull_request.user_id == member.user_id else _('reviewer')})</div> |
|
146 | 142 | <input type="hidden" value="${member.user_id}" name="review_members" /> |
|
147 | 143 | %if not c.pull_request.is_closed() and (h.HasPermissionAny('hg.admin', 'repository.admin')() or c.pull_request.user_id == c.rhodecode_user.user_id): |
|
148 | 144 | <span class="delete_icon action_button" onclick="removeReviewMember(${member.user_id})"></span> |
|
149 | 145 | %endif |
|
150 | 146 | </div> |
|
151 | 147 | </li> |
|
152 | 148 | %endfor |
|
153 | 149 | </ul> |
|
154 | 150 | </div> |
|
155 | 151 | %if not c.pull_request.is_closed(): |
|
156 | 152 | <div class='ac'> |
|
157 | 153 | %if h.HasPermissionAny('hg.admin', 'repository.admin')() or c.pull_request.author.user_id == c.rhodecode_user.user_id: |
|
158 | 154 | <div class="reviewer_ac"> |
|
159 | 155 | ${h.text('user', class_='yui-ac-input')} |
|
160 | 156 | <span class="help-block">${_('Add or remove reviewer to this pull request.')}</span> |
|
161 | 157 | <div id="reviewers_container"></div> |
|
162 | 158 | </div> |
|
163 | 159 | <div style="padding:0px 10px"> |
|
164 | 160 | <span id="update_pull_request" class="ui-btn xsmall">${_('Save changes')}</span> |
|
165 | 161 | </div> |
|
166 | 162 | %endif |
|
167 | 163 | </div> |
|
168 | 164 | %endif |
|
169 | 165 | </div> |
|
170 | 166 | </div> |
|
171 | 167 | </div> |
|
172 | 168 | <script> |
|
173 | 169 | var _USERS_AC_DATA = ${c.users_array|n}; |
|
174 | 170 | var _GROUPS_AC_DATA = ${c.users_groups_array|n}; |
|
175 | 171 | // TODO: switch this to pyroutes |
|
176 | 172 | AJAX_COMMENT_URL = "${url('pullrequest_comment',repo_name=c.repo_name,pull_request_id=c.pull_request.pull_request_id)}"; |
|
177 | 173 | AJAX_COMMENT_DELETE_URL = "${url('pullrequest_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"; |
|
178 | 174 | |
|
179 | 175 | pyroutes.register('pullrequest_comment', "${url('pullrequest_comment',repo_name='%(repo_name)s',pull_request_id='%(pull_request_id)s')}", ['repo_name', 'pull_request_id']); |
|
180 | 176 | pyroutes.register('pullrequest_comment_delete', "${url('pullrequest_comment_delete',repo_name='%(repo_name)s',comment_id='%(comment_id)s')}", ['repo_name', 'comment_id']); |
|
181 | 177 | pyroutes.register('pullrequest_update', "${url('pullrequest_update',repo_name='%(repo_name)s',pull_request_id='%(pull_request_id)s')}", ['repo_name', 'pull_request_id']); |
|
182 | 178 | |
|
183 | 179 | </script> |
|
184 | 180 | |
|
185 | 181 | ## diff block |
|
186 | 182 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
187 | 183 | %for fid, change, f, stat in c.files: |
|
188 | 184 | ${diff_block.diff_block_simple([c.changes[fid]])} |
|
189 | 185 | %endfor |
|
190 | 186 | % if c.limited_diff: |
|
191 | 187 | <h4>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h4> |
|
192 | 188 | % endif |
|
193 | 189 | |
|
194 | 190 | |
|
195 | 191 | ## template for inline comment form |
|
196 | 192 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> |
|
197 | 193 | ${comment.comment_inline_form()} |
|
198 | 194 | |
|
199 | 195 | ## render comments and inlines |
|
200 | 196 | ${comment.generate_comments(include_pr=True)} |
|
201 | 197 | |
|
202 | 198 | % if not c.pull_request.is_closed(): |
|
203 | 199 | ## main comment form and it status |
|
204 | 200 | ${comment.comments(h.url('pullrequest_comment', repo_name=c.repo_name, |
|
205 | 201 | pull_request_id=c.pull_request.pull_request_id), |
|
206 | 202 | c.current_changeset_status, |
|
207 | 203 | close_btn=True, change_status=c.allowed_to_change_status)} |
|
208 | 204 | %endif |
|
209 | 205 | |
|
210 | 206 | <script type="text/javascript"> |
|
211 | 207 | YUE.onDOMReady(function(){ |
|
212 | 208 | PullRequestAutoComplete('user', 'reviewers_container', _USERS_AC_DATA, _GROUPS_AC_DATA); |
|
213 | 209 | |
|
214 | 210 | YUE.on(YUQ('.show-inline-comments'),'change',function(e){ |
|
215 | 211 | var show = 'none'; |
|
216 | 212 | var target = e.currentTarget; |
|
217 | 213 | if(target.checked){ |
|
218 | 214 | var show = '' |
|
219 | 215 | } |
|
220 | 216 | var boxid = YUD.getAttribute(target,'id_for'); |
|
221 | 217 | var comments = YUQ('#{0} .inline-comments'.format(boxid)); |
|
222 | 218 | for(c in comments){ |
|
223 | 219 | YUD.setStyle(comments[c],'display',show); |
|
224 | 220 | } |
|
225 | 221 | var btns = YUQ('#{0} .inline-comments-button'.format(boxid)); |
|
226 | 222 | for(c in btns){ |
|
227 | 223 | YUD.setStyle(btns[c],'display',show); |
|
228 | 224 | } |
|
229 | 225 | }) |
|
230 | 226 | |
|
231 | 227 | YUE.on(YUQ('.line'),'click',function(e){ |
|
232 | 228 | var tr = e.currentTarget; |
|
233 | 229 | injectInlineForm(tr); |
|
234 | 230 | }); |
|
235 | 231 | |
|
236 | 232 | // inject comments into they proper positions |
|
237 | 233 | var file_comments = YUQ('.inline-comment-placeholder'); |
|
238 | 234 | renderInlineComments(file_comments); |
|
239 | 235 | |
|
240 | 236 | YUE.on(YUD.get('update_pull_request'),'click',function(e){ |
|
241 | 237 | updateReviewers(undefined, "${c.repo_name}", "${c.pull_request.pull_request_id}"); |
|
242 | 238 | }) |
|
243 | 239 | }) |
|
244 | 240 | </script> |
|
245 | 241 | |
|
246 | 242 | </div> |
|
247 | 243 | |
|
248 | 244 | </%def> |
@@ -1,142 +1,138 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | ## |
|
3 | 3 | ## See also repo_edit.html |
|
4 | 4 | ## |
|
5 | 5 | <%inherit file="/base/base.html"/> |
|
6 | 6 | |
|
7 | 7 | <%def name="title()"> |
|
8 | 8 | ${_('%s Settings') % c.repo_name} · ${c.rhodecode_name} |
|
9 | 9 | </%def> |
|
10 | 10 | |
|
11 | 11 | <%def name="breadcrumbs_links()"> |
|
12 | ${h.link_to(_(u'Home'),h.url('/'))} | |
|
13 | » | |
|
14 | ${h.link_to(c.repo_info.repo_name,h.url('summary_home',repo_name=c.repo_info.repo_name))} | |
|
15 | » | |
|
16 | 12 | ${_('Settings')} |
|
17 | 13 | </%def> |
|
18 | 14 | |
|
19 | 15 | <%def name="page_nav()"> |
|
20 | 16 | ${self.menu('settings')} |
|
21 | 17 | </%def> |
|
22 | 18 | |
|
23 | 19 | <%def name="main()"> |
|
24 | 20 | ${self.context_bar('options')} |
|
25 | 21 | <div class="box"> |
|
26 | 22 | <!-- box / title --> |
|
27 | 23 | <div class="title"> |
|
28 | 24 | ${self.breadcrumbs()} |
|
29 | 25 | </div> |
|
30 | 26 | ${h.form(url('repo_settings_update', repo_name=c.repo_info.repo_name),method='put')} |
|
31 | 27 | <div class="form"> |
|
32 | 28 | <!-- fields --> |
|
33 | 29 | <div class="fields"> |
|
34 | 30 | <div class="field"> |
|
35 | 31 | <div class="label"> |
|
36 | 32 | <label for="repo_name">${_('Name')}:</label> |
|
37 | 33 | </div> |
|
38 | 34 | <div class="input"> |
|
39 | 35 | ${h.text('repo_name',class_="medium")} |
|
40 | 36 | </div> |
|
41 | 37 | </div> |
|
42 | 38 | <div class="field"> |
|
43 | 39 | <div class="label"> |
|
44 | 40 | <label for="clone_uri">${_('Clone uri')}:</label> |
|
45 | 41 | </div> |
|
46 | 42 | <div class="input"> |
|
47 | 43 | ${h.text('clone_uri',class_="medium")} |
|
48 | 44 | <span class="help-block">${_('Optional http[s] url from which repository should be cloned.')}</span> |
|
49 | 45 | </div> |
|
50 | 46 | </div> |
|
51 | 47 | <div class="field"> |
|
52 | 48 | <div class="label"> |
|
53 | 49 | <label for="repo_group">${_('Repository group')}:</label> |
|
54 | 50 | </div> |
|
55 | 51 | <div class="input"> |
|
56 | 52 | ${h.select('repo_group','',c.repo_groups,class_="medium")} |
|
57 | 53 | <span class="help-block">${_('Optional select a group to put this repository into.')}</span> |
|
58 | 54 | </div> |
|
59 | 55 | </div> |
|
60 | 56 | <div class="field"> |
|
61 | 57 | <div class="label"> |
|
62 | 58 | <label for="landing_rev">${_('Landing revision')}:</label> |
|
63 | 59 | </div> |
|
64 | 60 | <div class="input"> |
|
65 | 61 | ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")} |
|
66 | 62 | <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span> |
|
67 | 63 | </div> |
|
68 | 64 | </div> |
|
69 | 65 | <div class="field"> |
|
70 | 66 | <div class="label label-textarea"> |
|
71 | 67 | <label for="repo_description">${_('Description')}:</label> |
|
72 | 68 | </div> |
|
73 | 69 | <div class="textarea text-area editor"> |
|
74 | 70 | ${h.textarea('repo_description')} |
|
75 | 71 | <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span> |
|
76 | 72 | </div> |
|
77 | 73 | </div> |
|
78 | 74 | |
|
79 | 75 | <div class="field"> |
|
80 | 76 | <div class="label label-checkbox"> |
|
81 | 77 | <label for="repo_private">${_('Private repository')}:</label> |
|
82 | 78 | </div> |
|
83 | 79 | <div class="checkboxes"> |
|
84 | 80 | ${h.checkbox('repo_private',value="True")} |
|
85 | 81 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> |
|
86 | 82 | </div> |
|
87 | 83 | </div> |
|
88 | 84 | %if c.visual.repository_fields: |
|
89 | 85 | ## EXTRA FIELDS |
|
90 | 86 | %for field in c.repo_fields: |
|
91 | 87 | <div class="field"> |
|
92 | 88 | <div class="label"> |
|
93 | 89 | <label for="${field.field_key_prefixed}">${field.field_label} (${field.field_key}):</label> |
|
94 | 90 | </div> |
|
95 | 91 | <div class="input input-medium"> |
|
96 | 92 | ${h.text(field.field_key_prefixed, field.field_value, class_='medium')} |
|
97 | 93 | %if field.field_desc: |
|
98 | 94 | <span class="help-block">${field.field_desc}</span> |
|
99 | 95 | %endif |
|
100 | 96 | </div> |
|
101 | 97 | </div> |
|
102 | 98 | %endfor |
|
103 | 99 | %endif |
|
104 | 100 | <div class="field"> |
|
105 | 101 | <div class="label"> |
|
106 | 102 | <label for="input">${_('Permissions')}:</label> |
|
107 | 103 | </div> |
|
108 | 104 | <div class="input"> |
|
109 | 105 | <%include file="../admin/repos/repo_edit_perms.html"/> |
|
110 | 106 | </div> |
|
111 | 107 | </div> |
|
112 | 108 | |
|
113 | 109 | <div class="buttons"> |
|
114 | 110 | ${h.submit('save',_('Save'),class_="ui-btn large")} |
|
115 | 111 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
116 | 112 | </div> |
|
117 | 113 | |
|
118 | 114 | </div> |
|
119 | 115 | </div> |
|
120 | 116 | ${h.end_form()} |
|
121 | 117 | |
|
122 | 118 | <h3>${_('Delete')}</h3> |
|
123 | 119 | ${h.form(url('repo_settings_delete', repo_name=c.repo_info.repo_name),method='delete')} |
|
124 | 120 | <div class="form"> |
|
125 | 121 | <div class="fields"> |
|
126 | 122 | <div class="field" style="border:none;color:#888"> |
|
127 | 123 | <div class="label"> |
|
128 | 124 | <label for="">${_('Remove repository')}:</label> |
|
129 | 125 | </div> |
|
130 | 126 | <div class="checkboxes"> |
|
131 | 127 | ${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 | 128 | <ul> |
|
133 | 129 | <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> |
|
134 | 130 | </ul> |
|
135 | 131 | </div> |
|
136 | 132 | </div> |
|
137 | 133 | </div> |
|
138 | 134 | </div> |
|
139 | 135 | ${h.end_form()} |
|
140 | 136 | |
|
141 | 137 | </div> |
|
142 | 138 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now