enju_biblio 0.3.11 → 0.3.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/agent_import_results_controller.rb +1 -1
  3. data/app/controllers/agents_controller.rb +0 -6
  4. data/app/controllers/items_controller.rb +15 -10
  5. data/app/controllers/manifestations_controller.rb +68 -76
  6. data/app/controllers/resource_import_results_controller.rb +2 -2
  7. data/app/controllers/series_statements_controller.rb +0 -6
  8. data/app/helpers/manifestations_helper.rb +8 -8
  9. data/app/models/agent.rb +10 -1
  10. data/app/models/form_of_work.rb +1 -1
  11. data/app/models/frequency.rb +1 -1
  12. data/app/models/identifier.rb +1 -1
  13. data/app/models/import_request.rb +2 -3
  14. data/app/models/item.rb +6 -6
  15. data/app/models/item_custom_value.rb +1 -1
  16. data/app/models/manifestation.rb +10 -18
  17. data/app/models/manifestation_custom_value.rb +1 -1
  18. data/app/models/resource_import_file.rb +8 -4
  19. data/app/views/agent_import_results/{index.txt.ruby → index.text.ruby} +0 -0
  20. data/app/views/agent_relationship_types/index.html.erb +3 -3
  21. data/app/views/agents/index.rss.builder +2 -2
  22. data/app/views/items/_item.json.jbuilder +17 -0
  23. data/app/views/items/index.json.jbuilder +5 -0
  24. data/app/views/items/index.text.ruby +13 -0
  25. data/app/views/items/show.html.erb +125 -125
  26. data/app/views/items/show.json.jbuilder +1 -0
  27. data/app/views/layouts/agents.html.erb +2 -2
  28. data/app/views/layouts/manifestations.html.erb +2 -2
  29. data/app/views/manifestations/_carrier_type_facet.html.erb +1 -1
  30. data/app/views/manifestations/_classification_facet.html.erb +2 -2
  31. data/app/views/manifestations/_export_list.html.erb +4 -4
  32. data/app/views/manifestations/_form.html.erb +3 -3
  33. data/app/views/manifestations/_language_facet.html.erb +1 -1
  34. data/app/views/manifestations/_library_facet.html.erb +1 -1
  35. data/app/views/manifestations/_pub_year_facet.html.erb +1 -1
  36. data/app/views/manifestations/_reservable_facet.html.erb +2 -2
  37. data/app/views/manifestations/_show_detail_librarian.html.erb +12 -8
  38. data/app/views/manifestations/_show_detail_user.html.erb +12 -8
  39. data/app/views/manifestations/_title.html.erb +1 -1
  40. data/app/views/manifestations/index.html.erb +7 -7
  41. data/app/views/manifestations/index.rdf.builder +2 -2
  42. data/app/views/manifestations/index.rss.builder +2 -2
  43. data/app/views/manifestations/index.text.ruby +13 -0
  44. data/app/views/manifestations/{show.txt.ruby → show.text.ruby} +0 -0
  45. data/app/views/resource_import_results/{index.txt.ruby → index.text.ruby} +0 -0
  46. data/lib/enju_biblio/version.rb +1 -1
  47. data/lib/enju_biblio.rb +0 -2
  48. data/spec/controllers/items_controller_spec.rb +41 -0
  49. data/spec/controllers/manifestations_controller_spec.rb +2 -21
  50. data/spec/fixtures/items.yml +1 -0
  51. data/spec/fixtures/manifestations.yml +1 -0
  52. data/spec/models/manifestation_spec.rb +11 -66
  53. data/spec/models/resource_import_file_spec.rb +18 -0
  54. data/spec/system/items_spec.rb +6 -0
  55. data/spec/views/agent_import_results/{index.txt.ruby_spec.rb → index.text.ruby_spec.rb} +1 -1
  56. data/spec/views/items/index.json.jbuilder_spec.rb +15 -0
  57. data/spec/views/items/show.json.jbuilder_spec.rb +15 -0
  58. data/spec/views/manifestations/index.html.erb_spec.rb +1 -1
  59. data/spec/views/manifestations/index.rdf.builder_spec.rb +0 -1
  60. data/spec/views/manifestations/{index.txt.ruby_spec.rb → index.text.ruby_spec.rb} +1 -1
  61. data/spec/views/manifestations/{show.txt.ruby_spec.rb → show.text.ruby_spec.rb} +1 -1
  62. data/spec/views/resource_import_results/{index.txt.ruby_spec.rb → index.text.ruby_spec.rb} +1 -1
  63. metadata +37 -34
  64. data/app/views/items/index.txt.erb +0 -4
  65. data/app/views/manifestations/explain.sru +0 -9
  66. data/app/views/manifestations/index.sru.builder +0 -101
  67. data/app/views/manifestations/index.txt.ruby +0 -7
  68. data/lib/enju_biblio/porta_cql.rb +0 -282
  69. data/lib/enju_biblio/sru.rb +0 -85
@@ -4,11 +4,11 @@ xml.rss('version' => "2.0",
4
4
  'xmlns:atom' => "http://www.w3.org/2005/Atom"){
5
5
  xml.channel{
6
6
  xml.title t('agent.library_group_agent', library_group_name: @library_group.display_name.localize)
7
- xml.link "#{request.protocol}#{request.host_with_port}#{url_for(filtered_params.merge(format: nil, only_path: true))}"
7
+ xml.link "#{request.protocol}#{request.host_with_port}#{url_for(request.params.merge(format: nil, only_path: true))}"
8
8
  xml.description "Next-L Enju, an open source integrated library system developed by Project Next-L"
9
9
  xml.language @locale.to_s
10
10
  xml.ttl "60"
11
- xml.tag! "atom:link", rel: 'self', href: "#{request.protocol}#{request.host_with_port}#{url_for(filtered_params.merge(format: :rss, only_path: true))}"
11
+ xml.tag! "atom:link", rel: 'self', href: "#{request.protocol}#{request.host_with_port}#{url_for(request.params.merge(format: :rss, only_path: true))}"
12
12
  xml.tag! "atom:link", rel: 'alternate', href: agents_url
13
13
  xml.tag! "atom:link", rel: 'search', type: 'application/opensearchdescription+xml', href: page_opensearch_url
14
14
  if params[:query].present?
@@ -0,0 +1,17 @@
1
+ json.id item.id
2
+ json.manifestation_id item.manifestation_id
3
+ json.item_identifier item.item_identifier
4
+ json.call_number item.call_number
5
+ json.shelf item.shelf.name
6
+ if defined?(EnjuCirculation)
7
+ json.circulation_status item.circulation_status&.name
8
+ end
9
+ json.binding_item_identifier item.binding_item_identifier
10
+ json.binding_call_number item.binding_call_number
11
+ json.binded_at item.binded_at
12
+ json.acquired_at item.acquired_at
13
+ json.include_supplements item.include_supplements
14
+ json.url item.url
15
+ json.note item.note
16
+ json.created_at item.created_at
17
+ json.updated_at item.updated_at
@@ -0,0 +1,5 @@
1
+ json.results do
2
+ json.array!(@items) do |item|
3
+ json.partial!(item)
4
+ end
5
+ end
@@ -0,0 +1,13 @@
1
+ csv = %w[title isbn item_identifier call_number created_at].to_csv(col_sep: "\t")
2
+
3
+ @items.map{|item|
4
+ [
5
+ item.manifestation.original_title,
6
+ item.manifestation.identifier_contents(:isbn).join("; "),
7
+ item.item_identifier,
8
+ item.call_number,
9
+ item.created_at
10
+ ]
11
+ }
12
+
13
+ csv
@@ -1,144 +1,144 @@
1
1
  <div style="color: red"><%= flash[:message] -%></div>
2
2
 
3
3
  <div id="content_detail" class="ui-corner-all ui-widget-content">
4
- <h1 class="title"><%= t('page.showing', model: t('activerecord.models.item')) -%></h1>
5
- <div id="content_list">
6
- <p id="notice"><%= notice %></p>
7
-
8
- <%- if @item.manifestation -%>
9
- <%= render 'manifestations/title', manifestation: @item.manifestation -%>
10
- <%- end -%>
11
-
12
- <p>
13
- <strong><%= t('activerecord.attributes.item.item_identifier') -%>:</strong>
14
- <%= @item.item_identifier -%>
15
- </p>
16
-
17
- <p>
18
- <strong><%= t('activerecord.attributes.item.binding_item_identifier') -%>:</strong>
19
- <%= @item.binding_item_identifier -%>
20
- </p>
21
-
22
- <p>
23
- <strong><%= t('activerecord.models.shelf') -%>:</strong>
24
- <%= link_to(@item.shelf_display_name.localize, @item.shelf, id: "shelf_item_#{@item.id}") -%>
25
- <%= render 'items/shelf_picture', item: @item -%>
26
- (<%= link_to(@item.shelf.library.display_name.localize, @item.shelf.library, id: "library_item_#{@item.id}") -%>)
27
- </p>
28
-
29
- <% if defined?(EnjuCirculation) %>
30
- <p>
31
- <strong><%= t('activerecord.attributes.item.checkout_type') -%>:</strong>
32
- <%= link_to @item.checkout_type.display_name.localize, @item.checkout_type -%>
33
- </p>
34
-
35
- <p>
36
- <strong><%= t('activerecord.models.circulation_status') -%>:</strong>
37
- <%= link_to @item.circulation_status.display_name.localize, @item.circulation_status -%>
38
- <%- if current_user.try(:has_role?, 'Librarian') -%>
39
- <%- unless @item.checkouts.not_returned.blank? -%>
40
- (<%= link_to t('item.current_checkout'), @item.checkouts.not_returned.first -%>)
41
- <%- end -%>
4
+ <h1 class="title"><%= t('page.showing', model: t('activerecord.models.item')) -%></h1>
5
+ <div id="content_list">
6
+ <p id="notice"><%= notice %></p>
7
+
8
+ <%- if @item.manifestation -%>
9
+ <%= render 'manifestations/title', manifestation: @item.manifestation -%>
42
10
  <%- end -%>
43
- </p>
44
- <% end %>
45
11
 
46
- <p>
47
- <strong><%= t('activerecord.attributes.item.include_supplements') -%>:</strong>
48
- <%= localized_boolean(@item.include_supplements) -%>
49
- </p>
12
+ <p>
13
+ <strong><%= t('activerecord.attributes.item.item_identifier') -%>:</strong>
14
+ <%= @item.item_identifier -%>
15
+ </p>
16
+
17
+ <p>
18
+ <strong><%= t('activerecord.attributes.item.binding_item_identifier') -%>:</strong>
19
+ <%= @item.binding_item_identifier -%>
20
+ </p>
21
+
22
+ <p>
23
+ <strong><%= t('activerecord.models.shelf') -%>:</strong>
24
+ <%= link_to(@item.shelf_display_name.localize, @item.shelf, id: "shelf_item_#{@item.id}") -%>
25
+ <%= render 'items/shelf_picture', item: @item -%>
26
+ (<%= link_to(@item.shelf.library.display_name.localize, @item.shelf.library, id: "library_item_#{@item.id}") -%>)
27
+ </p>
28
+
29
+ <% if defined?(EnjuCirculation) %>
30
+ <p>
31
+ <strong><%= t('activerecord.attributes.item.checkout_type') -%>:</strong>
32
+ <%= link_to @item.checkout_type.display_name.localize, @item.checkout_type -%>
33
+ </p>
34
+
35
+ <p>
36
+ <strong><%= t('activerecord.models.circulation_status') -%>:</strong>
37
+ <%= link_to @item.circulation_status.display_name.localize, @item.circulation_status -%>
38
+ <%- if current_user.try(:has_role?, 'Librarian') -%>
39
+ <%- unless @item.checkouts.not_returned.blank? -%>
40
+ (<%= link_to t('item.current_checkout'), @item.checkouts.not_returned.first -%>)
41
+ <%- end -%>
42
+ <%- end -%>
43
+ </p>
44
+ <% end %>
50
45
 
51
- <p>
52
- <strong><%= t('activerecord.attributes.item.call_number') -%>:</strong>
53
- <%= @item.call_number -%>
54
- </p>
46
+ <p>
47
+ <strong><%= t('activerecord.attributes.item.include_supplements') -%>:</strong>
48
+ <%= localized_boolean(@item.include_supplements) -%>
49
+ </p>
55
50
 
56
- <% if current_user.try(:has_role?, 'Librarian') %>
57
- <% if defined?(EnjuCirculation) %>
58
51
  <p>
59
- <strong><%= t('activerecord.models.use_restriction') -%>:</strong>
60
- <% if @item.use_restriction %>
61
- <ul>
62
- <li><%= @item.use_restriction.display_name.localize %></li>
63
- </ul>
52
+ <strong><%= t('activerecord.attributes.item.call_number') -%>:</strong>
53
+ <%= @item.call_number -%>
54
+ </p>
55
+
56
+ <% if current_user.try(:has_role?, 'Librarian') %>
57
+ <% if defined?(EnjuCirculation) %>
58
+ <p>
59
+ <strong><%= t('activerecord.models.use_restriction') -%>:</strong>
60
+ <% if @item.use_restriction %>
61
+ <ul>
62
+ <li><%= @item.use_restriction.display_name.localize %></li>
63
+ </ul>
64
+ <% end %>
65
+ </p>
64
66
  <% end %>
67
+
68
+ <p>
69
+ <strong><%= t('activerecord.attributes.item.required_role_id') -%>:</strong>
70
+ <%= @item.required_role.name -%>
71
+ </p>
72
+
73
+ <p>
74
+ <strong><%= t('activerecord.models.budget_type') -%>:</strong>
75
+ <%= @item.budget_type.try(:display_name).try(:localize) -%>
76
+ </p>
77
+
78
+ <p>
79
+ <strong><%= t('activerecord.models.bookstore') -%>:</strong>
80
+ <%= @item.bookstore.try(:name) -%>
81
+ </p>
82
+
83
+ <p>
84
+ <strong><%= t('activerecord.attributes.item.price') -%>:</strong>
85
+ <%= @item.price -%>
86
+ </p>
87
+ <% end %>
88
+
89
+ <p>
90
+ <strong><%= t('activerecord.attributes.item.url') -%>:</strong>
91
+ <%= auto_link(@item.url) -%>
65
92
  </p>
66
- <% end %>
67
-
68
- <p>
69
- <strong><%= t('activerecord.attributes.item.required_role_id') -%>:</strong>
70
- <%= @item.required_role.name -%>
71
- </p>
72
-
73
- <p>
74
- <strong><%= t('activerecord.models.budget_type') -%>:</strong>
75
- <%= @item.budget_type.try(:display_name).try(:localize) -%>
76
- </p>
77
-
78
- <p>
79
- <strong><%= t('activerecord.models.bookstore') -%>:</strong>
80
- <%= @item.bookstore.try(:name) -%>
81
- </p>
82
-
83
- <p>
84
- <strong><%= t('activerecord.attributes.item.price') -%>:</strong>
85
- <%= @item.price -%>
86
- </p>
87
- <% end %>
88
93
 
89
- <p>
90
- <strong><%= t('activerecord.attributes.item.url') -%>:</strong>
91
- <%= @item.url -%>
92
- </p>
93
-
94
- <p>
95
- <strong><%= t('activerecord.attributes.item.acquired_at') -%>:</strong>
96
- <%= l(@item.acquired_at, format: :only_date) if @item.acquired_at -%>
97
- </p>
98
-
99
- <p>
100
- <strong><%= t('activerecord.attributes.item.binding_call_number') -%>:</strong>
101
- <%= @item.binding_call_number -%>
102
- </p>
103
-
104
- <p>
105
- <strong><%= t('activerecord.attributes.item.binded_at') -%>:</strong>
106
- <%= l(@item.binded_at, format: :only_date) if @item.binded_at -%>
107
- </p>
108
-
109
- <p>
110
- <strong><%= t('activerecord.attributes.item.note') -%>:</strong>
111
- <%= simple_format(@item.note) %>
112
- </p>
113
-
114
- <% if current_user.try(:has_role?, 'Librarian') %>
115
- <% @item.item_custom_values.each do |value| %>
116
94
  <p>
117
- <strong><%= value.item_custom_property.display_name.localize -%>:</strong>
118
- <%= value.value -%>
95
+ <strong><%= t('activerecord.attributes.item.acquired_at') -%>:</strong>
96
+ <%= l(@item.acquired_at, format: :only_date) if @item.acquired_at -%>
119
97
  </p>
120
- <% end %>
121
- <p>
122
- <strong><%= t('activerecord.attributes.item.memo') -%>:</strong>
123
- <%= simple_format(@item.memo) %>
124
- </p>
125
- <% end %>
126
98
 
127
- <p>
128
- <strong><%= t('item.accepted_at') -%>:</strong>
129
- <%= l(@item.accept.created_at) if @item.accept -%>
130
- </p>
99
+ <p>
100
+ <strong><%= t('activerecord.attributes.item.binding_call_number') -%>:</strong>
101
+ <%= @item.binding_call_number -%>
102
+ </p>
131
103
 
132
- <p>
133
- <strong><%= t('page.created_at') -%>:</strong>
134
- <%= l(@item.created_at) -%>
135
- </p>
104
+ <p>
105
+ <strong><%= t('activerecord.attributes.item.binded_at') -%>:</strong>
106
+ <%= l(@item.binded_at, format: :only_date) if @item.binded_at -%>
107
+ </p>
136
108
 
137
- <p>
138
- <strong><%= t('page.updated_at') -%>:</strong>
139
- <%= l(@item.updated_at) -%>
140
- </p>
141
- </div>
109
+ <p>
110
+ <strong><%= t('activerecord.attributes.item.note') -%>:</strong>
111
+ <%= simple_format(@item.note) %>
112
+ </p>
113
+
114
+ <% if current_user.try(:has_role?, 'Librarian') %>
115
+ <% @item.item_custom_values.each do |value| %>
116
+ <p>
117
+ <strong><%= value.item_custom_property.display_name.localize -%>:</strong>
118
+ <%= value.value -%>
119
+ </p>
120
+ <% end %>
121
+ <p>
122
+ <strong><%= t('activerecord.attributes.item.memo') -%>:</strong>
123
+ <%= simple_format(@item.memo) %>
124
+ </p>
125
+ <% end %>
126
+
127
+ <p>
128
+ <strong><%= t('item.accepted_at') -%>:</strong>
129
+ <%= l(@item.accept.created_at) if @item.accept -%>
130
+ </p>
131
+
132
+ <p>
133
+ <strong><%= t('page.created_at') -%>:</strong>
134
+ <%= l(@item.created_at) -%>
135
+ </p>
136
+
137
+ <p>
138
+ <strong><%= t('page.updated_at') -%>:</strong>
139
+ <%= l(@item.updated_at) -%>
140
+ </p>
141
+ </div>
142
142
  </div>
143
143
 
144
144
  <div id="submenu" class="ui-corner-all ui-widget-content">
@@ -0,0 +1 @@
1
+ json.partial!(@item)
@@ -5,8 +5,8 @@
5
5
  <title><%= title(controller.controller_name) %></title>
6
6
  <%= render 'page/include' %>
7
7
  <%- if controller.action_name == 'index' -%>
8
- <%= auto_discovery_link_tag(:rss, url_for(filtered_params.merge(format: 'rss', page: nil, commit: nil, only_path: true)), title: (t('agent.library_group_agent', library_group_name: @library_group.display_name.localize) + " (RSS)")) %>
9
- <%= auto_discovery_link_tag(:atom, url_for(filtered_params.merge(format: 'atom', page: nil, commit: nil, only_path: true)), title: (t('agent.library_group_agent', library_group_name: @library_group.display_name.localize) + " (Atom)")) %>
8
+ <%= auto_discovery_link_tag(:rss, url_for(request.params.merge(format: 'rss', page: nil, commit: nil, only_path: true)), title: (t('agent.library_group_agent', library_group_name: @library_group.display_name.localize) + " (RSS)")) %>
9
+ <%= auto_discovery_link_tag(:atom, url_for(request.params.merge(format: 'atom', page: nil, commit: nil, only_path: true)), title: (t('agent.library_group_agent', library_group_name: @library_group.display_name.localize) + " (Atom)")) %>
10
10
  <%- end -%>
11
11
  </head>
12
12
  <body>
@@ -5,8 +5,8 @@
5
5
  <title><%= resource_title(@manifestation, controller.action_name) %></title>
6
6
  <%= render 'page/include' %>
7
7
  <%- if controller.action_name == 'index' -%>
8
- <%= auto_discovery_link_tag(:rss, url_for(filtered_params.merge(format: :rss, page: nil, commit: nil, only_path: true)), title: (t('manifestation.library_group_manifestation', library_group_name: @library_group.display_name.localize) + " (RSS)")) %>
9
- <%= auto_discovery_link_tag(:atom, url_for(filtered_params.merge(format: :atom, page: nil, commit: nil, only_path: true)), title: (t('manifestation.library_group_manifestation', library_group_name: @library_group.display_name.localize) + " (Atom)")) %>
8
+ <%= auto_discovery_link_tag(:rss, url_for(request.params.merge(format: :rss, page: nil, commit: nil, only_path: true)), title: (t('manifestation.library_group_manifestation', library_group_name: @library_group.display_name.localize) + " (RSS)")) %>
9
+ <%= auto_discovery_link_tag(:atom, url_for(request.params.merge(format: :atom, page: nil, commit: nil, only_path: true)), title: (t('manifestation.library_group_manifestation', library_group_name: @library_group.display_name.localize) + " (Atom)")) %>
10
10
  <%- end -%>
11
11
  <% if %w(show edit index).include?(controller.action_name) && defined?(EnjuManifestationViewer) %>
12
12
  <%= book_jacket_header(@library_group.book_jacket_source) %>
@@ -4,6 +4,6 @@
4
4
  <li><%= carrier_type_facet(facet) %></li>
5
5
  <%- end -%>
6
6
  <%- if params[:carrier_type] -%>
7
- <li><%= link_to t('page.remove_this_facet'), url_for(filtered_params.merge(carrier_type: nil, page: nil, view: nil, only_path: true)) -%></li>
7
+ <li><%= link_to t('page.remove_this_facet'), url_for(request.params.merge(carrier_type: nil, page: nil, view: nil, only_path: true)) -%></li>
8
8
  <%- end -%>
9
9
  </ul>
@@ -4,12 +4,12 @@
4
4
  <% @classification_facet.each do |category| %>
5
5
  <li>
6
6
  <% if category.value == params[:classification].to_s.downcase %><strong><% end %>
7
- <%= link_to "#{t('classification.category', number: category.value)} #{category_name(category.value)} (#{category.count})", url_for(filtered_params.merge(classification: category.value, page: nil, view: nil, only_path: true)) %>
7
+ <%= link_to "#{t('classification.category', number: category.value)} #{category_name(category.value)} (#{category.count})", url_for(request.params.merge(classification: category.value, page: nil, view: nil, only_path: true)) %>
8
8
  <% if category.value == params[:classification].to_s.downcase %></strong><% end %>
9
9
  </li>
10
10
  <% end %>
11
11
  <%- if params[:classification] -%>
12
- <li><%= link_to t('page.remove_this_facet'), url_for(filtered_params.merge(classification: nil, page: nil, view: nil, only_path: true)) -%></li>
12
+ <li><%= link_to t('page.remove_this_facet'), url_for(request.params.merge(classification: nil, page: nil, view: nil, only_path: true)) -%></li>
13
13
  <%- end -%>
14
14
  </ul>
15
15
  <%- else -%>
@@ -1,7 +1,7 @@
1
1
  <h4><%= t('page.other_format') %></h4>
2
2
  <ul>
3
- <li><%= link_to 'RDF/XML', url_for(filtered_params.merge(format: :rdf, only_path: true)) %>
4
- <li><%= link_to 'MODS', url_for(filtered_params.merge(format: :mods, only_path: true)) %></li>
5
- <li><%= link_to 'TSV', url_for(filtered_params.merge(format: :txt, only_path: true)) %></li>
6
- <li><%= link_to 'JSON', url_for(filtered_params.merge(format: :json, only_path: true)) %></li>
3
+ <li><%= link_to 'RDF/XML', url_for(request.params.merge(format: :rdf, only_path: true)) %>
4
+ <li><%= link_to 'MODS', url_for(request.params.merge(format: :mods, only_path: true)) %></li>
5
+ <li><%= link_to 'TSV', url_for(request.params.merge(format: :txt, only_path: true)) %></li>
6
+ <li><%= link_to 'JSON', url_for(request.params.merge(format: :json, only_path: true)) %></li>
7
7
  </ul>
@@ -71,7 +71,7 @@
71
71
 
72
72
  <div class="field" id="creator_form">
73
73
  <%= f.label :creator_string -%><br />
74
- <%= f.fields_for :creators do |creator_form| %>
74
+ <%= f.fields_for :creators, @manifestation.creators.order(Create.arel_table[:position].asc) do |creator_form| %>
75
75
  <%= render 'creator_fields', f: creator_form %>
76
76
  <% end %>
77
77
  <div class="links">
@@ -81,7 +81,7 @@
81
81
 
82
82
  <div class="field" id="contributor_form">
83
83
  <%= f.label :contributor_string -%><br />
84
- <%= f.fields_for :contributors do |contributor_form| %>
84
+ <%= f.fields_for :contributors, @manifestation.contributors.order(Realize.arel_table[:position].asc) do |contributor_form| %>
85
85
  <%= render 'contributor_fields', f: contributor_form %>
86
86
  <% end %>
87
87
  <div class="links">
@@ -91,7 +91,7 @@
91
91
 
92
92
  <div class="field" id="publisher_form">
93
93
  <%= f.label :publisher_string -%><br />
94
- <%= f.fields_for :publishers do |publisher_form| %>
94
+ <%= f.fields_for :publishers, @manifestation.publishers.order(Produce.arel_table[:position].asc) do |publisher_form| %>
95
95
  <%= render 'publisher_fields', f: publisher_form %>
96
96
  <% end %>
97
97
  <div class="links">
@@ -11,6 +11,6 @@
11
11
  <%- end -%>
12
12
  <%- end -%>
13
13
  <%- if params[:language] -%>
14
- <li><%= link_to t('page.remove_this_facet'), url_for(filtered_params.merge(language: nil, page: nil, view: nil, only_path: true)) -%></li>
14
+ <li><%= link_to t('page.remove_this_facet'), url_for(request.params.merge(language: nil, page: nil, view: nil, only_path: true)) -%></li>
15
15
  <%- end -%>
16
16
  </ul>
@@ -6,6 +6,6 @@
6
6
  <%= library_facet(current_libraries, facet) %>
7
7
  <%- end -%>
8
8
  <%- if params[:library] -%>
9
- <li><%= link_to t('page.remove_this_facet'), url_for(filtered_params.merge(library: nil, page: nil, view: nil, only_path: true)) -%></li>
9
+ <li><%= link_to t('page.remove_this_facet'), url_for(request.params.merge(library: nil, page: nil, view: nil, only_path: true)) -%></li>
10
10
  <%- end -%>
11
11
  </ul>
@@ -6,6 +6,6 @@
6
6
  </li>
7
7
  <%- end -%>
8
8
  <%- if params[:pub_date_from] and params[:pub_date_until] -%>
9
- <li><%= link_to t('page.remove_this_facet'), url_for(filtered_params.merge(pub_date_from: nil, pub_date_until: nil, page: nil, view: nil, only_path: true)) -%></li>
9
+ <li><%= link_to t('page.remove_this_facet'), url_for(request.params.merge(pub_date_from: nil, pub_date_until: nil, page: nil, view: nil, only_path: true)) -%></li>
10
10
  <%- end -%>
11
11
  </ul>
@@ -4,11 +4,11 @@
4
4
  <% facet.value ? facet_reservable = true : facet_reservable = false %>
5
5
  <li>
6
6
  <%- if @reservable == facet_reservable -%><strong><%- end -%>
7
- <%= link_to "#{localized_boolean(facet.value)} (#{facet.count})", url_for(filtered_params.merge(page: nil, reservable: facet.value.to_s, view: nil, only_path: true)) -%>
7
+ <%= link_to "#{localized_boolean(facet.value)} (#{facet.count})", url_for(request.params.merge(page: nil, reservable: facet.value.to_s, view: nil, only_path: true)) -%>
8
8
  <%- if @reservable == facet_reservable -%></strong><%- end -%>
9
9
  </li>
10
10
  <%- end -%>
11
11
  <%- unless @reservable.nil? -%>
12
- <li><%= link_to t('page.remove_this_facet'), url_for(filtered_params.merge(reservable: nil, page: nil, view: nil, only_path: true)) -%></li>
12
+ <li><%= link_to t('page.remove_this_facet'), url_for(request.params.merge(reservable: nil, page: nil, view: nil, only_path: true)) -%></li>
13
13
  <%- end -%>
14
14
  </ul>
@@ -4,22 +4,26 @@
4
4
  <% cache([manifestation, fragment: 'show_detail_librarian_html', role: current_user_role_name, locale: @locale]) do %>
5
5
  <table class="table table-striped" id="resource_detail">
6
6
  <%= embed_content(manifestation) if defined?(EnjuManifestationViewer) -%>
7
+ <tr>
8
+ <td style="width: 200px"><%= t('activerecord.attributes.manifestation.original_title') -%>:</td>
9
+ <td style="width: 500px"><%= manifestation.original_title -%></td>
10
+ </tr>
7
11
  <% if manifestation.title_transcription? %>
8
12
  <tr>
9
- <td style="width: 200px"><%= t('activerecord.attributes.manifestation.title_transcription') -%>:</td>
10
- <td style="width: 500px"><%= manifestation.title_transcription -%></td>
13
+ <td><%= t('activerecord.attributes.manifestation.title_transcription') -%>:</td>
14
+ <td><%= manifestation.title_transcription -%></td>
11
15
  </tr>
12
16
  <% end %>
13
17
  <% if manifestation.title_alternative? %>
14
18
  <tr>
15
- <td style="width: 200px"><%= t('activerecord.attributes.manifestation.title_alternative') -%>:</td>
16
- <td style="width: 500px"><%= manifestation.title_alternative -%></td>
19
+ <td><%= t('activerecord.attributes.manifestation.title_alternative') -%>:</td>
20
+ <td><%= manifestation.title_alternative -%></td>
17
21
  </tr>
18
22
  <% end %>
19
23
  <%- if manifestation.series_statements.exists? -%>
20
24
  <tr>
21
- <td style="width: 200px"><%= t('activerecord.models.series_statement') -%>:</td>
22
- <td style="width: 500px">
25
+ <td><%= t('activerecord.models.series_statement') -%>:</td>
26
+ <td>
23
27
  <%= render 'show_series_detail', manifestation: manifestation %>
24
28
  <%- unless manifestation.identifier_contents(:issn).empty? -%>
25
29
  (<%= t('activerecord.attributes.manifestation.issn') -%>: <%= manifestation.identifier_contents(:issn).join(" ") -%>)
@@ -29,8 +33,8 @@
29
33
  <% end %>
30
34
  <%= render 'edition_and_number', manifestation: manifestation %>
31
35
  <tr>
32
- <td style="width: 200px"><%= t('page.form') -%>:</td>
33
- <td style="width: 500px">
36
+ <td><%= t('page.form') -%>:</td>
37
+ <td>
34
38
  <%= form_icon(manifestation.carrier_type) -%> <%= manifestation.carrier_type.display_name.localize -%> /
35
39
  <%= content_type_icon(manifestation.manifestation_content_type) -%> <%= manifestation.manifestation_content_type.display_name.localize if manifestation.manifestation_content_type -%>
36
40
  </td>
@@ -4,22 +4,26 @@
4
4
  <% cache([manifestation, fragment: 'show_detail_user_html', role: current_user_role_name, locale: @locale]) do %>
5
5
  <table class="table table-striped" id="resource_detail">
6
6
  <%= embed_content(manifestation) if defined?(EnjuManifestationViewer) -%>
7
+ <tr>
8
+ <td style="width: 200px"><%= t('activerecord.attributes.manifestation.original_title') -%>:</td>
9
+ <td style="width: 500px"><%= manifestation.original_title -%></td>
10
+ </tr>
7
11
  <% if manifestation.title_transcription? %>
8
12
  <tr>
9
- <td style="width: 200px"><%= t('activerecord.attributes.manifestation.title_transcription') -%>:</td>
10
- <td style="width: 500px"><%= manifestation.title_transcription -%></td>
13
+ <td><%= t('activerecord.attributes.manifestation.title_transcription') -%>:</td>
14
+ <td><%= manifestation.title_transcription -%></td>
11
15
  </tr>
12
16
  <% end %>
13
17
  <% if manifestation.title_alternative? %>
14
18
  <tr>
15
- <td style="width: 200px"><%= t('activerecord.attributes.manifestation.title_alternative') -%>:</td>
16
- <td style="width: 500px"><%= manifestation.title_alternative -%></td>
19
+ <td><%= t('activerecord.attributes.manifestation.title_alternative') -%>:</td>
20
+ <td><%= manifestation.title_alternative -%></td>
17
21
  </tr>
18
22
  <% end %>
19
23
  <%- if manifestation.series_statements.exists? -%>
20
24
  <tr>
21
- <td style="width: 200px"><%= t('activerecord.models.series_statement') -%>:</td>
22
- <td style="width: 500px">
25
+ <td><%= t('activerecord.models.series_statement') -%>:</td>
26
+ <td>
23
27
  <%= render 'show_series_detail', manifestation: manifestation %>
24
28
  <%- unless manifestation.identifier_contents(:issn).empty? -%>
25
29
  (<%= t('activerecord.attributes.manifestation.issn') -%>: <%= manifestation.identifier_contents(:issn).join(" ") -%>)
@@ -29,8 +33,8 @@
29
33
  <% end %>
30
34
  <%= render 'edition_and_number', manifestation: manifestation %>
31
35
  <tr>
32
- <td style="width: 200px"><%= t('page.form') -%>:</td>
33
- <td style="width: 500px">
36
+ <td><%= t('page.form') -%>:</td>
37
+ <td>
34
38
  <%= form_icon(manifestation.carrier_type) -%> <%= manifestation.carrier_type.display_name.localize -%> /
35
39
  <%= content_type_icon(manifestation.manifestation_content_type) -%> <%= manifestation.manifestation_content_type.display_name.localize if manifestation.manifestation_content_type -%>
36
40
  </td>
@@ -19,7 +19,7 @@
19
19
  <%= t('agent.publisher') -%>: <%= agents_list(manifestation.publishers.readable_by(current_user), itemprop: 'publisher') -%>
20
20
  <% end %>
21
21
  <%- if manifestation.date_of_publication? -%>
22
- <meta itemprop="publishDate" content="<%= manifestation.date_of_publication.iso8601 %>" />
22
+ <meta itemprop="datePublished" content="<%= manifestation.date_of_publication.iso8601 %>" />
23
23
  (<%= t('activerecord.attributes.manifestation.pub_date') %>: <%= manifestation.pub_date -%>)
24
24
  <%- end -%>
25
25
  <%- if manifestation.access_address? -%>
@@ -43,7 +43,7 @@
43
43
  t('page.per_page', num: 20) => 20,
44
44
  t('page.per_page', num: 50) => 50,
45
45
  t('page.per_page', num: 100) => 100,
46
- }, selected: filtered_params[:per_page]) %>
46
+ }, selected: params[:per_page]) %>
47
47
  <%= select_tag 'sort_by', options_for_select({
48
48
  [t('page.sort_criteria.created_at'),
49
49
  t('page.sort_criteria.date_desc')].join(" : ") => 'created_at:desc',
@@ -59,10 +59,10 @@
59
59
  t('page.sort_criteria.title_asc')].join(" : ") => 'title:asc',
60
60
  [t('page.title'),
61
61
  t('page.sort_criteria.title_desc')].join(" : ") => 'title:desc',
62
- }, selected: filtered_params[:sort_by] || 'created_at:desc') -%>
62
+ }, selected: request.params[:sort_by] || 'created_at:desc') -%>
63
63
  <%= hidden_field_tag 'query', @query -%>
64
64
  <% [ :reservable, :carrier_type, :library, :language, :pub_year ].each do |p| -%>
65
- <%= hidden_field_tag p, filtered_params[p] if filtered_params[p] -%>
65
+ <%= hidden_field_tag p, request.params[p] if request.params[p] -%>
66
66
  <% end -%>
67
67
  <%= submit_tag t('page.show') -%><br />
68
68
  </p>
@@ -103,15 +103,15 @@
103
103
  <% if @parent and policy(@parent).update? %>
104
104
  <%= render 'submenu_parent' %>
105
105
  <% end %>
106
- <h3><%= link_to h("#{t('page.total')}: #{@count[:query_result]}"), url_for(filtered_params.merge(action: 'index', view: nil, carrier_type: nil, library: nil, language: nil, subject: nil, only_path: true)) -%></h3>
106
+ <h3><%= link_to h("#{t('page.total')}: #{@count[:query_result]}"), url_for(request.params.merge(action: 'index', view: nil, carrier_type: nil, library: nil, language: nil, subject: nil, only_path: true)) -%></h3>
107
107
  <%- if @manifestations.total_count > 0 -%>
108
108
  <%= render 'manifestations/all_facet' -%>
109
109
  <%- end -%>
110
110
  <div>
111
111
  <%- if params[:library_id].blank? -%>
112
- <%= link_to((image_tag 'icons/feed.png', size: '16x16', alt: t('page.feed'), class: 'enju_icon'), url_for(filtered_params.merge(format: :rss, page: nil, library_id: nil, only_path: true))) -%> <%= link_to t('page.search_result_feed'), url_for(filtered_params.merge(format: :rss, page: nil, library_id: nil, commit: nil, only_path: true)) -%>
112
+ <%= link_to((image_tag 'icons/feed.png', size: '16x16', alt: t('page.feed'), class: 'enju_icon'), url_for(request.params.merge(format: :rss, page: nil, library_id: nil, only_path: true))) -%> <%= link_to t('page.search_result_feed'), url_for(request.params.merge(format: :rss, page: nil, library_id: nil, commit: nil, only_path: true)) -%>
113
113
  <%- else -%>
114
- <%= link_to((image_tag 'icons/feed.png', size: '16x16', alt: t('page.feed'), class: 'enju_icon'), url_for(filtered_params.merge(format: :rss, page: nil, only_path: true))) -%> <%= link_to t('page.search_result_feed'), url_for(filtered_params.merge(format: :rss, page: nil, commit: nil, only_path: true)) -%>
114
+ <%= link_to((image_tag 'icons/feed.png', size: '16x16', alt: t('page.feed'), class: 'enju_icon'), url_for(request.params.merge(format: :rss, page: nil, only_path: true))) -%> <%= link_to t('page.search_result_feed'), url_for(request.params.merge(format: :rss, page: nil, commit: nil, only_path: true)) -%>
115
115
  <%- end -%>
116
116
  </div>
117
117
  <%= render 'manifestations/export_list' %>
@@ -120,7 +120,7 @@
120
120
  <% if defined?(EnjuBookmark) %>
121
121
  <script type="text/javascript">
122
122
  window.onload = function() {
123
- $("#tag_cloud_list").load('<%= url_for(filtered_params.merge(view: "tag_cloud", only_path: true)) -%>', hideTagCloudSpinner);
123
+ $("#tag_cloud_list").load('<%= url_for(request.params.merge(view: "tag_cloud", only_path: true)) -%>', hideTagCloudSpinner);
124
124
  }
125
125
 
126
126
  function hideTagCloudSpinner(){
@@ -8,9 +8,9 @@ xml.rdf(:RDF,
8
8
  'xmlns:foaf' => "http://xmlns.com/foaf/0.1/",
9
9
  'xmlns:prism' => "http://prismstandard.org/namespaces/basic/2.0/",
10
10
  'xmlns:rdfs' =>"http://www.w3.org/2000/01/rdf-schema#"){
11
- xml.channel("rdf:about" => manifestations_url(params: filtered_params.merge(format: 'rdf', only_path: true))){
11
+ xml.channel("rdf:about" => manifestations_url(params: request.params.merge(format: 'rdf', only_path: true))){
12
12
  xml.title t('manifestation.query_search_result', query: @query, library_group_name: @library_group.display_name.localize)
13
- xml.link "#{request.protocol}#{request.host_with_port}#{url_for(filtered_params.merge(format: nil, only_path: true))}"
13
+ xml.link "#{request.protocol}#{request.host_with_port}#{url_for(request.params.merge(format: nil, only_path: true))}"
14
14
  xml.description "Next-L Enju, an open source integrated library system developed by Project Next-L"
15
15
  xml.language @locale.to_s
16
16
  xml.ttl "60"