From 402d709930d68df81dcb8d6436127be018d3554a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baza=CC=81n?= Date: Tue, 27 Dec 2016 18:48:36 +0100 Subject: [PATCH] adds menu item to main bar for poll officers --- app/models/user.rb | 4 ++++ app/views/shared/_admin_login_items.html.erb | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index 688fde1b1..59495dc1f 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -114,6 +114,10 @@ class User < ActiveRecord::Base manager.present? end + def poll_officer? + poll_officer.present? + end + def organization? organization.present? end diff --git a/app/views/shared/_admin_login_items.html.erb b/app/views/shared/_admin_login_items.html.erb index cfe3cc1c9..078d02c01 100644 --- a/app/views/shared/_admin_login_items.html.erb +++ b/app/views/shared/_admin_login_items.html.erb @@ -23,9 +23,9 @@ <% end %> - <%# if current_user.administrator? || current_user.officer? %> + <% if current_user.administrator? || current_user.poll_officer? %>
  • <%= link_to t("layouts.header.officing"), officing_root_path %>
  • - <%# end %> + <% end %> <% end %>