Show add button just for agents.

This commit is contained in:
Martin Edenhofer 2015-11-17 22:51:06 +01:00
parent 38eb9e194e
commit 59b9a39423
2 changed files with 3 additions and 0 deletions

View file

@ -128,6 +128,7 @@ class Navbar extends App.Controller
items = App.OverviewIndexCollection.get() items = App.OverviewIndexCollection.get()
@html App.view("agent_ticket_view/navbar#{ if @vertical then '_vertical' }") @html App.view("agent_ticket_view/navbar#{ if @vertical then '_vertical' }")
items: items items: items
isAgent: @isRole('Agent')
while @clone.width() > @tabsHolder.width() while @clone.width() > @tabsHolder.width()
@tabClone.not('.hide').last().addClass('hide') @tabClone.not('.hide').last().addClass('hide')

View file

@ -21,9 +21,11 @@
<% end %> <% end %>
</div> </div>
</div> </div>
<% if @isAgent: %>
<a class="btn btn--success btn--quad" href="#ticket/create"> <a class="btn btn--success btn--quad" href="#ticket/create">
<%- @Icon('plus') %> <%- @Icon('plus') %>
</a> </a>
<% end %>
<% if @items: %> <% if @items: %>
<div class="tabs tabs--inline tabs--big tabs-clone u-invisible js-tabsClone"> <div class="tabs tabs--inline tabs--big tabs-clone u-invisible js-tabsClone">
<% for item in @items: %> <% for item in @items: %>