enju_flower 0.1.0.pre15 → 0.1.0.pre16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/manifestations/_manifestation.html.erb +8 -4
- data/app/views/manifestations/_pickup.html.erb +1 -1
- data/app/views/manifestations/_show_detail_librarian.html.erb +1 -1
- data/app/views/manifestations/_show_detail_user.html.erb +2 -2
- data/app/views/manifestations/_show_holding.html.erb +6 -1
- data/app/views/manifestations/_show_reservation.html.erb +0 -2
- data/app/views/manifestations/_title.html.erb +1 -1
- data/app/views/manifestations/_title.mobile.erb +1 -1
- data/app/views/manifestations/index.html.erb +2 -2
- data/app/views/manifestations/index.sru.builder +1 -1
- data/app/views/manifestations/show.html.erb +3 -3
- data/lib/enju_flower/version.rb +1 -1
- data/spec/controllers/manifestations_controller_spec.rb +4 -4
- data/spec/dummy/app/models/user.rb +1 -0
- data/spec/dummy/config/application.rb +1 -0
- data/spec/dummy/config/initializers/inflections.rb +8 -0
- data/spec/dummy/db/migrate/035_create_reserves.rb +1 -1
- data/spec/dummy/db/migrate/20130303104849_add_state_index_to_reserve.rb +5 -0
- data/spec/dummy/db/migrate/20130303124821_add_retained_at_to_reserve.rb +5 -0
- data/spec/dummy/db/migrate/20130304015019_add_postponed_at_to_reserve.rb +5 -0
- data/spec/dummy/db/migrate/20130519065638_add_lock_version_to_reserve.rb +5 -0
- data/spec/dummy/db/migrate/20130519065837_add_lock_version_to_checkin.rb +5 -0
- data/spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140528045518_create_user_checkout_stat_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140528045600_create_manifestation_checkout_stat_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140528045617_create_manifestation_reserve_stat_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140529014410_create_item_transitions.rb +14 -0
- data/spec/dummy/db/schema.rb +82 -5
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/solr/default/data/index/_cx.fdt +0 -0
- data/spec/dummy/solr/default/data/index/{_96.fnm → _cx.fnm} +0 -0
- data/spec/dummy/solr/default/data/index/{_96.si → _cx.si} +0 -0
- data/spec/dummy/solr/default/data/index/{_96_Lucene41_0.doc → _cx_Lucene41_0.doc} +0 -0
- data/spec/dummy/solr/default/data/index/{_96_Lucene41_0.pos → _cx_Lucene41_0.pos} +0 -0
- data/spec/dummy/solr/default/data/index/{_96_Lucene41_0.tim → _cx_Lucene41_0.tim} +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/{_97.fnm → _cy.fnm} +0 -0
- data/spec/dummy/solr/default/data/index/{_97.si → _cy.si} +0 -0
- data/spec/dummy/solr/default/data/index/{_97_Lucene41_0.doc → _cy_Lucene41_0.doc} +0 -0
- data/spec/dummy/solr/default/data/index/{_97_Lucene41_0.pos → _cy_Lucene41_0.pos} +0 -0
- data/spec/dummy/solr/default/data/index/{_97_Lucene41_0.tim → _cy_Lucene41_0.tim} +0 -0
- data/spec/dummy/solr/default/data/index/_cy_Lucene41_0.tip +0 -0
- data/spec/dummy/solr/default/data/index/_cz.fdt +0 -0
- data/spec/dummy/solr/default/data/index/{_98.fnm → _cz.fnm} +0 -0
- data/spec/dummy/solr/default/data/index/_cz.nvd +0 -0
- data/spec/dummy/solr/default/data/index/{_98.si → _cz.si} +0 -0
- data/spec/dummy/solr/default/data/index/_cz_Lucene41_0.doc +0 -0
- data/spec/dummy/solr/default/data/index/_cz_Lucene41_0.pos +0 -0
- data/spec/dummy/solr/default/data/index/_cz_Lucene41_0.tim +0 -0
- data/spec/dummy/solr/default/data/index/_cz_Lucene41_0.tip +0 -0
- data/spec/dummy/solr/default/data/index/segments.gen +0 -0
- data/spec/dummy/solr/default/data/index/segments_gj +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000591 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000592 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000593 +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/spec_helper.rb +3 -0
- metadata +126 -80
- data/spec/dummy/app/models/local_agent.rb +0 -27
- data/spec/dummy/solr/default/data/index/_96.fdt +0 -0
- data/spec/dummy/solr/default/data/index/_96_Lucene41_0.tip +0 -0
- data/spec/dummy/solr/default/data/index/_97.fdt +0 -0
- data/spec/dummy/solr/default/data/index/_97_Lucene41_0.tip +0 -0
- data/spec/dummy/solr/default/data/index/_98.fdt +0 -0
- data/spec/dummy/solr/default/data/index/_98.nvd +0 -0
- data/spec/dummy/solr/default/data/index/_98_Lucene41_0.doc +0 -0
- data/spec/dummy/solr/default/data/index/_98_Lucene41_0.pos +0 -0
- data/spec/dummy/solr/default/data/index/_98_Lucene41_0.tim +0 -0
- data/spec/dummy/solr/default/data/index/_98_Lucene41_0.tip +0 -0
- data/spec/dummy/solr/default/data/index/segments_bn +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000415 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000416 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000417 +0 -0
- data/vendor/assets/javascripts/jquery.mobile-1.3.1.js +0 -11191
- data/vendor/assets/stylesheets/jquery.mobile-1.3.1.css +0 -3366
- /data/spec/dummy/solr/default/data/index/{_96.fdx → _cx.fdx} +0 -0
- /data/spec/dummy/solr/default/data/index/{_96.nvd → _cx.nvd} +0 -0
- /data/spec/dummy/solr/default/data/index/{_96.nvm → _cx.nvm} +0 -0
- /data/spec/dummy/solr/default/data/index/{_97.fdx → _cy.fdx} +0 -0
- /data/spec/dummy/solr/default/data/index/{_97.nvd → _cy.nvd} +0 -0
- /data/spec/dummy/solr/default/data/index/{_97.nvm → _cy.nvm} +0 -0
- /data/spec/dummy/solr/default/data/index/{_98.fdx → _cz.fdx} +0 -0
- /data/spec/dummy/solr/default/data/index/{_98.nvm → _cz.nvm} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bde6cb170d186ff7704b504b226d11add963357
|
4
|
+
data.tar.gz: a3d1d54f28bb280616c7a293b366c3dc66b43209
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f79043997dcb5b7fd870b0c212c7cb3cd03e01885c141feeec76d8a2d2a16e0ae07d8d1dda311c9a2956d694bbd0a06310fe6479c0ec87656fb216fbddb7274
|
7
|
+
data.tar.gz: 09fc6adab782515eea1e76c5e8dfbbb2036eb82cfe880a1443fb3b298f2bf6aeee82cf80ae8247780b5d07bcd4ddb014f9810b9bad9e189148e747db83eb6ebd
|
@@ -1,7 +1,6 @@
|
|
1
1
|
<tr class="line<%= cycle("0", "1") -%>">
|
2
2
|
<td style="width: 30px"><%= @manifestations.offset_value + 1 + manifestation_counter -%></td>
|
3
3
|
<td style="480px">
|
4
|
-
<% cache([:manifestation => manifestation.id, :fragment => 'manifestation_html', :role => current_user_role_name, :locale => @locale]) do %>
|
5
4
|
<% if manifestation.root_series_statement %>
|
6
5
|
<%= render 'manifestations/show_series_index', :manifestation => manifestation, :series_statement => manifestation.root_series_statement -%>
|
7
6
|
<% else %>
|
@@ -9,8 +8,14 @@
|
|
9
8
|
<div class="access_address">
|
10
9
|
<%= link_to manifestation.access_address, manifestation.access_address if manifestation.access_address.present? -%>
|
11
10
|
</div>
|
12
|
-
|
13
|
-
|
11
|
+
<% if current_user.try(:has_role?, 'Librarian') %>
|
12
|
+
<%- unless manifestation.items.on_shelf.empty? -%>
|
13
|
+
(<%= link_to_function t('page.holding'), "$('#holding_#{manifestation.id}').toggle()" -%>)
|
14
|
+
<% end %>
|
15
|
+
<% else %>
|
16
|
+
<%- unless manifestation.items.for_checkout.on_shelf.empty? -%>
|
17
|
+
(<%= link_to_function t('page.holding'), "$('#holding_#{manifestation.id}').toggle()" -%>)
|
18
|
+
<%- end -%>
|
14
19
|
<%- end -%>
|
15
20
|
<% if defined?(EnjuBookmark) %>
|
16
21
|
<%- if manifestation.tags.first -%>
|
@@ -20,7 +25,6 @@
|
|
20
25
|
<% end %>
|
21
26
|
<% end %>
|
22
27
|
<%= render 'manifestations/holding', :manifestation => manifestation -%>
|
23
|
-
<% end %>
|
24
28
|
</td>
|
25
29
|
<% if signed_in? %>
|
26
30
|
<td id="edit_icons">
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% if manifestation %>
|
2
|
-
<% cache(
|
2
|
+
<% cache(:manifestation => manifestation.id, :fragment => 'pickup_html', :role => current_user_role_name, :locale => @locale) do %>
|
3
3
|
<div id="pickup_book_jacket">
|
4
4
|
<%= book_jacket(manifestation) -%>
|
5
5
|
</div>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<div id="tabs">
|
2
2
|
<%= render 'manifestations/tab_menu', :manifestation => manifestation %>
|
3
3
|
<div id="detail">
|
4
|
-
<% cache(
|
4
|
+
<% cache(:manifestation => manifestation.id, :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) -%>
|
7
7
|
<% if manifestation.title_alternative? %>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<div id="tabs">
|
2
2
|
<%= render 'manifestations/tab_menu', :manifestation => manifestation %>
|
3
3
|
<div id="detail">
|
4
|
-
<% cache(
|
4
|
+
<% cache(:manifestation => manifestation.id, :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) -%>
|
7
7
|
<% if manifestation.title_alternative? %>
|
@@ -103,7 +103,7 @@
|
|
103
103
|
<% end %>
|
104
104
|
</table>
|
105
105
|
<% end %>
|
106
|
-
<%- if manifestation.items.on_shelf.exists? -%>
|
106
|
+
<%- if manifestation.items.for_checkout.on_shelf.exists? -%>
|
107
107
|
<%= render 'manifestations/show_holding', :manifestation => manifestation -%>
|
108
108
|
<%- end -%>
|
109
109
|
</div>
|
@@ -9,7 +9,12 @@
|
|
9
9
|
<th><%= t('activerecord.models.circulation_status') -%></th>
|
10
10
|
<% end %>
|
11
11
|
</tr>
|
12
|
-
|
12
|
+
<% if current_user.try(:has_role?, 'Librarian') %>
|
13
|
+
<% items = manifestation.items.on_shelf %>
|
14
|
+
<% else %>
|
15
|
+
<% items = manifestation.items.for_checkout.on_shelf %>
|
16
|
+
<% end %>
|
17
|
+
<%- items.each do |item| -%>
|
13
18
|
<tr>
|
14
19
|
<td>
|
15
20
|
<%- if item.item_identifier? -%>
|
@@ -9,7 +9,6 @@
|
|
9
9
|
<% end %>
|
10
10
|
<br />
|
11
11
|
<% end %>
|
12
|
-
<% cache([current_user_role_name, @locale, manifestation]) do %>
|
13
12
|
<%- if can? :update, manifestation -%>
|
14
13
|
<% unless params[:mode] == 'add' %>
|
15
14
|
<%= link_to image_tag('icons/book_edit.png', :size => '16x16', :alt => t('page.edit')), edit_manifestation_path(manifestation) -%>
|
@@ -24,4 +23,3 @@
|
|
24
23
|
<% end %>
|
25
24
|
<%- end -%>
|
26
25
|
<% end %>
|
27
|
-
<% end %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<% cache(
|
1
|
+
<% cache(:manifestation => manifestation.id, :fragment => 'title_html', :role => current_user_role_name, :locale => @locale) do %>
|
2
2
|
<h2 class="resource_title">
|
3
3
|
[M]
|
4
4
|
<%= link_to title_with_volume_number(manifestation), manifestation, :itemprop => 'name' -%>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<% cache(
|
1
|
+
<% cache(:manifestation => manifestation.id, :fragment => 'title_mobile', :role => current_user_role_name, :locale => @locale) do %>
|
2
2
|
<h2 class="resource_title">
|
3
3
|
[M]
|
4
4
|
<%= link_to title_with_volume_number(manifestation), manifestation, :itemprop => 'name' -%>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div id="content_detail" class="ui-corner-all">
|
1
|
+
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
2
|
<h1 class="title"><%= t('page.search_resource', :model => t('page.resource')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<%= render 'manifestations/title', :manifestation => @manifestation if @manifestation -%>
|
@@ -74,7 +74,7 @@
|
|
74
74
|
</div>
|
75
75
|
</div>
|
76
76
|
|
77
|
-
<div id="submenu" class="ui-corner-all">
|
77
|
+
<div id="submenu" class="ui-corner-all ui-widget-content">
|
78
78
|
<% if @parent and can?(:update, @parent) %>
|
79
79
|
<%= render 'submenu_parent' %>
|
80
80
|
<% end %>
|
@@ -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 => manifestation.id, :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,4 +1,4 @@
|
|
1
|
-
<div id="content_detail" class="ui-corner-all" itemscope="itemscope" itemtype="http://schema.org/Book">
|
1
|
+
<div id="content_detail" class="ui-corner-all ui-widget-content" itemscope="itemscope" itemtype="http://schema.org/Book">
|
2
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>
|
@@ -16,7 +16,7 @@
|
|
16
16
|
</div>
|
17
17
|
</div>
|
18
18
|
|
19
|
-
<div id="submenu" class="ui-corner-all">
|
19
|
+
<div id="submenu" class="ui-corner-all ui-widget-content">
|
20
20
|
<%= render 'manifestations/book_jacket', :manifestation => @manifestation -%>
|
21
21
|
<ul>
|
22
22
|
<%- if @manifestation.picture_files.exists? -%>
|
@@ -34,7 +34,7 @@
|
|
34
34
|
</script>
|
35
35
|
<%- if user_signed_in? -%>
|
36
36
|
<div id="call_number_content">
|
37
|
-
<%- @manifestation.items.on_shelf.each do |item| -%>
|
37
|
+
<%- @manifestation.items.for_checkout.on_shelf.each do |item| -%>
|
38
38
|
<%- if item.hold?(current_user.library) -%>
|
39
39
|
<%= call_number_label(item) -%>
|
40
40
|
<%- end -%>
|
data/lib/enju_flower/version.rb
CHANGED
@@ -139,14 +139,14 @@ describe ManifestationsController do
|
|
139
139
|
it "should get index with pub_date_from" do
|
140
140
|
get :index, :query => '2005', :pub_date_from => '2000'
|
141
141
|
response.should be_success
|
142
|
-
assigns(:manifestations).should
|
142
|
+
assigns(:manifestations).should be_truthy
|
143
143
|
assigns(:query).should eq '2005 date_of_publication_d:[1999-12-31T15:00:00Z TO *]'
|
144
144
|
end
|
145
145
|
|
146
146
|
it "should get index with pub_date_to" do
|
147
147
|
get :index, :query => '2005', :pub_date_to => '2000'
|
148
148
|
response.should be_success
|
149
|
-
assigns(:manifestations).should
|
149
|
+
assigns(:manifestations).should be_truthy
|
150
150
|
assigns(:query).should eq '2005 date_of_publication_d:[* TO 2000-12-31T14:59:59Z]'
|
151
151
|
end
|
152
152
|
|
@@ -389,7 +389,7 @@ describe ManifestationsController do
|
|
389
389
|
it "assigns a series_statement" do
|
390
390
|
post :create, :manifestation => @attrs.merge(:series_statements_attributes => {[0] => {:original_title => SeriesStatement.find(1).original_title}})
|
391
391
|
assigns(:manifestation).reload
|
392
|
-
assigns(:manifestation).series_statements.pluck(:original_title).include?(series_statements(:one).original_title).should
|
392
|
+
assigns(:manifestation).series_statements.pluck(:original_title).include?(series_statements(:one).original_title).should be_truthy
|
393
393
|
end
|
394
394
|
|
395
395
|
it "redirects to the created manifestation" do
|
@@ -513,7 +513,7 @@ describe ManifestationsController do
|
|
513
513
|
it "assigns a series_statement" do
|
514
514
|
put :update, :id => @manifestation.id, :manifestation => @attrs.merge(:series_statements_attributes => {[0] => {:original_title => series_statements(:two).original_title, "_destroy"=>"false"}})
|
515
515
|
assigns(:manifestation).reload
|
516
|
-
assigns(:manifestation).series_statements.pluck(:original_title).include?(series_statements(:two).original_title).should
|
516
|
+
assigns(:manifestation).series_statements.pluck(:original_title).include?(series_statements(:two).original_title).should be_truthy
|
517
517
|
end
|
518
518
|
|
519
519
|
it "assigns the requested manifestation as @manifestation" do
|
@@ -8,3 +8,11 @@
|
|
8
8
|
# inflect.irregular 'person', 'people'
|
9
9
|
# inflect.uncountable %w( fish sheep )
|
10
10
|
# end
|
11
|
+
#
|
12
|
+
# These inflection rules are supported but not enabled by default:
|
13
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
14
|
+
# inflect.acronym 'RESTful'
|
15
|
+
# end
|
16
|
+
ActiveSupport::Inflector.inflections do |inflect|
|
17
|
+
inflect.irregular 'reserve', 'reserves'
|
18
|
+
end
|
@@ -11,7 +11,7 @@ class CreateReserves < ActiveRecord::Migration
|
|
11
11
|
t.datetime :expired_at
|
12
12
|
t.datetime :deleted_at
|
13
13
|
t.string :state
|
14
|
-
t.boolean :
|
14
|
+
t.boolean :expiration_notice_to_patron, :default => false
|
15
15
|
t.boolean :expiration_notice_to_library, :default => false
|
16
16
|
end
|
17
17
|
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateReserveTransitions < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :reserve_transitions do |t|
|
4
|
+
t.string :to_state
|
5
|
+
t.text :metadata, default: "{}"
|
6
|
+
t.integer :sort_key
|
7
|
+
t.integer :reserve_id
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
|
11
|
+
add_index :reserve_transitions, :reserve_id
|
12
|
+
add_index :reserve_transitions, [:sort_key, :reserve_id], unique: true
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateUserCheckoutStatTransitions < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :user_checkout_stat_transitions do |t|
|
4
|
+
t.string :to_state
|
5
|
+
t.text :metadata, default: "{}"
|
6
|
+
t.integer :sort_key
|
7
|
+
t.integer :user_checkout_stat_id
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
|
11
|
+
add_index :user_checkout_stat_transitions, :user_checkout_stat_id
|
12
|
+
add_index :user_checkout_stat_transitions, [:sort_key, :user_checkout_stat_id], unique: true, name: "index_user_checkout_stat_transitions_on_sort_key_and_stat_id"
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateUserReserveStatTransitions < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :user_reserve_stat_transitions do |t|
|
4
|
+
t.string :to_state
|
5
|
+
t.text :metadata, default: "{}"
|
6
|
+
t.integer :sort_key
|
7
|
+
t.integer :user_reserve_stat_id
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
|
11
|
+
add_index :user_reserve_stat_transitions, :user_reserve_stat_id
|
12
|
+
add_index :user_reserve_stat_transitions, [:sort_key, :user_reserve_stat_id], unique: true, name: "index_user_reserve_stat_transitions_on_sort_key_and_stat_id"
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateManifestationCheckoutStatTransitions < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :manifestation_checkout_stat_transitions do |t|
|
4
|
+
t.string :to_state
|
5
|
+
t.text :metadata, default: "{}"
|
6
|
+
t.integer :sort_key
|
7
|
+
t.integer :manifestation_checkout_stat_id
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
|
11
|
+
add_index :manifestation_checkout_stat_transitions, :manifestation_checkout_stat_id, name: "index_manifestation_checkout_stat_transitions_on_stat_id"
|
12
|
+
add_index :manifestation_checkout_stat_transitions, [:sort_key, :manifestation_checkout_stat_id], unique: true, name: "index_manifestation_checkout_stat_transitions_on_transition"
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateManifestationReserveStatTransitions < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :manifestation_reserve_stat_transitions do |t|
|
4
|
+
t.string :to_state
|
5
|
+
t.text :metadata, default: "{}"
|
6
|
+
t.integer :sort_key
|
7
|
+
t.integer :manifestation_reserve_stat_id
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
|
11
|
+
add_index :manifestation_reserve_stat_transitions, :manifestation_reserve_stat_id, name: "index_manifestation_reserve_stat_transitions_on_stat_id"
|
12
|
+
add_index :manifestation_reserve_stat_transitions, [:sort_key, :manifestation_reserve_stat_id], unique: true, name: "index_manifestation_reserve_stat_transitions_on_transition"
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateItemTransitions < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :item_transitions do |t|
|
4
|
+
t.string :to_state
|
5
|
+
t.text :metadata, default: "{}"
|
6
|
+
t.integer :sort_key
|
7
|
+
t.integer :item_id
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
|
11
|
+
add_index :item_transitions, :item_id
|
12
|
+
add_index :item_transitions, [:sort_key, :item_id], unique: true
|
13
|
+
end
|
14
|
+
end
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended to check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(:version =>
|
14
|
+
ActiveRecord::Schema.define(:version => 20140529014410) do
|
15
15
|
|
16
16
|
create_table "agent_import_files", :force => true do |t|
|
17
17
|
t.integer "parent_id"
|
@@ -238,11 +238,12 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
238
238
|
add_index "checked_items", ["item_id"], :name => "index_checked_items_on_item_id"
|
239
239
|
|
240
240
|
create_table "checkins", :force => true do |t|
|
241
|
-
t.integer "item_id",
|
241
|
+
t.integer "item_id", :null => false
|
242
242
|
t.integer "librarian_id"
|
243
243
|
t.integer "basket_id"
|
244
|
-
t.datetime "created_at",
|
245
|
-
t.datetime "updated_at",
|
244
|
+
t.datetime "created_at", :null => false
|
245
|
+
t.datetime "updated_at", :null => false
|
246
|
+
t.integer "lock_version", :default => 0, :null => false
|
246
247
|
end
|
247
248
|
|
248
249
|
add_index "checkins", ["basket_id"], :name => "index_checkins_on_basket_id"
|
@@ -550,6 +551,18 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
550
551
|
add_index "item_has_use_restrictions", ["item_id"], :name => "index_item_has_use_restrictions_on_item_id"
|
551
552
|
add_index "item_has_use_restrictions", ["use_restriction_id"], :name => "index_item_has_use_restrictions_on_use_restriction_id"
|
552
553
|
|
554
|
+
create_table "item_transitions", :force => true do |t|
|
555
|
+
t.string "to_state"
|
556
|
+
t.text "metadata", :default => "{}"
|
557
|
+
t.integer "sort_key"
|
558
|
+
t.integer "item_id"
|
559
|
+
t.datetime "created_at", :null => false
|
560
|
+
t.datetime "updated_at", :null => false
|
561
|
+
end
|
562
|
+
|
563
|
+
add_index "item_transitions", ["item_id"], :name => "index_item_transitions_on_item_id"
|
564
|
+
add_index "item_transitions", ["sort_key", "item_id"], :name => "index_item_transitions_on_sort_key_and_item_id", :unique => true
|
565
|
+
|
553
566
|
create_table "items", :force => true do |t|
|
554
567
|
t.string "call_number"
|
555
568
|
t.string "item_identifier"
|
@@ -665,6 +678,18 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
665
678
|
t.datetime "updated_at", :null => false
|
666
679
|
end
|
667
680
|
|
681
|
+
create_table "manifestation_checkout_stat_transitions", :force => true do |t|
|
682
|
+
t.string "to_state"
|
683
|
+
t.text "metadata", :default => "{}"
|
684
|
+
t.integer "sort_key"
|
685
|
+
t.integer "manifestation_checkout_stat_id"
|
686
|
+
t.datetime "created_at", :null => false
|
687
|
+
t.datetime "updated_at", :null => false
|
688
|
+
end
|
689
|
+
|
690
|
+
add_index "manifestation_checkout_stat_transitions", ["manifestation_checkout_stat_id"], :name => "index_manifestation_checkout_stat_transitions_on_stat_id"
|
691
|
+
add_index "manifestation_checkout_stat_transitions", ["sort_key", "manifestation_checkout_stat_id"], :name => "index_manifestation_checkout_stat_transitions_on_transition", :unique => true
|
692
|
+
|
668
693
|
create_table "manifestation_checkout_stats", :force => true do |t|
|
669
694
|
t.datetime "start_date"
|
670
695
|
t.datetime "end_date"
|
@@ -699,6 +724,18 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
699
724
|
add_index "manifestation_relationships", ["child_id"], :name => "index_manifestation_relationships_on_child_id"
|
700
725
|
add_index "manifestation_relationships", ["parent_id"], :name => "index_manifestation_relationships_on_parent_id"
|
701
726
|
|
727
|
+
create_table "manifestation_reserve_stat_transitions", :force => true do |t|
|
728
|
+
t.string "to_state"
|
729
|
+
t.text "metadata", :default => "{}"
|
730
|
+
t.integer "sort_key"
|
731
|
+
t.integer "manifestation_reserve_stat_id"
|
732
|
+
t.datetime "created_at", :null => false
|
733
|
+
t.datetime "updated_at", :null => false
|
734
|
+
end
|
735
|
+
|
736
|
+
add_index "manifestation_reserve_stat_transitions", ["manifestation_reserve_stat_id"], :name => "index_manifestation_reserve_stat_transitions_on_stat_id"
|
737
|
+
add_index "manifestation_reserve_stat_transitions", ["sort_key", "manifestation_reserve_stat_id"], :name => "index_manifestation_reserve_stat_transitions_on_transition", :unique => true
|
738
|
+
|
702
739
|
create_table "manifestation_reserve_stats", :force => true do |t|
|
703
740
|
t.datetime "start_date"
|
704
741
|
t.datetime "end_date"
|
@@ -970,6 +1007,18 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
970
1007
|
add_index "reserve_stat_has_users", ["user_id"], :name => "index_reserve_stat_has_users_on_user_id"
|
971
1008
|
add_index "reserve_stat_has_users", ["user_reserve_stat_id"], :name => "index_reserve_stat_has_users_on_user_reserve_stat_id"
|
972
1009
|
|
1010
|
+
create_table "reserve_transitions", :force => true do |t|
|
1011
|
+
t.string "to_state"
|
1012
|
+
t.text "metadata", :default => "{}"
|
1013
|
+
t.integer "sort_key"
|
1014
|
+
t.integer "reserve_id"
|
1015
|
+
t.datetime "created_at", :null => false
|
1016
|
+
t.datetime "updated_at", :null => false
|
1017
|
+
end
|
1018
|
+
|
1019
|
+
add_index "reserve_transitions", ["reserve_id"], :name => "index_reserve_transitions_on_reserve_id"
|
1020
|
+
add_index "reserve_transitions", ["sort_key", "reserve_id"], :name => "index_reserve_transitions_on_sort_key_and_reserve_id", :unique => true
|
1021
|
+
|
973
1022
|
create_table "reserves", :force => true do |t|
|
974
1023
|
t.integer "user_id", :null => false
|
975
1024
|
t.integer "manifestation_id", :null => false
|
@@ -982,13 +1031,17 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
982
1031
|
t.datetime "expired_at"
|
983
1032
|
t.datetime "deleted_at"
|
984
1033
|
t.string "state"
|
985
|
-
t.boolean "
|
1034
|
+
t.boolean "expiration_notice_to_patron", :default => false
|
986
1035
|
t.boolean "expiration_notice_to_library", :default => false
|
1036
|
+
t.datetime "retained_at"
|
1037
|
+
t.datetime "postponed_at"
|
1038
|
+
t.integer "lock_version", :default => 0, :null => false
|
987
1039
|
end
|
988
1040
|
|
989
1041
|
add_index "reserves", ["item_id"], :name => "index_reserves_on_item_id"
|
990
1042
|
add_index "reserves", ["manifestation_id"], :name => "index_reserves_on_manifestation_id"
|
991
1043
|
add_index "reserves", ["request_status_type_id"], :name => "index_reserves_on_request_status_type_id"
|
1044
|
+
add_index "reserves", ["state"], :name => "index_reserves_on_state"
|
992
1045
|
add_index "reserves", ["user_id"], :name => "index_reserves_on_user_id"
|
993
1046
|
|
994
1047
|
create_table "resource_import_files", :force => true do |t|
|
@@ -1140,6 +1193,18 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
1140
1193
|
t.datetime "updated_at", :null => false
|
1141
1194
|
end
|
1142
1195
|
|
1196
|
+
create_table "user_checkout_stat_transitions", :force => true do |t|
|
1197
|
+
t.string "to_state"
|
1198
|
+
t.text "metadata", :default => "{}"
|
1199
|
+
t.integer "sort_key"
|
1200
|
+
t.integer "user_checkout_stat_id"
|
1201
|
+
t.datetime "created_at", :null => false
|
1202
|
+
t.datetime "updated_at", :null => false
|
1203
|
+
end
|
1204
|
+
|
1205
|
+
add_index "user_checkout_stat_transitions", ["sort_key", "user_checkout_stat_id"], :name => "index_user_checkout_stat_transitions_on_sort_key_and_stat_id", :unique => true
|
1206
|
+
add_index "user_checkout_stat_transitions", ["user_checkout_stat_id"], :name => "index_user_checkout_stat_transitions_on_user_checkout_stat_id"
|
1207
|
+
|
1143
1208
|
create_table "user_checkout_stats", :force => true do |t|
|
1144
1209
|
t.datetime "start_date"
|
1145
1210
|
t.datetime "end_date"
|
@@ -1196,6 +1261,18 @@ ActiveRecord::Schema.define(:version => 20130509185724) do
|
|
1196
1261
|
t.datetime "updated_at", :null => false
|
1197
1262
|
end
|
1198
1263
|
|
1264
|
+
create_table "user_reserve_stat_transitions", :force => true do |t|
|
1265
|
+
t.string "to_state"
|
1266
|
+
t.text "metadata", :default => "{}"
|
1267
|
+
t.integer "sort_key"
|
1268
|
+
t.integer "user_reserve_stat_id"
|
1269
|
+
t.datetime "created_at", :null => false
|
1270
|
+
t.datetime "updated_at", :null => false
|
1271
|
+
end
|
1272
|
+
|
1273
|
+
add_index "user_reserve_stat_transitions", ["sort_key", "user_reserve_stat_id"], :name => "index_user_reserve_stat_transitions_on_sort_key_and_stat_id", :unique => true
|
1274
|
+
add_index "user_reserve_stat_transitions", ["user_reserve_stat_id"], :name => "index_user_reserve_stat_transitions_on_user_reserve_stat_id"
|
1275
|
+
|
1199
1276
|
create_table "user_reserve_stats", :force => true do |t|
|
1200
1277
|
t.datetime "start_date"
|
1201
1278
|
t.datetime "end_date"
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|