Sha256: c59e7db4ab6ce2f61e28e4f2c38970a309a9420c2cbd710886aebeb1b7e67931

Contents?: true

Size: 1.4 KB

Versions: 3

Compression:

Stored size: 1.4 KB

Contents

<div id="content_detail" class="ui-corner-all">
<h1 class="title">NDLサーチ検索によるインポート</h1>
<div id="content_list">
  <p id="notice"><%= notice %></p>

<%= form_for :books, :url => ndl_books_path, :html => {:method => 'get'} do -%>
  <p>
    <%= search_field_tag 'query', h(@query), {:id => 'search_form_top', :class => 'search_form'} -%>
    <%= submit_tag '検索' -%>
  </p>
<%- end -%>

<% if @query.present? %>
<p><%= @books.total_count %> 件が見つかりました。</p>

<table class="table table-striped index">
  <tr>
    <th></th>
    <th>書名</th>
  </tr>
  <% @books.each do |book| %>
    <tr class="line<%= cycle("0", "1") -%>">
      <td>
        <%= link_to_import(book.at('./dc:identifier[@xsi:type="dcndl:JPNO"]').try(:content).to_s) %>
      </td>
      <td>
        <%= link_to book.at('./title').content, book.at('./link').content %>
        <br />
        <%= book.xpath('./dc:creator').collect(&:content).join(' ') %>
      	<%= book.xpath('./dc:publisher').collect(&:content).join(' ') %>
        (<%= book.at('./dcterms:issued[@xsi:type="dcterms:W3CDTF"]').try(:content) %>,
        ISBN: <%= book.at('./dc:identifier[@xsi:type="dcndl:ISBN"]').try(:content).to_s %>)
      </td>
    </tr>
  <% end %>
</table>

<br />

<%= paginate(@books) %>
<% else %>
  <%= javascript_tag("$('#search_form_top').focus()") -%>
<% end %>

</div>
</div>

<div id="submenu" class="ui-corner-all">
</div>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
enju_ndl-0.1.0.pre3 app/views/ndl_books/index.html.erb
enju_ndl-0.1.0.pre2 app/views/ndl_books/index.html.erb
enju_ndl-0.1.0.pre app/views/ndl_books/index.html.erb