From 1e4129b58dc4401b81d3206e6dee5ad75bd370eb Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Fri, 10 Aug 2018 16:22:10 +0200 Subject: [PATCH] Move "my screenshots" to "My" menu --- app/views/layouts/_topbar.slim | 7 ------- app/views/my/_menu.slim | 10 +++++++--- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/app/views/layouts/_topbar.slim b/app/views/layouts/_topbar.slim index 934f5f4..4500287 100644 --- a/app/views/layouts/_topbar.slim +++ b/app/views/layouts/_topbar.slim @@ -32,13 +32,6 @@ nav.top-bar //a href="#" Ubuntu li.menu-text class=('active' if controller_name=='welcome' and action_name=='about') a href="/about" About/Privacy - // Add link if user has uploaded screenshots - - if @current_users_screenshots and @current_users_screenshots.any? - li.menu-text class=('active' if controller_name=='my' and action_name=='uploads') - = link_to my_uploads_path - ' My uploads - span.badge.secondary - = @current_users_screenshots.count // TODO: Check correct classes in Zurb/Foundation for top bar! - if user_signed_in? and current_user.is_admin? li.menu-text diff --git a/app/views/my/_menu.slim b/app/views/my/_menu.slim index 14c9746..8ee1c1d 100644 --- a/app/views/my/_menu.slim +++ b/app/views/my/_menu.slim @@ -3,9 +3,13 @@ li class=('active' if action_name=='profile') = link_to my_profile_path = fa_icon 'user-o 2x', text: 'Myself' - li class=('active' if action_name=='uploads') - a href='#' - = fa_icon 'image 2x', text: 'My uploads' + // Add link if user has uploaded screenshots + - if @current_users_screenshots and @current_users_screenshots.any? + li class=('active' if controller_name=='my' and action_name=='uploads') + = link_to my_uploads_path + = fa_icon 'image 2x', text: 'My uploads' + ' My uploads + li = link_to destroy_user_session_path = fa_icon 'lock 2x', text: 'Logout'