Mercurial > kallithea
changeset 4081:089fb21d19d5
Move create pull request button in pull requests view into the top
menu, and hide it when you're not logged in
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 03 Jul 2013 00:10:47 +0200 |
parents | b622e6849b67 |
children | ebcb1d32eed9 |
files | rhodecode/templates/pullrequests/pullrequest_show_all.html |
diffstat | 1 files changed, 11 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/templates/pullrequests/pullrequest_show_all.html Wed Jun 12 12:23:20 2013 +0200 +++ b/rhodecode/templates/pullrequests/pullrequest_show_all.html Wed Jul 03 00:10:47 2013 +0200 @@ -23,6 +23,17 @@ <!-- box / title --> <div class="title"> ${self.breadcrumbs()} + %if c.rhodecode_user.username != 'default': + <ul class="links"> + %if h.HasPermissionAny('hg.admin','hg.create.repository')() or h.HasReposGroupPermissionAny('group.write', 'group.admin')(c.group.group_name if c.group else None): + <li> + <span> + <a id="open_new_pr" href="${h.url('pullrequest_home',repo_name=c.repo_name)}">${_('Open new pull request')}</a> + </span> + </li> + %endif + </ul> + %endif </div> <div style="margin: 0 20px"> @@ -41,15 +52,9 @@ ${h.link_to(_('Show closed pull requests too'), h.url('pullrequest_show_all',repo_name=c.repo_name,from_=c.from_,closed=1))} %endif </div> - - <div> - <a id="open_new_pr" href="${h.url('pullrequest_home',repo_name=c.repo_name)}">${_('Open new pull request')}</a> - </div> - </div> ${c.pullrequest_data} </div> - </%def>