Show More
@@ -156,6 +156,14 b'' | |||||
156 | position: relative; |
|
156 | position: relative; | |
157 | } |
|
157 | } | |
158 |
|
158 | |||
|
159 | .menulink { | |||
|
160 | &.disabled { | |||
|
161 | color: @grey3; | |||
|
162 | cursor: default; | |||
|
163 | opacity: 0.5; | |||
|
164 | } | |||
|
165 | } | |||
|
166 | ||||
159 | #quick_login { |
|
167 | #quick_login { | |
160 |
|
168 | |||
161 | li a { |
|
169 | li a { |
@@ -308,43 +308,34 b'' | |||||
308 | <li class="${is_active('settings')}"><a class="menulink" href="${h.route_path('edit_repo',repo_name=c.repo_name)}"><div class="menulabel">${_('Repository Settings')}</div></a></li> |
|
308 | <li class="${is_active('settings')}"><a class="menulink" href="${h.route_path('edit_repo',repo_name=c.repo_name)}"><div class="menulabel">${_('Repository Settings')}</div></a></li> | |
309 | %endif |
|
309 | %endif | |
310 |
|
310 | |||
|
311 | ## determine if we have "any" option available | |||
|
312 | <% | |||
|
313 | can_lock = h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking | |||
|
314 | has_actions = (c.rhodecode_user.username != h.DEFAULT_USER and c.rhodecode_db_repo.repo_type in ['git','hg'] ) or can_lock | |||
|
315 | %> | |||
311 | <li class="${is_active('options')}"> |
|
316 | <li class="${is_active('options')}"> | |
312 | <a class="menulink dropdown"> |
|
317 | % if has_actions: | |
313 | <div class="menulabel">${_('Options')} <div class="show_more"></div></div> |
|
318 | <a class="menulink dropdown"> | |
314 | </a> |
|
319 | <div class="menulabel">${_('Options')}<div class="show_more"></div></div> | |
315 | <ul class="submenu"> |
|
320 | </a> | |
|
321 | <ul class="submenu"> | |||
|
322 | <li><a href="${h.route_path('repo_fork_new',repo_name=c.repo_name)}">${_('Fork this repository')}</a></li> | |||
|
323 | <li><a href="${h.route_path('pullrequest_new',repo_name=c.repo_name)}">${_('Create Pull Request')}</a></li> | |||
|
324 | %if can_lock: | |||
|
325 | %if c.rhodecode_db_repo.locked[0]: | |||
|
326 | <li><a class="locking_del" href="${h.route_path('repo_edit_toggle_locking',repo_name=c.repo_name)}">${_('Unlock Repository')}</a></li> | |||
|
327 | %else: | |||
|
328 | <li><a class="locking_add" href="${h.route_path('repo_edit_toggle_locking',repo_name=c.repo_name)}">${_('Lock Repository')}</a></li> | |||
|
329 | %endif | |||
|
330 | %endif | |||
|
331 | </ul> | |||
|
332 | % else: | |||
|
333 | <a class="menulink disabled"> | |||
|
334 | <div class="menulabel">${_('Options')}<div class="show_more"></div></div> | |||
|
335 | </a> | |||
|
336 | % endif | |||
|
337 | </li> | |||
316 |
|
|
338 | ||
317 | %if c.rhodecode_db_repo.fork: |
|
|||
318 | <li> |
|
|||
319 | <a title="${h.tooltip(_('Compare fork with %s' % c.rhodecode_db_repo.fork.repo_name))}" |
|
|||
320 | href="${h.route_path('repo_compare', |
|
|||
321 | repo_name=c.rhodecode_db_repo.fork.repo_name, |
|
|||
322 | source_ref_type=c.rhodecode_db_repo.landing_rev[0], |
|
|||
323 | source_ref=c.rhodecode_db_repo.landing_rev[1], |
|
|||
324 | target_repo=c.repo_name,target_ref_type='branch' if request.GET.get('branch') else c.rhodecode_db_repo.landing_rev[0], |
|
|||
325 | target_ref=request.GET.get('branch') or c.rhodecode_db_repo.landing_rev[1], |
|
|||
326 | _query=dict(merge=1))}" |
|
|||
327 | > |
|
|||
328 | ${_('Compare fork')} |
|
|||
329 | </a> |
|
|||
330 | </li> |
|
|||
331 | %endif |
|
|||
332 |
|
||||
333 | %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking: |
|
|||
334 | %if c.rhodecode_db_repo.locked[0]: |
|
|||
335 | <li><a class="locking_del" href="${h.route_path('repo_edit_toggle_locking',repo_name=c.repo_name)}">${_('Unlock')}</a></li> |
|
|||
336 | %else: |
|
|||
337 | <li><a class="locking_add" href="${h.route_path('repo_edit_toggle_locking',repo_name=c.repo_name)}">${_('Lock')}</a></li> |
|
|||
338 | %endif |
|
|||
339 | %endif |
|
|||
340 | %if c.rhodecode_user.username != h.DEFAULT_USER: |
|
|||
341 | %if c.rhodecode_db_repo.repo_type in ['git','hg']: |
|
|||
342 | <li><a href="${h.route_path('repo_fork_new',repo_name=c.repo_name)}">${_('Fork')}</a></li> |
|
|||
343 | <li><a href="${h.route_path('pullrequest_new',repo_name=c.repo_name)}">${_('Create Pull Request')}</a></li> |
|
|||
344 | %endif |
|
|||
345 | %endif |
|
|||
346 | </ul> |
|
|||
347 | </li> |
|
|||
348 | </ul> |
|
339 | </ul> | |
349 | </div> |
|
340 | </div> | |
350 | <div class="clear"></div> |
|
341 | <div class="clear"></div> | |
@@ -402,19 +393,30 b'' | |||||
402 | % if c.is_super_admin or group_admin: |
|
393 | % if c.is_super_admin or group_admin: | |
403 | <li class="${is_active('settings')}"><a class="menulink" href="${h.route_path('edit_repo_group',repo_group_name=c.repo_group.group_name)}" title="${_('You have admin right to this group, and can edit it')}"><div class="menulabel">${_('Group Settings')}</div></a></li> |
|
394 | <li class="${is_active('settings')}"><a class="menulink" href="${h.route_path('edit_repo_group',repo_group_name=c.repo_group.group_name)}" title="${_('You have admin right to this group, and can edit it')}"><div class="menulabel">${_('Group Settings')}</div></a></li> | |
404 | % endif |
|
395 | % endif | |
405 |
|
396 | ## determine if we have "any" option available | ||
|
397 | <% | |||
|
398 | can_create_repos = c.is_super_admin or group_admin or (group_write and create_on_write) | |||
|
399 | can_create_repo_groups = c.is_super_admin or group_admin | |||
|
400 | has_actions = can_create_repos or can_create_repo_groups | |||
|
401 | %> | |||
406 | <li class="${is_active('options')}"> |
|
402 | <li class="${is_active('options')}"> | |
407 | <a class="menulink dropdown"> |
|
403 | % if has_actions: | |
|
404 | <a class="menulink dropdown"> | |||
408 | <div class="menulabel">${_('Options')} <div class="show_more"></div></div> |
|
405 | <div class="menulabel">${_('Options')} <div class="show_more"></div></div> | |
409 | </a> |
|
406 | </a> | |
410 | <ul class="submenu"> |
|
407 | <ul class="submenu"> | |
411 | %if c.is_super_admin or group_admin or (group_write and create_on_write): |
|
408 | %if can_create_repos: | |
412 | <li><a href="${h.route_path('repo_new',_query=dict(parent_group=c.repo_group.group_id))}">${_('Add Repository')}</a></li> |
|
409 | <li><a href="${h.route_path('repo_new',_query=dict(parent_group=c.repo_group.group_id))}">${_('Add Repository')}</a></li> | |
413 | %endif |
|
410 | %endif | |
414 |
%if c |
|
411 | %if can_create_repo_groups: | |
415 | <li><a href="${h.route_path('repo_group_new',_query=dict(parent_group=c.repo_group.group_id))}">${_(u'Add Repository Group')}</a></li> |
|
412 | <li><a href="${h.route_path('repo_group_new',_query=dict(parent_group=c.repo_group.group_id))}">${_(u'Add Repository Group')}</a></li> | |
416 | %endif |
|
413 | %endif | |
417 |
|
|
414 | </ul> | |
|
415 | % else: | |||
|
416 | <a class="menulink disabled"> | |||
|
417 | <div class="menulabel">${_('Options')} <div class="show_more"></div></div> | |||
|
418 | </a> | |||
|
419 | % endif | |||
418 | </li> |
|
420 | </li> | |
419 | </ul> |
|
421 | </ul> | |
420 | </div> |
|
422 | </div> |
@@ -47,6 +47,7 b'' | |||||
47 | % endif |
|
47 | % endif | |
48 | </h4> |
|
48 | </h4> | |
49 | </span> |
|
49 | </span> | |
|
50 | ||||
50 | <div class="clear-fix"></div> |
|
51 | <div class="clear-fix"></div> | |
51 | </div> |
|
52 | </div> | |
52 |
|
53 | |||
@@ -87,6 +88,21 b'' | |||||
87 | <div class="compare-buttons"> |
|
88 | <div class="compare-buttons"> | |
88 | % if c.compare_home: |
|
89 | % if c.compare_home: | |
89 | <a id="compare_revs" class="btn btn-primary"> ${_('Compare Commits')}</a> |
|
90 | <a id="compare_revs" class="btn btn-primary"> ${_('Compare Commits')}</a> | |
|
91 | %if c.rhodecode_db_repo.fork: | |||
|
92 | ||||
|
93 | <a class="btn btn-default" title="${h.tooltip(_('Compare fork with %s' % c.rhodecode_db_repo.fork.repo_name))}" | |||
|
94 | href="${h.route_path('repo_compare', | |||
|
95 | repo_name=c.rhodecode_db_repo.fork.repo_name, | |||
|
96 | source_ref_type=c.rhodecode_db_repo.landing_rev[0], | |||
|
97 | source_ref=c.rhodecode_db_repo.landing_rev[1], | |||
|
98 | target_repo=c.repo_name,target_ref_type='branch' if request.GET.get('branch') else c.rhodecode_db_repo.landing_rev[0], | |||
|
99 | target_ref=request.GET.get('branch') or c.rhodecode_db_repo.landing_rev[1], | |||
|
100 | _query=dict(merge=1))}" | |||
|
101 | > | |||
|
102 | ${_('Compare with origin')} | |||
|
103 | </a> | |||
|
104 | ||||
|
105 | %endif | |||
90 |
|
106 | |||
91 | <a class="btn disabled tooltip" disabled="disabled" title="${_('Action unavailable in current view')}">${_('Swap')}</a> |
|
107 | <a class="btn disabled tooltip" disabled="disabled" title="${_('Action unavailable in current view')}">${_('Swap')}</a> | |
92 | <a class="btn disabled tooltip" disabled="disabled" title="${_('Action unavailable in current view')}">${_('Comment')}</a> |
|
108 | <a class="btn disabled tooltip" disabled="disabled" title="${_('Action unavailable in current view')}">${_('Comment')}</a> |
General Comments 0
You need to be logged in to leave comments.
Login now