topbar: Include "Create project" in menu.

For users who only have the "create-projects" role, actually display the
item in the menu as the only option.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
aszlig 2013-10-31 10:03:54 +01:00 committed by Eelco Dolstra
parent f6a83bcc5b
commit cfd4843290

View file

@ -72,12 +72,14 @@
[% END %] [% END %]
[% END %] [% END %]
[% IF c.user_exists && c.check_user_roles('admin') %] [% IF c.user_exists && (c.check_user_roles('admin') ||
c.check_user_roles('create-projects')) %]
[% WRAPPER makeSubMenu title="Admin" %] [% WRAPPER makeSubMenu title="Admin" %]
[% IF c.check_user_roles('admin') %] [% IF c.check_user_roles('admin') || c.check_user_roles('create-projects') %]
[% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('create')) title = "Create project" %] [% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('create')) title = "Create project" %]
<li class="divider"></li> <li class="divider"></li>
[% END %] [% END %]
[% IF c.check_user_roles('admin') %]
[% INCLUDE menuItem [% INCLUDE menuItem
uri = c.uri_for(c.controller('Admin').action_for('machines')) uri = c.uri_for(c.controller('Admin').action_for('machines'))
title = "Manage machines" %] title = "Manage machines" %]
@ -105,6 +107,7 @@
class = "" %] class = "" %]
[% END %] [% END %]
[% END %] [% END %]
[% END %]
</ul> </ul>