enju_biblio 0.1.0.pre34 → 0.1.0.pre35
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/manifestations_controller.rb +29 -14
- data/app/models/manifestation.rb +30 -17
- data/app/models/page_sweeper.rb +1 -1
- data/app/models/series_statement.rb +3 -17
- data/app/views/manifestations/_form.html.erb +14 -3
- data/app/views/manifestations/_index_form_parent.html.erb +21 -0
- data/app/views/manifestations/_manifestation.html.erb +12 -12
- data/app/views/manifestations/_show_detail_librarian.html.erb +5 -1
- data/app/views/manifestations/_show_parent.html.erb +26 -0
- data/app/views/manifestations/_show_series_index.html.erb +1 -1
- data/app/views/manifestations/_show_series_statement.html.erb +2 -2
- data/app/views/manifestations/_submenu_parent.html.erb +8 -0
- data/app/views/manifestations/index.html.erb +6 -6
- data/app/views/series_statements/index.html.erb +1 -5
- data/config/locales/translation_en.yml +3 -0
- data/config/locales/translation_ja.yml +3 -0
- data/db/migrate/20130429020822_add_root_manifestation_id_to_series_statement.rb +6 -0
- data/lib/enju_biblio/version.rb +1 -1
- data/spec/cassette_library/ImportRequest/import/should_import_bibliographic_record.yml +44 -50
- data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Administrator/with_isbn_which_is_already_imported/redirects_to_the_created_import_request.yml +44 -50
- data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Administrator/with_valid_params/assigns_a_newly_created_import_request_as_import_request.yml +43 -49
- data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Administrator/with_valid_params/redirects_to_the_created_import_request.yml +43 -49
- data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Librarian/with_valid_params/assigns_a_newly_created_import_request_as_import_request.yml +43 -49
- data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Librarian/with_valid_params/redirects_to_the_created_import_request.yml +43 -49
- data/spec/cassette_library/Manifestation/should_import_isbn.yml +3643 -0
- data/spec/dummy/app/models/ability.rb +4 -8
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +3 -12
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/solr/data/test/index/segments.gen +0 -0
- data/spec/dummy/solr/data/test/index/segments_iwe +0 -0
- data/spec/dummy/tmp/cache/4AD/470/country_all +0 -0
- data/spec/fixtures/manifestations.yml +11 -9
- data/spec/fixtures/series_statements.yml +15 -2
- data/spec/models/manifestation_spec.rb +3 -5
- data/spec/models/series_statement_spec.rb +1 -3
- metadata +10 -30
- data/app/controllers/series_has_manifestations_controller.rb +0 -101
- data/app/models/series_has_manifestation.rb +0 -35
- data/app/views/manifestations/_serial_form.html.erb +0 -14
- data/app/views/manifestations/_submenu_series_statement.html.erb +0 -9
- data/app/views/series_has_manifestations/_form.html.erb +0 -27
- data/app/views/series_has_manifestations/edit.html.erb +0 -15
- data/app/views/series_has_manifestations/index.html.erb +0 -34
- data/app/views/series_has_manifestations/new.html.erb +0 -14
- data/app/views/series_has_manifestations/show.html.erb +0 -23
- data/db/migrate/20110820131417_create_series_has_manifestations.rb +0 -13
- data/spec/controllers/series_has_manifestations_controller_spec.rb +0 -443
- data/spec/dummy/solr/data/test/index/segments_gs2 +0 -0
- data/spec/fixtures/series_has_manifestations.yml +0 -35
- data/spec/models/series_has_manifestation_spec.rb +0 -21
- data/spec/routing/series_has_manifestations_routing_spec.rb +0 -35
- data/spec/views/series_has_manifestations/edit.html.erb_spec.rb +0 -21
- data/spec/views/series_has_manifestations/index.html.erb_spec.rb +0 -31
- data/spec/views/series_has_manifestations/new.html.erb_spec.rb +0 -21
- data/spec/views/series_has_manifestations/show.html.erb_spec.rb +0 -21
@@ -37,8 +37,7 @@
|
|
37
37
|
RealizeType,
|
38
38
|
ResourceImportFile,
|
39
39
|
SeriesStatement,
|
40
|
-
SeriesStatementRelationship
|
41
|
-
SeriesHasManifestation
|
40
|
+
SeriesStatementRelationship
|
42
41
|
]
|
43
42
|
can :update, [
|
44
43
|
ContentType,
|
@@ -97,8 +96,7 @@
|
|
97
96
|
Realize,
|
98
97
|
ResourceImportFile,
|
99
98
|
SeriesStatement,
|
100
|
-
SeriesStatementRelationship
|
101
|
-
SeriesHasManifestation
|
99
|
+
SeriesStatementRelationship
|
102
100
|
]
|
103
101
|
can :read, [
|
104
102
|
CarrierType,
|
@@ -165,8 +163,7 @@
|
|
165
163
|
PatronRelationshipType,
|
166
164
|
Produce,
|
167
165
|
Realize,
|
168
|
-
SeriesStatement
|
169
|
-
SeriesHasManifestation
|
166
|
+
SeriesStatement
|
170
167
|
]
|
171
168
|
else
|
172
169
|
can :index, Manifestation
|
@@ -198,8 +195,7 @@
|
|
198
195
|
PictureFile,
|
199
196
|
Produce,
|
200
197
|
Realize,
|
201
|
-
SeriesStatement
|
202
|
-
SeriesHasManifestation
|
198
|
+
SeriesStatement
|
203
199
|
]
|
204
200
|
end
|
205
201
|
end
|
Binary file
|
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 => 20130429020822) do
|
15
15
|
|
16
16
|
create_table "baskets", :force => true do |t|
|
17
17
|
t.integer "user_id"
|
@@ -1030,17 +1030,6 @@ ActiveRecord::Schema.define(:version => 20130421164124) do
|
|
1030
1030
|
t.datetime "updated_at", :null => false
|
1031
1031
|
end
|
1032
1032
|
|
1033
|
-
create_table "series_has_manifestations", :force => true do |t|
|
1034
|
-
t.integer "series_statement_id"
|
1035
|
-
t.integer "manifestation_id"
|
1036
|
-
t.integer "position"
|
1037
|
-
t.datetime "created_at", :null => false
|
1038
|
-
t.datetime "updated_at", :null => false
|
1039
|
-
end
|
1040
|
-
|
1041
|
-
add_index "series_has_manifestations", ["manifestation_id"], :name => "index_series_has_manifestations_on_manifestation_id"
|
1042
|
-
add_index "series_has_manifestations", ["series_statement_id"], :name => "index_series_has_manifestations_on_series_statement_id"
|
1043
|
-
|
1044
1033
|
create_table "series_statement_merge_lists", :force => true do |t|
|
1045
1034
|
t.string "title"
|
1046
1035
|
t.datetime "created_at", :null => false
|
@@ -1083,9 +1072,11 @@ ActiveRecord::Schema.define(:version => 20130421164124) do
|
|
1083
1072
|
t.text "volume_number_string"
|
1084
1073
|
t.text "volume_number_transcription_string"
|
1085
1074
|
t.boolean "series_master"
|
1075
|
+
t.integer "root_manifestation_id"
|
1086
1076
|
end
|
1087
1077
|
|
1088
1078
|
add_index "series_statements", ["manifestation_id"], :name => "index_series_statements_on_manifestation_id"
|
1079
|
+
add_index "series_statements", ["root_manifestation_id"], :name => "index_series_statements_on_root_manifestation_id"
|
1089
1080
|
add_index "series_statements", ["series_statement_identifier"], :name => "index_series_statements_on_series_statement_identifier"
|
1090
1081
|
|
1091
1082
|
create_table "shelves", :force => true do |t|
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1681,7 +1681,7 @@ manifestation_00198:
|
|
1681
1681
|
manifestation_00201:
|
1682
1682
|
carrier_type_id: 1
|
1683
1683
|
language_id: 1
|
1684
|
-
isbn:
|
1684
|
+
isbn:
|
1685
1685
|
updated_at: 2010-03-01 16:14:18 +09:00
|
1686
1686
|
original_title: "テスト雑誌2005年1月号"
|
1687
1687
|
price:
|
@@ -1699,7 +1699,7 @@ manifestation_00201:
|
|
1699
1699
|
manifestation_00202:
|
1700
1700
|
carrier_type_id: 1
|
1701
1701
|
language_id: 1
|
1702
|
-
isbn:
|
1702
|
+
isbn:
|
1703
1703
|
updated_at: 2010-03-01 16:14:18 +09:00
|
1704
1704
|
original_title: "テスト雑誌2月号"
|
1705
1705
|
price:
|
@@ -1712,7 +1712,7 @@ manifestation_00202:
|
|
1712
1712
|
width:
|
1713
1713
|
created_at: 2007-11-19 17:55:41 UTC
|
1714
1714
|
frequency_id: 3
|
1715
|
-
issn:
|
1715
|
+
issn:
|
1716
1716
|
serial_number: 2
|
1717
1717
|
volume_number: 1
|
1718
1718
|
issue_number: 2
|
@@ -1720,7 +1720,7 @@ manifestation_00202:
|
|
1720
1720
|
manifestation_00203:
|
1721
1721
|
carrier_type_id: 1
|
1722
1722
|
language_id: 1
|
1723
|
-
isbn:
|
1723
|
+
isbn:
|
1724
1724
|
updated_at: 2010-03-01 16:14:18 +09:00
|
1725
1725
|
original_title: "テスト単行本記事2005"
|
1726
1726
|
price:
|
@@ -1733,12 +1733,13 @@ manifestation_00203:
|
|
1733
1733
|
width:
|
1734
1734
|
created_at: 2010-03-03 17:00:00 UTC
|
1735
1735
|
frequency_id: 1
|
1736
|
+
periodical: false
|
1736
1737
|
manifestation_00204:
|
1737
1738
|
carrier_type_id: 1
|
1738
1739
|
language_id: 1
|
1739
|
-
isbn:
|
1740
|
+
isbn:
|
1740
1741
|
updated_at: 2010-03-03 20:00:00 +09:00
|
1741
|
-
original_title: "テスト雑誌1月号の記事1"
|
1742
|
+
original_title: "テスト雑誌1月号の記事1 2005"
|
1742
1743
|
price:
|
1743
1744
|
manifestation_identifier:
|
1744
1745
|
depth:
|
@@ -1748,10 +1749,11 @@ manifestation_00204:
|
|
1748
1749
|
height:
|
1749
1750
|
width:
|
1750
1751
|
created_at: 2010-03-03 20:00:00 UTC
|
1752
|
+
periodical: true
|
1751
1753
|
manifestation_00205:
|
1752
1754
|
carrier_type_id: 1
|
1753
1755
|
language_id: 1
|
1754
|
-
isbn:
|
1756
|
+
isbn:
|
1755
1757
|
updated_at: 2010-03-03 20:00:00 +09:00
|
1756
1758
|
original_title: "テスト雑誌1月号の記事2"
|
1757
1759
|
price:
|
@@ -1766,7 +1768,7 @@ manifestation_00205:
|
|
1766
1768
|
manifestation_00206:
|
1767
1769
|
carrier_type_id: 1
|
1768
1770
|
language_id: 1
|
1769
|
-
isbn:
|
1771
|
+
isbn:
|
1770
1772
|
updated_at: 2010-03-03 20:00:00 +09:00
|
1771
1773
|
original_title: "テスト雑誌2月号の記事1"
|
1772
1774
|
price:
|
@@ -1781,7 +1783,7 @@ manifestation_00206:
|
|
1781
1783
|
manifestation_00207:
|
1782
1784
|
carrier_type_id: 1
|
1783
1785
|
language_id: 1
|
1784
|
-
isbn:
|
1786
|
+
isbn:
|
1785
1787
|
updated_at: 2010-03-03 20:00:00 +09:00
|
1786
1788
|
original_title: "試験単行本"
|
1787
1789
|
price:
|
@@ -9,13 +9,26 @@ two:
|
|
9
9
|
title_transcription: テスト
|
10
10
|
position: 2
|
11
11
|
manifestation_id: 202
|
12
|
-
series_master: true
|
13
12
|
|
14
13
|
three:
|
15
14
|
id: 3
|
16
15
|
original_title: テスト雑誌
|
17
16
|
position: 3
|
18
|
-
|
17
|
+
root_manifestation_id: 201
|
18
|
+
|
19
|
+
four:
|
20
|
+
id: 4
|
21
|
+
original_title: テスト雑誌
|
22
|
+
position: 4
|
23
|
+
root_manifestation_id: 202
|
24
|
+
|
25
|
+
five:
|
26
|
+
id: 5
|
27
|
+
original_title: テスト雑誌
|
28
|
+
position: 5
|
29
|
+
manifestation_id: 204
|
30
|
+
root_manifestation_id: 202
|
31
|
+
|
19
32
|
|
20
33
|
# == Schema Information
|
21
34
|
#
|
@@ -34,7 +34,7 @@ describe Manifestation, :solr => true do
|
|
34
34
|
results.size.should eq 8
|
35
35
|
openurl = Openurl.new({:jtitle => "テスト"})
|
36
36
|
results = openurl.search
|
37
|
-
results.size.should eq
|
37
|
+
results.size.should eq 3
|
38
38
|
openurl.query_text.should eq "jtitle_text:テスト"
|
39
39
|
openurl = Openurl.new({:atitle => "2005"})
|
40
40
|
results = openurl.search
|
@@ -200,10 +200,8 @@ describe Manifestation, :solr => true do
|
|
200
200
|
manifestations(:manifestation_00001).title.should be_true
|
201
201
|
end
|
202
202
|
|
203
|
-
|
204
|
-
|
205
|
-
Manifestation.import_isbn('4797327030').should be_valid
|
206
|
-
end
|
203
|
+
it "should import isbn", :vcr => true do
|
204
|
+
Manifestation.import_isbn('4797327030').should be_valid
|
207
205
|
end
|
208
206
|
|
209
207
|
it "should respond to pickup" do
|
@@ -5,9 +5,7 @@ describe SeriesStatement do
|
|
5
5
|
|
6
6
|
it "should create manifestation" do
|
7
7
|
series_statement = FactoryGirl.create(:series_statement)
|
8
|
-
series_statement.
|
9
|
-
series_statement.reload
|
10
|
-
series_statement.manifestation.series_statements.count.should eq 1
|
8
|
+
series_statement.root_manifestation.should be_nil
|
11
9
|
end
|
12
10
|
end
|
13
11
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enju_biblio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.
|
4
|
+
version: 0.1.0.pre35
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kosuke Tanabe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: enju_core
|
@@ -497,7 +497,6 @@ files:
|
|
497
497
|
- app/controllers/realizes_controller.rb
|
498
498
|
- app/controllers/resource_import_files_controller.rb
|
499
499
|
- app/controllers/resource_import_results_controller.rb
|
500
|
-
- app/controllers/series_has_manifestations_controller.rb
|
501
500
|
- app/controllers/series_statement_relationships_controller.rb
|
502
501
|
- app/controllers/series_statements_controller.rb
|
503
502
|
- app/helpers/manifestations_helper.rb
|
@@ -542,7 +541,6 @@ files:
|
|
542
541
|
- app/models/realize_type.rb
|
543
542
|
- app/models/resource_import_file.rb
|
544
543
|
- app/models/resource_import_result.rb
|
545
|
-
- app/models/series_has_manifestation.rb
|
546
544
|
- app/models/series_statement.rb
|
547
545
|
- app/models/series_statement_relationship.rb
|
548
546
|
- app/views/carrier_types/_form.html.erb
|
@@ -650,6 +648,7 @@ files:
|
|
650
648
|
- app/views/manifestations/_index_form_creator.html.erb
|
651
649
|
- app/views/manifestations/_index_form_item.html.erb
|
652
650
|
- app/views/manifestations/_index_form_manifestation.html.erb
|
651
|
+
- app/views/manifestations/_index_form_parent.html.erb
|
653
652
|
- app/views/manifestations/_index_form_publisher.html.erb
|
654
653
|
- app/views/manifestations/_index_form_series_statement.html.erb
|
655
654
|
- app/views/manifestations/_list.html.erb
|
@@ -660,7 +659,6 @@ files:
|
|
660
659
|
- app/views/manifestations/_pickup.html.erb
|
661
660
|
- app/views/manifestations/_question_list.html.erb
|
662
661
|
- app/views/manifestations/_search_engine.html.erb
|
663
|
-
- app/views/manifestations/_serial_form.html.erb
|
664
662
|
- app/views/manifestations/_session_ids.html.erb
|
665
663
|
- app/views/manifestations/_show.mods.builder
|
666
664
|
- app/views/manifestations/_show.rdf.builder
|
@@ -673,10 +671,11 @@ files:
|
|
673
671
|
- app/views/manifestations/_show_holding.mobile.erb
|
674
672
|
- app/views/manifestations/_show_index.html.erb
|
675
673
|
- app/views/manifestations/_show_index.mobile.erb
|
674
|
+
- app/views/manifestations/_show_parent.html.erb
|
676
675
|
- app/views/manifestations/_show_periodical_master.html.erb
|
677
676
|
- app/views/manifestations/_show_series_index.html.erb
|
678
677
|
- app/views/manifestations/_show_series_statement.html.erb
|
679
|
-
- app/views/manifestations/
|
678
|
+
- app/views/manifestations/_submenu_parent.html.erb
|
680
679
|
- app/views/manifestations/_tab_list.html.erb
|
681
680
|
- app/views/manifestations/_tab_menu.html.erb
|
682
681
|
- app/views/manifestations/_title.html.erb
|
@@ -799,11 +798,6 @@ files:
|
|
799
798
|
- app/views/resource_import_results/index.csv.erb
|
800
799
|
- app/views/resource_import_results/index.html.erb
|
801
800
|
- app/views/resource_import_results/show.html.erb
|
802
|
-
- app/views/series_has_manifestations/_form.html.erb
|
803
|
-
- app/views/series_has_manifestations/edit.html.erb
|
804
|
-
- app/views/series_has_manifestations/index.html.erb
|
805
|
-
- app/views/series_has_manifestations/new.html.erb
|
806
|
-
- app/views/series_has_manifestations/show.html.erb
|
807
801
|
- app/views/series_statement_relationships/_form.html.erb
|
808
802
|
- app/views/series_statement_relationships/edit.html.erb
|
809
803
|
- app/views/series_statement_relationships/index.html.erb
|
@@ -870,7 +864,6 @@ files:
|
|
870
864
|
- db/migrate/20110620173525_add_bookstore_id_to_item.rb
|
871
865
|
- db/migrate/20110627034940_create_series_statement_merge_lists.rb
|
872
866
|
- db/migrate/20110627035057_create_series_statement_merges.rb
|
873
|
-
- db/migrate/20110820131417_create_series_has_manifestations.rb
|
874
867
|
- db/migrate/20110916053430_rename_manifestation_number_list_to_number_string.rb
|
875
868
|
- db/migrate/20110916091020_add_volume_number_to_manifestation.rb
|
876
869
|
- db/migrate/20110916103953_add_manifestaiton_id_to_series_statement.rb
|
@@ -902,6 +895,7 @@ files:
|
|
902
895
|
- db/migrate/20130421093852_add_periodical_to_manifestation.rb
|
903
896
|
- db/migrate/20130421155019_add_creator_string_to_series_statement.rb
|
904
897
|
- db/migrate/20130421164124_add_series_master_to_series_statement.rb
|
898
|
+
- db/migrate/20130429020822_add_root_manifestation_id_to_series_statement.rb
|
905
899
|
- lib/enju_biblio/biblio_helper.rb
|
906
900
|
- lib/enju_biblio/engine.rb
|
907
901
|
- lib/enju_biblio/openurl.rb
|
@@ -936,6 +930,7 @@ files:
|
|
936
930
|
- spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Administrator/with_valid_params/redirects_to_the_created_import_request.yml
|
937
931
|
- spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Librarian/with_valid_params/assigns_a_newly_created_import_request_as_import_request.yml
|
938
932
|
- spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Librarian/with_valid_params/redirects_to_the_created_import_request.yml
|
933
|
+
- spec/cassette_library/Manifestation/should_import_isbn.yml
|
939
934
|
- spec/controllers/carrier_types_controller_spec.rb
|
940
935
|
- spec/controllers/content_types_controller_spec.rb
|
941
936
|
- spec/controllers/countries_controller_spec.rb
|
@@ -968,7 +963,6 @@ files:
|
|
968
963
|
- spec/controllers/realizes_controller_spec.rb
|
969
964
|
- spec/controllers/resource_import_files_controller_spec.rb
|
970
965
|
- spec/controllers/resource_import_results_controller_spec.rb
|
971
|
-
- spec/controllers/series_has_manifestations_controller_spec.rb
|
972
966
|
- spec/controllers/series_statement_relationships_controller_spec.rb
|
973
967
|
- spec/controllers/series_statements_controller_spec.rb
|
974
968
|
- spec/dummy/app/assets/javascripts/application.js
|
@@ -1136,7 +1130,7 @@ files:
|
|
1136
1130
|
- spec/dummy/solr/conf/stopwords.txt
|
1137
1131
|
- spec/dummy/solr/conf/synonyms.txt
|
1138
1132
|
- spec/dummy/solr/data/test/index/segments.gen
|
1139
|
-
- spec/dummy/solr/data/test/index/
|
1133
|
+
- spec/dummy/solr/data/test/index/segments_iwe
|
1140
1134
|
- spec/dummy/solr/data/test/spellchecker/segments.gen
|
1141
1135
|
- spec/dummy/solr/data/test/spellchecker/segments_1
|
1142
1136
|
- spec/dummy/tmp/cache/4AD/470/country_all
|
@@ -1235,7 +1229,6 @@ files:
|
|
1235
1229
|
- spec/fixtures/resource_import_files.yml
|
1236
1230
|
- spec/fixtures/resource_import_results.yml
|
1237
1231
|
- spec/fixtures/roles.yml
|
1238
|
-
- spec/fixtures/series_has_manifestations.yml
|
1239
1232
|
- spec/fixtures/series_statements.yml
|
1240
1233
|
- spec/fixtures/shelves.yml
|
1241
1234
|
- spec/fixtures/use_restrictions.yml
|
@@ -1277,7 +1270,6 @@ files:
|
|
1277
1270
|
- spec/models/realize_type_spec.rb
|
1278
1271
|
- spec/models/resource_import_file_spec.rb
|
1279
1272
|
- spec/models/resource_import_result_spec.rb
|
1280
|
-
- spec/models/series_has_manifestation_spec.rb
|
1281
1273
|
- spec/models/series_statement_relationship_spec.rb
|
1282
1274
|
- spec/models/series_statement_spec.rb
|
1283
1275
|
- spec/requests/create_types_spec.rb
|
@@ -1301,7 +1293,6 @@ files:
|
|
1301
1293
|
- spec/routing/produce_types_routing_spec.rb
|
1302
1294
|
- spec/routing/realize_types_routing_spec.rb
|
1303
1295
|
- spec/routing/realizes_routing_spec.rb
|
1304
|
-
- spec/routing/series_has_manifestations_routing_spec.rb
|
1305
1296
|
- spec/routing/series_statement_relationships_routing_spec.rb
|
1306
1297
|
- spec/spec_helper.rb
|
1307
1298
|
- spec/support/controller_macros.rb
|
@@ -1339,10 +1330,6 @@ files:
|
|
1339
1330
|
- spec/views/realizes/index.html.erb_spec.rb
|
1340
1331
|
- spec/views/realizes/new.html.erb_spec.rb
|
1341
1332
|
- spec/views/realizes/show.html.erb_spec.rb
|
1342
|
-
- spec/views/series_has_manifestations/edit.html.erb_spec.rb
|
1343
|
-
- spec/views/series_has_manifestations/index.html.erb_spec.rb
|
1344
|
-
- spec/views/series_has_manifestations/new.html.erb_spec.rb
|
1345
|
-
- spec/views/series_has_manifestations/show.html.erb_spec.rb
|
1346
1333
|
- spec/views/series_statement_relationships/edit.html.erb_spec.rb
|
1347
1334
|
- spec/views/series_statement_relationships/index.html.erb_spec.rb
|
1348
1335
|
- spec/views/series_statement_relationships/new.html.erb_spec.rb
|
@@ -1377,6 +1364,7 @@ test_files:
|
|
1377
1364
|
- spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Administrator/with_valid_params/redirects_to_the_created_import_request.yml
|
1378
1365
|
- spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Librarian/with_valid_params/assigns_a_newly_created_import_request_as_import_request.yml
|
1379
1366
|
- spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Librarian/with_valid_params/redirects_to_the_created_import_request.yml
|
1367
|
+
- spec/cassette_library/Manifestation/should_import_isbn.yml
|
1380
1368
|
- spec/controllers/carrier_types_controller_spec.rb
|
1381
1369
|
- spec/controllers/content_types_controller_spec.rb
|
1382
1370
|
- spec/controllers/countries_controller_spec.rb
|
@@ -1409,7 +1397,6 @@ test_files:
|
|
1409
1397
|
- spec/controllers/realizes_controller_spec.rb
|
1410
1398
|
- spec/controllers/resource_import_files_controller_spec.rb
|
1411
1399
|
- spec/controllers/resource_import_results_controller_spec.rb
|
1412
|
-
- spec/controllers/series_has_manifestations_controller_spec.rb
|
1413
1400
|
- spec/controllers/series_statement_relationships_controller_spec.rb
|
1414
1401
|
- spec/controllers/series_statements_controller_spec.rb
|
1415
1402
|
- spec/dummy/app/assets/javascripts/application.js
|
@@ -1577,7 +1564,7 @@ test_files:
|
|
1577
1564
|
- spec/dummy/solr/conf/stopwords.txt
|
1578
1565
|
- spec/dummy/solr/conf/synonyms.txt
|
1579
1566
|
- spec/dummy/solr/data/test/index/segments.gen
|
1580
|
-
- spec/dummy/solr/data/test/index/
|
1567
|
+
- spec/dummy/solr/data/test/index/segments_iwe
|
1581
1568
|
- spec/dummy/solr/data/test/spellchecker/segments.gen
|
1582
1569
|
- spec/dummy/solr/data/test/spellchecker/segments_1
|
1583
1570
|
- spec/dummy/tmp/cache/4AD/470/country_all
|
@@ -1676,7 +1663,6 @@ test_files:
|
|
1676
1663
|
- spec/fixtures/resource_import_files.yml
|
1677
1664
|
- spec/fixtures/resource_import_results.yml
|
1678
1665
|
- spec/fixtures/roles.yml
|
1679
|
-
- spec/fixtures/series_has_manifestations.yml
|
1680
1666
|
- spec/fixtures/series_statements.yml
|
1681
1667
|
- spec/fixtures/shelves.yml
|
1682
1668
|
- spec/fixtures/use_restrictions.yml
|
@@ -1718,7 +1704,6 @@ test_files:
|
|
1718
1704
|
- spec/models/realize_type_spec.rb
|
1719
1705
|
- spec/models/resource_import_file_spec.rb
|
1720
1706
|
- spec/models/resource_import_result_spec.rb
|
1721
|
-
- spec/models/series_has_manifestation_spec.rb
|
1722
1707
|
- spec/models/series_statement_relationship_spec.rb
|
1723
1708
|
- spec/models/series_statement_spec.rb
|
1724
1709
|
- spec/requests/create_types_spec.rb
|
@@ -1742,7 +1727,6 @@ test_files:
|
|
1742
1727
|
- spec/routing/produce_types_routing_spec.rb
|
1743
1728
|
- spec/routing/realize_types_routing_spec.rb
|
1744
1729
|
- spec/routing/realizes_routing_spec.rb
|
1745
|
-
- spec/routing/series_has_manifestations_routing_spec.rb
|
1746
1730
|
- spec/routing/series_statement_relationships_routing_spec.rb
|
1747
1731
|
- spec/spec_helper.rb
|
1748
1732
|
- spec/support/controller_macros.rb
|
@@ -1780,10 +1764,6 @@ test_files:
|
|
1780
1764
|
- spec/views/realizes/index.html.erb_spec.rb
|
1781
1765
|
- spec/views/realizes/new.html.erb_spec.rb
|
1782
1766
|
- spec/views/realizes/show.html.erb_spec.rb
|
1783
|
-
- spec/views/series_has_manifestations/edit.html.erb_spec.rb
|
1784
|
-
- spec/views/series_has_manifestations/index.html.erb_spec.rb
|
1785
|
-
- spec/views/series_has_manifestations/new.html.erb_spec.rb
|
1786
|
-
- spec/views/series_has_manifestations/show.html.erb_spec.rb
|
1787
1767
|
- spec/views/series_statement_relationships/edit.html.erb_spec.rb
|
1788
1768
|
- spec/views/series_statement_relationships/index.html.erb_spec.rb
|
1789
1769
|
- spec/views/series_statement_relationships/new.html.erb_spec.rb
|
@@ -1,101 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
class SeriesHasManifestationsController < ApplicationController
|
3
|
-
load_and_authorize_resource
|
4
|
-
before_filter :get_manifestation, :only => [:index, :new, :edit, :destroy]
|
5
|
-
before_filter :get_series_statement, :only => [:index, :new, :edit, :destroy]
|
6
|
-
after_filter :solr_commit, :only => [:create, :update, :destroy]
|
7
|
-
cache_sweeper :page_sweeper, :only => [:create, :update, :destroy]
|
8
|
-
|
9
|
-
# GET /series_has_manifestations
|
10
|
-
# GET /series_has_manifestations.json
|
11
|
-
def index
|
12
|
-
@series_has_manifestations = SeriesHasManifestation.page(params[:page])
|
13
|
-
|
14
|
-
respond_to do |format|
|
15
|
-
format.html # index.html.erb
|
16
|
-
format.json { render :json => @series_has_manifestations }
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
# GET /series_has_manifestations/1
|
21
|
-
# GET /series_has_manifestations/1.json
|
22
|
-
def show
|
23
|
-
|
24
|
-
respond_to do |format|
|
25
|
-
format.html # show.html.erb
|
26
|
-
format.json { render :json => @series_has_manifestation }
|
27
|
-
format.js
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
# GET /series_has_manifestations/new
|
32
|
-
# GET /series_has_manifestations/new.json
|
33
|
-
def new
|
34
|
-
@series_has_manifestation = SeriesHasManifestation.new
|
35
|
-
@series_has_manifestation.series_statement = @series_statement
|
36
|
-
@series_has_manifestation.manifestation = @manifestation
|
37
|
-
|
38
|
-
respond_to do |format|
|
39
|
-
format.html # new.html.erb
|
40
|
-
format.json { render :json => @series_has_manifestation }
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
# GET /series_has_manifestations/1/edit
|
45
|
-
def edit
|
46
|
-
@series_has_manifestation.series_statement = @series_statement if @series_statement
|
47
|
-
@series_has_manifestation.manifestation = @manifestation if @manifestation
|
48
|
-
end
|
49
|
-
|
50
|
-
# POST /series_has_manifestations
|
51
|
-
# POST /series_has_manifestations.json
|
52
|
-
def create
|
53
|
-
respond_to do |format|
|
54
|
-
if @series_has_manifestation.save
|
55
|
-
Sunspot.commit
|
56
|
-
format.html { redirect_to @series_has_manifestation, :notice => t('controller.successfully_created', :model => t('activerecord.models.series_has_manifestation')) }
|
57
|
-
format.json { render :json => @series_has_manifestation, :status => :created, :location => @series_has_manifestation }
|
58
|
-
else
|
59
|
-
@series_statement = @series_has_manifestation.series_statement
|
60
|
-
format.html { render :action => "new" }
|
61
|
-
format.json { render :json => @series_has_manifestation.errors, :status => :unprocessable_entity }
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
# PUT /series_has_manifestations/1
|
67
|
-
# PUT /series_has_manifestations/1.json
|
68
|
-
def update
|
69
|
-
old_series_statements = @series_has_manifestation.manifestation.series_statements
|
70
|
-
respond_to do |format|
|
71
|
-
if @series_has_manifestation.update_attributes(params[:series_has_manifestation])
|
72
|
-
old_series_statements.map{|s| s.index}
|
73
|
-
Sunspot.commit
|
74
|
-
format.html { redirect_to @series_has_manifestation, :notice => t('controller.successfully_updated', :model => t('activerecord.models.series_has_manifestation')) }
|
75
|
-
format.json { head :no_content }
|
76
|
-
else
|
77
|
-
@series_statement = @series_has_manifestation.series_statement
|
78
|
-
format.html { render :action => "edit" }
|
79
|
-
format.json { render :json => @series_has_manifestation.errors, :status => :unprocessable_entity }
|
80
|
-
end
|
81
|
-
end
|
82
|
-
end
|
83
|
-
|
84
|
-
# DELETE /series_has_manifestations/1
|
85
|
-
# DELETE /series_has_manifestations/1.json
|
86
|
-
def destroy
|
87
|
-
@series_has_manifestation.destroy
|
88
|
-
|
89
|
-
respond_to do |format|
|
90
|
-
format.html {
|
91
|
-
flash[:notice] = t('controller.successfully_deleted', :model => t('activerecord.models.series_has_manifestation'))
|
92
|
-
if @series_statement
|
93
|
-
redirect_to series_statement_manifestations_url(@series_statement)
|
94
|
-
else
|
95
|
-
redirect_to series_has_manifestations_url
|
96
|
-
end
|
97
|
-
}
|
98
|
-
format.json { head :no_content }
|
99
|
-
end
|
100
|
-
end
|
101
|
-
end
|
@@ -1,35 +0,0 @@
|
|
1
|
-
class SeriesHasManifestation < ActiveRecord::Base
|
2
|
-
attr_accessible :series_statement_id, :manifestation_id
|
3
|
-
belongs_to :series_statement
|
4
|
-
belongs_to :manifestation
|
5
|
-
accepts_nested_attributes_for :series_statement
|
6
|
-
|
7
|
-
validates_associated :series_statement, :manifestation
|
8
|
-
validates_presence_of :series_statement_id
|
9
|
-
validates_presence_of :manifestation_id, :on => :update
|
10
|
-
validates_uniqueness_of :manifestation_id, :scope => :series_statement_id
|
11
|
-
after_save :reindex
|
12
|
-
after_destroy :reindex
|
13
|
-
|
14
|
-
acts_as_list :scope => :series_statement_id
|
15
|
-
|
16
|
-
paginates_per 10
|
17
|
-
|
18
|
-
def reindex
|
19
|
-
series_statement.reload; series_statement.try(:index)
|
20
|
-
manifestation.reload; manifestation.try(:index)
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
# == Schema Information
|
25
|
-
#
|
26
|
-
# Table name: series_has_manifestations
|
27
|
-
#
|
28
|
-
# id :integer not null, primary key
|
29
|
-
# series_statement_id :integer
|
30
|
-
# manifestation_id :integer
|
31
|
-
# position :integer
|
32
|
-
# created_at :datetime not null
|
33
|
-
# updated_at :datetime not null
|
34
|
-
#
|
35
|
-
|
@@ -1,14 +0,0 @@
|
|
1
|
-
<div class="field">
|
2
|
-
<%= f.label :volume_number_string -%>
|
3
|
-
<%= f.text_field :volume_number_string -%>
|
4
|
-
<%= f.label :volume_number -%>
|
5
|
-
<%= f.text_field :volume_number, :class => 'resource_integer' -%>
|
6
|
-
<br />
|
7
|
-
<%= f.label :issue_number_string -%>
|
8
|
-
<%= f.text_field :issue_number_string -%>
|
9
|
-
<%= f.label :issue_number -%>
|
10
|
-
<%= f.text_field :issue_number, :class => 'resource_integer' -%>
|
11
|
-
<br />
|
12
|
-
<%= f.label :serial_number -%>
|
13
|
-
<%= f.text_field :serial_number, :class => 'resource_integer', :style => 'ime-mode: disabled' -%>
|
14
|
-
</div>
|
@@ -1,9 +0,0 @@
|
|
1
|
-
<ul>
|
2
|
-
<% if can? :create, Manifestation %>
|
3
|
-
<li><%= link_to t('page.new', :model => t('activerecord.models.manifestation')), new_series_statement_manifestation_path(@series_statement) %></li>
|
4
|
-
<% end %>
|
5
|
-
<% if can? :update, @series_statement %>
|
6
|
-
<li><%= link_to t('page.edit'), edit_series_statement_path(@series_statement) %></li>
|
7
|
-
<li><%= link_to t('page.add_child'), series_statements_path(:parent_id => @series_statement.id) %></li>
|
8
|
-
<% end %>
|
9
|
-
</ul>
|
@@ -1,27 +0,0 @@
|
|
1
|
-
<%= simple_form_for(@series_has_manifestation) do |f| %>
|
2
|
-
<%= f.error_notification %>
|
3
|
-
|
4
|
-
<div class="field">
|
5
|
-
<%= f.label t('activerecord.models.series_statement') -%><br />
|
6
|
-
<%- if @series_has_manifestation.series_statement -%>
|
7
|
-
<%= link_to @series_has_manifestation.series_statement.original_title, @series_has_manifestation.series_statement if @series_has_manifestation.series_statement %>
|
8
|
-
<%= f.hidden_field :series_statement_id %>
|
9
|
-
<%- else -%>
|
10
|
-
<%= f.text_field :series_statement_id -%>
|
11
|
-
<%- end -%>
|
12
|
-
</div>
|
13
|
-
|
14
|
-
<div class="field">
|
15
|
-
<%= f.label t('activerecord.models.manifestation') -%><br />
|
16
|
-
<%- if @series_has_manifestation.manifestation -%>
|
17
|
-
<%= link_to @series_has_manifestation.manifestation.original_title, @series_has_manifestation.manifestation if @series_has_manifestation.manifestation %>
|
18
|
-
<%= f.hidden_field :manifestation_id %>
|
19
|
-
<% else %>
|
20
|
-
<%= f.text_field :manifestation_id %>
|
21
|
-
<% end %>
|
22
|
-
</div>
|
23
|
-
|
24
|
-
<div class="actions">
|
25
|
-
<%= f.button :submit %>
|
26
|
-
</div>
|
27
|
-
<% end %>
|
@@ -1,15 +0,0 @@
|
|
1
|
-
<div id="content_detail" class="ui-corner-all">
|
2
|
-
<h1 class="title"><%= t('page.editing', :model => t('activerecord.models.series_has_manifestation')) -%></h1>
|
3
|
-
<div id="content_list">
|
4
|
-
|
5
|
-
<%= render 'form' %>
|
6
|
-
|
7
|
-
</div>
|
8
|
-
</div>
|
9
|
-
|
10
|
-
<div id="submenu" class="ui-corner-all">
|
11
|
-
<ul>
|
12
|
-
<li><%= link_to t('page.show'), series_has_manifestation_path(@series_has_manifestation) -%></li>
|
13
|
-
<li><%= link_to t('page.back'), series_has_manifestations_path -%></li>
|
14
|
-
</ul>
|
15
|
-
</div>
|