enju_biblio 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) hide show
  1. data/app/controllers/manifestations_controller.rb +36 -20
  2. data/app/controllers/picture_files_controller.rb +25 -16
  3. data/app/controllers/series_has_manifestations_controller.rb +4 -0
  4. data/app/controllers/series_statements_controller.rb +9 -7
  5. data/app/helpers/series_statements_helper.rb +6 -0
  6. data/app/models/item.rb +3 -0
  7. data/app/models/manifestation.rb +29 -15
  8. data/app/models/patron.rb +2 -0
  9. data/app/models/resource_import_file.rb +47 -12
  10. data/app/models/series_has_manifestation.rb +2 -3
  11. data/app/views/carrier_types/index.html.erb +1 -1
  12. data/app/views/content_types/index.html.erb +1 -1
  13. data/app/views/create_types/index.html.erb +1 -1
  14. data/app/views/creates/_index.html.erb +1 -1
  15. data/app/views/creates/_index_patron.html.erb +1 -1
  16. data/app/views/creates/_index_work.html.erb +2 -9
  17. data/app/views/donates/index.html.erb +1 -1
  18. data/app/views/exemplifies/index.html.erb +1 -1
  19. data/app/views/extents/index.html.erb +1 -1
  20. data/app/views/form_of_works/index.html.erb +1 -1
  21. data/app/views/frequencies/index.html.erb +1 -1
  22. data/app/views/import_requests/index.html.erb +1 -1
  23. data/app/views/import_requests/new.html.erb +1 -1
  24. data/app/views/items/edit.html.erb +1 -1
  25. data/app/views/items/show.html.erb +2 -1
  26. data/app/views/licenses/index.html.erb +1 -1
  27. data/app/views/manifestation_relationship_types/index.html.erb +1 -1
  28. data/app/views/manifestation_relationships/index.html.erb +1 -1
  29. data/app/views/manifestations/_form.html.erb +1 -1
  30. data/app/views/manifestations/_manifestation.html.erb +21 -17
  31. data/app/views/manifestations/_paginate_id_link.html.erb +20 -2
  32. data/app/views/manifestations/_session_ids.html.erb +10 -0
  33. data/app/views/manifestations/_show_detail_librarian.html.erb +7 -5
  34. data/app/views/manifestations/_show_detail_user.html.erb +7 -5
  35. data/app/views/manifestations/_show_index.html.erb +7 -1
  36. data/app/views/manifestations/_show_series_index.html.erb +15 -0
  37. data/app/views/manifestations/_show_series_statement.html.erb +30 -0
  38. data/app/views/manifestations/_submenu_series_statement.html.erb +8 -0
  39. data/app/views/manifestations/edit.html.erb +1 -1
  40. data/app/views/manifestations/index.html.erb +11 -0
  41. data/app/views/manifestations/show.html.erb +2 -2
  42. data/app/views/medium_of_performances/index.html.erb +1 -1
  43. data/app/views/owns/index.html.erb +1 -1
  44. data/app/views/patron_import_files/index.html.erb +1 -1
  45. data/app/views/patron_import_results/index.html.erb +1 -1
  46. data/app/views/patron_relationship_types/index.html.erb +1 -1
  47. data/app/views/patron_relationships/index.html.erb +1 -1
  48. data/app/views/patron_types/index.html.erb +1 -1
  49. data/app/views/patrons/_index_expression.html.erb +2 -1
  50. data/app/views/patrons/_index_manifestation.html.erb +2 -1
  51. data/app/views/patrons/_index_patron.html.erb +1 -1
  52. data/app/views/patrons/_index_patron_merge_list.html.erb +1 -1
  53. data/app/views/patrons/_index_work.html.erb +2 -1
  54. data/app/views/patrons/edit.html.erb +1 -1
  55. data/app/views/patrons/show.html.erb +1 -1
  56. data/app/views/picture_files/_index.html.erb +1 -1
  57. data/app/views/picture_files/_index_event.html.erb +1 -1
  58. data/app/views/picture_files/_index_manifestation.html.erb +1 -1
  59. data/app/views/picture_files/_index_patron.html.erb +1 -1
  60. data/app/views/picture_files/_index_shelf.html.erb +1 -1
  61. data/app/views/picture_files/_link.mobile.erb +3 -0
  62. data/app/views/picture_files/show.mobile.erb +49 -0
  63. data/app/views/produce_types/index.html.erb +1 -1
  64. data/app/views/produces/_index.html.erb +1 -1
  65. data/app/views/produces/_index_manifestation.html.erb +5 -11
  66. data/app/views/produces/_index_patron.html.erb +1 -1
  67. data/app/views/realize_types/index.html.erb +1 -1
  68. data/app/views/realizes/_index.html.erb +1 -1
  69. data/app/views/realizes/_index_expression.html.erb +5 -11
  70. data/app/views/realizes/_index_patron.html.erb +1 -1
  71. data/app/views/resource_import_files/index.html.erb +1 -1
  72. data/app/views/resource_import_results/index.html.erb +1 -1
  73. data/app/views/series_has_manifestations/index.html.erb +1 -1
  74. data/app/views/series_statements/_index.html.erb +1 -1
  75. data/app/views/series_statements/_index_manifestation.html.erb +1 -1
  76. data/app/views/series_statements/_index_series_statement_merge_list.html.erb +1 -1
  77. data/app/views/series_statements/show.html.erb +0 -3
  78. data/config/locales/translation_en.yml +34 -0
  79. data/config/locales/translation_ja.yml +34 -0
  80. data/config/routes.rb +7 -2
  81. data/lib/enju_biblio.rb +0 -5
  82. data/lib/enju_biblio/engine.rb +2 -6
  83. data/lib/enju_biblio/version.rb +1 -1
  84. data/spec/cassette_library/enju_ndl/ndl_search.yml +1140 -0
  85. data/spec/controllers/items_controller_spec.rb +1 -1
  86. data/spec/controllers/series_statements_controller_spec.rb +26 -21
  87. data/spec/dummy/config/application.rb +1 -0
  88. data/spec/dummy/config/routes.rb +1 -1
  89. data/spec/dummy/db/schema.rb +1 -1
  90. data/spec/dummy/db/test.sqlite3 +0 -0
  91. data/spec/dummy/lib/enju_leaf.rb +0 -1
  92. data/spec/dummy/private/system/patron_import_files/patron_imports/000/000/004/original/patron_delete_file.tsv +8 -0
  93. data/spec/dummy/private/system/patron_import_files/patron_imports/000/000/004/original/patron_import_file_sample1.tsv +5 -0
  94. data/spec/dummy/private/system/patron_import_files/patron_imports/000/000/004/original/patron_import_file_sample3.tsv +5 -0
  95. data/spec/dummy/private/system/patron_import_files/patron_imports/000/000/004/original/patron_update_file.tsv +3 -0
  96. data/spec/dummy/private/system/picture_files/pictures/000/000/005/medium/spinner.gif +0 -0
  97. data/spec/dummy/private/system/picture_files/pictures/000/000/005/original/spinner.gif +0 -0
  98. data/spec/dummy/private/system/picture_files/pictures/000/000/005/thumb/spinner.gif +0 -0
  99. data/spec/dummy/private/system/resource_imports/4/original/isbn_sample.txt +3 -0
  100. data/spec/dummy/private/system/resource_imports/4/original/item_delete_file.tsv +11 -0
  101. data/spec/dummy/private/system/resource_imports/4/original/item_update_file.tsv +4 -0
  102. data/spec/dummy/private/system/resource_imports/4/original/resource_import_file_sample1.tsv +19 -0
  103. data/spec/dummy/private/system/resource_imports/4/original/resource_import_file_sample2.tsv +19 -0
  104. data/spec/dummy/private/system/resource_imports/4/original/update_series_statement.tsv +2 -0
  105. data/spec/dummy/solr/data/test/index/_2z.fdt +0 -0
  106. data/spec/dummy/solr/data/test/index/_2z.fdx +0 -0
  107. data/spec/dummy/solr/data/test/index/{_2v.fnm → _2z.fnm} +0 -0
  108. data/spec/dummy/solr/data/test/index/_2z.frq +0 -0
  109. data/spec/dummy/solr/data/test/index/_2z.nrm +1 -0
  110. data/spec/dummy/solr/data/test/index/_2z.prx +0 -0
  111. data/spec/dummy/solr/data/test/index/_2z.tii +0 -0
  112. data/spec/dummy/solr/data/test/index/_2z.tis +0 -0
  113. data/spec/dummy/solr/data/test/index/{_2v.fdt → _39.fdt} +0 -0
  114. data/spec/dummy/solr/data/test/index/{_2v.fdx → _39.fdx} +0 -0
  115. data/spec/dummy/solr/data/test/index/_39.fnm +10 -0
  116. data/spec/dummy/solr/data/test/index/_39.frq +0 -0
  117. data/spec/dummy/solr/data/test/index/_39.nrm +1 -0
  118. data/spec/dummy/solr/data/test/index/_39.prx +0 -0
  119. data/spec/dummy/solr/data/test/index/{_2v.tii → _39.tii} +0 -0
  120. data/spec/dummy/solr/data/test/index/_39.tis +0 -0
  121. data/spec/dummy/solr/data/test/index/_39_1.del +0 -0
  122. data/spec/dummy/solr/data/test/index/_k_3.del +0 -0
  123. data/spec/dummy/solr/data/test/index/segments.gen +0 -0
  124. data/spec/dummy/solr/data/test/index/{segments_2v → segments_39} +0 -0
  125. data/spec/dummy/tmp/cache/4F7/F90/default_role +0 -0
  126. data/spec/dummy/tmp/cache/6E4/420/search_engine_all +0 -0
  127. data/spec/fixtures/exemplifies.yml +6 -0
  128. data/spec/models/resource_import_file_spec.rb +8 -0
  129. metadata +88 -129
  130. data/lib/enju_biblio/expire_editable_fragment.rb +0 -30
  131. data/lib/enju_biblio/expire_fragment_cache.rb +0 -17
  132. data/lib/enju_biblio/import_file.rb +0 -13
  133. data/lib/enju_biblio/master_model.rb +0 -19
  134. data/lib/enju_biblio/url_validator.rb +0 -10
  135. data/spec/dummy/app/models/library_group.rb +0 -86
  136. data/spec/dummy/lib/enju_leaf/localized_name.rb +0 -15
  137. data/spec/dummy/solr/data/test/index/_2v.frq +0 -0
  138. data/spec/dummy/solr/data/test/index/_2v.nrm +0 -1
  139. data/spec/dummy/solr/data/test/index/_2v.prx +0 -0
  140. data/spec/dummy/solr/data/test/index/_2v.tis +0 -0
  141. data/spec/dummy/solr/data/test/index/_2v_1.del +0 -0
  142. data/spec/dummy/solr/data/test/index/_k_2.del +0 -0
  143. data/spec/dummy/tmp/cache/4AD/470/country_all +0 -0
@@ -8,7 +8,6 @@ class SeriesHasManifestation < ActiveRecord::Base
8
8
  validates_presence_of :series_statement_id
9
9
  validates_presence_of :manifestation_id, :on => :update
10
10
  validates_uniqueness_of :manifestation_id, :scope => :series_statement_id
11
- after_save :reload
12
11
  after_save :reindex
13
12
  after_destroy :reindex
14
13
 
@@ -19,8 +18,8 @@ class SeriesHasManifestation < ActiveRecord::Base
19
18
  end
20
19
 
21
20
  def reindex
22
- series_statement.try(:index)
23
- manifestation.try(:index)
21
+ series_statement.reload; series_statement.try(:index)
22
+ manifestation.reload; manifestation.try(:index)
24
23
  end
25
24
  end
26
25
 
@@ -26,7 +26,7 @@
26
26
  <%= link_to t('page.edit'), edit_carrier_type_path(carrier_type) -%>
27
27
  <% end %>
28
28
  <%- if can? :destroy, carrier_type -%>
29
- <%= link_to t('page.destroy'), carrier_type_path(carrier_type), :confirm => t('page.are_you_sure'), :method => :delete -%>
29
+ <%= link_to t('page.destroy'), carrier_type_path(carrier_type), :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
30
30
  <%- end -%>
31
31
  </td>
32
32
  </tr>
@@ -26,7 +26,7 @@
26
26
  <%= link_to t('page.edit'), edit_content_type_path(content_type) -%>
27
27
  <% end %>
28
28
  <%- if can? :destroy, content_type -%>
29
- <%= link_to t('page.destroy'), content_type_path(content_type), :confirm => t('page.are_you_sure'), :method => :delete -%>
29
+ <%= link_to t('page.destroy'), content_type_path(content_type), :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
30
30
  <%- end -%>
31
31
  </td>
32
32
  </tr>
@@ -26,7 +26,7 @@
26
26
  <%= link_to t('page.edit'), edit_create_type_path(create_type) -%>
27
27
  <% end %>
28
28
  <%- if can? :destroy, create_type -%>
29
- <%= link_to t('page.destroy'), create_type, :confirm => t('page.are_you_sure'), :method => :delete -%>
29
+ <%= link_to t('page.destroy'), create_type, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
30
30
  <% end %>
31
31
  </td>
32
32
  </tr>
@@ -16,7 +16,7 @@
16
16
  <td>
17
17
  <%- if can? :destroy, create -%>
18
18
  <%= link_to t('page.show'), create -%>
19
- <%= link_to t('page.destroy'), create, :confirm => t('page.are_you_sure'), :method => :delete -%>
19
+ <%= link_to t('page.destroy'), create, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
20
20
  <%- end -%>
21
21
  </td>
22
22
  </tr>
@@ -28,7 +28,7 @@
28
28
  <td>
29
29
  <%- if can? :destroy, create -%>
30
30
  <%= link_to t('page.show'), patron_create_path(patron, create) -%>
31
- <%= link_to t('page.destroy'), patron_create_path(patron, create), :confirm => t('page.are_you_sure'), :method => :delete -%>
31
+ <%= link_to t('page.destroy'), patron_create_path(patron, create), :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
32
32
  <%- end -%>
33
33
  </td>
34
34
  </tr>
@@ -11,26 +11,19 @@
11
11
  <th><%= t('activerecord.models.patron') -%></th>
12
12
  <th><%= t('page.created_at') -%></th>
13
13
  <th><%= t('page.updated_at') -%></th>
14
- <th></th>
15
14
  </tr>
16
15
 
17
16
  <%- @creates.each do |create| -%>
18
17
  <tr class="line<%= cycle("0", "1") -%>">
19
18
  <td>
20
19
  <%- if can? :destroy, create -%>
21
- <%= create.first? ? image_tag('icons/stop.png') : link_to(image_tag('icons/arrow_up.png', :size => '16x16', :alt => t('page.asc')), {:action => 'update', :move => 'higher', :id => create.id, :work_id => work.id}, :method => :put) -%>
22
- <%= create.last? ? image_tag('icons/stop.png') : link_to(image_tag('icons/arrow_down.png', :size => '16x16', :alt => t('page.desc')), {:action => 'update', :move => 'lower', :id => create.id, :work_id => work.id}, :method => :put) -%>
20
+ <%= create.first? ? image_tag('icons/stop.png') : link_to(image_tag('icons/arrow_up.png', :size => '16x16', :alt => t('page.asc')), work_create_path(create.work, create, :move => 'higher'), :method => :put) -%>
21
+ <%= create.last? ? image_tag('icons/stop.png') : link_to(image_tag('icons/arrow_down.png', :size => '16x16', :alt => t('page.desc')), work_create_path(create.work, create, :move => 'lower'), :method => :put) -%>
23
22
  <%- end-%>
24
23
  </td>
25
24
  <td><%= link_to create.patron.try(:full_name), create.patron -%></td>
26
25
  <td><%= l(create.created_at) -%></td>
27
26
  <td><%= l(create.updated_at) -%></td>
28
- <td>
29
- <%- if can? :destroy, create -%>
30
- <%= link_to t('page.show'), work_create_path(work, create) -%>
31
- <%= link_to t('page.destroy'), work_create_path(work, create), :confirm => t('page.are_you_sure'), :method => :delete -%>
32
- <%- end -%>
33
- </td>
34
27
  </tr>
35
28
  <%- end -%>
36
29
  </table>
@@ -24,7 +24,7 @@
24
24
  <td>
25
25
  <%- if can? :destroy, donate -%>
26
26
  <%= link_to t('page.edit'), edit_donate_path(donate) -%>
27
- <%= link_to t('page.destroy'), donate, :confirm => t('page.are_you_sure'), :method => :delete -%>
27
+ <%= link_to t('page.destroy'), donate, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
28
28
  <%- end -%>
29
29
  </td>
30
30
  </tr>
@@ -18,7 +18,7 @@
18
18
  <%- if can? :destroy, exemplify -%>
19
19
  <td>
20
20
  <%= link_to t('page.show'), exemplify -%>
21
- <%= link_to t('page.destroy'), exemplify, :confirm => t('page.are_you_sure'), :method => :delete -%>
21
+ <%= link_to t('page.destroy'), exemplify, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
22
22
  </td>
23
23
  <%- end -%>
24
24
  </tr>
@@ -29,7 +29,7 @@
29
29
  <%= link_to t('page.edit'), edit_extent_path(extent) -%>
30
30
  <% end %>
31
31
  <%- if can? :destroy, extent -%>
32
- <%= link_to t('page.destroy'), extent, :confirm => t('page.are_you_sure'), :method => :delete -%>
32
+ <%= link_to t('page.destroy'), extent, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
33
33
  <%- end -%>
34
34
  </td>
35
35
  </tr>
@@ -26,7 +26,7 @@
26
26
  <%= link_to t('page.edit'), edit_form_of_work_path(form_of_work) -%>
27
27
  <% end %>
28
28
  <%- if can? :destroy, form_of_work -%>
29
- <%= link_to t('page.destroy'), form_of_work, :confirm => t('page.are_you_sure'), :method => :delete -%>
29
+ <%= link_to t('page.destroy'), form_of_work, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
30
30
  <%- end -%>
31
31
  </td>
32
32
  </tr>
@@ -24,7 +24,7 @@
24
24
  <%= link_to t('page.edit'), edit_frequency_path(frequency) -%>
25
25
  <% end %>
26
26
  <%- if can? :destroy, frequency -%>
27
- <%= link_to t('page.destroy'), frequency, :confirm => t('page.are_you_sure'), :method => :delete -%>
27
+ <%= link_to t('page.destroy'), frequency, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
28
28
  <%- end -%>
29
29
  </td>
30
30
  </tr>
@@ -23,7 +23,7 @@
23
23
  <td><%= link_to import_request.manifestation.original_title, import_request.manifestation if import_request.manifestation -%></td>
24
24
  <td>
25
25
  <%- if can? :destroy, import_request -%>
26
- <%= link_to image_tag('icons/delete.png', :size => '16x16', :alt => t('page.destroy')), import_request, :confirm => t('page.are_you_sure'), :method => :delete -%>
26
+ <%= link_to image_tag('icons/delete.png', :size => '16x16', :alt => t('page.destroy')), import_request, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
27
27
  <%- end -%>
28
28
  </td>
29
29
  </tr>
@@ -9,7 +9,7 @@
9
9
  <%= f.label :isbn -%><br />
10
10
  <%= f.text_field :isbn, :class => 'resource_isbn_issn' -%>
11
11
 
12
- <%= f.submit :disable_with => t('page.saving') %>
12
+ <%= f.submit 'data-disable-with' => t('page.saving') %>
13
13
  </div>
14
14
  <%= javascript_tag("$('#import_request_isbn').focus()") -%>
15
15
  <%- end -%>
@@ -11,7 +11,7 @@
11
11
  <ul>
12
12
  <li><%= link_to t('page.show'), @item -%></li>
13
13
  <% if can? :destroy, @item %>
14
- <li><%= link_to t('page.destroy'), @item, :confirm => t('page.are_you_sure'), :method => :delete -%></li>
14
+ <li><%= link_to t('page.destroy'), @item, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%></li>
15
15
  <% end %>
16
16
  <li><%= link_to t('page.back'), manifestation_items_path(@item.manifestation) -%></li>
17
17
  </ul>
@@ -142,7 +142,7 @@
142
142
  <li><%= link_to t('page.listing', :model => t('activerecord.models.inter_library_loan')), item_inter_library_loans_path(@item) -%></li>
143
143
  <% end %>
144
144
  <% if can? :destroy, @item %>
145
- <li><%= link_to t('page.destroy'), @item, :confirm => t('page.are_you_sure'), :method => :delete -%></li>
145
+ <li><%= link_to t('page.destroy'), @item, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%></li>
146
146
  <% end %>
147
147
  <% if defined?(EnjuInterLibraryLoan) %>
148
148
  <%- if @item.inter_library_loans.empty? -%>
@@ -151,6 +151,7 @@
151
151
  <% end %>
152
152
  <% if defined?(EnjuCirculation) %>
153
153
  <li><%= link_to t('page.listing', :model => t('activerecord.models.lending_policy')), item_lending_policies_path(@item) -%></li>
154
+ <li><%= link_to t('page.checkout_history'), item_checkouts_path(@item) -%></li>
154
155
  <% end %>
155
156
  </ul>
156
157
  </div>
@@ -28,7 +28,7 @@
28
28
  <%= link_to t('page.edit'), edit_license_path(license) -%>
29
29
  <% end %>
30
30
  <%- if can? :destroy, license -%>
31
- <%= link_to t('page.destroy'), license, :confirm => t('page.are_you_sure'), :method => :delete -%>
31
+ <%= link_to t('page.destroy'), license, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
32
32
  <%- end -%>
33
33
  </td>
34
34
  </tr>
@@ -26,7 +26,7 @@
26
26
  <%= link_to t('page.edit'), edit_manifestation_relationship_type_path(manifestation_relationship_type) -%>
27
27
  <% end %>
28
28
  <%- if can? :destroy, manifestation_relationship_type -%>
29
- <%= link_to t('page.destroy'), manifestation_relationship_type, :confirm => t('page.are_you_sure'), :method => :delete -%>
29
+ <%= link_to t('page.destroy'), manifestation_relationship_type, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
30
30
  <% end %>
31
31
  </td>
32
32
  </tr>
@@ -17,7 +17,7 @@
17
17
  <td><%= link_to manifestation_relationship.child.original_title, manifestation_relationship.child %></td>
18
18
  <td><%= link_to t('page.show'), manifestation_relationship %></td>
19
19
  <td><%= link_to t('page.edit'), edit_manifestation_relationship_path(manifestation_relationship) %></td>
20
- <td><%= link_to t('page.destroy'), manifestation_relationship, :confirm => t('page.are_you_sure'), :method => :delete %></td>
20
+ <td><%= link_to t('page.destroy'), manifestation_relationship, :data => {:confirm => t('page.are_you_sure')}, :method => :delete %></td>
21
21
  </tr>
22
22
  <% end %>
23
23
  </table>
@@ -37,7 +37,7 @@
37
37
  <%= f.text_field :title_alternative, :class => 'resource_title' -%>
38
38
  </div>
39
39
 
40
- <%- if @manifestation.periodical? -%>
40
+ <%- if @series_statement.try(:periodical?) -%>
41
41
  <%= render :partial => 'manifestations/serial_form', :locals => {:f => f, :manifestation => @manifestation} -%>
42
42
  <%- else -%>
43
43
  <div class="field">
@@ -1,24 +1,28 @@
1
1
  <tr class="line<%= cycle("0", "1") -%>">
2
2
  <td style="width: 30px"><%= itemnum = @manifestations.offset + 1 + manifestation_counter -%></td>
3
3
  <td style="480px">
4
- <% cache([:manifestation => manifestation.id, :fragment => 'manifestation_html', :role => current_user_role_name, :locale => @locale]) do %>
5
- <%= render 'manifestations/show_index', :manifestation => manifestation -%>
6
- <div class="access_address">
7
- <%= link_to manifestation.access_address, manifestation.access_address if manifestation.access_address.present? -%>
8
- </div>
9
- <%- unless manifestation.items.on_shelf.empty? -%>
10
- (<%= link_to_function t('page.holding'), "$('#holding_#{manifestation.id}').toggle()" -%>)
11
- <%- end -%>
12
- <% if defined?(EnjuBookmark) %>
13
- <%- if manifestation.tags.first -%>
14
- (<%= link_to_function t('activerecord.models.tag'), "$('#tag_#{manifestation.id}').toggle()" -%>)
4
+ <% if manifestation.root_of_series? %>
5
+ <%= render 'manifestations/show_series_index', :manifestation => manifestation -%>
6
+ <% else %>
7
+ <% cache([:manifestation => manifestation.id, :fragment => 'manifestation_html', :role => current_user_role_name, :locale => @locale]) do %>
8
+ <%= render 'manifestations/show_index', :manifestation => manifestation -%>
9
+ <div class="access_address">
10
+ <%= link_to manifestation.access_address, manifestation.access_address if manifestation.access_address.present? -%>
11
+ </div>
12
+ <%- unless manifestation.items.on_shelf.empty? -%>
13
+ (<%= link_to_function t('page.holding'), "$('#holding_#{manifestation.id}').toggle()" -%>)
15
14
  <%- end -%>
16
- <%= render 'manifestations/show_tag', :manifestation => manifestation -%>
15
+ <% if defined?(EnjuBookmark) %>
16
+ <%- if manifestation.tags.first -%>
17
+ (<%= link_to_function t('activerecord.models.tag'), "$('#tag_#{manifestation.id}').toggle()" -%>)
18
+ <%- end -%>
19
+ <%= render 'manifestations/show_tag', :manifestation => manifestation -%>
20
+ <% end %>
21
+ <%= render 'manifestations/holding', :manifestation => manifestation -%>
22
+ <%# グループ表示の部分テンプレート %>
23
+ <%= render 'manifestations/show_group', :manifestation => manifestation -%>
17
24
  <% end %>
18
- <%= render 'manifestations/holding', :manifestation => manifestation -%>
19
- <%# グループ表示の部分テンプレート %>
20
- <%= render 'manifestations/show_group', :manifestation => manifestation -%>
21
- <% end %>
25
+ <% end %>
22
26
  </td>
23
27
  <% if defined?(EnjuCirculation) %>
24
28
  <% if signed_in? %>
@@ -39,7 +43,7 @@
39
43
  <%= link_to image_tag('icons/book_edit.png', :size => '16x16', :alt => t('page.edit')), edit_manifestation_path(manifestation) -%>
40
44
  <% if @series_statement %>
41
45
  <% if manifestation.series_statement == @series_statement %>
42
- <%= link_to t('page.destroy'), series_statement_series_has_manifestation_path(manifestation.series_statement, manifestation.series_has_manifestation), :confirm => t('page.are_you_sure'), :method => :delete -%>
46
+ <%= link_to t('page.destroy'), series_statement_series_has_manifestation_path(manifestation.series_statement, manifestation.series_has_manifestation), :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
43
47
  <% end %>
44
48
  <% end %>
45
49
  <% else %>
@@ -1,9 +1,27 @@
1
+ <script>
2
+ $(function(){
3
+ if(typeof sessionStorage === "undefined"){
4
+ return;
5
+ }else{
6
+ var ids = JSON.parse(sessionStorage.getItem("<%= flash[:search_query] %>"));
7
+ var index = $.inArray(<%= manifestation.id %>, ids);
8
+ if(ids[index - 1] > 0){
9
+ $("#prev_link").html('<a href="<%= root_url %>manifestations/' + ids[index - 1] + '"><%= t('page.previous') %></a>');
10
+ };
11
+ if(ids[index + 1] > 0){
12
+ $("#next_link").html('<a href="<%= root_url %>manifestations/' + ids[index + 1] + '"><%= t('page.next') %></a>');
13
+ };
14
+ };
15
+ });
16
+ </script>
17
+
1
18
  <%= form_for :manifestations, :url => manifestations_path, :html => {:method => 'get'} do -%>
2
19
  <div>
3
- <%= paginate_id_link(manifestation, manifestation_ids) if manifestation_ids -%>
20
+ <span id="next_link"><%= t('page.next') %></span>
21
+ <span id="prev_link"><%= t('page.previous') %></span>
4
22
  <%= back_to_manifestation_index -%>
5
23
  <%= t('page.search_term') -%>:
6
- <%= search_field_tag 'query', session[:query], {:id => 'search_form_top', :class => 'search_form_short', :placeholder => t('page.search_term')} -%>
24
+ <%= search_field_tag 'query', @query, {:id => 'search_form_top', :class => 'search_form_short', :placeholder => t('page.search_term')} -%>
7
25
  <%= submit_tag t('page.search') -%>
8
26
  <%= link_to t('page.advanced_search'), page_advanced_search_path -%>
9
27
  </div>
@@ -0,0 +1,10 @@
1
+ <script>
2
+ $(function(){
3
+ if(typeof sessionStorage === "undefined"){
4
+ return;
5
+ }else{
6
+ var ids = <%= @manifestation_ids %>;
7
+ sessionStorage.setItem("<%= @search_query %>", JSON.stringify(ids));
8
+ };
9
+ });
10
+ </script>
@@ -10,16 +10,18 @@
10
10
  <% if manifestation.title_alternative? %>
11
11
  <tr>
12
12
  <td style="width: 200px"><%= t('activerecord.attributes.manifestation.title_alternative') -%>:</td>
13
- <td style="width: 490px"><%= manifestation.title_alternative -%></td>
13
+ <td style="width: 500px"><%= manifestation.title_alternative -%></td>
14
14
  </tr>
15
15
  <% end %>
16
16
  <%- if manifestation.series_statement -%>
17
17
  <tr>
18
18
  <td style="width: 200px"><%= t('activerecord.models.series_statement') -%>:</td>
19
- <td style="width: 490px"><%= link_to manifestation.series_statement.original_title, manifestation.series_statement -%>
20
- <%- if manifestation.issn.present? -%>
21
- (<%= t('activerecord.attributes.manifestation.issn') -%>: <%= manifestation.issn -%>)
22
- <%- end -%>
19
+ <td style="width: 500px">
20
+ <%= link_to manifestation.series_statement.original_title, manifestation.series_statement -%>
21
+ <%= manifestation.volume_number_string %>
22
+ <%- if manifestation.issn.present? -%>
23
+ (<%= t('activerecord.attributes.manifestation.issn') -%>: <%= manifestation.issn -%>)
24
+ <%- end -%>
23
25
  </td>
24
26
  </tr>
25
27
  <% end %>
@@ -10,16 +10,18 @@
10
10
  <% if manifestation.title_alternative? %>
11
11
  <tr>
12
12
  <td style="width: 200px"><%= t('activerecord.attributes.manifestation.title_alternative') -%>:</td>
13
- <td style="width: 490px"><%= manifestation.title_alternative -%></td>
13
+ <td style="width: 500px"><%= manifestation.title_alternative -%></td>
14
14
  </tr>
15
15
  <% end %>
16
16
  <%- if manifestation.series_statement -%>
17
17
  <tr>
18
18
  <td style="width: 200px"><%= t('activerecord.models.series_statement') -%>:</td>
19
- <td style="width: 490px"><%= link_to manifestation.series_statement.original_title, manifestation.series_statement -%>
20
- <%- if manifestation.issn.present? -%>
21
- (<%= t('activerecord.attributes.manifestation.issn') -%>: <%= manifestation.issn -%>)
22
- <%- end -%>
19
+ <td style="width: 500px">
20
+ <%= link_to manifestation.series_statement.original_title, manifestation.series_statement -%>
21
+ <%= manifestation.volume_number_string %>
22
+ <%- if manifestation.issn.present? -%>
23
+ (<%= t('activerecord.attributes.manifestation.issn') -%>: <%= manifestation.issn -%>)
24
+ <%- end -%>
23
25
  </td>
24
26
  </tr>
25
27
  <% end %>
@@ -1,4 +1,10 @@
1
- <strong><%= link_to title_with_volume_number(manifestation), manifestation -%></strong>
1
+ <strong>
2
+ <% if manifestation.root_of_series? %>
3
+ <%= link_to manifestation.series_statement.original_title, series_statement_manifestations_path(manifestation.series_statement, :query => @query) %>
4
+ <% else %>
5
+ <%= link_to title_with_volume_number(manifestation), manifestation -%>
6
+ <% end %>
7
+ </strong>
2
8
  <% if manifestation.periodical_master? %>
3
9
  <%- if manifestation.series_statement.try(:first_issue) and manifestation.series_statement.try(:latest_issue) -%>
4
10
  <%= manifestation.series_statement.first_issue.date_of_publication.try(:year) -%>
@@ -0,0 +1,15 @@
1
+ <strong><%= link_to manifestation.series_statement.original_title, series_statement_manifestations_path(manifestation.series_statement, :query => @query) -%></strong>
2
+ <% if manifestation.periodical_master? %>
3
+ <%- if manifestation.series_statement.try(:first_issue) and manifestation.series_statement.try(:latest_issue) -%>
4
+ <%= manifestation.series_statement.first_issue.date_of_publication.try(:year) -%>
5
+ -
6
+ <%= manifestation.series_statement.latest_issue.date_of_publication.try(:year) -%>
7
+ <%- end -%>
8
+ <%= image_tag('icons/newspaper.png', :size => '16x16', :alt => t('manifestation.serial')) -%>
9
+ <%- end -%>
10
+ <%= link_to form_icon(manifestation.carrier_type), manifestation -%>
11
+ <%= link_to image_tag('icons/world_go.png', :size => '16x16', :alt => t('manifestation.web')), manifestation.access_address unless manifestation.access_address.blank? -%>
12
+ <br />
13
+ <div id="creator_list_<%= manifestation.id -%>">
14
+ <%= render 'manifestations/show_creators', :manifestation => manifestation -%>
15
+ </div>
@@ -0,0 +1,30 @@
1
+ <table id="resource_detail">
2
+ <tr>
3
+ <td style="width: 200px"><%= t('activerecord.attributes.series_statement.title_transcription') -%></td>
4
+ <td style="width: 490px"><%= @series_statement.title_transcription %></td>
5
+ </tr>
6
+ <tr>
7
+ <td style="width: 200px"><%= t('activerecord.attributes.series_statement.title_subseries') -%></td>
8
+ <td style="width: 490px"><%= @series_statement.title_subseries %>
9
+ <% if @series_statement.title_subseries_transcription? %>
10
+ (<%= @series_statement.title_subseries_transcription %>)
11
+ <% end %>
12
+ </td>
13
+ </tr>
14
+ <tr>
15
+ <td><%= t('activerecord.attributes.series_statement.periodical') -%></td>
16
+ <td><%= localized_boolean(@series_statement.periodical) %></td>
17
+ </tr>
18
+ <tr>
19
+ <td><%= t('activerecord.attributes.series_statement.issn') -%></td>
20
+ <td><%= @series_statement.issn %></td>
21
+ </tr>
22
+ <tr>
23
+ <td><%= t('activerecord.attributes.series_statement.series_statement_identifier') -%></td>
24
+ <td><%= @series_statement.series_statement_identifier %></td>
25
+ </tr>
26
+ <tr>
27
+ <td><%= t('activerecord.attributes.series_statement.note') -%></td>
28
+ <td><%= @series_statement.note %></td>
29
+ </tr>
30
+ </table>
@@ -0,0 +1,8 @@
1
+ <ul>
2
+ <% if can? :create, Manifestation %>
3
+ <li><%= link_to t('page.new', :model => t('activerecord.models.manifestation')), new_series_statement_manifestation_path(@series_statement) %></li>
4
+ <% end %>
5
+ <% if can? :update, @series_statement %>
6
+ <li><%= link_to t('page.edit'), edit_series_statement_path(@series_statement) %></li>
7
+ <% end %>
8
+ </ul>