<li class="nav-item dropdown">
  <a class="nav-link dropdown-toggle" href="#" id="my_school" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">My school</a>
  <div class="dropdown-menu" aria-labelledby="my_school">
    <%= link_to current_user.school.name, school_path(current_user.school), class: 'dropdown-item' %>
    <%= link_to 'Gas usage', pupils_school_analysis_path(school, category: :gas), class: 'dropdown-item' if current_user.school.has_gas? %>
    <%= link_to 'Electricity usage', pupils_school_analysis_path(school, category: :electricity), class: 'dropdown-item' if current_user.school.has_electricity? %>
    <%= link_to 'Analysis', school_analysis_path(current_user.school), class: 'dropdown-item' %>
    <%= link_to 'Simulations', school_simulations_path(current_user.school), class: 'dropdown-item' if can?(:manage, current_user.school) %>
    <% if current_user.contact %>
      <%= link_to 'My alerts', edit_school_contact_path(current_user.school, current_user.contact), class: 'dropdown-item' %>
    <% else %>
      <%= link_to 'My alerts', new_school_contact_path(current_user.school, user_id: current_user.id), class: 'dropdown-item' %>
    <% end %>
  </div>
</li>

<li class="nav-item dropdown">
  <a class="nav-link dropdown-toggle" href="#" id="my_school" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">My school</a>
  <div class="dropdown-menu" aria-labelledby="my_school">
    <%= link_to current_user.school.name, school_path(current_user.school), class: 'dropdown-item' %>
    <%= link_to 'Gas usage', pupils_school_analysis_path(current_user.school, category: :gas), class: 'dropdown-item' if current_user.school.has_gas? %>
    <%= link_to 'Electricity usage', pupils_school_analysis_path(current_user.school, category: :electricity), class: 'dropdown-item' if current_user.school.has_electricity? %>
    <%= link_to 'Analysis', school_analysis_path(current_user.school), class: 'dropdown-item' %>
    <%= link_to 'Simulations', school_simulations_path(current_user.school), class: 'dropdown-item' if can?(:manage, current_user.school) %>
    <% if current_user.contact %>
      <%= link_to 'My alerts', edit_school_contact_path(current_user.school, current_user.contact), class: 'dropdown-item' %>
    <% else %>
      <%= link_to 'My alerts', new_school_contact_path(current_user.school, user_id: current_user.id), class: 'dropdown-item' %>
    <% end %>
  </div>
</li>

Fix links in my school
Fix links in my school
