enju_biblio 0.1.0.pre36 → 0.1.0.pre37
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/scaffold.css +56 -0
- data/app/controllers/manifestations_controller.rb +18 -22
- data/app/controllers/series_statements_controller.rb +6 -35
- data/app/models/enju_biblio/ability.rb +2 -4
- data/app/models/manifestation.rb +75 -92
- data/app/models/series_statement.rb +13 -18
- data/app/views/manifestations/_edit_detail.html.erb +10 -0
- data/app/views/manifestations/_form.html.erb +49 -34
- data/app/views/manifestations/_manifestation.html.erb +2 -12
- data/app/views/manifestations/_show_detail_librarian.html.erb +3 -33
- data/app/views/manifestations/_show_detail_user.html.erb +3 -18
- data/app/views/manifestations/_show_parent.html.erb +0 -12
- data/app/views/manifestations/_show_series_detail.html.erb +26 -0
- data/app/views/manifestations/show.html.erb +1 -27
- data/app/views/series_statements/_form.html.erb +1 -1
- data/app/views/series_statements/_index.html.erb +3 -11
- data/app/views/series_statements/show.html.erb +22 -30
- data/config/locales/translation_en.yml +2 -0
- data/config/locales/translation_ja.yml +2 -0
- data/config/routes.rb +3 -7
- data/db/migrate/005_create_manifestations.rb +4 -3
- data/db/migrate/20081028083142_create_patron_import_files.rb +1 -1
- data/db/migrate/20081028083208_create_resource_import_files.rb +1 -1
- data/lib/enju_biblio/biblio_helper.rb +1 -1
- data/lib/enju_biblio/version.rb +1 -1
- data/spec/controllers/import_requests_controller_spec.rb +1 -1
- data/spec/controllers/manifestations_controller_spec.rb +0 -6
- data/spec/controllers/series_statements_controller_spec.rb +4 -4
- data/spec/dummy/app/controllers/application_controller.rb +1 -0
- data/spec/dummy/app/models/ability.rb +2 -4
- data/spec/dummy/config/application.rb +1 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/029_create_subjects.rb +27 -0
- data/spec/dummy/db/migrate/142_create_classifications.rb +19 -0
- data/spec/dummy/db/migrate/144_create_classification_types.rb +16 -0
- data/spec/dummy/db/migrate/145_create_subject_heading_types.rb +16 -0
- data/spec/dummy/db/migrate/146_create_subject_types.rb +16 -0
- data/spec/dummy/db/migrate/20080606052544_create_work_has_subjects.rb +18 -0
- data/spec/dummy/db/migrate/20090208044541_create_subject_heading_type_has_subjects.rb +16 -0
- data/spec/dummy/db/migrate/20110913120629_add_lft_and_rgt_to_classification.rb +11 -0
- data/spec/dummy/db/migrate/20120406020752_add_url_to_subject.rb +5 -0
- data/spec/dummy/db/migrate/20130504133816_add_manifestation_id_to_subject.rb +6 -0
- data/spec/dummy/db/migrate/20130504143515_add_manifestation_id_to_classification.rb +6 -0
- data/spec/dummy/db/schema.rb +92 -9
- 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_l8s +0 -0
- data/spec/dummy/tmp/cache/4AD/470/country_all +0 -0
- data/spec/fixtures/manifestations.yml +66 -70
- data/spec/fixtures/series_statements.yml +1 -1
- data/spec/fixtures/subject_types.yml +28 -0
- data/spec/models/import_request_spec.rb +2 -0
- data/spec/models/manifestation_spec.rb +66 -70
- data/spec/models/series_statement_spec.rb +1 -0
- metadata +35 -37
- data/app/controllers/series_statement_relationships_controller.rb +0 -20
- data/app/models/series_statement_relationship.rb +0 -30
- data/app/views/series_statement_relationships/_form.html.erb +0 -27
- data/app/views/series_statement_relationships/edit.html.erb +0 -15
- data/app/views/series_statement_relationships/index.html.erb +0 -34
- data/app/views/series_statement_relationships/new.html.erb +0 -14
- data/app/views/series_statement_relationships/show.html.erb +0 -24
- data/app/views/series_statements/_index_parent.html.erb +0 -53
- data/app/views/series_statements/_manifestation_list.html.erb +0 -17
- data/db/migrate/20110916053430_rename_manifestation_number_list_to_number_string.rb +0 -13
- data/db/migrate/20120415060308_rename_resource_import_file_imported_at_to_executed_at.rb +0 -9
- data/db/migrate/20120415060323_rename_patron_import_file_imported_at_to_executed_at.rb +0 -9
- data/db/migrate/20120728204337_create_series_statement_relationships.rb +0 -11
- data/spec/controllers/series_statement_relationships_controller_spec.rb +0 -179
- data/spec/dummy/solr/data/test/index/segments_iwe +0 -0
- data/spec/models/series_statement_relationship_spec.rb +0 -17
- data/spec/requests/series_statement_relationships_spec.rb +0 -11
- data/spec/routing/series_statement_relationships_routing_spec.rb +0 -35
- data/spec/views/series_statement_relationships/edit.html.erb_spec.rb +0 -20
- data/spec/views/series_statement_relationships/index.html.erb_spec.rb +0 -23
- data/spec/views/series_statement_relationships/new.html.erb_spec.rb +0 -20
- data/spec/views/series_statement_relationships/show.html.erb_spec.rb +0 -17
@@ -36,18 +36,8 @@
|
|
36
36
|
<% end %>
|
37
37
|
<% else %>
|
38
38
|
<% case %>
|
39
|
-
<% when @
|
40
|
-
<%= link_to t('page.add'),
|
41
|
-
<% when @index_patron[:contributor] %>
|
42
|
-
<%= link_to t('page.add'), new_patron_realize_path(@index_patron[:contributor], :expression_id => manifestation.id) unless manifestation.contributors.include?(@index_patron[:contributor]) -%>
|
43
|
-
<% when @index_patron[:publisher] %>
|
44
|
-
<%= link_to t('page.add'), new_patron_produce_path(@index_patron[:publisher], :manifestation_id => manifestation.id) unless manifestation.publishers.include?(@index_patron[:publisher]) -%>
|
45
|
-
<% when @series_statement %>
|
46
|
-
<% unless manifestation.series_statements.exists? -%>
|
47
|
-
<%= link_to t('page.add'), new_manifestation_path(:parent_id => @series_statement.root_manifestation.id) if @series_statement.root_manifestation -%>
|
48
|
-
<% end %>
|
49
|
-
<% when @manifestation %>
|
50
|
-
<%= link_to t('page.add'), new_manifestation_manifestation_relationship_path(@manifestation, :child_id => manifestation.id) unless @manifestation.derived_manifestations.include?(manifestation) or @manifestation == manifestation -%>
|
39
|
+
<% when @parent %>
|
40
|
+
<%= link_to t('page.add'), new_manifestation_manifestation_relationship_path(@parent, :child_id => manifestation.id) unless @parent.derived_manifestations.include?(manifestation) or @parent == manifestation -%>
|
51
41
|
<% when @item %>
|
52
42
|
<%= link_to t('page.change'), edit_exemplify_path(@item.exemplify, :manifestation_id => manifestation.id) unless @item.manifestation == manifestation -%>
|
53
43
|
<% else %>
|
@@ -10,26 +10,15 @@
|
|
10
10
|
<td style="width: 500px"><%= manifestation.title_alternative -%></td>
|
11
11
|
</tr>
|
12
12
|
<% end %>
|
13
|
-
<%- if manifestation.series_statements.exists? -%>
|
14
13
|
<tr>
|
15
14
|
<td style="width: 200px"><%= t('activerecord.models.series_statement') -%>:</td>
|
16
15
|
<td style="width: 500px">
|
17
|
-
|
18
|
-
<% manifestation.series_statements.each do |series_statement| %>
|
19
|
-
<% if series_statement.root_manifestation %>
|
20
|
-
<li><%= link_to series_statement.original_title, series_statement.root_manifestation -%></li>
|
21
|
-
<% else %>
|
22
|
-
<li><%= series_statement.original_title -%></li>
|
23
|
-
<% end %>
|
24
|
-
<% end %>
|
25
|
-
</ul>
|
26
|
-
<%= manifestation.volume_number_string %>
|
16
|
+
<%= render 'show_series_detail', :manifestation => manifestation %>
|
27
17
|
<%- if manifestation.issn.present? -%>
|
28
18
|
(<%= t('activerecord.attributes.manifestation.issn') -%>: <%= manifestation.issn -%>)
|
29
19
|
<%- end -%>
|
30
20
|
</td>
|
31
21
|
</tr>
|
32
|
-
<% end %>
|
33
22
|
<%= render 'edition_and_number', :manifestation => manifestation %>
|
34
23
|
<tr>
|
35
24
|
<td style="width: 200px"><%= t('page.form') -%>:</td>
|
@@ -60,27 +49,8 @@
|
|
60
49
|
<td><%= manifestation.price -%></td>
|
61
50
|
</tr>
|
62
51
|
<% if defined?(EnjuSubject) %>
|
63
|
-
|
64
|
-
|
65
|
-
<td>
|
66
|
-
<%- unless manifestation.subjects.empty? -%>
|
67
|
-
<ul>
|
68
|
-
<%- manifestation.subjects.each do |subject| -%>
|
69
|
-
<li>
|
70
|
-
<%= link_to subject.term, subject -%>
|
71
|
-
<%- unless subject.classifications.empty? -%>
|
72
|
-
(
|
73
|
-
<%- subject.classifications.each do |classification| -%>
|
74
|
-
<%= classification.classification_type.name -%>: <%= link_to classification.category, classification -%>
|
75
|
-
<%- end -%>
|
76
|
-
)
|
77
|
-
<%- end -%>
|
78
|
-
</li>
|
79
|
-
<%- end -%>
|
80
|
-
</ul>
|
81
|
-
<%- end -%>
|
82
|
-
</td>
|
83
|
-
</tr>
|
52
|
+
<%= render 'manifestations/subject_detail', :manifestation => manifestation %>
|
53
|
+
<%= render 'manifestations/classification_detail', :manifestation => manifestation %>
|
84
54
|
<% end %>
|
85
55
|
<%- unless manifestation.periodical? -%>
|
86
56
|
<tr>
|
@@ -10,22 +10,15 @@
|
|
10
10
|
<td style="width: 500px"><%= manifestation.title_alternative -%></td>
|
11
11
|
</tr>
|
12
12
|
<% end %>
|
13
|
-
<%- if manifestation.series_statements.exists? -%>
|
14
13
|
<tr>
|
15
14
|
<td style="width: 200px"><%= t('activerecord.models.series_statement') -%>:</td>
|
16
15
|
<td style="width: 500px">
|
17
|
-
|
18
|
-
<% manifestation.series_statements.each do |series_statement| %>
|
19
|
-
<li><%= link_to series_statement.original_title, series_statement -%></li>
|
20
|
-
<% end %>
|
21
|
-
</ul>
|
22
|
-
<%= manifestation.volume_number_string %>
|
16
|
+
<%= render 'show_series_detail', :manifestation => manifestation %>
|
23
17
|
<%- if manifestation.issn.present? -%>
|
24
18
|
(<%= t('activerecord.attributes.manifestation.issn') -%>: <%= manifestation.issn -%>)
|
25
19
|
<%- end -%>
|
26
20
|
</td>
|
27
21
|
</tr>
|
28
|
-
<% end %>
|
29
22
|
<%= render 'edition_and_number', :manifestation => manifestation %>
|
30
23
|
<tr>
|
31
24
|
<td style="width: 200px"><%= t('page.form') -%>:</td>
|
@@ -58,16 +51,8 @@
|
|
58
51
|
</tr>
|
59
52
|
<% end %>
|
60
53
|
<% if defined?(EnjuSubject) %>
|
61
|
-
|
62
|
-
|
63
|
-
<td><%= t('activerecord.models.subject') -%>:</td>
|
64
|
-
<td>
|
65
|
-
<%- manifestation.subjects.each do |subject| -%>
|
66
|
-
<%= link_to subject.term, subject -%>
|
67
|
-
<%- end -%>
|
68
|
-
</td>
|
69
|
-
</tr>
|
70
|
-
<%- end -%>
|
54
|
+
<%= render 'manifestations/subject_detail', :manifestation => manifestation %>
|
55
|
+
<%= render 'manifestations/classification_detail', :manifestation => manifestation %>
|
71
56
|
<% end %>
|
72
57
|
<%- unless manifestation.periodical? -%>
|
73
58
|
<tr>
|
@@ -3,22 +3,10 @@
|
|
3
3
|
<td style="width: 200px"><%= t('activerecord.attributes.series_statement.title_transcription') -%></td>
|
4
4
|
<td style="width: 490px"><%= @parent.title_transcription %></td>
|
5
5
|
</tr>
|
6
|
-
<tr>
|
7
|
-
<td style="width: 200px"><%= t('activerecord.attributes.series_statement.title_subseries') -%></td>
|
8
|
-
<td style="width: 490px"><%= @parent.root_series_statement.title_subseries %>
|
9
|
-
<% if @parent.root_series_statement.title_subseries_transcription? %>
|
10
|
-
(<%= @parent.root_series_statement.title_subseries_transcription %>)
|
11
|
-
<% end %>
|
12
|
-
</td>
|
13
|
-
</tr>
|
14
6
|
<tr>
|
15
7
|
<td><%= t('activerecord.attributes.series_statement.series_master') -%></td>
|
16
8
|
<td><%= localized_boolean(@parent.series_master?) %></td>
|
17
9
|
</tr>
|
18
|
-
<tr>
|
19
|
-
<td><%= t('activerecord.attributes.series_statement.series_statement_identifier') -%></td>
|
20
|
-
<td><%= @parent.root_series_statement.series_statement_identifier %></td>
|
21
|
-
</tr>
|
22
10
|
<tr>
|
23
11
|
<td><%= t('activerecord.attributes.series_statement.note') -%></td>
|
24
12
|
<td><%= @parent.note %></td>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<ul>
|
2
|
+
<% manifestation.original_manifestations.each do |m| %>
|
3
|
+
<li>
|
4
|
+
<%= link_to m.original_title, m %>
|
5
|
+
<% if can? :create, Manifestation and m.periodical? %>
|
6
|
+
(<%= link_to t('manifestation.add_next_issue'), new_manifestation_path(:parent_id => m.id) %>)
|
7
|
+
<% end %>
|
8
|
+
<% if m.series_statements.exists? %>
|
9
|
+
<ul>
|
10
|
+
<% m.series_statements.each do |s| %>
|
11
|
+
<li>
|
12
|
+
<%= s.original_title %>
|
13
|
+
<%= s.volume_number_string %>
|
14
|
+
</li>
|
15
|
+
<% end %>
|
16
|
+
</ul>
|
17
|
+
<% end %>
|
18
|
+
</li>
|
19
|
+
<% end %>
|
20
|
+
</ul>
|
21
|
+
|
22
|
+
<ul>
|
23
|
+
<% manifestation.series_statements.each do |series_statement| %>
|
24
|
+
<li><%= link_to series_statement.original_title, manifestations_path(:query => series_statement.original_title) %></li>
|
25
|
+
<% end %>
|
26
|
+
</ul>
|
@@ -73,33 +73,7 @@
|
|
73
73
|
</ul>
|
74
74
|
|
75
75
|
<%- if current_user.try(:has_role?, 'Librarian') -%>
|
76
|
-
|
77
|
-
<li>
|
78
|
-
<%- case when @expression -%>
|
79
|
-
<%= link_to t('page.edit'), edit_expression_manifestation_path(@expression, @manifestation) -%>
|
80
|
-
<%- when @patron -%>
|
81
|
-
<%= link_to t('page.edit'), edit_publisher_manifestation_path(@patron, @manifestation) -%>
|
82
|
-
<%- else -%>
|
83
|
-
<%= link_to t('page.edit'), edit_manifestation_path(@manifestation) -%>
|
84
|
-
<%- end -%>
|
85
|
-
<ul>
|
86
|
-
<li><%= link_to t('manifestation.edit_creator'), work_patrons_path(@manifestation) -%></li>
|
87
|
-
<li><%= link_to t('manifestation.edit_contributor'), expression_patrons_path(@manifestation) -%></li>
|
88
|
-
<li><%= link_to t('manifestation.edit_publisher'), manifestation_patrons_path(@manifestation) -%></li>
|
89
|
-
<%- if @manifestation.periodical? -%>
|
90
|
-
<li><%= link_to t('manifestation.add_next_issue'), new_series_statement_manifestation_path(@manifestation.root_series_statement) if @manifestation.root_series_statement -%></li>
|
91
|
-
<%- end -%>
|
92
|
-
</ul>
|
93
|
-
</li>
|
94
|
-
<% if can? :delete, @manifestation %>
|
95
|
-
<li><%= link_to t('page.destroy'), @manifestation, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%></li>
|
96
|
-
<% end %>
|
97
|
-
<li><%= link_to t('manifestation.add_derivation'), manifestation_manifestations_path(@manifestation, :mode => 'add') -%></li>
|
98
|
-
<% if defined?(EnjuSubject) %>
|
99
|
-
<li><%= link_to t('page.listing', :model => t('activerecord.models.subject')), work_subjects_path(@manifestation) -%></li>
|
100
|
-
<% end %>
|
101
|
-
<li><%= link_to t('manifestation.edit_item'), manifestation_items_path(@manifestation) -%></li>
|
102
|
-
</ul>
|
76
|
+
<%= render 'manifestations/edit_detail' %>
|
103
77
|
<% end %>
|
104
78
|
</div>
|
105
79
|
</div>
|
@@ -33,11 +33,11 @@
|
|
33
33
|
<%= f.label :numbering_subseries -%><br />
|
34
34
|
<%= f.text_field :numbering_subseries %>
|
35
35
|
</div>
|
36
|
-
-->
|
37
36
|
<div class="field">
|
38
37
|
<%= f.label :series_statement_identifier -%><br />
|
39
38
|
<%= f.text_field :series_statement_identifier, :class => 'resource_identifier' %>
|
40
39
|
</div>
|
40
|
+
-->
|
41
41
|
<div class="field">
|
42
42
|
<%= f.label :note -%><br />
|
43
43
|
<%= f.text_area :note, :class => 'resource_textarea' -%>
|
@@ -17,7 +17,6 @@
|
|
17
17
|
<th id="position"></th>
|
18
18
|
<th><%= t('activerecord.attributes.series_statement.original_title') -%></th>
|
19
19
|
<th></th>
|
20
|
-
<th></th>
|
21
20
|
</tr>
|
22
21
|
|
23
22
|
<% @series_statements.each do |series_statement| %>
|
@@ -29,15 +28,6 @@
|
|
29
28
|
</td>
|
30
29
|
<td>
|
31
30
|
<strong><%= link_to series_statement.original_title, series_statement %></strong>
|
32
|
-
<% if series_statement.manifestation -%>
|
33
|
-
<% if series_statement.manifestation.publishers.exists? %>
|
34
|
-
<br />
|
35
|
-
<%= patrons_list(series_statement.manifestation.publishers.readable_by(current_user)) %>
|
36
|
-
<% end %>
|
37
|
-
<% end %>
|
38
|
-
</td>
|
39
|
-
<td>
|
40
|
-
<%= link_to t('page.new', :model => t('activerecord.models.manifestation')), new_series_statement_manifestation_path(series_statement) -%>
|
41
31
|
</td>
|
42
32
|
<td>
|
43
33
|
<%= link_to t('page.edit'), edit_series_statement_path(series_statement) if can? :update, series_statement -%>
|
@@ -54,6 +44,8 @@
|
|
54
44
|
|
55
45
|
<div id="submenu" class="ui-corner-all">
|
56
46
|
<ul>
|
57
|
-
|
47
|
+
<% if can? :create, SeriesStatement %>
|
48
|
+
<li><%= link_to t('page.new', :model => t('activerecord.models.series_statement')), new_series_statement_path -%></li>
|
49
|
+
<% end %>
|
58
50
|
</ul>
|
59
51
|
</div>
|
@@ -2,41 +2,33 @@
|
|
2
2
|
<h1 class="title"><%= t('page.showing', :model => t('activerecord.models.series_statement')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<p id="notice"><%= notice %></p>
|
5
|
+
<% if @series_statement.root_manifestation and @manifestation_ids %>
|
6
|
+
<%= render 'manifestations/paginate_id_link', :manifestation => @series_statement.root_manifestation , :manifestation_ids => @manifestation_ids %>
|
7
|
+
<% end %>
|
5
8
|
|
6
9
|
<h2 class="resource_title">
|
7
10
|
<%= @series_statement.original_title %>
|
11
|
+
<%= image_tag('icons/newspaper.png', :size => '16x16', :alt => t('manifestation.serial')) if @series_statement.periodical -%>
|
8
12
|
</h2>
|
9
13
|
|
10
|
-
<
|
11
|
-
|
12
|
-
|
13
|
-
<
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
<td><%= @series_statement.series_statement_identifier %></td>
|
29
|
-
</tr>
|
30
|
-
<tr>
|
31
|
-
<td><%= t('activerecord.attributes.series_statement.note') -%></td>
|
32
|
-
<td><%= @series_statement.note %></td>
|
33
|
-
</tr>
|
34
|
-
</table>
|
35
|
-
</div>
|
36
|
-
</div>
|
37
|
-
|
38
|
-
<%= render 'series_statements/refine_search_form', :series_statement => @series_statement %>
|
39
|
-
<%= render 'manifestation_list' -%>
|
14
|
+
<table id="resource_detail">
|
15
|
+
<tr>
|
16
|
+
<td style="width: 200px"><%= t('activerecord.attributes.series_statement.title_transcription') -%></td>
|
17
|
+
<td style="width: 490px"><%= @series_statement.title_transcription %></td>
|
18
|
+
</tr>
|
19
|
+
<tr>
|
20
|
+
<td style="width: 200px"><%= t('activerecord.attributes.series_statement.title_subseries') -%></td>
|
21
|
+
<td style="width: 490px"><%= @series_statement.title_subseries %>
|
22
|
+
<% if @series_statement.title_subseries_transcription? %>
|
23
|
+
(<%= @series_statement.title_subseries_transcription %>)
|
24
|
+
<% end %>
|
25
|
+
</td>
|
26
|
+
</tr>
|
27
|
+
<tr>
|
28
|
+
<td><%= t('activerecord.attributes.series_statement.note') -%></td>
|
29
|
+
<td><%= @series_statement.note %></td>
|
30
|
+
</tr>
|
31
|
+
</table>
|
40
32
|
</div>
|
41
33
|
</div>
|
42
34
|
|
data/config/routes.rb
CHANGED
@@ -1,10 +1,12 @@
|
|
1
1
|
Rails.application.routes.draw do
|
2
|
+
resources :people
|
3
|
+
|
4
|
+
|
2
5
|
resources :manifestations do
|
3
6
|
resources :patrons
|
4
7
|
resources :produces
|
5
8
|
resources :exemplifies
|
6
9
|
resources :series_statements
|
7
|
-
resources :series_has_manifestations
|
8
10
|
resources :items
|
9
11
|
resources :picture_files
|
10
12
|
resources :manifestations
|
@@ -64,16 +66,10 @@ Rails.application.routes.draw do
|
|
64
66
|
|
65
67
|
resources :donates
|
66
68
|
|
67
|
-
resources :series_has_manifestations
|
68
|
-
|
69
69
|
resources :series_statements do
|
70
70
|
resources :manifestations
|
71
|
-
resources :series_has_manifestations
|
72
|
-
resources :series_statement_relationships
|
73
71
|
end
|
74
72
|
|
75
|
-
resources :series_statement_relationships
|
76
|
-
|
77
73
|
resources :countries
|
78
74
|
resources :languages
|
79
75
|
resources :form_of_works
|
@@ -28,9 +28,9 @@ class CreateManifestations < ActiveRecord::Migration
|
|
28
28
|
t.string :issn
|
29
29
|
t.integer :price # TODO: 通貨単位
|
30
30
|
t.text :fulltext
|
31
|
-
t.string :
|
32
|
-
t.string :
|
33
|
-
t.string :
|
31
|
+
t.string :volume_number_string
|
32
|
+
t.string :issue_number_string
|
33
|
+
t.string :serial_number_string
|
34
34
|
t.integer :edition
|
35
35
|
t.text :note
|
36
36
|
t.boolean :repository_content, :default => false, :null => false
|
@@ -52,5 +52,6 @@ class CreateManifestations < ActiveRecord::Migration
|
|
52
52
|
#add_index :manifestations, :frequency_id
|
53
53
|
add_index :manifestations, :manifestation_identifier
|
54
54
|
add_index :manifestations, :updated_at
|
55
|
+
add_index :manifestations, :date_of_publication
|
55
56
|
end
|
56
57
|
end
|
@@ -51,7 +51,7 @@ module EnjuBiblio
|
|
51
51
|
if options[:nolink]
|
52
52
|
patrons_list = patrons.map{|patron| patron.full_name}
|
53
53
|
else
|
54
|
-
patrons_list = patrons.map{|patron| link_to(patron.full_name, patron, options)}
|
54
|
+
patrons_list = patrons.map{|patron| link_to(patron.full_name, manifestations_path(:query => patron.full_name), options)}
|
55
55
|
end
|
56
56
|
patrons_list.join(" ").html_safe
|
57
57
|
end
|
data/lib/enju_biblio/version.rb
CHANGED
@@ -171,7 +171,7 @@ describe ImportRequestsController do
|
|
171
171
|
describe "with valid params", :vcr => true do
|
172
172
|
it "assigns a newly created import_request as @import_request" do
|
173
173
|
post :create, :import_request => @attrs
|
174
|
-
assigns(:import_request).should be_valid
|
174
|
+
assigns(:import_request).manifestation.save! #should be_valid
|
175
175
|
end
|
176
176
|
|
177
177
|
it "redirects to the created import_request" do
|
@@ -118,12 +118,6 @@ describe ManifestationsController do
|
|
118
118
|
assigns(:manifestations).collect(&:id).should eq assigns(:manifestation).derived_manifestations.collect(&:id)
|
119
119
|
end
|
120
120
|
|
121
|
-
it "should get index with publisher_id" do
|
122
|
-
get :index, :publisher_id => 1
|
123
|
-
response.should be_success
|
124
|
-
assigns(:manifestations).collect(&:id).should eq Patron.find(1).manifestations.order('created_at DESC').collect(&:id)
|
125
|
-
end
|
126
|
-
|
127
121
|
it "should get index with query" do
|
128
122
|
get :index, :query => '2005'
|
129
123
|
response.should be_success
|
@@ -55,7 +55,7 @@ describe SeriesStatementsController do
|
|
55
55
|
series_statement = FactoryGirl.create(:series_statement)
|
56
56
|
get :show, :id => series_statement.id
|
57
57
|
assigns(:series_statement).should eq(series_statement)
|
58
|
-
response.should
|
58
|
+
response.should be_success
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
@@ -66,7 +66,7 @@ describe SeriesStatementsController do
|
|
66
66
|
series_statement = FactoryGirl.create(:series_statement)
|
67
67
|
get :show, :id => series_statement.id
|
68
68
|
assigns(:series_statement).should eq(series_statement)
|
69
|
-
response.should
|
69
|
+
response.should be_success
|
70
70
|
end
|
71
71
|
end
|
72
72
|
|
@@ -77,7 +77,7 @@ describe SeriesStatementsController do
|
|
77
77
|
series_statement = FactoryGirl.create(:series_statement)
|
78
78
|
get :show, :id => series_statement.id
|
79
79
|
assigns(:series_statement).should eq(series_statement)
|
80
|
-
response.should
|
80
|
+
response.should be_success
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
@@ -86,7 +86,7 @@ describe SeriesStatementsController do
|
|
86
86
|
series_statement = FactoryGirl.create(:series_statement)
|
87
87
|
get :show, :id => series_statement.id
|
88
88
|
assigns(:series_statement).should eq(series_statement)
|
89
|
-
response.should
|
89
|
+
response.should be_success
|
90
90
|
end
|
91
91
|
end
|
92
92
|
end
|
@@ -36,8 +36,7 @@
|
|
36
36
|
Realize,
|
37
37
|
RealizeType,
|
38
38
|
ResourceImportFile,
|
39
|
-
SeriesStatement
|
40
|
-
SeriesStatementRelationship
|
39
|
+
SeriesStatement
|
41
40
|
]
|
42
41
|
can :update, [
|
43
42
|
ContentType,
|
@@ -95,8 +94,7 @@
|
|
95
94
|
Produce,
|
96
95
|
Realize,
|
97
96
|
ResourceImportFile,
|
98
|
-
SeriesStatement
|
99
|
-
SeriesStatementRelationship
|
97
|
+
SeriesStatement
|
100
98
|
]
|
101
99
|
can :read, [
|
102
100
|
CarrierType,
|
Binary file
|
@@ -0,0 +1,27 @@
|
|
1
|
+
class CreateSubjects < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :subjects do |t|
|
4
|
+
t.integer :parent_id
|
5
|
+
t.integer :use_term_id
|
6
|
+
t.string :term
|
7
|
+
t.text :term_transcription
|
8
|
+
t.integer :subject_type_id, :null => false
|
9
|
+
t.text :scope_note
|
10
|
+
t.text :note
|
11
|
+
t.integer :required_role_id, :default => 1, :null => false
|
12
|
+
t.integer :lock_version, :default => 0, :null => false
|
13
|
+
t.datetime :created_at
|
14
|
+
t.datetime :updated_at
|
15
|
+
t.datetime :deleted_at
|
16
|
+
end
|
17
|
+
add_index :subjects, :term
|
18
|
+
add_index :subjects, :parent_id
|
19
|
+
add_index :subjects, :use_term_id
|
20
|
+
add_index :subjects, :subject_type_id
|
21
|
+
add_index :subjects, :required_role_id
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.down
|
25
|
+
drop_table :subjects
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
class CreateClassifications < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :classifications do |t|
|
4
|
+
t.integer :parent_id
|
5
|
+
t.string :category, :null => false
|
6
|
+
t.text :note
|
7
|
+
t.integer :classification_type_id, :null => false
|
8
|
+
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
add_index :classifications, :parent_id
|
12
|
+
add_index :classifications, :category
|
13
|
+
add_index :classifications, :classification_type_id
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.down
|
17
|
+
drop_table :classifications
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreateClassificationTypes < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :classification_types do |t|
|
4
|
+
t.string :name, :null => false
|
5
|
+
t.text :display_name
|
6
|
+
t.text :note
|
7
|
+
t.integer :position
|
8
|
+
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.down
|
14
|
+
drop_table :classification_types
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreateSubjectHeadingTypes < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :subject_heading_types do |t|
|
4
|
+
t.string :name, :null => false
|
5
|
+
t.text :display_name
|
6
|
+
t.text :note
|
7
|
+
t.integer :position
|
8
|
+
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.down
|
14
|
+
drop_table :subject_heading_types
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreateSubjectTypes < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :subject_types do |t|
|
4
|
+
t.string :name, :null => false
|
5
|
+
t.text :display_name
|
6
|
+
t.text :note
|
7
|
+
t.integer :position
|
8
|
+
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.down
|
14
|
+
drop_table :subject_types
|
15
|
+
end
|
16
|
+
end
|