enju_biblio 0.2.0.beta.3 → 0.2.0.beta.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/agents_controller.rb +6 -0
- data/app/controllers/carrier_types_controller.rb +24 -0
- data/app/controllers/import_requests_controller.rb +3 -3
- data/app/controllers/items_controller.rb +11 -5
- data/app/controllers/manifestations_controller.rb +10 -15
- data/app/controllers/picture_files_controller.rb +1 -0
- data/app/helpers/manifestations_helper.rb +8 -8
- data/app/models/agent.rb +7 -3
- data/app/models/agent_import_file.rb +2 -1
- data/app/models/carrier_type.rb +17 -0
- data/app/models/import_request.rb +23 -21
- data/app/models/manifestation.rb +17 -3
- data/app/models/picture_file.rb +2 -1
- data/app/models/resource_export_file.rb +2 -1
- data/app/models/resource_import_file.rb +2 -1
- data/app/views/agent_import_results/index.html.erb +2 -2
- data/app/views/agents/_form.html.erb +1 -1
- data/app/views/agents/index.rss.builder +2 -2
- data/app/views/carrier_types/_form.html.erb +4 -0
- data/app/views/carrier_types/show.html.erb +5 -0
- data/app/views/creates/_index_agent.html.erb +2 -2
- data/app/views/creates/_index_work.html.erb +2 -2
- data/app/views/items/_shelf_picture.html+phone.erb +1 -1
- data/app/views/items/_shelf_picture.html.erb +1 -1
- data/app/views/items/index.html.erb +1 -1
- data/app/views/layouts/agents.html.erb +2 -2
- data/app/views/layouts/items.html.erb +1 -1
- data/app/views/layouts/manifestations.html.erb +3 -3
- data/app/views/manifestations/_carrier_type_facet.html.erb +1 -1
- data/app/views/manifestations/_classification_facet.html.erb +2 -2
- data/app/views/manifestations/_export_list.html.erb +3 -3
- data/app/views/manifestations/_form.html.erb +5 -11
- data/app/views/manifestations/_index_form_parent.html.erb +1 -1
- data/app/views/manifestations/_language_facet.html.erb +1 -1
- data/app/views/manifestations/_library_facet.html.erb +1 -1
- data/app/views/manifestations/_manifestation.html.erb +1 -1
- data/app/views/manifestations/_manifestation_list.html.erb +2 -2
- data/app/views/manifestations/_paginate_id_link.html.erb +1 -1
- data/app/views/manifestations/_paginate_id_store.html.erb +9 -9
- data/app/views/manifestations/_physical_description.html.erb +16 -0
- data/app/views/manifestations/_pub_year_facet.html.erb +1 -1
- data/app/views/manifestations/_reservable_facet.html.erb +2 -2
- data/app/views/manifestations/_session_ids.html.erb +3 -1
- data/app/views/manifestations/_show_detail_librarian.html.erb +1 -8
- data/app/views/manifestations/_show_detail_user.html.erb +1 -8
- data/app/views/manifestations/_show_index.html+phone.erb +2 -2
- data/app/views/manifestations/_show_index.html.erb +2 -2
- data/app/views/manifestations/_show_parent_form.html.erb +1 -1
- data/app/views/manifestations/_show_series_index.html.erb +2 -2
- data/app/views/manifestations/_title.html+phone.erb +1 -1
- data/app/views/manifestations/_title.html.erb +2 -2
- data/app/views/manifestations/index.html.erb +6 -6
- data/app/views/manifestations/index.rdf.builder +2 -2
- data/app/views/manifestations/index.rss.builder +2 -2
- data/app/views/produces/_index_manifestation.html.erb +2 -2
- data/app/views/realizes/_index_expression.html.erb +2 -2
- data/app/views/resource_import_results/index.html.erb +2 -2
- data/config/locales/translation_en.yml +4 -0
- data/config/locales/translation_ja.yml +5 -0
- data/db/migrate/20160801080612_add_most_recent_to_import_request_transitions.rb +9 -0
- data/db/migrate/20160801080619_add_most_recent_to_resource_import_file_transitions.rb +9 -0
- data/db/migrate/20160801080637_add_most_recent_to_resource_export_file_transitions.rb +9 -0
- data/db/migrate/20160801080643_add_most_recent_to_agent_import_file_transitions.rb +9 -0
- data/db/migrate/20160820004638_add_attachment_attachment_to_carrier_types.rb +11 -0
- data/lib/enju_biblio/biblio_helper.rb +15 -15
- data/lib/enju_biblio/version.rb +1 -1
- data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Administrator/should_import_without_errors.yml +275 -0
- data/spec/controllers/agent_types_controller_spec.rb +1 -1
- data/spec/controllers/carrier_types_controller_spec.rb +1 -1
- data/spec/controllers/content_types_controller_spec.rb +1 -1
- data/spec/controllers/create_types_controller_spec.rb +1 -1
- data/spec/controllers/creates_controller_spec.rb +1 -1
- data/spec/controllers/form_of_works_controller_spec.rb +2 -1
- data/spec/controllers/frequencies_controller_spec.rb +1 -1
- data/spec/controllers/identifier_types_controller_spec.rb +1 -1
- data/spec/controllers/import_requests_controller_spec.rb +3 -1
- data/spec/controllers/items_controller_spec.rb +12 -1
- data/spec/controllers/licenses_controller_spec.rb +1 -1
- data/spec/controllers/manifestations_controller_spec.rb +11 -0
- data/spec/controllers/medium_of_performances_controller_spec.rb +1 -1
- data/spec/controllers/produce_types_controller_spec.rb +1 -1
- data/spec/controllers/produces_controller_spec.rb +1 -1
- data/spec/controllers/realize_types_controller_spec.rb +1 -1
- data/spec/controllers/realizes_controller_spec.rb +1 -1
- data/spec/dummy/app/models/user.rb +9 -0
- data/spec/dummy/db/migrate/20160703184619_add_most_recent_to_reserve_transitions.rb +9 -0
- data/spec/dummy/db/migrate/20160703184650_add_most_recent_to_manifestation_checkout_stat_transitions.rb +9 -0
- data/spec/dummy/db/migrate/20160703184723_add_most_recent_to_manifestation_reserve_stat_transitions.rb +9 -0
- data/spec/dummy/db/migrate/20160703184747_add_most_recent_to_user_checkout_stat_transitions.rb +9 -0
- data/spec/dummy/db/migrate/20160703184805_add_most_recent_to_user_reserve_stat_transitions.rb +9 -0
- data/spec/dummy/db/migrate/20160703185015_add_most_recent_to_message_transitions.rb +9 -0
- data/spec/dummy/db/migrate/20160703190209_add_foreign_key_on_manifestation_id_to_reserve.rb +5 -0
- data/spec/dummy/db/migrate/20160813191533_add_book_jacket_source_to_library_group.rb +5 -0
- data/spec/dummy/db/migrate/20160813191647_add_max_number_of_results_to_library_group.rb +5 -0
- data/spec/dummy/db/migrate/20160813191733_add_family_name_first_to_library_group.rb +5 -0
- data/spec/dummy/db/migrate/20160813191820_add_screenshot_generator_to_library_group.rb +5 -0
- data/spec/dummy/db/migrate/20160813192542_add_pub_year_facet_range_interval_to_library_group.rb +5 -0
- data/spec/dummy/db/migrate/20160813203039_add_user_id_to_library_group.rb +5 -0
- data/spec/dummy/db/migrate/20160814165332_add_most_recent_to_message_request_transitions.rb +9 -0
- data/spec/dummy/db/schema.rb +30 -9
- data/spec/fixtures/library_groups.yml +3 -2
- data/spec/fixtures/manifestations.yml +2 -0
- data/spec/models/agent_import_file_spec.rb +1 -1
- data/spec/models/agent_import_result_spec.rb +1 -1
- data/spec/models/agent_merge_list_spec.rb +1 -1
- data/spec/models/agent_merge_spec.rb +1 -1
- data/spec/models/agent_relationship_spec.rb +1 -1
- data/spec/models/agent_relationship_type_spec.rb +1 -1
- data/spec/models/agent_spec.rb +29 -1
- data/spec/models/agent_type_spec.rb +1 -1
- data/spec/models/carrier_type_spec.rb +1 -1
- data/spec/models/content_type_spec.rb +1 -1
- data/spec/models/country_spec.rb +1 -1
- data/spec/models/create_spec.rb +1 -1
- data/spec/models/create_type_spec.rb +1 -1
- data/spec/models/donate_spec.rb +1 -1
- data/spec/models/form_of_work_spec.rb +1 -1
- data/spec/models/frequency_spec.rb +1 -1
- data/spec/models/identifier_spec.rb +1 -1
- data/spec/models/identifier_type_spec.rb +1 -1
- data/spec/models/import_request_spec.rb +1 -1
- data/spec/models/item_spec.rb +1 -1
- data/spec/models/language_spec.rb +1 -1
- data/spec/models/license_spec.rb +1 -1
- data/spec/models/manifestation_relationship_spec.rb +1 -1
- data/spec/models/manifestation_relationship_type_spec.rb +1 -1
- data/spec/models/manifestation_spec.rb +2 -0
- data/spec/models/manifestation_spec.rb.mod +337 -0
- data/spec/models/medium_of_performance_spec.rb +1 -1
- data/spec/models/own_spec.rb +1 -1
- data/spec/models/picture_file_spec.rb +1 -1
- data/spec/models/produce_spec.rb +1 -1
- data/spec/models/produce_type_spec.rb +1 -1
- data/spec/models/realize_spec.rb +1 -1
- data/spec/models/realize_type_spec.rb +1 -1
- data/spec/models/resource_import_result_spec.rb +1 -1
- data/spec/models/series_statement_merge_list_spec.rb +1 -1
- data/spec/models/series_statement_merge_spec.rb +1 -1
- data/spec/models/series_statement_spec.rb +1 -1
- data/spec/requests/agents_spec.rb +1 -1
- data/spec/requests/create_types_spec.rb +1 -1
- data/spec/requests/items_spec.rb +1 -1
- data/spec/requests/manifestations_spec.rb +1 -1
- data/spec/requests/produce_types_spec.rb +1 -1
- data/spec/requests/realize_types_spec.rb +1 -1
- data/spec/requests/series_statement_merge_lists_spec.rb +1 -1
- data/spec/requests/series_statement_merges_spec.rb +1 -1
- data/spec/routing/agent_relationship_types_routing_spec.rb +1 -1
- data/spec/routing/agent_relationships_routing_spec.rb +1 -1
- data/spec/routing/agents_routing_spec.rb +1 -1
- data/spec/routing/content_types_routing_spec.rb +1 -1
- data/spec/routing/create_types_routing_spec.rb +1 -1
- data/spec/routing/creates_routing_spec.rb +1 -1
- data/spec/routing/items_routing_spec.rb +1 -1
- data/spec/routing/licenses_routing_spec.rb +1 -1
- data/spec/routing/manifestation_relationship_types_routing_spec.rb +1 -1
- data/spec/routing/manifestation_relationships_routing_spec.rb +1 -1
- data/spec/routing/manifestations_routing_spec.rb +1 -1
- data/spec/routing/produce_types_routing_spec.rb +1 -1
- data/spec/routing/realize_types_routing_spec.rb +1 -1
- data/spec/routing/realizes_routing_spec.rb +1 -1
- data/spec/routing/resource_export_files_routing_spec.rb +1 -1
- data/spec/routing/resource_import_files_routing_spec.rb +1 -1
- data/spec/routing/series_statement_merge_lists_routing_spec.rb +1 -1
- data/spec/routing/series_statement_merges_routing_spec.rb +1 -1
- data/spec/views/agent_types/edit.html.erb_spec.rb +1 -1
- data/spec/views/agent_types/index.html.erb_spec.rb +1 -1
- data/spec/views/agent_types/new.html.erb_spec.rb +1 -1
- data/spec/views/agent_types/show.html.erb_spec.rb +1 -1
- data/spec/views/create_types/edit.html.erb_spec.rb +1 -1
- data/spec/views/create_types/index.html.erb_spec.rb +1 -1
- data/spec/views/create_types/new.html.erb_spec.rb +1 -1
- data/spec/views/create_types/show.html.erb_spec.rb +1 -1
- data/spec/views/creates/edit.html.erb_spec.rb +1 -1
- data/spec/views/creates/index.html.erb_spec.rb +1 -1
- data/spec/views/creates/new.html.erb_spec.rb +1 -1
- data/spec/views/creates/show.html.erb_spec.rb +1 -1
- data/spec/views/import_requests/edit.html.erb_spec.rb +1 -1
- data/spec/views/import_requests/index.html.erb_spec.rb +1 -1
- data/spec/views/import_requests/new.html.erb_spec.rb +1 -1
- data/spec/views/import_requests/show.html.erb_spec.rb +1 -1
- data/spec/views/items/index.html.erb_spec.rb +33 -0
- data/spec/views/manifestations/index.html.erb_spec.rb +1 -1
- data/spec/views/manifestations/index.rdf.builder_spec.rb +1 -1
- data/spec/views/manifestations/show.html.erb_spec.rb +27 -3
- data/spec/views/owns/edit.html.erb_spec.rb +1 -1
- data/spec/views/owns/index.html.erb_spec.rb +1 -1
- data/spec/views/owns/new.html.erb_spec.rb +1 -1
- data/spec/views/owns/show.html.erb_spec.rb +1 -1
- data/spec/views/produce_types/edit.html.erb_spec.rb +1 -1
- data/spec/views/produce_types/index.html.erb_spec.rb +1 -1
- data/spec/views/produce_types/new.html.erb_spec.rb +1 -1
- data/spec/views/produce_types/show.html.erb_spec.rb +1 -1
- data/spec/views/produces/edit.html.erb_spec.rb +1 -1
- data/spec/views/produces/index.html.erb_spec.rb +1 -1
- data/spec/views/produces/new.html.erb_spec.rb +1 -1
- data/spec/views/produces/show.html.erb_spec.rb +1 -1
- data/spec/views/realize_types/edit.html.erb_spec.rb +1 -1
- data/spec/views/realize_types/index.html.erb_spec.rb +1 -1
- data/spec/views/realize_types/new.html.erb_spec.rb +1 -1
- data/spec/views/realize_types/show.html.erb_spec.rb +1 -1
- data/spec/views/realizes/edit.html.erb_spec.rb +1 -1
- data/spec/views/realizes/index.html.erb_spec.rb +1 -1
- data/spec/views/realizes/new.html.erb_spec.rb +1 -1
- data/spec/views/realizes/show.html.erb_spec.rb +1 -1
- data/spec/views/resource_export_files/edit.html.erb_spec.rb +1 -1
- data/spec/views/resource_export_files/index.html.erb_spec.rb +1 -1
- data/spec/views/resource_export_files/new.html.erb_spec.rb +1 -1
- data/spec/views/resource_export_files/show.html.erb_spec.rb +1 -1
- data/spec/views/resource_import_files/index.html.erb_spec.rb +1 -1
- data/spec/views/resource_import_files/show.html.erb_spec.rb +1 -1
- data/spec/views/resource_import_results/index.html.erb_spec.rb +1 -1
- data/spec/views/resource_import_results/show.html.erb_spec.rb +1 -1
- data/spec/views/series_statement_merge_lists/edit.html.erb_spec.rb +1 -1
- data/spec/views/series_statement_merge_lists/index.html.erb_spec.rb +1 -1
- data/spec/views/series_statement_merge_lists/new.html.erb_spec.rb +1 -1
- data/spec/views/series_statement_merge_lists/show.html.erb_spec.rb +1 -1
- data/spec/views/series_statement_merges/edit.html.erb_spec.rb +1 -1
- data/spec/views/series_statement_merges/index.html.erb_spec.rb +1 -1
- data/spec/views/series_statement_merges/new.html.erb_spec.rb +1 -1
- data/spec/views/series_statement_merges/show.html.erb_spec.rb +1 -1
- metadata +491 -447
- data/spec/dummy/config/initializers/enju_leaf.rb +0 -8
- data/spec/dummy/db/migrate/20160813130535_add_email_to_library_group.rb +0 -5
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/tmp/cache/stdout +0 -25
- data/spec/dummy/tmp/pids/redis-test.pid +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5222027fd1307cb67a413384660ea0cacbbb646d
|
4
|
+
data.tar.gz: e25563e07fb2bed77a91767889bb1a7bfdd9fdd3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6363146e0e014ae3d7b223a3a4aadb24da3279c61aeef4c242e12e67c7118bfed70036749b3333ad705b4ea05f22700af19b4a978a69e759c9c8c8da9bf6081b
|
7
|
+
data.tar.gz: 9344322cf8ac5d3b811430d70d0f48252279da09d731164617289f05ae84805ec3d6ad384dc0ad5c09ec47f93064d88b944e75642b1e7a96f17a6b6ba494c3b4
|
@@ -227,4 +227,10 @@ class AgentsController < ApplicationController
|
|
227
227
|
@languages = Language.all
|
228
228
|
@agent_type = AgentType.where(name: 'person').first
|
229
229
|
end
|
230
|
+
|
231
|
+
def filtered_params
|
232
|
+
params.permit([:view, :format, :page, :language, :sort_by, :per_page])
|
233
|
+
end
|
234
|
+
|
235
|
+
helper_method :filtered_params
|
230
236
|
end
|
@@ -17,9 +17,20 @@ class CarrierTypesController < ApplicationController
|
|
17
17
|
# GET /carrier_types/1
|
18
18
|
# GET /carrier_types/1.json
|
19
19
|
def show
|
20
|
+
if @carrier_type.attachment.path
|
21
|
+
if ENV['ENJU_STORAGE'] == 's3'
|
22
|
+
file = Faraday.get(@carrier_type.attachment.expiring_url).body.force_encoding('UTF-8')
|
23
|
+
else
|
24
|
+
file = @carrier_type.attachment.path(size)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
20
28
|
respond_to do |format|
|
21
29
|
format.html # show.html.erb
|
22
30
|
format.json { render json: @carrier_type }
|
31
|
+
format.download {
|
32
|
+
render_image(file)
|
33
|
+
}
|
23
34
|
end
|
24
35
|
end
|
25
36
|
|
@@ -99,6 +110,7 @@ class CarrierTypesController < ApplicationController
|
|
99
110
|
def carrier_type_params
|
100
111
|
params.require(:carrier_type).permit(
|
101
112
|
:name, :display_name, :note, :position,
|
113
|
+
:attachment,
|
102
114
|
# EnjuCirculation
|
103
115
|
{
|
104
116
|
:carrier_type_has_checkout_types_attributes => [
|
@@ -113,4 +125,16 @@ class CarrierTypesController < ApplicationController
|
|
113
125
|
@checkout_types = CheckoutType.select([:id, :display_name, :position])
|
114
126
|
end
|
115
127
|
end
|
128
|
+
|
129
|
+
def render_image(file)
|
130
|
+
if @carrier_type.picture.path
|
131
|
+
if ENV['ENJU_STORAGE'] == 's3'
|
132
|
+
send_data file, filename: File.basename(@carrier_type.attachment_file_name), type: @carrier_type.attachment_content_type, disposition: 'inline'
|
133
|
+
else
|
134
|
+
if File.exist?(file) && File.file?(file)
|
135
|
+
send_file file, filename: File.basename(@carrier_type.attachment_file_name), type: @carrier_type.attachment_content_type, disposition: 'inline'
|
136
|
+
end
|
137
|
+
end
|
138
|
+
end
|
139
|
+
end
|
116
140
|
end
|
@@ -45,12 +45,12 @@ class ImportRequestsController < ApplicationController
|
|
45
45
|
|
46
46
|
respond_to do |format|
|
47
47
|
if @import_request.save
|
48
|
-
@import_request.import!
|
48
|
+
@error_type = @import_request.import!
|
49
49
|
format.html {
|
50
50
|
if @import_request.manifestation
|
51
51
|
redirect_to @import_request.manifestation, notice: t('controller.successfully_created', model: t('activerecord.models.import_request'))
|
52
|
-
|
53
|
-
redirect_to new_import_request_url, notice: t(
|
52
|
+
elsif @error_type
|
53
|
+
redirect_to new_import_request_url, notice: t("import_request.#{@error_type}")
|
54
54
|
end
|
55
55
|
}
|
56
56
|
#format.html.phone {
|
@@ -278,24 +278,30 @@ class ItemsController < ApplicationController
|
|
278
278
|
end
|
279
279
|
|
280
280
|
def prepare_options
|
281
|
-
@libraries = Library.
|
281
|
+
@libraries = Library.order(:position)
|
282
282
|
if @item
|
283
283
|
@library = @item.shelf.library
|
284
284
|
else
|
285
285
|
@library = Library.real.includes(:shelves).order(:position).first
|
286
286
|
end
|
287
287
|
@shelves = @library.try(:shelves)
|
288
|
-
@bookstores = Bookstore.
|
289
|
-
@budget_types = BudgetType.
|
288
|
+
@bookstores = Bookstore.order(:position)
|
289
|
+
@budget_types = BudgetType.order(:position)
|
290
290
|
@roles = Role.all
|
291
291
|
if defined?(EnjuCirculation)
|
292
|
-
@circulation_statuses = CirculationStatus.
|
292
|
+
@circulation_statuses = CirculationStatus.order(:position)
|
293
293
|
@use_restrictions = UseRestriction.available
|
294
294
|
if @manifestation
|
295
295
|
@checkout_types = CheckoutType.available_for_carrier_type(@manifestation.carrier_type)
|
296
296
|
else
|
297
|
-
@checkout_types = CheckoutType.
|
297
|
+
@checkout_types = CheckoutType.order(:position)
|
298
298
|
end
|
299
299
|
end
|
300
300
|
end
|
301
|
+
|
302
|
+
def filtered_params
|
303
|
+
params.permit([:view, :format, :page, :library, :carrier_type, :reservable, :pub_date_from, :pub_date_until, :language, :sort_by, :per_page])
|
304
|
+
end
|
305
|
+
|
306
|
+
helper_method :filtered_params
|
301
307
|
end
|
@@ -147,24 +147,13 @@ class ManifestationsController < ApplicationController
|
|
147
147
|
all_result = search.execute
|
148
148
|
@count[:query_result] = all_result.total
|
149
149
|
@reservable_facet = all_result.facet(:reservable).rows if defined?(EnjuCirculation)
|
150
|
-
max_number_of_results = @library_group.
|
150
|
+
max_number_of_results = @library_group.max_number_of_results
|
151
151
|
if max_number_of_results == 0
|
152
152
|
@max_number_of_results = @count[:query_result]
|
153
153
|
else
|
154
154
|
@max_number_of_results = max_number_of_results
|
155
155
|
end
|
156
156
|
|
157
|
-
if session[:search_params]
|
158
|
-
unless search.query.to_params == session[:search_params]
|
159
|
-
clear_search_sessions
|
160
|
-
end
|
161
|
-
else
|
162
|
-
clear_search_sessions
|
163
|
-
session[:params] = params
|
164
|
-
session[:search_params] = search.query.to_params
|
165
|
-
session[:query] = @query
|
166
|
-
end
|
167
|
-
|
168
157
|
if params[:format] == 'html' or params[:format].nil?
|
169
158
|
@search_query = Digest::SHA1.hexdigest(Marshal.dump(search.query.to_params).force_encoding('UTF-8'))
|
170
159
|
if flash[:search_query] == @search_query
|
@@ -220,7 +209,7 @@ class ManifestationsController < ApplicationController
|
|
220
209
|
if params[:pub_year_range_interval]
|
221
210
|
pub_year_range_interval = params[:pub_year_range_interval].to_i
|
222
211
|
else
|
223
|
-
pub_year_range_interval = @library_group.
|
212
|
+
pub_year_range_interval = @library_group.pub_year_facet_range_interval || 10
|
224
213
|
end
|
225
214
|
|
226
215
|
search.build do
|
@@ -491,7 +480,7 @@ class ManifestationsController < ApplicationController
|
|
491
480
|
params.require(:manifestation).permit(
|
492
481
|
:original_title, :title_alternative, :title_transcription,
|
493
482
|
:manifestation_identifier, :date_copyrighted,
|
494
|
-
:access_address, :language_id, :carrier_type_id, :
|
483
|
+
:access_address, :language_id, :carrier_type_id, :start_page,
|
495
484
|
:end_page, :height, :width, :depth, :publication_place,
|
496
485
|
:price, :fulltext, :volume_number_string,
|
497
486
|
:issue_number_string, :serial_number_string, :edition, :note,
|
@@ -501,7 +490,7 @@ class ManifestationsController < ApplicationController
|
|
501
490
|
:ndl_bib_id, :pub_date, :edition_string, :volume_number, :issue_number,
|
502
491
|
:serial_number, :content_type_id, :attachment, :lock_version,
|
503
492
|
:dimensions, :fulltext_content, :extent,
|
504
|
-
:
|
493
|
+
:parent_id,
|
505
494
|
:serial, :statement_of_responsibility,
|
506
495
|
{:creators_attributes => [
|
507
496
|
:id, :last_name, :middle_name, :first_name,
|
@@ -850,4 +839,10 @@ class ManifestationsController < ApplicationController
|
|
850
839
|
end
|
851
840
|
query
|
852
841
|
end
|
842
|
+
|
843
|
+
def filtered_params
|
844
|
+
params.permit([:view, :format, :library, :carrier_type, :reservable, :pub_date_from, :pub_date_until, :language, :sort_by, :per_page])
|
845
|
+
end
|
846
|
+
|
847
|
+
helper_method :filtered_params
|
853
848
|
end
|
@@ -2,6 +2,7 @@ class PictureFilesController < ApplicationController
|
|
2
2
|
before_action :set_picture_file, only: [:show, :edit, :update, :destroy]
|
3
3
|
before_action :check_policy, only: [:index, :new, :create]
|
4
4
|
before_action :get_attachable, only: [:index, :new]
|
5
|
+
skip_before_action :store_current_location, only: :show
|
5
6
|
|
6
7
|
# GET /picture_files
|
7
8
|
# GET /picture_files.json
|
@@ -71,10 +71,10 @@ module ManifestationsHelper
|
|
71
71
|
current = true if languages.include?(language.name)
|
72
72
|
if current
|
73
73
|
content_tag :strong do
|
74
|
-
link_to("#{language.display_name.localize} (" + facet.count.to_s + ")", url_for(
|
74
|
+
link_to("#{language.display_name.localize} (" + facet.count.to_s + ")", url_for(filtered_params.merge(page: nil, language: language.name, view: nil, only_path: true)))
|
75
75
|
end
|
76
76
|
else
|
77
|
-
link_to("#{language.display_name.localize} (" + facet.count.to_s + ")", url_for(
|
77
|
+
link_to("#{language.display_name.localize} (" + facet.count.to_s + ")", url_for(filtered_params.merge(page: nil, language: language.name, view: nil, only_path: true)))
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
@@ -86,10 +86,10 @@ module ManifestationsHelper
|
|
86
86
|
content_tag :li do
|
87
87
|
if current
|
88
88
|
content_tag :strong do
|
89
|
-
link_to("#{library.display_name.localize} (" + facet.count.to_s + ")", url_for(
|
89
|
+
link_to("#{library.display_name.localize} (" + facet.count.to_s + ")", url_for(filtered_params.merge(page: nil, library: (current_libraries << library.name).uniq.join(' '), view: nil, only_path: true)))
|
90
90
|
end
|
91
91
|
else
|
92
|
-
link_to("#{library.display_name.localize} (" + facet.count.to_s + ")", url_for(
|
92
|
+
link_to("#{library.display_name.localize} (" + facet.count.to_s + ")", url_for(filtered_params.merge(page: nil, library: (current_libraries << library.name).uniq.join(' '), view: nil, only_path: true)))
|
93
93
|
end
|
94
94
|
end
|
95
95
|
end
|
@@ -102,10 +102,10 @@ module ManifestationsHelper
|
|
102
102
|
current = true if params[:carrier_type] == carrier_type.name
|
103
103
|
if current
|
104
104
|
content_tag :strong do
|
105
|
-
link_to("#{carrier_type.display_name.localize} (" + facet.count.to_s + ")", url_for(
|
105
|
+
link_to("#{carrier_type.display_name.localize} (" + facet.count.to_s + ")", url_for(filtered_params.merge(carrier_type: carrier_type.name, page: nil, view: nil, only_path: true)))
|
106
106
|
end
|
107
107
|
else
|
108
|
-
link_to("#{carrier_type.display_name.localize} (" + facet.count.to_s + ")", url_for(
|
108
|
+
link_to("#{carrier_type.display_name.localize} (" + facet.count.to_s + ")", url_for(filtered_params.merge(carrier_type: carrier_type.name, page: nil, view: nil, only_path: true)))
|
109
109
|
end
|
110
110
|
end
|
111
111
|
end
|
@@ -115,10 +115,10 @@ module ManifestationsHelper
|
|
115
115
|
current = true if facet.value.first.to_i == pub_date_from.to_i and facet.value.last.to_i - 1 == pub_date_until.to_i
|
116
116
|
if current
|
117
117
|
content_tag :strong do
|
118
|
-
link_to("#{facet.value.first.to_i} - #{facet.value.last.to_i - 1} (" + facet.count.to_s + ")", url_for(
|
118
|
+
link_to("#{facet.value.first.to_i} - #{facet.value.last.to_i - 1} (" + facet.count.to_s + ")", url_for(filtered_params.merge(pub_date_from: facet.value.first.to_i, pub_date_until: facet.value.last.to_i - 1, page: nil, view: nil, only_path: true)))
|
119
119
|
end
|
120
120
|
else
|
121
|
-
link_to("#{facet.value.first.to_i} - #{facet.value.last.to_i - 1} (" + facet.count.to_s + ")", url_for(
|
121
|
+
link_to("#{facet.value.first.to_i} - #{facet.value.last.to_i - 1} (" + facet.count.to_s + ")", url_for(filtered_params.merge(pub_date_from: facet.value.first.to_i, pub_date_until: facet.value.last.to_i - 1, page: nil, view: nil, only_path: true)))
|
122
122
|
end
|
123
123
|
end
|
124
124
|
|
data/app/models/agent.rb
CHANGED
@@ -82,7 +82,7 @@ class Agent < ActiveRecord::Base
|
|
82
82
|
|
83
83
|
def set_full_name
|
84
84
|
if full_name.blank?
|
85
|
-
if LibraryGroup.site_config.
|
85
|
+
if LibraryGroup.site_config.family_name_first
|
86
86
|
self.full_name = [last_name, middle_name, first_name].compact.join(" ").to_s.strip
|
87
87
|
else
|
88
88
|
self.full_name = [first_name, last_name, middle_name].compact.join(" ").to_s.strip
|
@@ -224,7 +224,9 @@ class Agent < ActiveRecord::Base
|
|
224
224
|
if agent_list[:agent_identifier].present?
|
225
225
|
agent = Agent.where(agent_identifier: agent_list[:agent_identifier]).first
|
226
226
|
else
|
227
|
-
|
227
|
+
agents_matched = Agent.where(full_name: name_and_role[0])
|
228
|
+
agents_matched = agents_matched.where(place: agent_list[:place]) if agent_list[:place]
|
229
|
+
agent = agents_matched.first
|
228
230
|
end
|
229
231
|
role_type = name_and_role[1].to_s.strip
|
230
232
|
unless agent
|
@@ -232,13 +234,15 @@ class Agent < ActiveRecord::Base
|
|
232
234
|
full_name: name_and_role[0],
|
233
235
|
full_name_transcription: agent_list[:full_name_transcription],
|
234
236
|
agent_identifier: agent_list[:agent_identifier],
|
235
|
-
|
237
|
+
place: agent_list[:place],
|
238
|
+
language_id: 1,
|
236
239
|
)
|
237
240
|
agent.required_role = Role.where(name: 'Guest').first
|
238
241
|
agent.save
|
239
242
|
end
|
240
243
|
agents << agent
|
241
244
|
end
|
245
|
+
agents.uniq!
|
242
246
|
agents
|
243
247
|
end
|
244
248
|
|
@@ -11,7 +11,8 @@ class AgentImportFile < ActiveRecord::Base
|
|
11
11
|
access_key: ENV['AWS_ACCESS_KEY_ID'],
|
12
12
|
secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'],
|
13
13
|
bucket: ENV['S3_BUCKET_NAME'],
|
14
|
-
s3_host_name: ENV['S3_HOST_NAME']
|
14
|
+
s3_host_name: ENV['S3_HOST_NAME'],
|
15
|
+
s3_region: ENV['S3_REGION']
|
15
16
|
},
|
16
17
|
s3_permissions: :private
|
17
18
|
else
|
data/app/models/carrier_type.rb
CHANGED
@@ -2,6 +2,23 @@ class CarrierType < ActiveRecord::Base
|
|
2
2
|
include MasterModel
|
3
3
|
default_scope { order("carrier_types.position") }
|
4
4
|
has_many :manifestations
|
5
|
+
if ENV['ENJU_STORAGE'] == 's3'
|
6
|
+
has_attached_file :attachment, storage: :s3,
|
7
|
+
styles: { thumb: "16x16#" },
|
8
|
+
s3_credentials: {
|
9
|
+
access_key: ENV['AWS_ACCESS_KEY_ID'],
|
10
|
+
secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'],
|
11
|
+
bucket: ENV['S3_BUCKET_NAME'],
|
12
|
+
s3_host_name: ENV['S3_HOST_NAME'],
|
13
|
+
s3_region: ENV['S3_REGION']
|
14
|
+
},
|
15
|
+
s3_permissions: :private
|
16
|
+
else
|
17
|
+
has_attached_file :attachment,
|
18
|
+
styles: { thumb: "16x16#" },
|
19
|
+
path: ":rails_root/private/system/:class/:attachment/:id_partition/:style/:filename"
|
20
|
+
end
|
21
|
+
validates_attachment_content_type :attachment, content_type: /\Aimage\/.*\Z/
|
5
22
|
|
6
23
|
def mods_type
|
7
24
|
case name
|
@@ -36,29 +36,31 @@ class ImportRequest < ActiveRecord::Base
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def import!
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
39
|
+
exceptions = [ ActiveRecord::RecordInvalid, NameError, URI::InvalidURIError ]
|
40
|
+
not_found_exceptions = []
|
41
|
+
not_found_exceptions << EnjuNdl::RecordNotFound if defined? EnjuNdl
|
42
|
+
not_found_exceptions << EnjuNii::RecordNotFound if defined? EnjuNii
|
43
|
+
begin
|
44
|
+
return nil unless Manifestation.respond_to?(:import_isbn)
|
45
|
+
unless manifestation
|
46
|
+
manifestation = Manifestation.import_isbn(isbn)
|
47
|
+
if manifestation
|
48
|
+
self.manifestation = manifestation
|
49
|
+
transition_to!(:completed)
|
50
|
+
manifestation.index
|
51
|
+
Sunspot.commit
|
52
|
+
else
|
53
|
+
transition_to!(:failed)
|
54
|
+
end
|
49
55
|
end
|
50
|
-
|
51
|
-
|
56
|
+
save
|
57
|
+
rescue *not_found_exceptions => e
|
58
|
+
transition_to!(:failed)
|
59
|
+
return :record_not_found
|
60
|
+
rescue *exceptions => e
|
61
|
+
transition_to!(:failed)
|
62
|
+
return :error
|
52
63
|
end
|
53
|
-
save
|
54
|
-
rescue ActiveRecord::RecordInvalid
|
55
|
-
transition_to!(:failed)
|
56
|
-
rescue NameError
|
57
|
-
transition_to!(:failed)
|
58
|
-
rescue EnjuNdl::RecordNotFound
|
59
|
-
transition_to!(:failed)
|
60
|
-
rescue EnjuNii::RecordNotFound
|
61
|
-
transition_to!(:failed)
|
62
64
|
end
|
63
65
|
|
64
66
|
private
|
data/app/models/manifestation.rb
CHANGED
@@ -35,8 +35,15 @@ class Manifestation < ActiveRecord::Base
|
|
35
35
|
text :title, default_boost: 2 do
|
36
36
|
titles
|
37
37
|
end
|
38
|
-
|
39
|
-
|
38
|
+
[ :fulltext, :note, :creator, :contributor, :publisher, :description, :statement_of_responsibility ].each do |field|
|
39
|
+
text field do
|
40
|
+
if series_master?
|
41
|
+
derived_manifestations.map{|c| c.send(field) }.flatten.compact
|
42
|
+
else
|
43
|
+
self.send(field)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
40
47
|
text :item_identifier do
|
41
48
|
if series_master?
|
42
49
|
root_series_statement.root_manifestation.items.pluck(:item_identifier, :binding_item_identifier).flatten.compact
|
@@ -205,7 +212,8 @@ class Manifestation < ActiveRecord::Base
|
|
205
212
|
access_key: ENV['AWS_ACCESS_KEY_ID'],
|
206
213
|
secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'],
|
207
214
|
bucket: ENV['S3_BUCKET_NAME'],
|
208
|
-
s3_host_name: ENV['S3_HOST_NAME']
|
215
|
+
s3_host_name: ENV['S3_HOST_NAME'],
|
216
|
+
s3_region: ENV["S3_REGION"]
|
209
217
|
},
|
210
218
|
s3_permissions: :private
|
211
219
|
else
|
@@ -531,6 +539,8 @@ class Manifestation < ActiveRecord::Base
|
|
531
539
|
manifestation_identifier
|
532
540
|
access_address
|
533
541
|
note
|
542
|
+
extent
|
543
|
+
dimensions
|
534
544
|
)
|
535
545
|
|
536
546
|
header += IdentifierType.order(:position).pluck(:name)
|
@@ -600,6 +610,8 @@ class Manifestation < ActiveRecord::Base
|
|
600
610
|
item_lines << manifestation_identifier
|
601
611
|
item_lines << access_address
|
602
612
|
item_lines << note
|
613
|
+
item_lines << extent
|
614
|
+
item_lines << dimensions
|
603
615
|
|
604
616
|
IdentifierType.order(:position).pluck(:name).each do |identifier_type|
|
605
617
|
if identifier_contents(identifier_type.to_sym).first
|
@@ -673,6 +685,8 @@ class Manifestation < ActiveRecord::Base
|
|
673
685
|
line << manifestation_identifier
|
674
686
|
line << access_address
|
675
687
|
line << note
|
688
|
+
line << extent
|
689
|
+
line << dimensions
|
676
690
|
|
677
691
|
IdentifierType.order(:position).pluck(:name).each do |identifier_type|
|
678
692
|
if identifier_contents(identifier_type.to_sym).first
|
data/app/models/picture_file.rb
CHANGED
@@ -9,7 +9,8 @@ class PictureFile < ActiveRecord::Base
|
|
9
9
|
access_key: ENV['AWS_ACCESS_KEY_ID'],
|
10
10
|
secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'],
|
11
11
|
bucket: ENV['S3_BUCKET_NAME'],
|
12
|
-
s3_host_name: ENV['S3_HOST_NAME']
|
12
|
+
s3_host_name: ENV['S3_HOST_NAME'],
|
13
|
+
s3_region: ENV['S3_REGION']
|
13
14
|
},
|
14
15
|
s3_permissions: :private
|
15
16
|
else
|
@@ -8,7 +8,8 @@ class ResourceExportFile < ActiveRecord::Base
|
|
8
8
|
access_key: ENV['AWS_ACCESS_KEY_ID'],
|
9
9
|
secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'],
|
10
10
|
bucket: ENV['S3_BUCKET_NAME'],
|
11
|
-
s3_host_name: ENV['S3_HOST_NAME']
|
11
|
+
s3_host_name: ENV['S3_HOST_NAME'],
|
12
|
+
s3_region: ENV['S3_REGION']
|
12
13
|
},
|
13
14
|
s3_permissions: :private
|
14
15
|
else
|
@@ -11,7 +11,8 @@ class ResourceImportFile < ActiveRecord::Base
|
|
11
11
|
access_key: ENV['AWS_ACCESS_KEY_ID'],
|
12
12
|
secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'],
|
13
13
|
bucket: ENV['S3_BUCKET_NAME'],
|
14
|
-
s3_host_name: ENV['S3_HOST_NAME']
|
14
|
+
s3_host_name: ENV['S3_HOST_NAME'],
|
15
|
+
s3_region: ENV['S3_REGION']
|
15
16
|
},
|
16
17
|
s3_permissions: :private
|
17
18
|
else
|
@@ -39,10 +39,10 @@
|
|
39
39
|
<ul>
|
40
40
|
<li>
|
41
41
|
<% if @agent_import_file %>
|
42
|
-
<%= link_to((image_tag 'icons/page_white_excel.png', size: '16x16', alt: 'TSV', class: 'icon'), agent_import_results_path(agent_import_file_id: @agent_import_file.id, format: :txt)) -%>
|
42
|
+
<%= link_to((image_tag 'icons/page_white_excel.png', size: '16x16', class: 'enju_icon', alt: 'TSV', class: 'icon'), agent_import_results_path(agent_import_file_id: @agent_import_file.id, format: :txt)) -%>
|
43
43
|
(<%= link_to 'TSV', agent_import_results_path(agent_import_file_ud: @agent_import_file.id, format: :txt) -%>)
|
44
44
|
<% else %>
|
45
|
-
<%= link_to((image_tag 'icons/page_white_excel.png', size: '16x16', alt: 'TSV', class: 'icon'), agent_import_results_path(format: :txt, locale: @locale.to_s)) -%>
|
45
|
+
<%= link_to((image_tag 'icons/page_white_excel.png', size: '16x16', class: 'enju_icon', alt: 'TSV', class: 'icon'), agent_import_results_path(format: :txt, locale: @locale.to_s)) -%>
|
46
46
|
(<%= link_to 'TSV', agent_import_results_path(format: :txt, locale: @locale.to_s) -%>)
|
47
47
|
<% end %>
|
48
48
|
</li>
|
@@ -9,7 +9,7 @@
|
|
9
9
|
|
10
10
|
<div class="field">
|
11
11
|
<span id="name_person">
|
12
|
-
<%- if @library_group.
|
12
|
+
<%- if @library_group.family_name_first -%>
|
13
13
|
<%= render 'agents/form_family_name_first', f: f -%>
|
14
14
|
<%- else -%>
|
15
15
|
<%= render 'agents/form_family_name_last', f: f -%>
|
@@ -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(
|
7
|
+
xml.link "#{request.protocol}#{request.host_with_port}#{url_for(filtered_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(
|
11
|
+
xml.tag! "atom:link", rel: 'self', href: "#{request.protocol}#{request.host_with_port}#{url_for(filtered_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
|
unless params[:query].blank?
|
@@ -9,6 +9,10 @@
|
|
9
9
|
<%= f.label :display_name %><br />
|
10
10
|
<%= f.text_area :display_name %>
|
11
11
|
</div>
|
12
|
+
<div class="field">
|
13
|
+
<%= f.label t('page.file') -%>
|
14
|
+
<%= f.file_field :attachment -%>
|
15
|
+
</div>
|
12
16
|
<% if defined?(EnjuCirculation) and !@carrier_type.new_record? %>
|
13
17
|
<%= render 'carrier_types/checkout_form', f: f %>
|
14
18
|
<% end %>
|
@@ -13,6 +13,11 @@
|
|
13
13
|
<%= @carrier_type.display_name.localize -%>
|
14
14
|
</p>
|
15
15
|
|
16
|
+
<p>
|
17
|
+
<strong><%= t('page.file') -%>:</strong>
|
18
|
+
<%= link_to @carrier_type.attachment_file_name, carrier_type_path(@carrier_type, format: :download, size: 'thumb') -%><br />
|
19
|
+
</p>
|
20
|
+
|
16
21
|
<% if defined?(EnjuCirculation) %>
|
17
22
|
<p>
|
18
23
|
<strong><%= t('activerecord.models.checkout_type') -%>:</strong>
|
@@ -18,8 +18,8 @@
|
|
18
18
|
<tr class="line<%= cycle("0", "1") -%>">
|
19
19
|
<td>
|
20
20
|
<%- if policy(create).destroy? -%>
|
21
|
-
<%= create.first? ? image_tag('icons/stop.png', size: '16x16') : link_to(image_tag('icons/arrow_up.png', size: '16x16', alt: t('page.asc')), {action: 'update', move: 'higher', id: create.id, agent_id: agent.id}, method: :put) -%>
|
22
|
-
<%= create.last? ? image_tag('icons/stop.png', size: '16x16') : link_to(image_tag('icons/arrow_down.png', size: '16x16', alt: t('page.desc')), {action: 'update', move: 'lower', id: create.id, agent_id: agent.id}, method: :put) -%>
|
21
|
+
<%= create.first? ? image_tag('icons/stop.png', size: '16x16', class: 'enju_icon') : link_to(image_tag('icons/arrow_up.png', size: '16x16', class: 'enju_icon', alt: t('page.asc')), {action: 'update', move: 'higher', id: create.id, agent_id: agent.id}, method: :put) -%>
|
22
|
+
<%= create.last? ? image_tag('icons/stop.png', size: '16x16', class: 'enju_icon') : link_to(image_tag('icons/arrow_down.png', size: '16x16', class: 'enju_icon', alt: t('page.desc')), {action: 'update', move: 'lower', id: create.id, agent_id: agent.id}, method: :put) -%>
|
23
23
|
<%- end -%>
|
24
24
|
</td>
|
25
25
|
<td><%= link_to create.work.try(:original_title), create.work -%></td>
|
@@ -17,8 +17,8 @@
|
|
17
17
|
<tr class="line<%= cycle("0", "1") -%>">
|
18
18
|
<td>
|
19
19
|
<%- if policy(create).destroy? -%>
|
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) -%>
|
20
|
+
<%= create.first? ? image_tag('icons/stop.png', size: '16x16', class: 'enju_icon') : link_to(image_tag('icons/arrow_up.png', size: '16x16', class: 'enju_icon', alt: t('page.asc')), work_create_path(create.work, create, move: 'higher'), method: :put) -%>
|
21
|
+
<%= create.last? ? image_tag('icons/stop.png', size: '16x16', class: 'enju_icon') : link_to(image_tag('icons/arrow_down.png', size: '16x16', class: 'enju_icon', alt: t('page.desc')), work_create_path(create.work, create, move: 'lower'), method: :put) -%>
|
22
22
|
<%- end-%>
|
23
23
|
</td>
|
24
24
|
<td><%= link_to create.agent.try(:full_name), create.agent -%></td>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%- item.shelf.picture_files.each do |picture_file| -%>
|
2
|
-
<%= link_to image_tag('icons/picture.png', size: '16x16', alt: t('page.picture')), picture_file_path(picture_file, format: :download), rel: "item_#{item.id}_manifestation_#{item.manifestation_id}" -%>
|
2
|
+
<%= link_to image_tag('icons/picture.png', size: '16x16', class: 'enju_icon', alt: t('page.picture')), picture_file_path(picture_file, format: :download), rel: "item_#{item.id}_manifestation_#{item.manifestation_id}" -%>
|
3
3
|
<%- end -%>
|
4
4
|
<script type="text/javascript">
|
5
5
|
$(document).ready(function(){
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%- item.shelf.picture_files.each do |picture_file| -%>
|
2
|
-
<%= link_to image_tag('icons/picture.png', size: '16x16', alt: t('page.picture')), picture_file_path(picture_file, format: :download), rel: "item_#{item.id}_manifestation_#{item.manifestation_id}" -%>
|
2
|
+
<%= link_to image_tag('icons/picture.png', size: '16x16', class: 'enju_icon', alt: t('page.picture')), picture_file_path(picture_file, format: :download), rel: "item_#{item.id}_manifestation_#{item.manifestation_id}" -%>
|
3
3
|
<%- end -%>
|
4
4
|
<script type="text/javascript">
|
5
5
|
$(document).ready(function(){
|
@@ -83,7 +83,7 @@
|
|
83
83
|
<li><%= circulation_status_facet(facet) %></li>
|
84
84
|
<%- end -%>
|
85
85
|
<%- if params[:circulation_status] -%>
|
86
|
-
<li><%= link_to t('page.remove_this_facet'), url_for(
|
86
|
+
<li><%= link_to t('page.remove_this_facet'), url_for(filtered_params.merge(circulation_status: nil, page: nil, view: nil, only_path: true)) -%></li>
|
87
87
|
<%- end -%>
|
88
88
|
</ul>
|
89
89
|
<% end %>
|
@@ -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(
|
9
|
-
<%= auto_discovery_link_tag(:atom, url_for(
|
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)")) %>
|
10
10
|
<%- end -%>
|
11
11
|
</head>
|
12
12
|
<body>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<%= render 'page/include' %>
|
6
6
|
<title><%= title(controller.controller_name) %></title>
|
7
7
|
<% if %w(index show new edit).include?(controller.action_name) %>
|
8
|
-
<%= book_jacket_header(@library_group.
|
8
|
+
<%= book_jacket_header(@library_group.book_jacket_source) %>
|
9
9
|
<% end %>
|
10
10
|
</head>
|
11
11
|
<body itemscope itemtype="http://schema.org/WebPage">
|
@@ -5,11 +5,11 @@
|
|
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(
|
9
|
-
<%= auto_discovery_link_tag(:atom, url_for(
|
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)")) %>
|
10
10
|
<%- end -%>
|
11
11
|
<% if %w(show edit).include?(controller.action_name) %>
|
12
|
-
<%= book_jacket_header(@library_group.
|
12
|
+
<%= book_jacket_header(@library_group.book_jacket_source) %>
|
13
13
|
<% end %>
|
14
14
|
<link rel="search" type="application/opensearchdescription+xml" title="<%= LibraryGroup.site_config.display_name.localize %>" href="<%= page_opensearch_url(format: :xml) %>" />
|
15
15
|
</head>
|
@@ -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(
|
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>
|
8
8
|
<%- end -%>
|
9
9
|
</ul>
|