MiraitSystems/enju_trunk

View on GitHub
app/views/manifestations/_list_nacsis.html.erb

Summary

Maintainability
Test Coverage
<table class="index" id="manifestation_list">
<%- manifestations.each do |m| -%>
  <%- mt = m.book? ? 'book' : 'serial' -%>
  <%- s = m.request_summary -%>
  <tr class="line<%= cycle("0","1") -%>">
    <td style="480px">
      <%- if m.manifestation -%>
        <strong>
          <%= "[#{t('page.imported')}]" -%>
          <%= link_to t('page.search_local', :library => "#{LibraryGroup.first.display_name}"), m.manifestation -%>
        </strong><br />
      <%- end -%>
      <%= link_to s[:subject_heading],
          params.merge(:action => "show_nacsis", :ncid => s[:ncid], :manifestation_type => mt) -%>
      <br />
      <%= s[:publisher] -%>
      <%- if mt == 'book' && s[:series_title].present? -%>
        (<%= s[:series_title] -%>)
      <%- end -%>
    </td>
  </tr>
<%- end -%>
</table>

<%=
    if type == 'book' || type == 'all'
      page_name = :page
    else
      page_name = :"page_#{type}"
    end
    paginate(manifestations, :param_name => page_name)
-%>
<br />