From bdb4b0e275c205b0b44bbe3cc4ec4c162b309b37 Mon Sep 17 00:00:00 2001 From: Azul Date: Sat, 5 Jul 2014 11:41:43 +0200 Subject: make link_to_navigation more generic and reuse it Use link_to_navigation for all important navigation items. It creates a link in a list item for use with bootstrap. It supports an :active flag and an :icon option in the html_options now. It also translates the label. This way it can be used in a lot of places as the generic navigation link. --- app/views/layouts/_header.html.haml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/views/layouts/_header.html.haml') diff --git a/app/views/layouts/_header.html.haml b/app/views/layouts/_header.html.haml index ff14af9..7b7999a 100644 --- a/app/views/layouts/_header.html.haml +++ b/app/views/layouts/_header.html.haml @@ -1,8 +1,8 @@ - if admin? %ul.nav.nav-tabs - = render partial: 'common/navigation_item', collection: [:users, :identities, :tickets] - %li - = link_to t(:logout), logout_path, :method => :delete + = render partial: 'common/navigation_item', + collection: [:users, :identities, :tickets] + = link_to_navigation :logout, logout_path, :method => :delete - if @user && @show_navigation .lead = @user.email_address -- cgit v1.2.3