enju_flower 0.1.0.pre16 → 0.1.0.pre17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/manifestations_helper.rb +17 -17
- data/app/views/manifestations/_attachment_file.html.erb +1 -1
- 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/_holding.html.erb +1 -1
- data/app/views/manifestations/_index_form.html.erb +2 -2
- data/app/views/manifestations/_index_form_contributor.html.erb +2 -2
- data/app/views/manifestations/_index_form_creator.html.erb +2 -2
- data/app/views/manifestations/_index_form_item.html.erb +2 -2
- data/app/views/manifestations/_index_form_manifestation.html.erb +2 -2
- data/app/views/manifestations/_index_form_parent.html.erb +9 -3
- data/app/views/manifestations/_index_form_publisher.html.erb +2 -2
- data/app/views/manifestations/_index_form_series_statement.html.erb +3 -3
- data/app/views/manifestations/_language_facet.html.erb +2 -2
- data/app/views/manifestations/_library_facet.html.erb +1 -1
- data/app/views/manifestations/_list.html.erb +2 -2
- data/app/views/manifestations/_manifestation.html.erb +53 -51
- data/app/views/manifestations/_manifestation_list.html.erb +2 -2
- data/app/views/manifestations/_paginate_id_link.html.erb +2 -2
- data/app/views/manifestations/_pickup.html.erb +5 -5
- data/app/views/manifestations/_pub_year_facet.html.erb +1 -1
- data/app/views/manifestations/_question_list.html.erb +1 -1
- data/app/views/manifestations/_reservable_facet.html.erb +2 -2
- data/app/views/manifestations/_search_engine.html.erb +1 -1
- data/app/views/manifestations/_show_creators.html.erb +2 -2
- data/app/views/manifestations/_show_creators.mobile.erb +2 -2
- data/app/views/manifestations/_show_detail_librarian.html.erb +14 -10
- data/app/views/manifestations/_show_detail_user.html.erb +14 -10
- data/app/views/manifestations/_show_holding.html.erb +12 -10
- data/app/views/manifestations/_show_holding.mobile.erb +1 -1
- data/app/views/manifestations/_show_index.html.erb +7 -5
- data/app/views/manifestations/_show_index.mobile.erb +3 -3
- data/app/views/manifestations/_show_reservation.html.erb +5 -5
- data/app/views/manifestations/_show_series_index.html.erb +6 -3
- data/app/views/manifestations/_submenu_parent.html.erb +1 -1
- data/app/views/manifestations/_tab_list.html.erb +3 -3
- data/app/views/manifestations/_tab_menu.html.erb +1 -1
- data/app/views/manifestations/_title.html.erb +9 -6
- data/app/views/manifestations/_title.mobile.erb +6 -6
- data/app/views/manifestations/index.atom.builder +3 -3
- data/app/views/manifestations/index.html.erb +15 -14
- data/app/views/manifestations/index.mobile.erb +3 -3
- data/app/views/manifestations/index.mods.builder +1 -1
- data/app/views/manifestations/index.opds.builder +5 -5
- data/app/views/manifestations/index.rdf.builder +4 -4
- data/app/views/manifestations/index.rss.builder +6 -6
- data/app/views/manifestations/index.sru.builder +1 -1
- data/app/views/manifestations/show.html.erb +14 -14
- data/app/views/manifestations/show.mobile.erb +3 -3
- data/app/views/manifestations/show.mods.builder +1 -1
- data/app/views/manifestations/show.rdf.builder +1 -1
- data/app/views/page/_footer.html.erb +3 -2
- data/lib/enju_flower/version.rb +1 -1
- data/spec/controllers/manifestations_controller_spec.rb +22 -22
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/001_create_agents.rb +0 -1
- data/spec/dummy/db/migrate/{20111201155513_add_devise_to_users.rb → 002_devise_create_users.rb} +18 -16
- data/spec/dummy/db/migrate/005_create_manifestations.rb +4 -16
- data/spec/dummy/db/migrate/006_create_items.rb +0 -3
- data/spec/dummy/db/migrate/035_create_reserves.rb +0 -1
- data/spec/dummy/db/migrate/041_create_roles.rb +13 -0
- data/spec/dummy/db/migrate/077_create_user_groups.rb +3 -7
- data/spec/dummy/db/migrate/080_create_library_groups.rb +0 -1
- data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +17 -0
- data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +14 -0
- data/spec/dummy/db/migrate/20081028083142_create_agent_import_files.rb +0 -2
- data/spec/dummy/db/migrate/20081028083208_create_resource_import_files.rb +1 -3
- data/spec/dummy/db/migrate/20081212080038_create_manifestation_checkout_stats.rb +0 -1
- data/spec/dummy/db/migrate/20081215094302_create_user_checkout_stats.rb +0 -1
- data/spec/dummy/db/migrate/20081216190724_create_manifestation_reserve_stats.rb +0 -1
- data/spec/dummy/db/migrate/20081220023628_create_user_reserve_stats.rb +0 -1
- data/spec/dummy/db/migrate/20090321130448_add_completed_at_to_user_checkout_stat.rb +0 -4
- data/spec/dummy/db/migrate/20100129142347_create_import_requests.rb +0 -1
- data/spec/dummy/db/migrate/20100314190054_add_opening_hour_to_library.rb +9 -0
- data/spec/dummy/db/migrate/{20111201163718_create_user_has_roles.rb → 20100606065209_create_user_has_roles.rb} +2 -0
- data/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +0 -2
- data/spec/dummy/db/migrate/20110627034940_create_series_statement_merge_lists.rb +9 -0
- data/spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb +12 -0
- data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +14 -0
- data/spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb +1 -11
- data/spec/dummy/db/migrate/20130412083556_add_latitude_and_longitude_to_library.rb +6 -0
- data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +18 -0
- data/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb +11 -0
- data/spec/dummy/db/migrate/20140122054321_create_profiles.rb +20 -0
- data/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140524135607_create_bookmark_stat_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140524142813_add_taggings_count_to_tag.rb +5 -0
- data/spec/dummy/db/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb +11 -0
- data/spec/dummy/db/migrate/20140614065404_create_resource_export_files.rb +11 -0
- data/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140628072217_add_user_encoding_to_user_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140628073524_add_user_encoding_to_agent_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140628073535_add_user_encoding_to_resource_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb +11 -0
- data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140720140916_add_binding_item_identifier_to_item.rb +8 -0
- data/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140721151416_add_default_shelf_id_to_resource_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140802082007_add_manifestation_id_to_item.rb +6 -0
- data/spec/dummy/db/migrate/20140810061942_add_user_id_to_user_checkout_stat.rb +12 -0
- data/spec/dummy/db/migrate/20140810091231_add_checkout_icalendar_token_to_profile.rb +6 -0
- data/spec/dummy/db/migrate/20140810091417_add_save_checkout_history_to_profile.rb +5 -0
- data/spec/dummy/db/migrate/20140811031145_add_expired_at_to_profile.rb +5 -0
- data/spec/dummy/db/migrate/20140812093836_add_share_bookmarks_to_profile.rb +5 -0
- data/spec/dummy/db/schema.rb +250 -252
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/solr/default/data/index/_1x.fdt +0 -0
- data/spec/dummy/solr/default/data/index/_1x.fnm +0 -0
- data/spec/dummy/solr/default/data/index/_1x.nvm +0 -0
- data/spec/dummy/solr/default/data/index/{_cx.si → _1x.si} +0 -0
- data/spec/dummy/solr/default/data/index/{_cx_Lucene41_0.tim → _1x_Lucene41_0.tim} +0 -0
- data/spec/dummy/solr/default/data/index/_1x_Lucene41_0.tip +0 -0
- data/spec/dummy/solr/default/data/index/_1y.fdt +0 -0
- data/spec/dummy/solr/default/data/index/_1y.fnm +0 -0
- data/spec/dummy/solr/default/data/index/_1y.nvm +0 -0
- data/spec/dummy/solr/default/data/index/{_cy.si → _1y.si} +0 -0
- data/spec/dummy/solr/default/data/index/{_cy_Lucene41_0.tim → _1y_Lucene41_0.tim} +0 -0
- data/spec/dummy/solr/default/data/index/{_cy_Lucene41_0.tip → _1y_Lucene41_0.tip} +0 -0
- data/spec/dummy/solr/default/data/index/_1z.fdt +0 -0
- data/spec/dummy/solr/default/data/index/_1z.fnm +0 -0
- data/spec/dummy/solr/default/data/index/_1z.nvm +0 -0
- data/spec/dummy/solr/default/data/index/{_cz.si → _1z.si} +0 -0
- data/spec/dummy/solr/default/data/index/{_cz_Lucene41_0.tim → _1z_Lucene41_0.tim} +0 -0
- data/spec/dummy/solr/default/data/index/{_cz_Lucene41_0.tip → _1z_Lucene41_0.tip} +0 -0
- data/spec/dummy/solr/default/data/index/segments.gen +0 -0
- data/spec/dummy/solr/default/data/index/segments_2p +0 -0
- data/spec/dummy/solr/default/data/tlog/{tlog.0000000000000000591 → tlog.0000000000000000093} +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000094 +0 -0
- data/spec/dummy/solr/default/data/tlog/{tlog.0000000000000000593 → tlog.0000000000000000095} +0 -0
- data/spec/dummy/tmp/cache/4F7/F90/default_role +0 -0
- data/spec/dummy/tmp/cache/6E4/420/search_engine_all +0 -0
- data/spec/factories/profile.rb +10 -0
- data/spec/factories/user.rb +0 -13
- data/spec/fixtures/import_requests.yml +0 -3
- data/spec/fixtures/items.yml +46 -21
- data/spec/fixtures/library_groups.yml +0 -2
- data/spec/fixtures/manifestations.yml +0 -2
- data/spec/fixtures/profiles.yml +98 -0
- data/spec/fixtures/reserve_transitions.yml +88 -0
- data/spec/fixtures/resource_import_files.yml +0 -4
- data/spec/fixtures/users.yml +0 -55
- metadata +158 -140
- data/spec/dummy/db/migrate/113_create_events.rb +0 -23
- data/spec/dummy/db/migrate/114_create_event_categories.rb +0 -16
- data/spec/dummy/db/migrate/149_create_message_templates.rb +0 -18
- data/spec/dummy/db/migrate/154_create_messages.rb +0 -24
- data/spec/dummy/db/migrate/20080819181903_create_message_requests.rb +0 -20
- data/spec/dummy/db/migrate/20081028093607_create_event_import_files.rb +0 -27
- data/spec/dummy/db/migrate/20081117143156_create_inventory_files.rb +0 -18
- data/spec/dummy/db/migrate/20081117143455_create_inventories.rb +0 -17
- data/spec/dummy/db/migrate/20090519203307_create_participates.rb +0 -17
- data/spec/dummy/db/migrate/20090706125521_add_attachments_inventory_to_inventory_file.rb +0 -15
- data/spec/dummy/db/migrate/20100527113752_create_delayed_jobs.rb +0 -21
- data/spec/dummy/db/migrate/20100925074639_create_event_import_results.rb +0 -15
- data/spec/dummy/db/migrate/20110425133109_add_issn_to_series_statement.rb +0 -9
- data/spec/dummy/db/migrate/20110618091240_add_periodical_to_series_statement.rb +0 -9
- data/spec/dummy/db/migrate/20110820131417_create_series_has_manifestations.rb +0 -13
- data/spec/dummy/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb +0 -11
- data/spec/dummy/db/migrate/20110916053430_rename_manifestation_number_list_to_number_string.rb +0 -13
- data/spec/dummy/db/migrate/20111009183423_add_ndc_to_manifestation.rb +0 -9
- data/spec/dummy/db/migrate/20111201121844_create_roles.rb +0 -12
- data/spec/dummy/db/migrate/20111201155456_create_users.rb +0 -8
- data/spec/dummy/db/migrate/20120105101944_add_queue_to_delayed_jobs.rb +0 -9
- data/spec/dummy/db/migrate/20120125050502_add_depth_to_message.rb +0 -6
- data/spec/dummy/db/migrate/20120413051535_add_event_import_fingerprint_to_event_import_file.rb +0 -5
- data/spec/dummy/db/migrate/20120413100431_add_fingerprint_to_inventory_file.rb +0 -5
- data/spec/dummy/db/migrate/20120413170734_add_error_message_to_event_import_file.rb +0 -5
- data/spec/dummy/db/migrate/20120415060308_rename_resource_import_file_imported_at_to_executed_at.rb +0 -9
- data/spec/dummy/db/migrate/20120415060342_rename_event_import_file_imported_at_to_executed_at.rb +0 -9
- data/spec/dummy/db/migrate/20120728204337_create_series_statement_relationships.rb +0 -11
- data/spec/dummy/db/migrate/20130303104849_add_state_index_to_reserve.rb +0 -5
- data/spec/dummy/db/migrate/20140529014410_create_item_transitions.rb +0 -14
- data/spec/dummy/solr/default/data/index/_cx.fdt +0 -0
- data/spec/dummy/solr/default/data/index/_cx.fnm +0 -0
- data/spec/dummy/solr/default/data/index/_cx.nvm +0 -0
- data/spec/dummy/solr/default/data/index/_cx_Lucene41_0.tip +0 -0
- data/spec/dummy/solr/default/data/index/_cy.fdt +0 -0
- data/spec/dummy/solr/default/data/index/_cy.fnm +0 -0
- data/spec/dummy/solr/default/data/index/_cy.nvm +0 -0
- data/spec/dummy/solr/default/data/index/_cz.fdt +0 -0
- data/spec/dummy/solr/default/data/index/_cz.fnm +0 -0
- data/spec/dummy/solr/default/data/index/_cz.nvm +0 -0
- data/spec/dummy/solr/default/data/index/segments_gj +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000592 +0 -0
- /data/spec/dummy/solr/default/data/index/{_cx.fdx → _1x.fdx} +0 -0
- /data/spec/dummy/solr/default/data/index/{_cx.nvd → _1x.nvd} +0 -0
- /data/spec/dummy/solr/default/data/index/{_cx_Lucene41_0.doc → _1x_Lucene41_0.doc} +0 -0
- /data/spec/dummy/solr/default/data/index/{_cx_Lucene41_0.pos → _1x_Lucene41_0.pos} +0 -0
- /data/spec/dummy/solr/default/data/index/{_cy.fdx → _1y.fdx} +0 -0
- /data/spec/dummy/solr/default/data/index/{_cy.nvd → _1y.nvd} +0 -0
- /data/spec/dummy/solr/default/data/index/{_cy_Lucene41_0.doc → _1y_Lucene41_0.doc} +0 -0
- /data/spec/dummy/solr/default/data/index/{_cy_Lucene41_0.pos → _1y_Lucene41_0.pos} +0 -0
- /data/spec/dummy/solr/default/data/index/{_cz.fdx → _1z.fdx} +0 -0
- /data/spec/dummy/solr/default/data/index/{_cz.nvd → _1z.nvd} +0 -0
- /data/spec/dummy/solr/default/data/index/{_cz_Lucene41_0.doc → _1z_Lucene41_0.doc} +0 -0
- /data/spec/dummy/solr/default/data/index/{_cz_Lucene41_0.pos → _1z_Lucene41_0.pos} +0 -0
@@ -4,19 +4,19 @@ xml.rss('version' => "2.0",
|
|
4
4
|
'xmlns:dc' => "http://purl.org/dc/elements/1.1/",
|
5
5
|
'xmlns:atom' => "http://www.w3.org/2005/Atom"){
|
6
6
|
xml.channel{
|
7
|
-
xml.title t('manifestation.query_search_result', :
|
8
|
-
xml.link "#{request.protocol}#{request.host_with_port}#{url_for(params.merge(:
|
7
|
+
xml.title t('manifestation.query_search_result', query: @query, library_group_name: @library_group.display_name.localize)
|
8
|
+
xml.link "#{request.protocol}#{request.host_with_port}#{url_for(params.merge(format: nil, only_path: true))}"
|
9
9
|
xml.description "Next-L Enju, an open source integrated library system developed by Project Next-L"
|
10
10
|
xml.language @locale.to_s
|
11
11
|
xml.ttl "60"
|
12
|
-
xml.tag! "atom:link", :
|
13
|
-
xml.tag! "atom:link", :
|
14
|
-
xml.tag! "atom:link", :
|
12
|
+
xml.tag! "atom:link", rel: 'self', href: "#{request.protocol}#{request.host_with_port}#{url_for(params.merge(format: :rss, only_path: true))}"
|
13
|
+
xml.tag! "atom:link", rel: 'alternate', href: manifestations_url
|
14
|
+
xml.tag! "atom:link", rel: 'search', type: 'application/opensearchdescription+xml', href: page_opensearch_url
|
15
15
|
unless params[:query].blank?
|
16
16
|
xml.tag! "opensearch:totalResults", @manifestations.total_count
|
17
17
|
xml.tag! "opensearch:startIndex", @manifestations.offset_value + 1
|
18
18
|
xml.tag! "opensearch:itemsPerPage", @manifestations.limit_value
|
19
|
-
xml.tag! "opensearch:Query", :
|
19
|
+
xml.tag! "opensearch:Query", role: 'request', :searchTerms => h(params[:query]), :startPage => (h(params[:page]) || 1)
|
20
20
|
end
|
21
21
|
if @manifestations
|
22
22
|
@manifestations.each do |manifestation|
|
@@ -69,7 +69,7 @@ def get_record(manifestation)
|
|
69
69
|
'xmlns:srw_dc' => "info:srw/schema/1/dc-v1.1",
|
70
70
|
'xmlns:xsi' => "http://www.w3.org/2001/XMLSchema-instance",
|
71
71
|
'xsi:schemaLocation' => "info:srw/schema/1/dc-v1.1 http://www.loc.gov/standards/sru/dc-schema.xsd" do
|
72
|
-
cache(
|
72
|
+
cache([manifestation, fragment: 'index_sru', role: current_user_role_name, locale: @locale]) do
|
73
73
|
xml.tag! 'dc:title', manifestation.original_title
|
74
74
|
manifestation.creators.readable_by(current_user).each do |agent|
|
75
75
|
xml.tag! 'dc:creator', agent.full_name
|
@@ -1,30 +1,30 @@
|
|
1
1
|
<div id="content_detail" class="ui-corner-all ui-widget-content" itemscope="itemscope" itemtype="http://schema.org/Book">
|
2
|
-
<h1 class="title"><%= t('page.showing', :
|
2
|
+
<h1 class="title"><%= t('page.showing', model: t('activerecord.models.manifestation')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<p id="notice"><%= notice %></p>
|
5
|
-
<%= render 'paginate_id_link', :
|
5
|
+
<%= render 'paginate_id_link', manifestation: @manifestation, manifestation_ids: @manifestation_ids %>
|
6
6
|
|
7
|
-
<%= render 'manifestations/title', :
|
7
|
+
<%= render 'manifestations/title', manifestation: @manifestation -%>
|
8
8
|
<%- if @version -%>
|
9
9
|
<p>(<%= l(@manifestation.versions.find(@version).created_at) -%>)</p>
|
10
10
|
<%- end -%>
|
11
11
|
<% if current_user.try(:has_role?, 'Librarian') %>
|
12
|
-
<%= render 'manifestations/show_detail_librarian', :
|
12
|
+
<%= render 'manifestations/show_detail_librarian', manifestation: @manifestation %>
|
13
13
|
<% else %>
|
14
|
-
<%= render 'manifestations/show_detail_user', :
|
14
|
+
<%= render 'manifestations/show_detail_user', manifestation: @manifestation %>
|
15
15
|
<% end %>
|
16
16
|
</div>
|
17
17
|
</div>
|
18
18
|
|
19
19
|
<div id="submenu" class="ui-corner-all ui-widget-content">
|
20
|
-
<%= render 'manifestations/book_jacket', :
|
20
|
+
<%= render 'manifestations/book_jacket', manifestation: @manifestation -%>
|
21
21
|
<ul>
|
22
22
|
<%- if @manifestation.picture_files.exists? -%>
|
23
|
-
<li><%= t('page.total') %>: <%= @manifestation.picture_files.count %> <%= t('page.number_of_pictures', :
|
24
|
-
<li><%= link_to t('page.listing', :
|
23
|
+
<li><%= t('page.total') %>: <%= @manifestation.picture_files.count %> <%= t('page.number_of_pictures', count: @manifestation.picture_files.count) %></li>
|
24
|
+
<li><%= link_to t('page.listing', model: t('activerecord.models.picture_file')), picture_files_path(manifestation_id: @manifestation.id) -%></li>
|
25
25
|
<% end %>
|
26
26
|
<%- if can? :create, PictureFile -%>
|
27
|
-
<li><%= link_to t('page.new', :
|
27
|
+
<li><%= link_to t('page.new', model: t('activerecord.models.picture_file')), new_picture_file_path(manifestation_id: @manifestation.id) -%></li>
|
28
28
|
<%- end -%>
|
29
29
|
</ul>
|
30
30
|
<script type="text/javascript">
|
@@ -35,7 +35,7 @@
|
|
35
35
|
<%- if user_signed_in? -%>
|
36
36
|
<div id="call_number_content">
|
37
37
|
<%- @manifestation.items.for_checkout.on_shelf.each do |item| -%>
|
38
|
-
<%- if item.hold?(current_user.library) -%>
|
38
|
+
<%- if item.hold?(current_user.profile.library) -%>
|
39
39
|
<%= call_number_label(item) -%>
|
40
40
|
<%- end -%>
|
41
41
|
<%- end -%>
|
@@ -46,7 +46,7 @@
|
|
46
46
|
<ul>
|
47
47
|
<%- if user_signed_in? -%>
|
48
48
|
<%- if current_user.email.present? -%>
|
49
|
-
<li><%= link_to t('manifestation.send_email'), manifestation_path(:
|
49
|
+
<li><%= link_to t('manifestation.send_email'), manifestation_path(mode: 'send_email'), data: {confirm: t('page.are_you_sure')} -%></li>
|
50
50
|
<%- end -%>
|
51
51
|
<% if defined?(EnjuBookmark) %>
|
52
52
|
<li><%= link_to_bookmark(@manifestation) %></li>
|
@@ -59,16 +59,16 @@
|
|
59
59
|
<% if @manifestation.is_reservable_by?(current_user) %>
|
60
60
|
<li><%= link_to_reservation(@manifestation, @reserve) %>
|
61
61
|
<br />
|
62
|
-
(<%= t('page.number_of_reservations', :
|
62
|
+
(<%= t('page.number_of_reservations', count: @reserved_count) -%>)</li>
|
63
63
|
<%- else -%>
|
64
64
|
<% if defined?(EnjuPurchaseRequest) %>
|
65
|
-
<li><%= link_to t('activerecord.models.purchase_request'), new_purchase_request_path(:
|
65
|
+
<li><%= link_to t('activerecord.models.purchase_request'), new_purchase_request_path(purchase_request: {url: manifestation_url(@manifestation)}) %></li>
|
66
66
|
<% end %>
|
67
67
|
<%- end -%>
|
68
68
|
<% else %>
|
69
69
|
<% unless @manifestation.items.for_checkout.empty? %>
|
70
70
|
<li><%= link_to_reservation(@manifestation, @reserve) %><br />
|
71
|
-
(<%= t('page.number_of_reservations', :
|
71
|
+
(<%= t('page.number_of_reservations', count: @reserved_count) -%>)</li>
|
72
72
|
<% end %>
|
73
73
|
<% end %>
|
74
74
|
<% end %>
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<div data-role="header">
|
2
2
|
<a href="javascript:history.back()" data-icon="back" data-iconpos="notext" class="ui-btn-left"><%= t('page.back') %></a>
|
3
|
-
<h1 class="title"><%= t('page.showing', :
|
3
|
+
<h1 class="title"><%= t('page.showing', model: t('activerecord.models.manifestation')) -%></h1>
|
4
4
|
</div>
|
5
5
|
<div data-role="content">
|
6
|
-
<%= render 'title', :
|
6
|
+
<%= render 'title', manifestation: @manifestation %>
|
7
7
|
<table class="table table-striped">
|
8
8
|
<tr>
|
9
9
|
<th>ISBN</th>
|
@@ -15,6 +15,6 @@
|
|
15
15
|
</tr>
|
16
16
|
</table>
|
17
17
|
<%- if @manifestation.items.on_shelf.exists? -%>
|
18
|
-
<%= render 'manifestations/show_holding', :
|
18
|
+
<%= render 'manifestations/show_holding', manifestation: @manifestation -%>
|
19
19
|
<%- end -%>
|
20
20
|
</div>
|
@@ -2,5 +2,5 @@ xml.instruct! :xml, :version=>"1.0"
|
|
2
2
|
xml.mods('version' => "3.3",
|
3
3
|
'xmlns:xsi' => "http://www.w3.org/2001/XMLSchema-instance",
|
4
4
|
'xmlns' => "http://www.loc.gov/mods/v3"){
|
5
|
-
xml << render('manifestations/show', :
|
5
|
+
xml << render('manifestations/show', manifestation: @manifestation)
|
6
6
|
}
|
@@ -8,5 +8,5 @@ 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#") do
|
11
|
-
xml << render('manifestations/show', :
|
11
|
+
xml << render('manifestations/show', manifestation: @manifestation)
|
12
12
|
end
|
@@ -5,9 +5,10 @@
|
|
5
5
|
<%= t('page.open_source_integrated_library_system') -%>
|
6
6
|
<br />
|
7
7
|
Developed by <a href="https://github.com/nabeta">Kosuke Tanabe</a> and <a href="http://www.next-l.jp/">Project Next-L</a> |
|
8
|
-
<%= link_to t('page.report_bugs'), "https://github.com/next-l/enju_leaf/issues" -%>
|
8
|
+
<%= link_to t('page.report_bugs'), "https://github.com/next-l/enju_leaf/issues" -%> |
|
9
|
+
<%= link_to t('page.manual'), "https://next-l.github.io/manual/" %>
|
9
10
|
<% if is_mobile_request? %>
|
10
|
-
| <%= link_to t('page.mobile_view'), url_for(:
|
11
|
+
| <%= link_to t('page.mobile_view'), url_for(mobile_view: 'true') %>
|
11
12
|
<% end %>
|
12
13
|
</div>
|
13
14
|
</div>
|
data/lib/enju_flower/version.rb
CHANGED
@@ -13,7 +13,7 @@ describe ManifestationsController do
|
|
13
13
|
end
|
14
14
|
|
15
15
|
describe "When logged in as Administrator" do
|
16
|
-
|
16
|
+
login_fixture_admin
|
17
17
|
|
18
18
|
it "assigns all manifestations as @manifestations" do
|
19
19
|
get :index
|
@@ -22,7 +22,7 @@ describe ManifestationsController do
|
|
22
22
|
end
|
23
23
|
|
24
24
|
describe "When logged in as Librarian" do
|
25
|
-
|
25
|
+
login_fixture_librarian
|
26
26
|
|
27
27
|
it "assigns all manifestations as @manifestations" do
|
28
28
|
get :index
|
@@ -31,7 +31,7 @@ describe ManifestationsController do
|
|
31
31
|
end
|
32
32
|
|
33
33
|
describe "When logged in as User" do
|
34
|
-
|
34
|
+
login_fixture_user
|
35
35
|
|
36
36
|
it "assigns all manifestations as @manifestations" do
|
37
37
|
get :index
|
@@ -51,8 +51,8 @@ describe ManifestationsController do
|
|
51
51
|
assigns(:manifestations).should_not be_nil
|
52
52
|
end
|
53
53
|
|
54
|
-
it "assigns all manifestations as @manifestations in
|
55
|
-
get :index, :format => '
|
54
|
+
it "assigns all manifestations as @manifestations in txt format without operation" do
|
55
|
+
get :index, :format => 'txt'
|
56
56
|
response.should be_success
|
57
57
|
assigns(:manifestations).should_not be_nil
|
58
58
|
response.should render_template('manifestations/index')
|
@@ -172,7 +172,7 @@ describe ManifestationsController do
|
|
172
172
|
|
173
173
|
describe "GET show" do
|
174
174
|
describe "When logged in as Administrator" do
|
175
|
-
|
175
|
+
login_fixture_admin
|
176
176
|
|
177
177
|
it "assigns the requested manifestation as @manifestation" do
|
178
178
|
get :show, :id => 1
|
@@ -181,7 +181,7 @@ describe ManifestationsController do
|
|
181
181
|
end
|
182
182
|
|
183
183
|
describe "When logged in as Librarian" do
|
184
|
-
|
184
|
+
login_fixture_librarian
|
185
185
|
|
186
186
|
it "assigns the requested manifestation as @manifestation" do
|
187
187
|
get :show, :id => 1
|
@@ -270,7 +270,7 @@ describe ManifestationsController do
|
|
270
270
|
|
271
271
|
describe "GET new" do
|
272
272
|
describe "When logged in as Administrator" do
|
273
|
-
|
273
|
+
login_fixture_admin
|
274
274
|
|
275
275
|
it "assigns the requested manifestation as @manifestation" do
|
276
276
|
get :new
|
@@ -289,7 +289,7 @@ describe ManifestationsController do
|
|
289
289
|
end
|
290
290
|
|
291
291
|
describe "When logged in as Librarian" do
|
292
|
-
|
292
|
+
login_fixture_librarian
|
293
293
|
|
294
294
|
it "assigns the requested manifestation as @manifestation" do
|
295
295
|
get :new
|
@@ -308,7 +308,7 @@ describe ManifestationsController do
|
|
308
308
|
end
|
309
309
|
|
310
310
|
describe "When logged in as User" do
|
311
|
-
|
311
|
+
login_fixture_user
|
312
312
|
|
313
313
|
it "should not assign the requested manifestation as @manifestation" do
|
314
314
|
get :new
|
@@ -328,7 +328,7 @@ describe ManifestationsController do
|
|
328
328
|
|
329
329
|
describe "GET edit" do
|
330
330
|
describe "When logged in as Administrator" do
|
331
|
-
|
331
|
+
login_fixture_admin
|
332
332
|
|
333
333
|
it "assigns the requested manifestation as @manifestation" do
|
334
334
|
manifestation = FactoryGirl.create(:manifestation)
|
@@ -338,7 +338,7 @@ describe ManifestationsController do
|
|
338
338
|
end
|
339
339
|
|
340
340
|
describe "When logged in as Librarian" do
|
341
|
-
|
341
|
+
login_fixture_librarian
|
342
342
|
|
343
343
|
it "assigns the requested manifestation as @manifestation" do
|
344
344
|
manifestation = FactoryGirl.create(:manifestation)
|
@@ -348,7 +348,7 @@ describe ManifestationsController do
|
|
348
348
|
end
|
349
349
|
|
350
350
|
describe "When logged in as User" do
|
351
|
-
|
351
|
+
login_fixture_user
|
352
352
|
|
353
353
|
it "assigns the requested manifestation as @manifestation" do
|
354
354
|
manifestation = FactoryGirl.create(:manifestation)
|
@@ -378,7 +378,7 @@ describe ManifestationsController do
|
|
378
378
|
end
|
379
379
|
|
380
380
|
describe "When logged in as Administrator" do
|
381
|
-
|
381
|
+
login_fixture_admin
|
382
382
|
|
383
383
|
describe "with valid params" do
|
384
384
|
it "assigns a newly created manifestation as @manifestation" do
|
@@ -412,7 +412,7 @@ describe ManifestationsController do
|
|
412
412
|
end
|
413
413
|
|
414
414
|
describe "When logged in as Librarian" do
|
415
|
-
|
415
|
+
login_fixture_librarian
|
416
416
|
|
417
417
|
describe "with valid params" do
|
418
418
|
it "assigns a newly created manifestation as @manifestation" do
|
@@ -440,7 +440,7 @@ describe ManifestationsController do
|
|
440
440
|
end
|
441
441
|
|
442
442
|
describe "When logged in as User" do
|
443
|
-
|
443
|
+
login_fixture_user
|
444
444
|
|
445
445
|
describe "with valid params" do
|
446
446
|
it "assigns a newly created manifestation as @manifestation" do
|
@@ -503,7 +503,7 @@ describe ManifestationsController do
|
|
503
503
|
end
|
504
504
|
|
505
505
|
describe "When logged in as Administrator" do
|
506
|
-
|
506
|
+
login_fixture_admin
|
507
507
|
|
508
508
|
describe "with valid params" do
|
509
509
|
it "updates the requested manifestation" do
|
@@ -531,7 +531,7 @@ describe ManifestationsController do
|
|
531
531
|
end
|
532
532
|
|
533
533
|
describe "When logged in as Librarian" do
|
534
|
-
|
534
|
+
login_fixture_librarian
|
535
535
|
|
536
536
|
describe "with valid params" do
|
537
537
|
it "updates the requested manifestation" do
|
@@ -559,7 +559,7 @@ describe ManifestationsController do
|
|
559
559
|
end
|
560
560
|
|
561
561
|
describe "When logged in as User" do
|
562
|
-
|
562
|
+
login_fixture_user
|
563
563
|
|
564
564
|
describe "with valid params" do
|
565
565
|
it "updates the requested manifestation" do
|
@@ -608,7 +608,7 @@ describe ManifestationsController do
|
|
608
608
|
end
|
609
609
|
|
610
610
|
describe "When logged in as Administrator" do
|
611
|
-
|
611
|
+
login_fixture_admin
|
612
612
|
|
613
613
|
it "destroys the requested manifestation" do
|
614
614
|
delete :destroy, :id => @manifestation.id
|
@@ -631,7 +631,7 @@ describe ManifestationsController do
|
|
631
631
|
end
|
632
632
|
|
633
633
|
describe "When logged in as Librarian" do
|
634
|
-
|
634
|
+
login_fixture_librarian
|
635
635
|
|
636
636
|
it "destroys the requested manifestation" do
|
637
637
|
delete :destroy, :id => @manifestation.id
|
@@ -644,7 +644,7 @@ describe ManifestationsController do
|
|
644
644
|
end
|
645
645
|
|
646
646
|
describe "When logged in as User" do
|
647
|
-
|
647
|
+
login_fixture_user
|
648
648
|
|
649
649
|
it "destroys the requested manifestation" do
|
650
650
|
delete :destroy, :id => @manifestation.id
|
Binary file
|
data/spec/dummy/db/migrate/{20111201155513_add_devise_to_users.rb → 002_devise_create_users.rb}
RENAMED
@@ -1,6 +1,6 @@
|
|
1
|
-
class
|
2
|
-
def
|
3
|
-
|
1
|
+
class DeviseCreateUsers < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table(:users) do |t|
|
4
4
|
## Database authenticatable
|
5
5
|
t.string :email, :null => false, :default => ""
|
6
6
|
t.string :encrypted_password, :null => false, :default => ""
|
@@ -19,26 +19,28 @@ class AddDeviseToUsers < ActiveRecord::Migration
|
|
19
19
|
t.string :current_sign_in_ip
|
20
20
|
t.string :last_sign_in_ip
|
21
21
|
|
22
|
-
|
23
|
-
# t.
|
24
|
-
# t.
|
25
|
-
# t.
|
22
|
+
## Confirmable
|
23
|
+
# t.string :confirmation_token
|
24
|
+
# t.datetime :confirmed_at
|
25
|
+
# t.datetime :confirmation_sent_at
|
26
|
+
# t.string :unconfirmed_email # Only if using reconfirmable
|
26
27
|
|
28
|
+
## Lockable
|
29
|
+
# t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
|
30
|
+
# t.string :unlock_token # Only if unlock strategy is :email or :both
|
31
|
+
# t.datetime :locked_at
|
27
32
|
|
28
|
-
|
29
|
-
# t.
|
33
|
+
## Token authenticatable
|
34
|
+
# t.string :authentication_token
|
35
|
+
|
36
|
+
|
37
|
+
t.timestamps
|
30
38
|
end
|
31
39
|
|
32
|
-
add_index :users, :email
|
40
|
+
add_index :users, :email, :unique => true
|
33
41
|
add_index :users, :reset_password_token, :unique => true
|
34
42
|
# add_index :users, :confirmation_token, :unique => true
|
35
43
|
# add_index :users, :unlock_token, :unique => true
|
36
44
|
# add_index :users, :authentication_token, :unique => true
|
37
45
|
end
|
38
|
-
|
39
|
-
def self.down
|
40
|
-
# By default, we don't want to make any assumption about how to roll back a migration when your
|
41
|
-
# model already existed. Please edit below which fields you would like to remove in this migration.
|
42
|
-
raise ActiveRecord::IrreversibleMigration
|
43
|
-
end
|
44
46
|
end
|
@@ -19,38 +19,26 @@ class CreateManifestations < ActiveRecord::Migration
|
|
19
19
|
t.integer :height
|
20
20
|
t.integer :width
|
21
21
|
t.integer :depth
|
22
|
-
t.string :isbn
|
23
|
-
t.string :isbn10
|
24
|
-
t.string :wrong_isbn
|
25
|
-
t.string :nbn
|
26
|
-
t.string :lccn
|
27
|
-
t.string :oclc_number
|
28
|
-
t.string :issn
|
29
22
|
t.integer :price # TODO: 通貨単位
|
30
23
|
t.text :fulltext
|
31
|
-
t.string :
|
32
|
-
t.string :
|
33
|
-
t.string :
|
24
|
+
t.string :volume_number_string
|
25
|
+
t.string :issue_number_string
|
26
|
+
t.string :serial_number_string
|
34
27
|
t.integer :edition
|
35
28
|
t.text :note
|
36
29
|
t.boolean :repository_content, :default => false, :null => false
|
37
30
|
t.integer :lock_version, :default => 0, :null => false
|
38
31
|
t.integer :required_role_id, :default => 1, :null => false
|
39
|
-
t.string :state
|
40
32
|
t.integer :required_score, :default => 0, :null => false
|
41
33
|
t.integer :frequency_id, :default => 1, :null => false
|
42
34
|
t.boolean :subscription_master, :default => false, :null => false
|
43
35
|
end
|
44
36
|
#add_index :manifestations, :carrier_type_id
|
45
37
|
#add_index :manifestations, :required_role_id
|
46
|
-
add_index :manifestations, :isbn
|
47
|
-
add_index :manifestations, :nbn
|
48
|
-
add_index :manifestations, :lccn
|
49
|
-
add_index :manifestations, :oclc_number
|
50
|
-
add_index :manifestations, :issn
|
51
38
|
add_index :manifestations, :access_address
|
52
39
|
#add_index :manifestations, :frequency_id
|
53
40
|
add_index :manifestations, :manifestation_identifier
|
54
41
|
add_index :manifestations, :updated_at
|
42
|
+
add_index :manifestations, :date_of_publication
|
55
43
|
end
|
56
44
|
end
|
@@ -1,7 +1,6 @@
|
|
1
1
|
class CreateItems < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :items do |t|
|
4
|
-
#t.integer :manifestation_id
|
5
4
|
t.string :call_number
|
6
5
|
t.string :item_identifier
|
7
6
|
t.timestamps
|
@@ -13,10 +12,8 @@ class CreateItems < ActiveRecord::Migration
|
|
13
12
|
t.integer :price
|
14
13
|
t.integer :lock_version, :default => 0, :null => false
|
15
14
|
t.integer :required_role_id, :default => 1, :null => false
|
16
|
-
t.string :state
|
17
15
|
t.integer :required_score, :default => 0, :null => false
|
18
16
|
end
|
19
|
-
#add_index :items, :manifestation_id
|
20
17
|
add_index :items, :shelf_id
|
21
18
|
add_index :items, :item_identifier
|
22
19
|
add_index :items, :required_role_id
|
@@ -10,7 +10,6 @@ class CreateReserves < ActiveRecord::Migration
|
|
10
10
|
t.datetime :canceled_at
|
11
11
|
t.datetime :expired_at
|
12
12
|
t.datetime :deleted_at
|
13
|
-
t.string :state
|
14
13
|
t.boolean :expiration_notice_to_patron, :default => false
|
15
14
|
t.boolean :expiration_notice_to_library, :default => false
|
16
15
|
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class CreateRoles < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table "roles" do |t|
|
4
|
+
t.column :name, :string, :null => false
|
5
|
+
t.column :display_name, :string
|
6
|
+
t.column :note, :text
|
7
|
+
t.column :created_at, :datetime
|
8
|
+
t.column :updated_at, :datetime
|
9
|
+
t.integer :score, :default => 0, :null => false
|
10
|
+
t.integer :position
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -1,16 +1,12 @@
|
|
1
1
|
class CreateUserGroups < ActiveRecord::Migration
|
2
|
-
def
|
2
|
+
def change
|
3
3
|
create_table :user_groups do |t|
|
4
|
-
t.string :name, :
|
5
|
-
t.text :display_name
|
4
|
+
t.string :name, :not_null => true
|
5
|
+
t.text :display_name
|
6
6
|
t.text :note
|
7
7
|
t.integer :position
|
8
8
|
t.timestamps
|
9
9
|
t.datetime :deleted_at
|
10
10
|
end
|
11
11
|
end
|
12
|
-
|
13
|
-
def self.down
|
14
|
-
drop_table :user_groups
|
15
|
-
end
|
16
12
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class CreateSubscriptions < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :subscriptions do |t|
|
4
|
+
t.text :title, :null => false
|
5
|
+
t.text :note
|
6
|
+
#t.integer :subscription_list_id, :integer
|
7
|
+
t.integer :user_id
|
8
|
+
t.integer :order_list_id
|
9
|
+
t.datetime :deleted_at
|
10
|
+
t.integer :subscribes_count, :default => 0, :null => false
|
11
|
+
|
12
|
+
t.timestamps
|
13
|
+
end
|
14
|
+
add_index :subscriptions, :user_id
|
15
|
+
add_index :subscriptions, :order_list_id
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateSubscribes < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :subscribes do |t|
|
4
|
+
t.integer :subscription_id, :null => false
|
5
|
+
t.integer :work_id, :null => false
|
6
|
+
t.datetime :start_at, :null => false
|
7
|
+
t.datetime :end_at, :null => false
|
8
|
+
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
add_index :subscribes, :subscription_id
|
12
|
+
add_index :subscribes, :work_id
|
13
|
+
end
|
14
|
+
end
|
@@ -7,7 +7,6 @@ class CreateAgentImportFiles < ActiveRecord::Migration
|
|
7
7
|
t.integer :user_id
|
8
8
|
t.text :note
|
9
9
|
t.datetime :executed_at
|
10
|
-
t.string :state
|
11
10
|
t.string :agent_import_file_name
|
12
11
|
t.string :agent_import_content_type
|
13
12
|
t.integer :agent_import_file_size
|
@@ -17,6 +16,5 @@ class CreateAgentImportFiles < ActiveRecord::Migration
|
|
17
16
|
end
|
18
17
|
add_index :agent_import_files, :parent_id
|
19
18
|
add_index :agent_import_files, :user_id
|
20
|
-
add_index :agent_import_files, :state
|
21
19
|
end
|
22
20
|
end
|
@@ -6,8 +6,7 @@ class CreateResourceImportFiles < ActiveRecord::Migration
|
|
6
6
|
t.integer :size
|
7
7
|
t.integer :user_id
|
8
8
|
t.text :note
|
9
|
-
t.datetime :
|
10
|
-
t.string :state
|
9
|
+
t.datetime :executed_at
|
11
10
|
t.string :resource_import_file_name
|
12
11
|
t.string :resource_import_content_type
|
13
12
|
t.integer :resource_import_file_size
|
@@ -17,6 +16,5 @@ class CreateResourceImportFiles < ActiveRecord::Migration
|
|
17
16
|
end
|
18
17
|
add_index :resource_import_files, :parent_id
|
19
18
|
add_index :resource_import_files, :user_id
|
20
|
-
add_index :resource_import_files, :state
|
21
19
|
end
|
22
20
|
end
|