Skip to content

Commit

Permalink
Change dropdowns to conform to new layout https://getbootstrap.com/do…
Browse files Browse the repository at this point in the history
  • Loading branch information
xmunoz committed May 12, 2022
1 parent ba3ffd2 commit 7a20b3c
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions app/views/layouts/_navigation_links.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,29 @@

<% if current_user.admin? || current_user.data_volunteer? %>
<div class="dropdown">
<button href="#" data-toggle="dropdown" class="btn dropdown-toggle navbar-text" id="admin-dropdown" aria-haspopup="true" aria-expanded="false">
<button class="btn dropdown-toggle navbar-text" type="button" id="admin-dropdown" aria-haspopup="true" aria-expanded="false">
<%= t('navigation.admin_tools.label') %>
</button>

<div class="dropdown-menu" aria-labelledby="admin-dropdown">
<ul class="dropdown-menu" aria-labelledby="admin-dropdown">
<% if current_user.admin? %>
<%= link_to t('navigation.admin_tools.user_management'), users_path, class: 'dropdown-item' %>
<%= link_to t('navigation.admin_tools.clinic_management'), clinics_path, class: 'dropdown-item' %>
<%= link_to t('navigation.admin_tools.config_management'), configs_path, class: 'dropdown-item' %>
<li><%= link_to t('navigation.admin_tools.user_management'), users_path, class: 'dropdown-item' %></li>
<li><%= link_to t('navigation.admin_tools.clinic_management'), clinics_path, class: 'dropdown-item' %></li>
<li><%= link_to t('navigation.admin_tools.config_management'), configs_path, class: 'dropdown-item' %></li>
<% end %>
<%= link_to t('navigation.admin_tools.accounting'), accountants_path, class: 'dropdown-item' %>
<%= link_to t('navigation.admin_tools.export'), patients_path(format: :csv), class: 'dropdown-item' %>
</div>
<li><%= link_to t('navigation.admin_tools.accounting'), accountants_path, class: 'dropdown-item' %></li>
<li><%= link_to t('navigation.admin_tools.export'), patients_path(format: :csv), class: 'dropdown-item' %></li>
</ul>
</div>
<% end %>

<div class="dropdown">
<button href="#" data-toggle="dropdown" class="btn dropdown-toggle navbar-text" id="user-dropdown" aria-haspopup="true" aria-expanded="false">
<button class="btn dropdown-toggle navbar-text" type="button" id="user-dropdown" aria-haspopup="true" aria-expanded="false">
<%= current_user.name %>
</button>

<div class="dropdown-menu" aria-labelledby="admin-dropdown">
<%= link_to t('navigation.user_tools.profile'), edit_user_registration_path, class: 'dropdown-item' %>
<%= link_to t('navigation.user_tools.sign_out'), destroy_user_session_path, method: 'delete', class: 'dropdown-item' %>
</div>
<ul class="dropdown-menu" aria-labelledby="user-dropdown">
<li><%= link_to t('navigation.user_tools.profile'), edit_user_registration_path, class: 'dropdown-item' %></li>
<li><%= link_to t('navigation.user_tools.sign_out'), destroy_user_session_path, method: 'delete', class: 'dropdown-item' %></li>
</ul>
</div>

0 comments on commit 7a20b3c

Please sign in to comment.