Skip to content

Commit

Permalink
fix(sidebar): fixed UI problems for diffrent roles
Browse files Browse the repository at this point in the history
removed the duplicate checkin button for orginizers and had checkin page defaut to be highlighted for volenteers
  • Loading branch information
JeremyRudman committed Sep 20, 2020
1 parent 057e3aa commit b5ad3b8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion app/views/layouts/_header.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
= btn_link_to "Home", homepage_url
.header-nav
- if user_signed_in?
- if current_user.staff?
- if current_user.organizing_staff?
= btn_link_to "Manage", manage_root_path
- elsif current_user.volunteer?
= btn_link_to "Manage", manage_checkins_path
= btn_link_to "Sign Out", destroy_user_session_path, method: :delete
12 changes: 9 additions & 3 deletions app/views/layouts/manage/application.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,18 @@
= active_link_to manage_messages_path, class: "nav-link" do
.fa.fa-bullhorn.fa-fw.icon-space-r-half
= t(:title, scope: 'pages.manage.messages')
- elsif current_user.organizer?
%ul.nav.flex-column.mb-2
%li.nav-item
= active_link_to manage_questionnaires_path, class: "nav-link" do
.fa.fa-inbox.fa-fw.icon-space-r-half
= t(:title, scope: 'pages.manage.questionnaires')
- else
%ul.nav.flex-column.mb-2
%li.nav-item
= active_link_to manage_checkins_path, class: "nav-link" do
.fa.fa-drivers-license-o.fa-fw.icon-space-r-half
= t(:title, scope: 'pages.manage.check-in')
= active_link_to manage_checkins_path, class: "nav-link" do
.fa.fa-drivers-license-o.fa-fw.icon-space-r-half
= t(:title, scope: 'pages.manage.check-in')
%li.nav-item
= active_link_to manage_questionnaires_path, class: "nav-link" do
.fa.fa-inbox.fa-fw.icon-space-r-half
Expand Down

0 comments on commit b5ad3b8

Please sign in to comment.