enju_biblio 0.1.0.pre33 → 0.1.0.pre34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/manifestations_controller.rb +6 -27
- data/app/controllers/series_has_manifestations_controller.rb +2 -2
- data/app/controllers/series_statements_controller.rb +1 -17
- data/app/models/enju_biblio/ability.rb +2 -2
- data/app/models/item.rb +2 -3
- data/app/models/manifestation.rb +109 -163
- data/app/models/page_sweeper.rb +1 -3
- data/app/models/resource_import_file.rb +26 -62
- data/app/models/series_statement.rb +35 -76
- data/app/views/manifestations/_form.html.erb +9 -24
- data/app/views/manifestations/_manifestation.html.erb +5 -5
- data/app/views/manifestations/_show_detail_librarian.html.erb +6 -2
- data/app/views/manifestations/_show_detail_user.html.erb +6 -2
- data/app/views/manifestations/_show_index.html.erb +3 -8
- data/app/views/manifestations/_show_periodical_master.html.erb +6 -23
- data/app/views/manifestations/_show_series_index.html.erb +1 -9
- data/app/views/manifestations/show.html.erb +1 -1
- data/app/views/series_statements/_form.html.erb +0 -8
- data/app/views/series_statements/_index.html.erb +3 -17
- data/app/views/series_statements/_index_manifestation.html.erb +0 -15
- data/app/views/series_statements/_index_parent.html.erb +0 -2
- data/app/views/series_statements/_index_series_statement_merge_list.html.erb +0 -2
- data/app/views/series_statements/_manifestation_list.html.erb +1 -1
- data/app/views/series_statements/show.html.erb +0 -9
- data/config/locales/translation_en.yml +1 -0
- data/config/locales/translation_ja.yml +1 -0
- data/db/migrate/20130421093852_add_periodical_to_manifestation.rb +5 -0
- data/db/migrate/20130421155019_add_creator_string_to_series_statement.rb +7 -0
- data/db/migrate/20130421164124_add_series_master_to_series_statement.rb +5 -0
- data/lib/enju_biblio/version.rb +1 -1
- data/spec/cassette_library/ImportRequest/import/should_import_bibliographic_record.yml +49 -47
- 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 +624 -0
- 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 +624 -0
- data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Administrator/with_valid_params/redirects_to_the_created_import_request.yml +624 -0
- 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 +624 -0
- data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Librarian/with_valid_params/redirects_to_the_created_import_request.yml +624 -0
- data/spec/controllers/import_requests_controller_spec.rb +29 -31
- data/spec/controllers/manifestations_controller_spec.rb +5 -37
- data/spec/dummy/app/models/ability.rb +2 -2
- data/spec/dummy/config/application.rb +0 -1
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +10 -7
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/private/system/resource_import_files/resource_imports/000/000/004/original/resource_import_file_sample1.tsv +1 -1
- data/spec/dummy/private/system/resource_import_files/resource_imports/000/000/004/original/resource_import_file_sample2.tsv +1 -1
- data/spec/dummy/solr/data/test/index/segments.gen +0 -0
- data/spec/dummy/solr/data/test/index/segments_gs2 +0 -0
- data/spec/dummy/tmp/cache/4AD/470/country_all +0 -0
- data/spec/fixtures/items.yml +2 -3
- data/spec/fixtures/manifestations.yml +72 -72
- data/spec/fixtures/series_statements.yml +21 -23
- data/spec/models/item_spec.rb +26 -28
- data/spec/models/manifestation_spec.rb +80 -76
- data/spec/models/resource_import_file_spec.rb +33 -9
- data/spec/models/series_statement_spec.rb +22 -34
- metadata +22 -25
- data/app/views/series_statements/_periodical_facet.html.erb +0 -15
- data/db/migrate/20110425133109_add_issn_to_series_statement.rb +0 -9
- data/db/migrate/20110618091240_add_periodical_to_series_statement.rb +0 -9
- data/db/migrate/20110918161853_rename_series_statement_manifestation_id_to_root_manifestation_id.rb +0 -13
- data/spec/dummy/solr/data/test/index/segments_6n6 +0 -0
@@ -108,7 +108,7 @@ class ResourceImportFile < ActiveRecord::Base
|
|
108
108
|
m = Manifestation.find_by_isbn(isbn)
|
109
109
|
end
|
110
110
|
if m
|
111
|
-
|
111
|
+
if m.series_statements.exists?
|
112
112
|
manifestation = m
|
113
113
|
end
|
114
114
|
end
|
@@ -117,11 +117,9 @@ class ResourceImportFile < ActiveRecord::Base
|
|
117
117
|
|
118
118
|
if row['original_title'].blank?
|
119
119
|
unless manifestation
|
120
|
-
series_statement = find_series_statement(row)
|
121
120
|
begin
|
122
121
|
manifestation = Manifestation.import_isbn(isbn) if isbn
|
123
122
|
if manifestation
|
124
|
-
manifestation.series_statement = series_statement
|
125
123
|
num[:manifestation_imported] += 1
|
126
124
|
end
|
127
125
|
rescue EnjuNdl::InvalidIsbn
|
@@ -485,10 +483,14 @@ class ResourceImportFile < ActiveRecord::Base
|
|
485
483
|
end_page = nil
|
486
484
|
end
|
487
485
|
|
488
|
-
if row['fulltext_content'].to_s.strip == "t"
|
486
|
+
if row['fulltext_content'].to_s.downcase.strip == "t"
|
489
487
|
fulltext_content = true
|
490
488
|
end
|
491
489
|
|
490
|
+
if row['periodical'].to_s.downcase.strip == "t"
|
491
|
+
periodical = true
|
492
|
+
end
|
493
|
+
|
492
494
|
creators = row['creator'].to_s.split('//')
|
493
495
|
creator_transcriptions = row['creator_transcription'].to_s.split('//')
|
494
496
|
creators_list = creators.zip(creator_transcriptions).map{|f,t| {:full_name => f.to_s.strip, :full_name_transcription => t.to_s.strip}}
|
@@ -504,11 +506,9 @@ class ResourceImportFile < ActiveRecord::Base
|
|
504
506
|
publisher_patrons = Patron.import_patrons(publishers_list)
|
505
507
|
#classification = Classification.where(:category => row['classification'].to_s.strip).first
|
506
508
|
subjects = import_subject(row) if defined?(EnjuSubject)
|
507
|
-
series_statement = import_series_statement(row)
|
508
509
|
case options[:edit_mode]
|
509
510
|
when 'create'
|
510
511
|
work = self.class.import_work(title, creator_patrons, options)
|
511
|
-
work.series_statement = series_statement
|
512
512
|
if defined?(EnjuSubject)
|
513
513
|
work.subjects = subjects.uniq unless subjects.empty?
|
514
514
|
end
|
@@ -516,7 +516,6 @@ class ResourceImportFile < ActiveRecord::Base
|
|
516
516
|
when 'update'
|
517
517
|
expression = manifestation
|
518
518
|
work = expression
|
519
|
-
work.series_statement = series_statement if series_statement
|
520
519
|
work.creators = creator_patrons.uniq unless creator_patrons.empty?
|
521
520
|
expression.contributors = contributor_patrons.uniq unless contributor_patrons.empty?
|
522
521
|
if defined?(EnjuSubject)
|
@@ -579,7 +578,26 @@ class ResourceImportFile < ActiveRecord::Base
|
|
579
578
|
|
580
579
|
manifestation.carrier_type = carrier_type if carrier_type
|
581
580
|
|
582
|
-
|
581
|
+
if row['series_original_title'].to_s.strip.present?
|
582
|
+
Manifestation.transaction do
|
583
|
+
if manifestation.series_statements.exists?
|
584
|
+
manifestation.series_statements.delete_all
|
585
|
+
end
|
586
|
+
series_title = row['series_original_title'].split('//')
|
587
|
+
series_title_transcription = row['series_title_transcription'].split('//')
|
588
|
+
series_statement = SeriesStatement.new(
|
589
|
+
:original_title => series_title[0],
|
590
|
+
:title_transcription => series_title_transcription[0],
|
591
|
+
:title_subseries => "#{series_title[1]} #{series_title[2]}",
|
592
|
+
:title_subseries_transcription => "#{series_title_transcription[1]} #{series_title_transcription[2]}",
|
593
|
+
:volume_number_string => series_title[0],
|
594
|
+
:creator_string => row['series_creator_string'],
|
595
|
+
)
|
596
|
+
series_statement.manifestation = manifestation
|
597
|
+
series_statement.save!
|
598
|
+
end
|
599
|
+
end
|
600
|
+
|
583
601
|
manifestation.save!
|
584
602
|
|
585
603
|
if options[:edit_mode] == 'create'
|
@@ -590,60 +608,6 @@ class ResourceImportFile < ActiveRecord::Base
|
|
590
608
|
end
|
591
609
|
manifestation
|
592
610
|
end
|
593
|
-
|
594
|
-
def import_series_statement(row)
|
595
|
-
issn = StdNum::ISSN.normalize(row['issn'].to_s)
|
596
|
-
series_statement = find_series_statement(row)
|
597
|
-
unless series_statement
|
598
|
-
if row['series_title'].to_s.strip.present?
|
599
|
-
title = row['series_title'].to_s.strip.split('//')
|
600
|
-
title_transcription = row['series_title_transcription'].to_s.strip.split('//')
|
601
|
-
series_statement = SeriesStatement.new(
|
602
|
-
:original_title => title[0],
|
603
|
-
:title_transcription => title_transcription[0],
|
604
|
-
:series_statement_identifier => row['series_statement_identifier'].to_s.strip.split('//').first,
|
605
|
-
:title_subseries => "#{title[1]} #{title[2]}",
|
606
|
-
:title_subseries_transcription => "#{title_transcription[1]} #{title_transcription[2]}"
|
607
|
-
)
|
608
|
-
if issn.present?
|
609
|
-
series_statement.issn = issn
|
610
|
-
end
|
611
|
-
if row['periodical'].to_s.strip.present?
|
612
|
-
series_statement.periodical = true
|
613
|
-
end
|
614
|
-
series_statement.save!
|
615
|
-
if series_statement.periodical
|
616
|
-
SeriesStatement.transaction do
|
617
|
-
creators = row['series_statement_creator'].to_s.split('//')
|
618
|
-
creator_transcriptions = row['series_statement_creator_transcription'].to_s.split('//')
|
619
|
-
creators_list = creators.zip(creator_transcriptions).map{|f,t| {:full_name => f.to_s.strip, :full_name_transcription => t.to_s.strip}}
|
620
|
-
creator_patrons = Patron.import_patrons(creators_list)
|
621
|
-
series_statement.root_manifestation.creators = creator_patrons.uniq unless creator_patrons.empty?
|
622
|
-
end
|
623
|
-
end
|
624
|
-
end
|
625
|
-
end
|
626
|
-
if series_statement
|
627
|
-
series_statement
|
628
|
-
else
|
629
|
-
nil
|
630
|
-
end
|
631
|
-
end
|
632
|
-
|
633
|
-
def find_series_statement(row)
|
634
|
-
issn = StdNum::ISSN.normalize(row['issn'].to_s)
|
635
|
-
series_statement_identifier = row['series_statement_identifier'].to_s.strip
|
636
|
-
series_statement_id = row['series_statement_id'].to_s.strip
|
637
|
-
series_statement = SeriesStatement.where(:issn => issn).first if issn.present?
|
638
|
-
unless series_statement
|
639
|
-
series_statement = SeriesStatement.where(:series_statement_identifier => series_statement_identifier).first if series_statement_identifier.present?
|
640
|
-
end
|
641
|
-
unless series_statement
|
642
|
-
series_statement = SeriesStatement.where(:id => series_statement_id).first if series_statement_id
|
643
|
-
end
|
644
|
-
series_statement = SeriesStatement.where(:original_title => row['series_statement_original_title'].to_s.strip).first unless series_statement
|
645
|
-
series_statement
|
646
|
-
end
|
647
611
|
end
|
648
612
|
|
649
613
|
# == Schema Information
|
@@ -1,21 +1,19 @@
|
|
1
1
|
class SeriesStatement < ActiveRecord::Base
|
2
2
|
attr_accessible :original_title, :numbering, :title_subseries,
|
3
3
|
:numbering_subseries, :title_transcription, :title_alternative,
|
4
|
-
:series_statement_identifier, :
|
5
|
-
:title_subseries_transcription
|
4
|
+
:series_statement_identifier, :note,
|
5
|
+
:title_subseries_transcription, :creator_string, :volume_number_string
|
6
6
|
attr_accessible :url, :frequency_id
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
belongs_to :root_manifestation, :foreign_key => :root_manifestation_id, :class_name => 'Manifestation'
|
8
|
+
belongs_to :manifestation
|
9
|
+
belongs_to :manifestation, :foreign_key => :manifestation_id, :class_name => 'Manifestation'
|
11
10
|
has_many :child_relationships, :foreign_key => 'parent_id', :class_name => 'SeriesStatementRelationship', :dependent => :destroy
|
12
11
|
has_many :parent_relationships, :foreign_key => 'child_id', :class_name => 'SeriesStatementRelationship', :dependent => :destroy
|
13
12
|
has_many :children, :through => :child_relationships, :source => :child
|
14
13
|
has_many :parents, :through => :parent_relationships, :source => :parent
|
15
14
|
belongs_to :frequency
|
16
15
|
validates_presence_of :original_title
|
17
|
-
|
18
|
-
before_save :create_root_manifestation, :destroy_root_manifestation
|
16
|
+
before_save :create_manifestation
|
19
17
|
|
20
18
|
acts_as_list
|
21
19
|
searchable do
|
@@ -23,11 +21,8 @@ class SeriesStatement < ActiveRecord::Base
|
|
23
21
|
titles
|
24
22
|
end
|
25
23
|
text :numbering, :title_subseries, :numbering_subseries
|
26
|
-
integer :
|
27
|
-
series_has_manifestations.collect(&:manifestation_id)
|
28
|
-
end
|
24
|
+
integer :manifestation_id
|
29
25
|
integer :position
|
30
|
-
boolean :periodical
|
31
26
|
integer :series_statement_merge_list_ids, :multiple => true if defined?(EnjuResourceMerge)
|
32
27
|
integer :parent_ids, :multiple => true do
|
33
28
|
parents.pluck('series_statements.id')
|
@@ -38,58 +33,10 @@ class SeriesStatement < ActiveRecord::Base
|
|
38
33
|
end
|
39
34
|
|
40
35
|
attr_accessor :selected
|
41
|
-
normalize_attributes :original_title
|
36
|
+
normalize_attributes :original_title
|
42
37
|
|
43
38
|
paginates_per 10
|
44
39
|
|
45
|
-
def last_issue
|
46
|
-
issue = manifestations.where('date_of_publication IS NOT NULL').order('date_of_publication DESC').first
|
47
|
-
unless issue
|
48
|
-
issues = manifestations.order('manifestations.id DESC').limit(2)
|
49
|
-
if issues[0] == root_manifestation
|
50
|
-
issue = issues[1]
|
51
|
-
else
|
52
|
-
issue = issues[0]
|
53
|
-
end
|
54
|
-
end
|
55
|
-
issue
|
56
|
-
end
|
57
|
-
|
58
|
-
def check_issn
|
59
|
-
self.issn = StdNum::ISSN.normalize(issn)
|
60
|
-
if issn.present?
|
61
|
-
unless StdNum::ISSN.valid?(issn)
|
62
|
-
errors.add(:issn)
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
|
-
def create_root_manifestation
|
68
|
-
return nil unless periodical
|
69
|
-
return nil if root_manifestation
|
70
|
-
SeriesStatement.transaction do
|
71
|
-
manifestation = Manifestation.create!(
|
72
|
-
:original_title => original_title
|
73
|
-
)
|
74
|
-
self.root_manifestation = manifestation
|
75
|
-
self.manifestations << manifestation
|
76
|
-
end
|
77
|
-
end
|
78
|
-
|
79
|
-
def destroy_root_manifestation
|
80
|
-
unless periodical
|
81
|
-
self.root_manifestation = nil
|
82
|
-
end
|
83
|
-
end
|
84
|
-
|
85
|
-
def first_issue
|
86
|
-
manifestations.order(:date_of_publication).first
|
87
|
-
end
|
88
|
-
|
89
|
-
def latest_issue
|
90
|
-
manifestations.order(:date_of_publication).last
|
91
|
-
end
|
92
|
-
|
93
40
|
def manifestation_included(manifestation)
|
94
41
|
series_has_manifestations.where(:manifestation_id => manifestation.id).first
|
95
42
|
end
|
@@ -103,6 +50,16 @@ class SeriesStatement < ActiveRecord::Base
|
|
103
50
|
].flatten.compact
|
104
51
|
end
|
105
52
|
|
53
|
+
def create_manifestation
|
54
|
+
return nil if manifestation
|
55
|
+
SeriesStatement.transaction do
|
56
|
+
manifestation = Manifestation.create!(
|
57
|
+
:original_title => original_title
|
58
|
+
)
|
59
|
+
self.manifestation = manifestation
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
106
63
|
if defined?(EnjuResourceMerge)
|
107
64
|
has_many :series_statement_merges, :dependent => :destroy
|
108
65
|
has_many :series_statement_merge_lists, :through => :series_statement_merges
|
@@ -113,21 +70,23 @@ end
|
|
113
70
|
#
|
114
71
|
# Table name: series_statements
|
115
72
|
#
|
116
|
-
# id
|
117
|
-
# original_title
|
118
|
-
# numbering
|
119
|
-
# title_subseries
|
120
|
-
# numbering_subseries
|
121
|
-
# position
|
122
|
-
# created_at
|
123
|
-
# updated_at
|
124
|
-
# title_transcription
|
125
|
-
# title_alternative
|
126
|
-
# series_statement_identifier
|
127
|
-
#
|
128
|
-
#
|
129
|
-
#
|
130
|
-
#
|
131
|
-
#
|
73
|
+
# id :integer not null, primary key
|
74
|
+
# original_title :text
|
75
|
+
# numbering :text
|
76
|
+
# title_subseries :text
|
77
|
+
# numbering_subseries :text
|
78
|
+
# position :integer
|
79
|
+
# created_at :datetime not null
|
80
|
+
# updated_at :datetime not null
|
81
|
+
# title_transcription :text
|
82
|
+
# title_alternative :text
|
83
|
+
# series_statement_identifier :string(255)
|
84
|
+
# manifestation_id :integer
|
85
|
+
# note :text
|
86
|
+
# title_subseries_transcription :text
|
87
|
+
# creator_string :text
|
88
|
+
# volume_number_string :text
|
89
|
+
# volume_number_transcription_string :text
|
90
|
+
# series_master :boolean
|
132
91
|
#
|
133
92
|
|
@@ -2,30 +2,6 @@
|
|
2
2
|
<%= simple_nested_form_for(@manifestation, :html => { :multipart => true }) do |f| -%>
|
3
3
|
<%= f.error_messages -%>
|
4
4
|
|
5
|
-
<div class="field">
|
6
|
-
<%- if @manifestation.series_has_manifestation.try(:series_statement) -%>
|
7
|
-
<%= f.label t('activerecord.models.series_statement') -%>
|
8
|
-
<%= link_to @manifestation.series_has_manifestation.series_statement.original_title, @manifestation.series_has_manifestation.series_statement -%>
|
9
|
-
<% if @manifestation.new_record? %>
|
10
|
-
(<%= link_to t('series_statement.edit'), series_statements_path %>)
|
11
|
-
<% else %>
|
12
|
-
(<%= link_to t('series_statement.edit'), series_statements_path(:manifestation_id => @manifestation.id) -%>)
|
13
|
-
<% end %>
|
14
|
-
<%- else -%>
|
15
|
-
<%= f.label t('activerecord.models.series_statement') -%>
|
16
|
-
<% if @manifestation.new_record? %>
|
17
|
-
(<%= link_to t('page.listing', :model => t('activerecord.models.series_statement')), series_statements_path -%>)
|
18
|
-
<% else %>
|
19
|
-
(<%= link_to t('page.listing', :model => t('activerecord.models.series_statement')), manifestation_series_statements_path(@manifestation) -%>)
|
20
|
-
<%- end -%>
|
21
|
-
<%- end -%>
|
22
|
-
<% if @series_statement %>
|
23
|
-
<%= f.fields_for :series_has_manifestation do |s| %>
|
24
|
-
<%= s.hidden_field :series_statement_id %>
|
25
|
-
<% end %>
|
26
|
-
<% end %>
|
27
|
-
</div>
|
28
|
-
|
29
5
|
<div class="field">
|
30
6
|
<%= f.label :original_title -%><br />
|
31
7
|
<%= f.text_field :original_title, :class => 'resource_title' -%>
|
@@ -39,6 +15,15 @@
|
|
39
15
|
<%= f.text_field :title_alternative, :class => 'resource_title' -%>
|
40
16
|
</div>
|
41
17
|
|
18
|
+
<div class="field">
|
19
|
+
<%= f.label :series_statement_string -%><br />
|
20
|
+
<%= f.fields_for :series_statements do |series_form| %>
|
21
|
+
<%= series_form.text_field :original_title %>
|
22
|
+
<%= series_form.link_to_remove t('page.remove') %>
|
23
|
+
<% end %>
|
24
|
+
<p><%= f.link_to_add t('page.add'), :series_statements %></p>
|
25
|
+
</div>
|
26
|
+
|
42
27
|
<div class="field">
|
43
28
|
<%= f.label :creator_string -%><br />
|
44
29
|
<%= f.fields_for :creators do |creator_form| %>
|
@@ -1,8 +1,8 @@
|
|
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
|
-
<% if manifestation.
|
5
|
-
<%= render 'manifestations/show_series_index', :manifestation => manifestation -%>
|
4
|
+
<% if manifestation.root_series_statement %>
|
5
|
+
<%= render 'manifestations/show_series_index', :manifestation => manifestation, :series_statement => manifestation.root_series_statement -%>
|
6
6
|
<% else %>
|
7
7
|
<% cache([:manifestation => manifestation.id, :fragment => 'manifestation_html', :role => current_user_role_name, :locale => @locale]) do %>
|
8
8
|
<%= render 'manifestations/show_index', :manifestation => manifestation -%>
|
@@ -31,8 +31,8 @@
|
|
31
31
|
<% unless params[:mode] == 'add' %>
|
32
32
|
<%= link_to image_tag('icons/book_edit.png', :size => '16x16', :alt => t('page.edit')), edit_manifestation_path(manifestation) -%>
|
33
33
|
<% if @series_statement %>
|
34
|
-
<% if manifestation.
|
35
|
-
<%= link_to t('page.destroy'), series_statement_series_has_manifestation_path(manifestation.
|
34
|
+
<% if manifestation.root_series_statement == @series_statement %>
|
35
|
+
<%= link_to t('page.destroy'), series_statement_series_has_manifestation_path(manifestation.root_series_statement, manifestation.series_has_manifestations.where(:series_statement_id => manifestation.root_series_statement.id).first), :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
|
36
36
|
<% end %>
|
37
37
|
<% end %>
|
38
38
|
<% else %>
|
@@ -44,7 +44,7 @@
|
|
44
44
|
<% when @index_patron[:publisher] %>
|
45
45
|
<%= link_to t('page.add'), new_patron_produce_path(@index_patron[:publisher], :manifestation_id => manifestation.id) unless manifestation.publishers.include?(@index_patron[:publisher]) -%>
|
46
46
|
<% when @series_statement %>
|
47
|
-
<% unless manifestation.
|
47
|
+
<% unless manifestation.series_statements.exists? -%>
|
48
48
|
<%= link_to t('page.add'), new_series_has_manifestation_path(:series_statement_id => @series_statement.id, :manifestation_id => manifestation.id) -%>
|
49
49
|
<% end %>
|
50
50
|
<% when @manifestation %>
|
@@ -10,11 +10,15 @@
|
|
10
10
|
<td style="width: 500px"><%= manifestation.title_alternative -%></td>
|
11
11
|
</tr>
|
12
12
|
<% end %>
|
13
|
-
<%- if manifestation.
|
13
|
+
<%- if manifestation.series_statements.exists? -%>
|
14
14
|
<tr>
|
15
15
|
<td style="width: 200px"><%= t('activerecord.models.series_statement') -%>:</td>
|
16
16
|
<td style="width: 500px">
|
17
|
-
|
17
|
+
<ul>
|
18
|
+
<% manifestation.series_statements.each do |series_statement| %>
|
19
|
+
<li><%= link_to series_statement.original_title, series_statement -%></li>
|
20
|
+
<% end %>
|
21
|
+
</ul>
|
18
22
|
<%= manifestation.volume_number_string %>
|
19
23
|
<%- if manifestation.issn.present? -%>
|
20
24
|
(<%= t('activerecord.attributes.manifestation.issn') -%>: <%= manifestation.issn -%>)
|
@@ -10,11 +10,15 @@
|
|
10
10
|
<td style="width: 500px"><%= manifestation.title_alternative -%></td>
|
11
11
|
</tr>
|
12
12
|
<% end %>
|
13
|
-
<%- if manifestation.
|
13
|
+
<%- if manifestation.series_statements.exists? -%>
|
14
14
|
<tr>
|
15
15
|
<td style="width: 200px"><%= t('activerecord.models.series_statement') -%>:</td>
|
16
16
|
<td style="width: 500px">
|
17
|
-
|
17
|
+
<ul>
|
18
|
+
<% manifestation.series_statements.each do |series_statement| %>
|
19
|
+
<li><%= link_to series_statement.original_title, series_statement -%></li>
|
20
|
+
<% end %>
|
21
|
+
</ul>
|
18
22
|
<%= manifestation.volume_number_string %>
|
19
23
|
<%- if manifestation.issn.present? -%>
|
20
24
|
(<%= t('activerecord.attributes.manifestation.issn') -%>: <%= manifestation.issn -%>)
|
@@ -1,16 +1,11 @@
|
|
1
1
|
<strong>
|
2
|
-
<% if manifestation.
|
3
|
-
<%= link_to manifestation.
|
2
|
+
<% if manifestation.root_series_statement %>
|
3
|
+
<%= link_to manifestation.root_series_statement.original_title, series_statement_manifestations_path(manifestation.root_series_statement, :query => @query) %>
|
4
4
|
<% else %>
|
5
5
|
<%= link_to title_with_volume_number(manifestation), manifestation -%>
|
6
6
|
<% end %>
|
7
7
|
</strong>
|
8
|
-
<% if manifestation.
|
9
|
-
<%- if manifestation.series_statement.try(:first_issue) and manifestation.series_statement.try(:latest_issue) -%>
|
10
|
-
<%= manifestation.series_statement.first_issue.date_of_publication.try(:year) -%>
|
11
|
-
-
|
12
|
-
<%= manifestation.series_statement.latest_issue.date_of_publication.try(:year) -%>
|
13
|
-
<%- end -%>
|
8
|
+
<% if manifestation.series_master? %>
|
14
9
|
<%= image_tag('icons/newspaper.png', :size => '16x16', :alt => t('manifestation.serial')) -%>
|
15
10
|
<%- end -%>
|
16
11
|
<%= link_to form_icon(manifestation.carrier_type), manifestation -%>
|
@@ -1,40 +1,23 @@
|
|
1
|
-
<%= render 'manifestations/title', :manifestation => @manifestation.
|
1
|
+
<%= render 'manifestations/title', :manifestation => @manifestation.root_series_statement.manifestation -%>
|
2
2
|
|
3
3
|
<p>
|
4
4
|
<strong><%= t('activerecord.attributes.series_statement.original_title') -%></strong>
|
5
|
-
<%= @manifestation.
|
5
|
+
<%= @manifestation.root_series_statement.original_title %>
|
6
6
|
</p>
|
7
7
|
|
8
8
|
<p>
|
9
9
|
<strong><%= t('activerecord.attributes.series_statement.title_transcription') -%></strong>
|
10
|
-
<%= @manifestation.
|
10
|
+
<%= @manifestation.root_series_statement.title_transcription %>
|
11
11
|
</p>
|
12
12
|
|
13
13
|
<p>
|
14
14
|
<strong><%= t('activerecord.attributes.series_statement.issn') -%></strong>
|
15
|
-
<%= @manifestation.
|
15
|
+
<%= @manifestation.root_series_statement.issn %>
|
16
16
|
</p>
|
17
17
|
|
18
|
-
<!--
|
19
|
-
<p>
|
20
|
-
<strong><%= t('activerecord.attributes.series_statement.numbering') -%></strong>
|
21
|
-
<%= @manifestation.series_statement.numbering %>
|
22
|
-
</p>
|
23
|
-
|
24
|
-
<p>
|
25
|
-
<strong><%= t('activerecord.attributes.series_statement.title_subseries') -%></strong>
|
26
|
-
<%= @manifestation.series_statement.title_subseries %>
|
27
|
-
</p>
|
28
|
-
|
29
|
-
<p>
|
30
|
-
<strong><%= t('activerecord.attributes.series_statement.numbering_subseries') -%></strong>
|
31
|
-
<%= @manifestation.series_statement.numbering_subseries %>
|
32
|
-
</p>
|
33
|
-
-->
|
34
|
-
|
35
18
|
<p>
|
36
19
|
<strong><%= t('activerecord.attributes.series_statement.series_statement_identifier') -%></strong>
|
37
|
-
<%= @manifestation.
|
20
|
+
<%= @manifestation.root_series_statement.series_statement_identifier %>
|
38
21
|
</p>
|
39
22
|
|
40
|
-
<%= render 'series_statements/manifestation_list', :series_statement => @manifestation.
|
23
|
+
<%= render 'series_statements/manifestation_list', :series_statement => @manifestation.root_series_statement -%>
|
@@ -1,12 +1,4 @@
|
|
1
|
-
<strong><%= link_to
|
2
|
-
<% if manifestation.periodical_master? %>
|
3
|
-
<%- if manifestation.series_statement.try(:first_issue) and manifestation.series_statement.try(:latest_issue) -%>
|
4
|
-
<%= manifestation.series_statement.first_issue.date_of_publication.try(:year) -%>
|
5
|
-
-
|
6
|
-
<%= manifestation.series_statement.latest_issue.date_of_publication.try(:year) -%>
|
7
|
-
<%- end -%>
|
8
|
-
<%= image_tag('icons/newspaper.png', :size => '16x16', :alt => t('manifestation.serial')) -%>
|
9
|
-
<%- end -%>
|
1
|
+
<strong><%= link_to series_statement.original_title, series_statement_manifestations_path(series_statement, :query => @query) -%></strong>
|
10
2
|
<%= link_to form_icon(manifestation.carrier_type), manifestation -%>
|
11
3
|
<%= link_to image_tag('icons/world_go.png', :size => '16x16', :alt => t('manifestation.web')), manifestation.access_address unless manifestation.access_address.blank? -%>
|
12
4
|
<br />
|
@@ -87,7 +87,7 @@
|
|
87
87
|
<li><%= link_to t('manifestation.edit_contributor'), expression_patrons_path(@manifestation) -%></li>
|
88
88
|
<li><%= link_to t('manifestation.edit_publisher'), manifestation_patrons_path(@manifestation) -%></li>
|
89
89
|
<%- if @manifestation.periodical? -%>
|
90
|
-
<li><%= link_to t('manifestation.add_next_issue'), new_series_statement_manifestation_path(@manifestation.
|
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
91
|
<%- end -%>
|
92
92
|
</ul>
|
93
93
|
</li>
|
@@ -16,14 +16,6 @@
|
|
16
16
|
<%= f.label :title_transcription %><br />
|
17
17
|
<%= f.text_field :title_transcription %>
|
18
18
|
</div>
|
19
|
-
<div class="field">
|
20
|
-
<%= f.label :periodical %><br />
|
21
|
-
<%= f.check_box :periodical %>
|
22
|
-
</div>
|
23
|
-
<div class="field">
|
24
|
-
<%= f.label :issn %><br />
|
25
|
-
<%= f.text_field :issn %>
|
26
|
-
</div>
|
27
19
|
<div class="field">
|
28
20
|
<%= f.label :title_subseries %><br />
|
29
21
|
<%= f.text_field :title_subseries %>
|
@@ -29,23 +29,11 @@
|
|
29
29
|
</td>
|
30
30
|
<td>
|
31
31
|
<strong><%= link_to series_statement.original_title, series_statement %></strong>
|
32
|
-
|
33
|
-
|
34
|
-
<% if series_statement.root_manifestation.publishers.exists? %>
|
32
|
+
<% if series_statement.manifestation -%>
|
33
|
+
<% if series_statement.manifestation.publishers.exists? %>
|
35
34
|
<br />
|
36
|
-
<%= patrons_list(series_statement.
|
35
|
+
<%= patrons_list(series_statement.manifestation.publishers.readable_by(current_user)) %>
|
37
36
|
<% end %>
|
38
|
-
<% else %>
|
39
|
-
<% if series_statement.latest_issue %>
|
40
|
-
<% if series_statement.latest_issue.publishers.exists? %>
|
41
|
-
<br />
|
42
|
-
<%= patrons_list(series_statement.latest_issue.publishers.readable_by(current_user)) %>
|
43
|
-
<% end %>
|
44
|
-
<% end %>
|
45
|
-
<% end %>
|
46
|
-
<% if series_statement.issn? %>
|
47
|
-
<br />
|
48
|
-
ISSN: <%= series_statement.issn %>
|
49
37
|
<% end %>
|
50
38
|
</td>
|
51
39
|
<td>
|
@@ -68,6 +56,4 @@
|
|
68
56
|
<ul>
|
69
57
|
<li><%= link_to t('page.new', :model => t('activerecord.models.series_statement')), new_series_statement_path -%></li>
|
70
58
|
</ul>
|
71
|
-
<hr/>
|
72
|
-
<%= render 'periodical_facet' %>
|
73
59
|
</div>
|
@@ -18,7 +18,6 @@
|
|
18
18
|
<table class="table table-striped index">
|
19
19
|
<tr>
|
20
20
|
<th><%= t('activerecord.attributes.series_statement.original_title') -%></th>
|
21
|
-
<th><%= t('activerecord.attributes.series_statement.issn') -%></th>
|
22
21
|
<th><%= t('activerecord.attributes.series_statement.series_statement_identifier') -%></th>
|
23
22
|
<th></th>
|
24
23
|
</tr>
|
@@ -26,22 +25,8 @@
|
|
26
25
|
<% @series_statements.each do |series_statement| %>
|
27
26
|
<tr class="line<%= cycle("0", "1") -%>">
|
28
27
|
<td><%= link_to series_statement.original_title, series_statement %></td>
|
29
|
-
<td><%= series_statement.issn %></td>
|
30
28
|
<td><%= series_statement.series_statement_identifier %></td>
|
31
29
|
<td>
|
32
|
-
<%- if can? :create, SeriesHasManifestation -%>
|
33
|
-
<%- if params[:mode] == 'add' -%>
|
34
|
-
<% if @manifestation.series_has_manifestation %>
|
35
|
-
<% unless @manifestation.series_statement == series_statement %>
|
36
|
-
<%= link_to t('page.select'), edit_series_has_manifestation_path(@manifestation.series_has_manifestation, :series_statement_id => series_statement.id) -%>
|
37
|
-
<% end %>
|
38
|
-
<% else %>
|
39
|
-
<%= link_to t('page.select'), new_series_has_manifestation_path(:series_statement_id => series_statement.id, :manifestation_id => @manifestation.id) -%>
|
40
|
-
<% end %>
|
41
|
-
<%- else -%>
|
42
|
-
<%= link_to t('page.destroy'), manifestation_series_has_manifestation_path(@manifestation, series_statement.manifestation_included(@manifestation)), :data => {:confirm => t('page.are_you_sure')}, :method => :delete if series_statement.manifestation_included(@manifestation) -%>
|
43
|
-
<%- end -%>
|
44
|
-
<%- end -%>
|
45
30
|
</td>
|
46
31
|
</tr>
|
47
32
|
<% end %>
|
@@ -20,7 +20,6 @@
|
|
20
20
|
<table class="table table-striped index">
|
21
21
|
<tr>
|
22
22
|
<th><%= t('activerecord.attributes.series_statement.original_title') -%></th>
|
23
|
-
<th><%= t('activerecord.attributes.series_statement.issn') -%></th>
|
24
23
|
<th><%= t('activerecord.attributes.series_statement.series_statement_identifier') -%></th>
|
25
24
|
<th id="edit_icons"></th>
|
26
25
|
</tr>
|
@@ -28,7 +27,6 @@
|
|
28
27
|
<%- @series_statements.each do |series_statement| -%>
|
29
28
|
<tr class="line<%= cycle("0", "1") -%>">
|
30
29
|
<td><%= link_to series_statement.original_title, series_statement -%></td>
|
31
|
-
<td><%= series_statement.issn -%></td>
|
32
30
|
<td><%= series_statement.series_statement_identifier -%></td>
|
33
31
|
<td>
|
34
32
|
<%- if can? :update, series_statement -%>
|
@@ -18,7 +18,6 @@
|
|
18
18
|
<table class="table table-striped index">
|
19
19
|
<tr>
|
20
20
|
<th><%= t('activerecord.attributes.series_statement.original_title') -%></th>
|
21
|
-
<th><%= t('activerecord.attributes.series_statement.issn') -%></th>
|
22
21
|
<th><%= t('activerecord.attributes.series_statement.series_statement_identifier') -%></th>
|
23
22
|
<th id="edit_icons"></th>
|
24
23
|
</tr>
|
@@ -26,7 +25,6 @@
|
|
26
25
|
<%- @series_statements.each do |series_statement| -%>
|
27
26
|
<tr class="line<%= cycle("0", "1") -%>">
|
28
27
|
<td><%= link_to series_statement.original_title, series_statement_merge_list_series_statement_path(@series_statement_merge_list, series_statement) -%></td>
|
29
|
-
<td><%= series_statement.issn -%></td>
|
30
28
|
<td><%= series_statement.series_statement_identifier -%></td>
|
31
29
|
<td>
|
32
30
|
<%- if can? :delete, series_statement -%>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<%= paginate(@manifestations, :param_name => :manifestation_page, :remote => true) -%>
|
3
3
|
<table class="table table-striped index">
|
4
4
|
<%- @manifestations.each do |manifestation| -%>
|
5
|
-
<% next if manifestation.
|
5
|
+
<% next if manifestation.series_master? %>
|
6
6
|
<tr class="line<%= cycle("0", "1") -%>">
|
7
7
|
<td>
|
8
8
|
<%= render 'manifestations/show_index', :manifestation => manifestation %>
|