MiraitSystems/enju_trunk

View on GitHub
app/views/page/_menu_tabindex0.html.erb

Summary

Maintainability
Test Coverage
<a tabindex="0" href='#'><%= current_user.try(:has_role?, 'Librarian') ? t('page.librarian_circulation')  : t('page.user_circulation') %></a>
<ul class='sub'>
  <% if user_signed_in? && Setting.operation %>
    <% if current_user.has_role?('Librarian') %>  
      <li><%= link_to t('page.checkout'), new_basket_path %></li>
      <li><%= link_to t('page.checkin'), (@checkins and @basketi) ? user_basket_checkins_path(@basket.user, @basket) : checkins_path %></li>
    <% end %>
    <li><%= link_to t('page.listing', model: t('activerecord.models.reserve')), (current_user.has_role?('Librarian') ? reserves_path : user_reserves_path(current_user)) %></li>
    <% if defined? EnjuTrunkIll %>
      <% if current_user.has_role?('Librarian') and SystemConfiguration.get('use_inter_library_loan') %>
        <li><%= link_to t('activerecord.models.inter_library_loan'), inter_library_loans_path %></li>
      <% end %>
    <% end %>
    <% if current_user.has_role?('Librarian') %>
      <!-- <li><%= link_to 'NACSIS ILL', 'page/under_construction' -%></li> -->
    <% end %>
    <li><%= link_to t('page.checkout_history'), (current_user.has_role?('Librarian') ? checkouts_path : checkout_histories_path) %></li>
    <li><%= link_to t('activerecord.models.checkout_history'), checkout_histories_path %></li>
  <% elsif !SystemConfiguration.isWebOPAC %>
    <li><%= link_to t('page.checkout_history'), checkouts_path %></li>
    <li><%= link_to t('page.listing', model: t('activerecord.models.reserve')), reserves_path %></li>
  <% end %>
</ul>