enju_flower 0.1.0.pre5 → 0.1.0.pre6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/app/views/manifestations/_call_number.html.erb +3 -1
  3. data/app/views/manifestations/_index_form_parent.html.erb +21 -0
  4. data/app/views/manifestations/_manifestation.html.erb +19 -19
  5. data/app/views/manifestations/_show_detail_librarian.html.erb +10 -2
  6. data/app/views/manifestations/_show_detail_user.html.erb +6 -2
  7. data/app/views/manifestations/_show_index.html.erb +3 -8
  8. data/app/views/manifestations/_show_parent.html.erb +26 -0
  9. data/app/views/manifestations/_show_periodical_master.html.erb +6 -23
  10. data/app/views/manifestations/_show_series_index.html.erb +1 -9
  11. data/app/views/manifestations/_show_series_statement.html.erb +2 -2
  12. data/app/views/manifestations/_submenu_parent.html.erb +8 -0
  13. data/app/views/manifestations/index.html.erb +6 -10
  14. data/app/views/manifestations/show.html.erb +1 -1
  15. data/lib/enju_flower/version.rb +1 -1
  16. data/spec/controllers/manifestations_controller_spec.rb +20 -37
  17. data/spec/dummy/app/models/ability.rb +6 -10
  18. data/spec/dummy/config/application.rb +1 -0
  19. data/spec/dummy/db/migrate/20130421093852_add_periodical_to_manifestation.rb +5 -0
  20. data/spec/dummy/db/migrate/20130421155019_add_creator_string_to_series_statement.rb +7 -0
  21. data/spec/dummy/db/migrate/20130421164124_add_series_master_to_series_statement.rb +5 -0
  22. data/spec/dummy/db/migrate/20130429020822_add_root_manifestation_id_to_series_statement.rb +6 -0
  23. data/spec/dummy/db/schema.rb +13 -6
  24. data/spec/dummy/db/test.sqlite3 +0 -0
  25. data/spec/dummy/solr/data/test/index/{_ay.fnm → _rs.fnm} +3 -3
  26. data/spec/dummy/solr/data/test/index/{_ay.frq → _rs.frq} +0 -0
  27. data/spec/dummy/solr/data/test/index/{_ay.nrm → _rs.nrm} +1 -1
  28. data/spec/dummy/solr/data/test/index/{_ay.prx → _rs.prx} +0 -0
  29. data/spec/dummy/solr/data/test/index/_rs.tii +0 -0
  30. data/spec/dummy/solr/data/test/index/{_ay.tis → _rs.tis} +0 -0
  31. data/spec/dummy/solr/data/test/index/{_az.fnm → _rt.fnm} +3 -3
  32. data/spec/dummy/solr/data/test/index/{_az.frq → _rt.frq} +0 -0
  33. data/spec/dummy/solr/data/test/index/{_az.nrm → _rt.nrm} +1 -1
  34. data/spec/dummy/solr/data/test/index/{_az.prx → _rt.prx} +0 -0
  35. data/spec/dummy/solr/data/test/index/{_az.tii → _rt.tii} +0 -0
  36. data/spec/dummy/solr/data/test/index/{_az.tis → _rt.tis} +0 -0
  37. data/spec/dummy/solr/data/test/index/{_b0.fnm → _ru.fnm} +3 -3
  38. data/spec/dummy/solr/data/test/index/_ru.frq +0 -0
  39. data/spec/dummy/solr/data/test/index/_ru.nrm +1 -0
  40. data/spec/dummy/solr/data/test/index/_ru.prx +0 -0
  41. data/spec/dummy/solr/data/test/index/_ru.tii +0 -0
  42. data/spec/dummy/solr/data/test/index/_ru.tis +0 -0
  43. data/spec/dummy/solr/data/test/index/segments.gen +0 -0
  44. data/spec/dummy/solr/data/test/index/{segments_es → segments_11u} +0 -0
  45. data/spec/fixtures/series_statements.yml +21 -23
  46. data/vendor/assets/javascripts/{jquery.mobile-1.3.0.js → jquery.mobile-1.3.1.js} +3857 -3758
  47. data/vendor/assets/stylesheets/images/ajax-loader.gif +0 -0
  48. data/vendor/assets/stylesheets/images/icons-18-black.png +0 -0
  49. data/vendor/assets/stylesheets/images/icons-18-white.png +0 -0
  50. data/vendor/assets/stylesheets/images/icons-36-black.png +0 -0
  51. data/vendor/assets/stylesheets/images/icons-36-white.png +0 -0
  52. data/vendor/assets/stylesheets/{jquery.mobile-1.3.0.css → jquery.mobile-1.3.1.css} +73 -64
  53. metadata +87 -64
  54. data/app/assets/javascripts/resources.js +0 -2
  55. data/app/assets/stylesheets/resources.css +0 -4
  56. data/app/views/manifestations/_submenu_series_statement.html.erb +0 -9
  57. data/spec/dummy/db/migrate/20110918161853_rename_series_statement_manifestation_id_to_root_manifestation_id.rb +0 -13
  58. data/spec/dummy/solr/data/test/index/_ay.tii +0 -0
  59. data/spec/dummy/solr/data/test/index/_b0.frq +0 -0
  60. data/spec/dummy/solr/data/test/index/_b0.nrm +0 -1
  61. data/spec/dummy/solr/data/test/index/_b0.prx +0 -0
  62. data/spec/dummy/solr/data/test/index/_b0.tii +0 -0
  63. data/spec/dummy/solr/data/test/index/_b0.tis +0 -0
  64. data/spec/fixtures/series_has_manifestations.yml +0 -35
  65. /data/spec/dummy/solr/data/test/index/{_ay.fdt → _rs.fdt} +0 -0
  66. /data/spec/dummy/solr/data/test/index/{_ay.fdx → _rs.fdx} +0 -0
  67. /data/spec/dummy/solr/data/test/index/{_az.fdt → _rt.fdt} +0 -0
  68. /data/spec/dummy/solr/data/test/index/{_az.fdx → _rt.fdx} +0 -0
  69. /data/spec/dummy/solr/data/test/index/{_b0.fdt → _ru.fdt} +0 -0
  70. /data/spec/dummy/solr/data/test/index/{_b0.fdx → _ru.fdx} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fe77f1014183a755ac1e82337a3eddacf8550548
4
- data.tar.gz: adfb92ef1c60b1ed59c4c681aa7f507424c2947e
3
+ metadata.gz: 7711f54778f3b74c9d47fe99629bfaace2f92cca
4
+ data.tar.gz: e0b715f7ab1c40c2f49a6b0a525061402e70ea11
5
5
  SHA512:
6
- metadata.gz: fcdc2115b65e31e4c695cb604f54bbe3aa6d7f28a80316dbe55f0d82e0dbffb606eed7517ca6e5e9530d0fb4fda3599b0c599e740db8962e4289c1516d30dbdc
7
- data.tar.gz: 28189c0c7fdf344ff351f6e3963752f31147816a8ef42a8fae0a7f8b942ce11f87cb42d350807fa461745749f2cce7c68bb823a7039f17bfdaae4c7563fd8194
6
+ metadata.gz: dedfc6c22f1e821ee65cd2ae38c42dcaeec519aba3f8c32d78dcf40c6511e7e1df5622fad564700d1582f516bc7b9fa3c73e1db0b3ff6970612bf21041aa3596
7
+ data.tar.gz: 808f1c1df3146eef2e7b6aec049ccdbbca3714d4d59a31dc1c7455cfa506fdc1241ffd1ab255b723117e8fdfed025cc814105eb509b2515c7d7386270863c38e
@@ -5,7 +5,9 @@
5
5
  <br />
6
6
  <%= link_to item.shelf.display_name.localize, library_shelf_path(item.shelf.library, item.shelf) -%>
7
7
  <br />
8
- <%= item.circulation_status.display_name.localize if item.circulation_status -%>
8
+ <% if defined?(EnjuCirculation) %>
9
+ <%= item.circulation_status.display_name.localize if item.circulation_status -%>
10
+ <% end %>
9
11
 
10
12
  </td>
11
13
  <td class="call_number_table">
@@ -0,0 +1,21 @@
1
+ <h2 class="resource_title">
2
+ [M]
3
+ <%= link_to @parent.original_title, @parent, :itemprop => 'name' -%>
4
+ </h2>
5
+
6
+ <div class="search_form">
7
+ <%= form_for :manifestations, :url => manifestations_path, :html => {:method => 'get'} do -%>
8
+ <p>
9
+ <%= label_tag :search_form_top, t('page.search_term') -%>:
10
+ <%= search_field_tag 'query', h(@query), {:id => 'search_form_top', :class => 'search_form', :placeholder => t('page.search_term')} -%>
11
+ <%= hidden_field_tag 'parent_id', @parent.id -%>
12
+ <%= hidden_field_tag 'reservable', h(@reservable) if @reservable -%>
13
+ <% if can? :update, Manifestation %>
14
+ <%= render 'page/add' %>
15
+ <% end %>
16
+ <%= submit_tag t('page.search') -%>
17
+ <br />
18
+ <%= link_to t('page.advanced_search'), page_advanced_search_path -%>
19
+ </p>
20
+ <%- end -%>
21
+ </div>
@@ -2,23 +2,23 @@
2
2
  <td style="width: 30px"><%= @manifestations.offset_value + 1 + manifestation_counter -%></td>
3
3
  <% cache([:manifestation => manifestation.id, :fragment => 'manifestation_html', :role => current_user_role_name, :locale => @locale]) do %>
4
4
  <td style="480px">
5
- <% if manifestation.root_of_series? %>
6
- <%= render 'manifestations/show_series_index', :manifestation => manifestation -%>
5
+ <% if manifestation.root_series_statement %>
6
+ <%= render 'manifestations/show_series_index', :manifestation => manifestation, :series_statement => manifestation.root_series_statement -%>
7
7
  <% else %>
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()" -%>)
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()" -%>)
14
+ <%- end -%>
15
+ <% if defined?(EnjuBookmark) %>
16
+ <%- if manifestation.tags.first -%>
17
+ (<%= link_to_function t('activerecord.models.tag'), "$('#tag_#{manifestation.id}').toggle()" -%>)
14
18
  <%- end -%>
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 -%>
19
+ <%= render 'manifestations/show_tag', :manifestation => manifestation -%>
20
+ <% end %>
21
+ <%= render 'manifestations/holding', :manifestation => manifestation -%>
22
22
  <% end %>
23
23
  </td>
24
24
  <% if signed_in? %>
@@ -40,8 +40,8 @@
40
40
  <% unless params[:mode] == 'add' %>
41
41
  <%= link_to image_tag('icons/book_edit.png', :size => '16x16', :alt => t('page.edit')), edit_manifestation_path(manifestation) -%>
42
42
  <% if @series_statement %>
43
- <% if manifestation.series_statement == @series_statement %>
44
- <%= 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
+ <% if manifestation.root_series_statement == @series_statement %>
44
+ <%= link_to t('page.destroy'), series_statement_series_has_manifestation_path(manifestation.root_series_statement, manifestation.series_has_manifestations.where(:series_statement_id => manifestation.root_series_statement.id).first), :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
45
45
  <% end %>
46
46
  <% end %>
47
47
  <% else %>
@@ -53,7 +53,7 @@
53
53
  <% when @index_patron[:publisher] %>
54
54
  <%= link_to t('page.add'), new_patron_produce_path(@index_patron[:publisher], :manifestation_id => manifestation.id) unless manifestation.publishers.include?(@index_patron[:publisher]) -%>
55
55
  <% when @series_statement %>
56
- <% unless manifestation.series_statement -%>
56
+ <% unless manifestation.series_statements.exists? -%>
57
57
  <%= link_to t('page.add'), new_series_has_manifestation_path(:series_statement_id => @series_statement.id, :manifestation_id => manifestation.id) -%>
58
58
  <% end %>
59
59
  <% when @manifestation %>
@@ -61,7 +61,7 @@
61
61
  <% when @item %>
62
62
  <%= link_to t('page.change'), edit_exemplify_path(@item.exemplify, :manifestation_id => manifestation.id) unless @item.manifestation == manifestation -%>
63
63
  <% else %>
64
- <%= link_to image_tag('icons/arrow_divide.png', :size => '16x16', :alt => t('manifestation.add_derivation')), manifestation_manifestations_path(manifestation, :mode => 'add') -%>
64
+ <%= link_to image_tag('icons/arrow_divide.png', :size => '16x16', :alt => t('manifestation.add_derivation')), new_manifestation_path(:parent_id => manifestation.id) -%>
65
65
  <% end %>
66
66
  <%- end -%>
67
67
  <%- end -%>
@@ -10,11 +10,19 @@
10
10
  <td style="width: 500px"><%= manifestation.title_alternative -%></td>
11
11
  </tr>
12
12
  <% end %>
13
- <%- if manifestation.series_statement -%>
13
+ <%- if manifestation.series_statements.exists? -%>
14
14
  <tr>
15
15
  <td style="width: 200px"><%= t('activerecord.models.series_statement') -%>:</td>
16
16
  <td style="width: 500px">
17
- <%= link_to manifestation.series_statement.original_title, manifestation.series_statement -%>
17
+ <ul>
18
+ <% manifestation.series_statements.each do |series_statement| %>
19
+ <% if series_statement.root_manifestation %>
20
+ <li><%= link_to series_statement.original_title, series_statement.root_manifestation -%></li>
21
+ <% else %>
22
+ <li><%= series_statement.original_title -%></li>
23
+ <% end %>
24
+ <% end %>
25
+ </ul>
18
26
  <%= manifestation.volume_number_string %>
19
27
  <%- if manifestation.issn.present? -%>
20
28
  (<%= t('activerecord.attributes.manifestation.issn') -%>: <%= manifestation.issn -%>)
@@ -10,11 +10,15 @@
10
10
  <td style="width: 500px"><%= manifestation.title_alternative -%></td>
11
11
  </tr>
12
12
  <% end %>
13
- <%- if manifestation.series_statement -%>
13
+ <%- if manifestation.series_statements.exists? -%>
14
14
  <tr>
15
15
  <td style="width: 200px"><%= t('activerecord.models.series_statement') -%>:</td>
16
16
  <td style="width: 500px">
17
- <%= link_to manifestation.series_statement.original_title, manifestation.series_statement -%>
17
+ <ul>
18
+ <% manifestation.series_statements.each do |series_statement| %>
19
+ <li><%= link_to series_statement.original_title, series_statement -%></li>
20
+ <% end %>
21
+ </ul>
18
22
  <%= manifestation.volume_number_string %>
19
23
  <%- if manifestation.issn.present? -%>
20
24
  (<%= t('activerecord.attributes.manifestation.issn') -%>: <%= manifestation.issn -%>)
@@ -1,16 +1,11 @@
1
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) %>
2
+ <% if manifestation.root_series_statement %>
3
+ <%= link_to manifestation.root_series_statement.original_title, series_statement_manifestations_path(manifestation.root_series_statement, :query => @query) %>
4
4
  <% else %>
5
5
  <%= link_to title_with_volume_number(manifestation), manifestation -%>
6
6
  <% end %>
7
7
  </strong>
8
- <% if manifestation.periodical_master? %>
9
- <%- if manifestation.series_statement.try(:first_issue) and manifestation.series_statement.try(:latest_issue) -%>
10
- <%= manifestation.series_statement.first_issue.date_of_publication.try(:year) -%>
11
- -
12
- <%= manifestation.series_statement.latest_issue.date_of_publication.try(:year) -%>
13
- <%- end -%>
8
+ <% if manifestation.series_master? %>
14
9
  <%= image_tag('icons/newspaper.png', :size => '16x16', :alt => t('manifestation.serial')) -%>
15
10
  <%- end -%>
16
11
  <%= link_to form_icon(manifestation.carrier_type), manifestation -%>
@@ -0,0 +1,26 @@
1
+ <table class="table table-striped" id="resource_detail">
2
+ <tr>
3
+ <td style="width: 200px"><%= t('activerecord.attributes.series_statement.title_transcription') -%></td>
4
+ <td style="width: 490px"><%= @parent.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"><%= @parent.root_series_statement.title_subseries %>
9
+ <% if @parent.root_series_statement.title_subseries_transcription? %>
10
+ (<%= @parent.root_series_statement.title_subseries_transcription %>)
11
+ <% end %>
12
+ </td>
13
+ </tr>
14
+ <tr>
15
+ <td><%= t('activerecord.attributes.series_statement.series_master') -%></td>
16
+ <td><%= localized_boolean(@parent.series_master?) %></td>
17
+ </tr>
18
+ <tr>
19
+ <td><%= t('activerecord.attributes.series_statement.series_statement_identifier') -%></td>
20
+ <td><%= @parent.root_series_statement.series_statement_identifier %></td>
21
+ </tr>
22
+ <tr>
23
+ <td><%= t('activerecord.attributes.series_statement.note') -%></td>
24
+ <td><%= @parent.note %></td>
25
+ </tr>
26
+ </table>
@@ -1,40 +1,23 @@
1
- <%= render 'manifestations/title', :manifestation => @manifestation.series_statement.root_manifestation -%>
1
+ <%= render 'manifestations/title', :manifestation => @manifestation.root_series_statement.manifestation -%>
2
2
 
3
3
  <p>
4
4
  <strong><%= t('activerecord.attributes.series_statement.original_title') -%></strong>
5
- <%= @manifestation.series_statement.original_title %>
5
+ <%= @manifestation.root_series_statement.original_title %>
6
6
  </p>
7
7
 
8
8
  <p>
9
9
  <strong><%= t('activerecord.attributes.series_statement.title_transcription') -%></strong>
10
- <%= @manifestation.series_statement.title_transcription %>
10
+ <%= @manifestation.root_series_statement.title_transcription %>
11
11
  </p>
12
12
 
13
13
  <p>
14
14
  <strong><%= t('activerecord.attributes.series_statement.issn') -%></strong>
15
- <%= @manifestation.series_statement.issn %>
15
+ <%= @manifestation.root_series_statement.issn %>
16
16
  </p>
17
17
 
18
- <!--
19
- <p>
20
- <strong><%= t('activerecord.attributes.series_statement.numbering') -%></strong>
21
- <%= @manifestation.series_statement.numbering %>
22
- </p>
23
-
24
- <p>
25
- <strong><%= t('activerecord.attributes.series_statement.title_subseries') -%></strong>
26
- <%= @manifestation.series_statement.title_subseries %>
27
- </p>
28
-
29
- <p>
30
- <strong><%= t('activerecord.attributes.series_statement.numbering_subseries') -%></strong>
31
- <%= @manifestation.series_statement.numbering_subseries %>
32
- </p>
33
- -->
34
-
35
18
  <p>
36
19
  <strong><%= t('activerecord.attributes.series_statement.series_statement_identifier') -%></strong>
37
- <%= @manifestation.series_statement.series_statement_identifier %>
20
+ <%= @manifestation.root_series_statement.series_statement_identifier %>
38
21
  </p>
39
22
 
40
- <%= render 'series_statements/manifestation_list', :series_statement => @manifestation.series_statement -%>
23
+ <%= render 'series_statements/manifestation_list', :series_statement => @manifestation.root_series_statement -%>
@@ -1,12 +1,4 @@
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 -%>
1
+ <strong><%= link_to manifestation.original_title, manifestations_path(:parent_id => manifestation.id, :query => @query) -%></strong>
10
2
  <%= link_to form_icon(manifestation.carrier_type), manifestation -%>
11
3
  <%= link_to image_tag('icons/world_go.png', :size => '16x16', :alt => t('manifestation.web')), manifestation.access_address unless manifestation.access_address.blank? -%>
12
4
  <br />
@@ -12,8 +12,8 @@
12
12
  </td>
13
13
  </tr>
14
14
  <tr>
15
- <td><%= t('activerecord.attributes.series_statement.periodical') -%></td>
16
- <td><%= localized_boolean(@series_statement.periodical) %></td>
15
+ <td><%= t('activerecord.attributes.series_statement.root_manifestation_id') -%></td>
16
+ <td><%= link_to @series_statement.root_manifestation.original_title, @series_statement.root_manifestation %></td>
17
17
  </tr>
18
18
  <tr>
19
19
  <td><%= t('activerecord.attributes.series_statement.issn') -%></td>
@@ -0,0 +1,8 @@
1
+ <ul>
2
+ <% if can? :create, Manifestation %>
3
+ <li><%= link_to t('page.new', :model => t('activerecord.models.manifestation')), new_manifestation_path(:parent_id => @parent.id) %></li>
4
+ <% end %>
5
+ <% if can? :update, @parent %>
6
+ <li><%= link_to t('page.edit'), edit_manifestation_path(@parent) %></li>
7
+ <% end %>
8
+ </ul>
@@ -14,15 +14,15 @@
14
14
  <%= render 'index_form_manifestation' %>
15
15
  <% when @item %>
16
16
  <%= render 'index_form_item' %>
17
- <% when @series_statement %>
18
- <%= render 'index_form_series_statement' %>
17
+ <% when @parent %>
18
+ <%= render 'index_form_parent' %>
19
19
  <% else %>
20
20
  <%= render 'index_form' %>
21
21
  <% end %>
22
22
  <%= set_focus_on_search_form %>
23
23
 
24
- <% if @series_statement %>
25
- <%= render 'show_series_statement' %>
24
+ <% if @parent %>
25
+ <%= render 'show_parent' %>
26
26
  <% end %>
27
27
 
28
28
  <%- if @manifestations.total_count > 0 -%>
@@ -66,10 +66,6 @@
66
66
  </div>
67
67
  <% end %>
68
68
  <%- else -%>
69
- <!-- TODO: 検索結果が少ない場合にも表示させる -->
70
- <%- if @suggested_tag -%>
71
- <p><%= t('page.did_you_mean') -%>: <%= link_to @suggested_tag.name, manifestations_path(:tag => @suggested_tag.name) -%></p>
72
- <%- end -%>
73
69
  <%= render 'manifestations/not_found' -%>
74
70
  <%- end -%>
75
71
 
@@ -79,8 +75,8 @@
79
75
  </div>
80
76
 
81
77
  <div id="submenu" class="ui-corner-all">
82
- <% if @series_statement and can?(:update, @series_statement) %>
83
- <%= render 'submenu_series_statement' %>
78
+ <% if @parent and can?(:update, @parent) %>
79
+ <%= render 'submenu_parent' %>
84
80
  <% end %>
85
81
  <h3><%= link_to h("#{t('page.total')}: #{@count[:query_result]}"), url_for(params.merge(:action => 'index', :view => nil, :carrier_type => nil, :library => nil, :language => nil, :subject => nil, :only_path => true)) -%></h3>
86
82
  <%- if @manifestations.total_count > 0 -%>
@@ -90,7 +90,7 @@
90
90
  <li><%= link_to t('manifestation.edit_contributor'), expression_patrons_path(@manifestation) -%></li>
91
91
  <li><%= link_to t('manifestation.edit_publisher'), manifestation_patrons_path(@manifestation) -%></li>
92
92
  <%- if @manifestation.periodical? -%>
93
- <li><%= link_to t('manifestation.add_next_issue'), new_series_statement_manifestation_path(@manifestation.series_statement) if @manifestation.series_statement -%></li>
93
+ <li><%= link_to t('manifestation.add_next_issue'), new_series_statement_manifestation_path(@manifestation.root_series_statement) if @manifestation.root_series_statement -%></li>
94
94
  <%- end -%>
95
95
  </ul>
96
96
  </li>
@@ -1,3 +1,3 @@
1
1
  module EnjuFlower
2
- VERSION = "0.1.0.pre5"
2
+ VERSION = "0.1.0.pre6"
3
3
  end
@@ -150,39 +150,10 @@ describe ManifestationsController do
150
150
  assigns(:query).should eq '2005 date_of_publication_d:[* TO 2000-12-31T14:59:59Z]'
151
151
  end
152
152
 
153
- it "should get index_all_facet" do
154
- get :index, :query => '2005', :view => 'all_facet'
153
+ it "should get tag_cloud" do
154
+ get :index, :query => '2005', :view => 'tag_cloud'
155
155
  response.should be_success
156
- assigns(:carrier_type_facet).should_not be_empty
157
- assigns(:language_facet).should_not be_empty
158
- assigns(:library_facet).should_not be_empty
159
- end
160
-
161
- it "should get index_carrier_type_facet" do
162
- get :index, :query => '2005', :view => 'carrier_type_facet'
163
- response.should be_success
164
- assigns(:carrier_type_facet).should_not be_empty
165
- end
166
-
167
- it "should get index_language_facet" do
168
- get :index, :query => '2005', :view => 'language_facet'
169
- response.should be_success
170
- assigns(:language_facet).should_not be_empty
171
- end
172
-
173
- it "should get index_library_facet" do
174
- get :index, :query => '2005', :view => 'library_facet'
175
- response.should be_success
176
- assigns(:library_facet).should_not be_empty
177
- end
178
-
179
- it "should get index_pub_year_facet" do
180
- get :index, :view => 'pub_year_facet'
181
- response.should be_success
182
- assigns(:pub_year_facet).first.value.should eq 2010.0..2020.0
183
- assigns(:pub_year_facet).first.count.should eq 1
184
- assigns(:pub_year_facet).last.value.should eq 2000.0..2010.0
185
- assigns(:pub_year_facet).last.count.should eq 1
156
+ response.should render_template("manifestations/_tag_cloud")
186
157
  end
187
158
  end
188
159
  end
@@ -264,6 +235,18 @@ describe ManifestationsController do
264
235
  response.should be_success
265
236
  end
266
237
 
238
+ it "should show manifestation with tag_edit" do
239
+ get :show, :id => 1, :mode => 'tag_edit'
240
+ response.should render_template('manifestations/_tag_edit')
241
+ response.should be_success
242
+ end
243
+
244
+ it "should show manifestation with tag_list" do
245
+ get :show, :id => 1, :mode => 'tag_list'
246
+ response.should render_template('manifestations/_tag_list')
247
+ response.should be_success
248
+ end
249
+
267
250
  it "should show manifestation with show_creators" do
268
251
  get :show, :id => 1, :mode => 'show_creators'
269
252
  response.should render_template('manifestations/_show_creators')
@@ -402,9 +385,9 @@ describe ManifestationsController do
402
385
  end
403
386
 
404
387
  it "assigns a series_statement" do
405
- post :create, :manifestation => @attrs.merge(:series_has_manifestation_attributes => {:series_statement_id => 1})
388
+ post :create, :manifestation => @attrs.merge(:series_statements_attributes => {[0] => {:original_title => SeriesStatement.find(1).original_title}})
406
389
  assigns(:manifestation).reload
407
- assigns(:manifestation).series_statement.should eq SeriesStatement.find(1)
390
+ assigns(:manifestation).series_statements.pluck(:original_title).include?(series_statements(:one).original_title).should be_true
408
391
  end
409
392
 
410
393
  it "redirects to the created manifestation" do
@@ -512,7 +495,7 @@ describe ManifestationsController do
512
495
  describe "PUT update" do
513
496
  before(:each) do
514
497
  @manifestation = FactoryGirl.create(:manifestation)
515
- @manifestation.series_statement = SeriesStatement.find(1)
498
+ @manifestation.series_statements = [SeriesStatement.find(1)]
516
499
  @attrs = valid_attributes
517
500
  @invalid_attrs = {:original_title => ''}
518
501
  end
@@ -526,9 +509,9 @@ describe ManifestationsController do
526
509
  end
527
510
 
528
511
  it "assigns a series_statement" do
529
- put :update, :id => @manifestation.id, :manifestation => @attrs.merge(:series_has_manifestation_attributes => {:series_statement_id => 2})
512
+ put :update, :id => @manifestation.id, :manifestation => @attrs.merge(:series_statements_attributes => {[0] => {:original_title => series_statements(:two).original_title, "_destroy"=>"false"}})
530
513
  assigns(:manifestation).reload
531
- assigns(:manifestation).series_statement.should eq SeriesStatement.find(2)
514
+ assigns(:manifestation).series_statements.pluck(:original_title).include?(series_statements(:two).original_title).should be_true
532
515
  end
533
516
 
534
517
  it "assigns the requested manifestation as @manifestation" do
@@ -15,7 +15,7 @@
15
15
  end
16
16
  can [:read, :create, :update], Manifestation
17
17
  can [:destroy, :delete], Manifestation do |manifestation|
18
- manifestation.items.empty? and !manifestation.periodical_master?
18
+ manifestation.items.empty? and !manifestation.series_master?
19
19
  end
20
20
  can :manage, [
21
21
  Create,
@@ -37,8 +37,7 @@
37
37
  RealizeType,
38
38
  ResourceImportFile,
39
39
  SeriesStatement,
40
- SeriesStatementRelationship,
41
- SeriesHasManifestation
40
+ SeriesStatementRelationship
42
41
  ]
43
42
  can :update, [
44
43
  ContentType,
@@ -74,7 +73,7 @@
74
73
  can :index, Manifestation
75
74
  can [:show, :create, :update], Manifestation
76
75
  can [:destroy, :delete], Manifestation do |manifestation|
77
- manifestation.items.empty? and !manifestation.periodical_master?
76
+ manifestation.items.empty? and !manifestation.series_master?
78
77
  end
79
78
  can [:index, :create], Patron
80
79
  can :show, Patron do |patron|
@@ -97,8 +96,7 @@
97
96
  Realize,
98
97
  ResourceImportFile,
99
98
  SeriesStatement,
100
- SeriesStatementRelationship,
101
- SeriesHasManifestation
99
+ SeriesStatementRelationship
102
100
  ]
103
101
  can :read, [
104
102
  CarrierType,
@@ -165,8 +163,7 @@
165
163
  PatronRelationshipType,
166
164
  Produce,
167
165
  Realize,
168
- SeriesStatement,
169
- SeriesHasManifestation
166
+ SeriesStatement
170
167
  ]
171
168
  else
172
169
  can :index, Manifestation
@@ -198,8 +195,7 @@
198
195
  PictureFile,
199
196
  Produce,
200
197
  Realize,
201
- SeriesStatement,
202
- SeriesHasManifestation
198
+ SeriesStatement
203
199
  ]
204
200
  end
205
201
  end
@@ -59,5 +59,6 @@ end
59
59
 
60
60
  require 'enju_biblio'
61
61
  require 'enju_library'
62
+ require 'enju_bookmark'
62
63
  require 'mobylette'
63
64
  require 'plugins'
@@ -0,0 +1,5 @@
1
+ class AddPeriodicalToManifestation < ActiveRecord::Migration
2
+ def change
3
+ add_column :manifestations, :periodical, :boolean
4
+ end
5
+ end
@@ -0,0 +1,7 @@
1
+ class AddCreatorStringToSeriesStatement < ActiveRecord::Migration
2
+ def change
3
+ add_column :series_statements, :creator_string, :text
4
+ add_column :series_statements, :volume_number_string, :text
5
+ add_column :series_statements, :volume_number_transcription_string, :text
6
+ end
7
+ end
@@ -0,0 +1,5 @@
1
+ class AddSeriesMasterToSeriesStatement < ActiveRecord::Migration
2
+ def change
3
+ add_column :series_statements, :series_master, :boolean
4
+ end
5
+ end
@@ -0,0 +1,6 @@
1
+ class AddRootManifestationIdToSeriesStatement < ActiveRecord::Migration
2
+ def change
3
+ add_column :series_statements, :root_manifestation_id, :integer
4
+ add_index :series_statements, :root_manifestation_id
5
+ end
6
+ end
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended to check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(:version => 20121116033446) do
14
+ ActiveRecord::Schema.define(:version => 20130429020822) do
15
15
 
16
16
  create_table "baskets", :force => true do |t|
17
17
  t.integer "user_id"
@@ -632,6 +632,7 @@ ActiveRecord::Schema.define(:version => 20121116033446) do
632
632
  t.integer "month_of_publication"
633
633
  t.boolean "fulltext_content"
634
634
  t.string "doi"
635
+ t.boolean "periodical"
635
636
  end
636
637
 
637
638
  add_index "manifestations", ["access_address"], :name => "index_manifestations_on_access_address"
@@ -1063,19 +1064,25 @@ ActiveRecord::Schema.define(:version => 20121116033446) do
1063
1064
  t.text "title_subseries"
1064
1065
  t.text "numbering_subseries"
1065
1066
  t.integer "position"
1066
- t.datetime "created_at", :null => false
1067
- t.datetime "updated_at", :null => false
1067
+ t.datetime "created_at", :null => false
1068
+ t.datetime "updated_at", :null => false
1068
1069
  t.text "title_transcription"
1069
1070
  t.text "title_alternative"
1070
1071
  t.string "series_statement_identifier"
1071
1072
  t.string "issn"
1072
- t.boolean "periodical", :default => false, :null => false
1073
- t.integer "root_manifestation_id"
1073
+ t.boolean "periodical", :default => false, :null => false
1074
+ t.integer "manifestation_id"
1074
1075
  t.text "note"
1075
1076
  t.text "title_subseries_transcription"
1077
+ t.text "creator_string"
1078
+ t.text "volume_number_string"
1079
+ t.text "volume_number_transcription_string"
1080
+ t.boolean "series_master"
1081
+ t.integer "root_manifestation_id"
1076
1082
  end
1077
1083
 
1078
- add_index "series_statements", ["root_manifestation_id"], :name => "index_series_statements_on_manifestation_id"
1084
+ add_index "series_statements", ["manifestation_id"], :name => "index_series_statements_on_manifestation_id"
1085
+ add_index "series_statements", ["root_manifestation_id"], :name => "index_series_statements_on_root_manifestation_id"
1079
1086
  add_index "series_statements", ["series_statement_identifier"], :name => "index_series_statements_on_series_statement_identifier"
1080
1087
 
1081
1088
  create_table "shelves", :force => true do |t|
Binary file
@@ -2,6 +2,6 @@
2
2
  class_nametitle_smconnect_title_sconnect_creator_sconnect_publisher_sisbn_smcarrier_type_s
3
3
  library_sm
4
4
  language_sitem_identifier_smshelf_sm created_at_d updated_at_dcreator_ids_imcontributor_ids_impublisher_ids_im item_ids_imrequired_role_id_i start_page_i
5
- end_page_inumber_of_pages_iseries_statement_id_irepository_content_b
6
- creator_sm sort_title_s periodical_bperiodical_master_b
7
- title_text creator_textcontributor_textpublisher_textitem_identifier_text aulast_text aufirst_textau_text btitle_text isbn_textoriginal_manifestation_ids_im jtitle_text pub_date_dm
5
+ end_page_inumber_of_pages_irepository_content_b
6
+ creator_sm sort_title_s periodical_bseries_master_bresource_master_b
7
+ title_text creator_textcontributor_textpublisher_textitem_identifier_text aulast_text aufirst_textau_text btitle_text isbn_textoriginal_manifestation_ids_im
@@ -1 +1 @@
1
- NRM�turxtuxutrtwsssuuvyrttrvrrtxtxswuywtrtyvywtuwwttptxy|||||||||||tuuu|||||||||||||||||||||||||||||||||wxwwx|||||||||||||||||||||||||||||||||||||||||||||wxwwx|||||||||||||||||||||||||||u|||||||||||||||||uvw|||||||x|||||||||||||||||||||||||||||||||||||||y||||||||||||w���|||||||||||||||||||||||||||||||||��|||||||||||w���|||||||||||||||||||||||||||||||||xy|||||||||||tuuu|||||||||||||||||||||||||||||||||turxtuxutrtwsssuuvyrttrvrrtxtxswuywtrtyvywtuwwttpt||||��|||||��||||||||||||||||||||||||||||||||||||||tu|||||||||||||||||||||||||||||||||||||||||||||||
1
+ NRM�turxtuxutrtwsssuuvyrttrvrrtxtxswuywtrtyvywtuwwttptxy|||||||||||tuuu|||||||||||||||||||||||||||||||||wxwwx|||||||||||||||||||||||||||||||||||||||||||||wxwwx|||||||||||||||||||||||||||u|||||||||||||||||uvw|||||||x|||||||||||||||||||||||||||||||||||||||y||||||||||||w���|||||||||||||||||||||||||||||||||��|||||||||||w���|||||||||||||||||||||||||||||||||xy|||||||||||tuuu|||||||||||||||||||||||||||||||||turxtuxutrtwsssuuvyrttrvrrtxtxswuywtrtyvywtuwwttpt||||��|||||��|||||||||||||||||||||||||||||||||||||
@@ -2,6 +2,6 @@
2
2
  class_nametitle_smconnect_title_sconnect_creator_sconnect_publisher_sisbn_smcarrier_type_s
3
3
  library_sm
4
4
  language_sitem_identifier_smshelf_sm created_at_d updated_at_dcreator_ids_imcontributor_ids_impublisher_ids_im item_ids_imrequired_role_id_i start_page_i
5
- end_page_inumber_of_pages_iseries_statement_id_irepository_content_b
6
- creator_sm sort_title_s periodical_bperiodical_master_b
7
- title_text creator_textcontributor_textpublisher_textitem_identifier_text aulast_text aufirst_textau_text btitle_text isbn_textoriginal_manifestation_ids_im jtitle_text pub_date_dm
5
+ end_page_inumber_of_pages_irepository_content_b
6
+ creator_sm sort_title_s periodical_bseries_master_bresource_master_b
7
+ title_text creator_textcontributor_textpublisher_textitem_identifier_text aulast_text aufirst_textau_text btitle_text isbn_textoriginal_manifestation_ids_im