From 668745f3e1d56559152abd264affe9fde0ba2e87 Mon Sep 17 00:00:00 2001 From: decabeza Date: Sat, 21 Oct 2017 17:36:44 +0200 Subject: [PATCH] moves officing menu outside of admin dropdown --- app/helpers/users_helper.rb | 6 +----- app/views/shared/_admin_login_items.html.erb | 11 +++++------ 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index 111a80267..da340bb46 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -52,12 +52,8 @@ module UsersHelper current_user && current_user.manager? end - def current_poll_officer? - current_user && current_user.poll_officer? - end - def show_admin_menu? - current_administrator? || current_moderator? || current_valuator? || current_manager? || current_poll_officer? + current_administrator? || current_moderator? || current_valuator? || current_manager? end def interests_title_text(user) diff --git a/app/views/shared/_admin_login_items.html.erb b/app/views/shared/_admin_login_items.html.erb index 9634874f9..a9e6fa4b9 100644 --- a/app/views/shared/_admin_login_items.html.erb +++ b/app/views/shared/_admin_login_items.html.erb @@ -26,12 +26,11 @@ <%= link_to t("layouts.header.management"), management_sign_in_path %> <% end %> - - <% if current_user.administrator? || current_user.poll_officer? %> -
  • - <%= link_to t("layouts.header.officing"), officing_root_path %> -
  • - <% end %> <% end %> +<% if current_user && current_user.poll_officer? %> +
  • + <%= link_to t("layouts.header.officing"), officing_root_path %> +
  • +<% end %>