enju_biblio 0.1.0.pre25 → 0.1.0.pre26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/items_controller.rb +5 -3
- data/app/models/enju_biblio/ability.rb +1 -1
- data/app/models/item.rb +6 -8
- data/app/models/manifestation.rb +1 -1
- data/app/models/resource_import_file.rb +1 -1
- data/app/views/items/show.html.erb +1 -1
- data/app/views/manifestations/_manifestation.html.erb +31 -31
- data/app/views/series_statements/_index.html.erb +5 -3
- data/lib/enju_biblio/version.rb +1 -1
- data/spec/dummy/app/models/ability.rb +1 -1
- 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_46s +0 -0
- data/spec/dummy/tmp/cache/4F7/F90/default_role +0 -0
- data/spec/dummy/tmp/cache/6E4/420/search_engine_all +0 -0
- metadata +4 -36
- data/spec/dummy/solr/data/test/index/_2m7.fdt +0 -0
- data/spec/dummy/solr/data/test/index/_2m7.fdx +0 -0
- data/spec/dummy/solr/data/test/index/_2m7.fnm +0 -3
- data/spec/dummy/solr/data/test/index/_2m7.frq +0 -0
- data/spec/dummy/solr/data/test/index/_2m7.nrm +0 -1
- data/spec/dummy/solr/data/test/index/_2m7.prx +0 -0
- data/spec/dummy/solr/data/test/index/_2m7.tii +0 -0
- data/spec/dummy/solr/data/test/index/_2m7.tis +0 -0
- data/spec/dummy/solr/data/test/index/segments_3ra +0 -0
- data/spec/dummy/tmp/cache/4AD/470/country_all +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c13e2a38d5c6944c5ed3a848a94409d27c2e7ab3
|
4
|
+
data.tar.gz: fc303a17573c7c188a1a305ea929f0fe0f553cc6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b0b4215ba1bf4a50dc52dce7c171f8948ffb060db270db63d7717c9de43fc8811bb1ede2b594715d4daa4a5aca1e422220adc38ca2db75dd5ba95ec8fd2bbab
|
7
|
+
data.tar.gz: f4a4891b39e3ebc5204c9f66fdf0e60a5e5f06a04dd94262f2ffef273dc37cfd252950eb07cf200ce7ff810de0e7be864ec348dea8f0e1ad654a6f7bf4b09f16
|
@@ -158,9 +158,11 @@ class ItemsController < ApplicationController
|
|
158
158
|
# GET /items/1/edit
|
159
159
|
def edit
|
160
160
|
@item.library_id = @item.shelf.library_id
|
161
|
-
|
162
|
-
@item.
|
163
|
-
|
161
|
+
if defined?(EnjuCirculation)
|
162
|
+
unless @item.use_restriction
|
163
|
+
@item.build_item_has_use_restriction
|
164
|
+
@item.item_has_use_restriction.use_restriction = UseRestriction.where(:name => 'Not For Loan').first
|
165
|
+
end
|
164
166
|
end
|
165
167
|
end
|
166
168
|
|
@@ -11,7 +11,7 @@ module EnjuBiblio
|
|
11
11
|
end if LibraryGroup.site_config.network_access_allowed?(ip_address)
|
12
12
|
can [:read, :create, :update], Item
|
13
13
|
can [:destroy, :delete], Item do |item|
|
14
|
-
item.
|
14
|
+
item.removable?
|
15
15
|
end
|
16
16
|
can [:read, :create, :update], Manifestation
|
17
17
|
can [:destroy, :delete], Manifestation do |manifestation|
|
data/app/models/item.rb
CHANGED
@@ -78,15 +78,13 @@ class Item < ActiveRecord::Base
|
|
78
78
|
Addressable::URI.parse("#{LibraryGroup.site_config.url}manifestations/#{self.manifestation.id}").normalize.to_s if self.manifestation
|
79
79
|
end
|
80
80
|
|
81
|
-
def
|
82
|
-
if
|
83
|
-
return false
|
81
|
+
def removable?
|
82
|
+
if defined?(EnjuCirculation)
|
83
|
+
return false if circulation_status.name == 'Removed'
|
84
|
+
return false if checkouts.not_returned.exists?
|
85
|
+
true
|
84
86
|
else
|
85
|
-
|
86
|
-
checkouts.not_returned.empty?
|
87
|
-
else
|
88
|
-
true
|
89
|
-
end
|
87
|
+
true
|
90
88
|
end
|
91
89
|
end
|
92
90
|
|
data/app/models/manifestation.rb
CHANGED
@@ -9,7 +9,7 @@ class Manifestation < ActiveRecord::Base
|
|
9
9
|
:title_alternative_transcription, :description, :abstract, :available_at,
|
10
10
|
:valid_until, :date_submitted, :date_accepted, :date_captured, :ndl_bib_id,
|
11
11
|
:pub_date, :edition_string, :volume_number, :issue_number, :serial_number,
|
12
|
-
:ndc, :content_type_id, :attachment,
|
12
|
+
:ndc, :content_type_id, :attachment, :classification_number,
|
13
13
|
:series_has_manifestation_attributes
|
14
14
|
attr_accessible :fulltext_content,
|
15
15
|
:doi, :number_of_page_string
|
@@ -316,7 +316,7 @@ class ResourceImportFile < ActiveRecord::Base
|
|
316
316
|
item_identifier = row['item_identifier'].to_s.strip
|
317
317
|
item = Item.where(:item_identifier => item_identifier).first
|
318
318
|
if item
|
319
|
-
item.destroy if item.
|
319
|
+
item.destroy if item.removable?
|
320
320
|
end
|
321
321
|
row_num += 1
|
322
322
|
end
|
@@ -12,9 +12,9 @@
|
|
12
12
|
<% end %>
|
13
13
|
<% end %>
|
14
14
|
</td>
|
15
|
-
<% if
|
16
|
-
|
17
|
-
|
15
|
+
<% if signed_in? %>
|
16
|
+
<td id="edit_icons">
|
17
|
+
<% if defined?(EnjuCirculation) %>
|
18
18
|
<% unless params[:mode] == 'add' %>
|
19
19
|
<% if manifestation.is_reservable_by?(current_user) %>
|
20
20
|
<%- reserve = manifestation.is_reserved_by?(current_user) -%>
|
@@ -26,36 +26,36 @@
|
|
26
26
|
<% end %>
|
27
27
|
<br />
|
28
28
|
<% end %>
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
29
|
+
<% end %>
|
30
|
+
<%- if can? :update, manifestation -%>
|
31
|
+
<% unless params[:mode] == 'add' %>
|
32
|
+
<%= link_to image_tag('icons/book_edit.png', :size => '16x16', :alt => t('page.edit')), edit_manifestation_path(manifestation) -%>
|
33
|
+
<% if @series_statement %>
|
34
|
+
<% if manifestation.series_statement == @series_statement %>
|
35
|
+
<%= link_to t('page.destroy'), series_statement_series_has_manifestation_path(manifestation.series_statement, manifestation.series_has_manifestation), :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
|
36
36
|
<% end %>
|
37
|
-
<%
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
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 -%>
|
51
|
-
<% when @item %>
|
52
|
-
<%= link_to t('page.change'), edit_exemplify_path(@item.exemplify, :manifestation_id => manifestation.id) unless @item.manifestation == manifestation -%>
|
53
|
-
<% else %>
|
54
|
-
<%= link_to image_tag('icons/arrow_divide.png', :size => '16x16', :alt => t('manifestation.add_derivation')), manifestation_manifestations_path(manifestation, :mode => 'add') -%>
|
37
|
+
<% end %>
|
38
|
+
<% else %>
|
39
|
+
<% case %>
|
40
|
+
<% when @index_patron[:creator] %>
|
41
|
+
<%= link_to t('page.add'), new_patron_create_path(@index_patron[:creator], :work_id => manifestation.id) unless manifestation.creators.include?(@index_patron[:creator]) -%>
|
42
|
+
<% when @index_patron[:contributor] %>
|
43
|
+
<%= link_to t('page.add'), new_patron_realize_path(@index_patron[:contributor], :expression_id => manifestation.id) unless manifestation.contributors.include?(@index_patron[:contributor]) -%>
|
44
|
+
<% when @index_patron[:publisher] %>
|
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
|
+
<% when @series_statement %>
|
47
|
+
<% unless manifestation.series_statement -%>
|
48
|
+
<%= link_to t('page.add'), new_series_has_manifestation_path(:series_statement_id => @series_statement.id, :manifestation_id => manifestation.id) -%>
|
55
49
|
<% end %>
|
56
|
-
|
50
|
+
<% when @manifestation %>
|
51
|
+
<%= link_to t('page.add'), new_manifestation_manifestation_relationship_path(@manifestation, :child_id => manifestation.id) unless @manifestation.derived_manifestations.include?(manifestation) or @manifestation == manifestation -%>
|
52
|
+
<% when @item %>
|
53
|
+
<%= link_to t('page.change'), edit_exemplify_path(@item.exemplify, :manifestation_id => manifestation.id) unless @item.manifestation == manifestation -%>
|
54
|
+
<% else %>
|
55
|
+
<%= link_to image_tag('icons/arrow_divide.png', :size => '16x16', :alt => t('manifestation.add_derivation')), manifestation_manifestations_path(manifestation, :mode => 'add') -%>
|
56
|
+
<% end %>
|
57
57
|
<%- end -%>
|
58
|
-
|
59
|
-
|
58
|
+
<%- end -%>
|
59
|
+
</td>
|
60
60
|
<% end %>
|
61
61
|
</tr>
|
@@ -36,9 +36,11 @@
|
|
36
36
|
<%= patrons_list(series_statement.root_manifestation.publishers.readable_by(current_user)) %>
|
37
37
|
<% end %>
|
38
38
|
<% else %>
|
39
|
-
<% if series_statement.latest_issue
|
40
|
-
|
41
|
-
|
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 %>
|
42
44
|
<% end %>
|
43
45
|
<% end %>
|
44
46
|
<% if series_statement.issn? %>
|
data/lib/enju_biblio/version.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
end if LibraryGroup.site_config.network_access_allowed?(ip_address)
|
12
12
|
can [:read, :create, :update], Item
|
13
13
|
can [:destroy, :delete], Item do |item|
|
14
|
-
item.
|
14
|
+
item.removable?
|
15
15
|
end
|
16
16
|
can [:read, :create, :update], Manifestation
|
17
17
|
can [:destroy, :delete], Manifestation do |manifestation|
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
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.pre26
|
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-03-
|
11
|
+
date: 2013-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -234,20 +234,6 @@ dependencies:
|
|
234
234
|
- - '>='
|
235
235
|
- !ruby/object:Gem::Version
|
236
236
|
version: '0'
|
237
|
-
- !ruby/object:Gem::Dependency
|
238
|
-
name: nested_form
|
239
|
-
requirement: !ruby/object:Gem::Requirement
|
240
|
-
requirements:
|
241
|
-
- - '>='
|
242
|
-
- !ruby/object:Gem::Version
|
243
|
-
version: '0'
|
244
|
-
type: :runtime
|
245
|
-
prerelease: false
|
246
|
-
version_requirements: !ruby/object:Gem::Requirement
|
247
|
-
requirements:
|
248
|
-
- - '>='
|
249
|
-
- !ruby/object:Gem::Version
|
250
|
-
version: '0'
|
251
237
|
- !ruby/object:Gem::Dependency
|
252
238
|
name: sqlite3
|
253
239
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1142,19 +1128,10 @@ files:
|
|
1142
1128
|
- spec/dummy/solr/conf/spellings.txt
|
1143
1129
|
- spec/dummy/solr/conf/stopwords.txt
|
1144
1130
|
- spec/dummy/solr/conf/synonyms.txt
|
1145
|
-
- spec/dummy/solr/data/test/index/_2m7.fdt
|
1146
|
-
- spec/dummy/solr/data/test/index/_2m7.fdx
|
1147
|
-
- spec/dummy/solr/data/test/index/_2m7.fnm
|
1148
|
-
- spec/dummy/solr/data/test/index/_2m7.frq
|
1149
|
-
- spec/dummy/solr/data/test/index/_2m7.nrm
|
1150
|
-
- spec/dummy/solr/data/test/index/_2m7.prx
|
1151
|
-
- spec/dummy/solr/data/test/index/_2m7.tii
|
1152
|
-
- spec/dummy/solr/data/test/index/_2m7.tis
|
1153
1131
|
- spec/dummy/solr/data/test/index/segments.gen
|
1154
|
-
- spec/dummy/solr/data/test/index/
|
1132
|
+
- spec/dummy/solr/data/test/index/segments_46s
|
1155
1133
|
- spec/dummy/solr/data/test/spellchecker/segments.gen
|
1156
1134
|
- spec/dummy/solr/data/test/spellchecker/segments_1
|
1157
|
-
- spec/dummy/tmp/cache/4AD/470/country_all
|
1158
1135
|
- spec/dummy/tmp/cache/4F7/F90/default_role
|
1159
1136
|
- spec/dummy/tmp/cache/6E4/420/search_engine_all
|
1160
1137
|
- spec/factories/basket.rb
|
@@ -1584,19 +1561,10 @@ test_files:
|
|
1584
1561
|
- spec/dummy/solr/conf/spellings.txt
|
1585
1562
|
- spec/dummy/solr/conf/stopwords.txt
|
1586
1563
|
- spec/dummy/solr/conf/synonyms.txt
|
1587
|
-
- spec/dummy/solr/data/test/index/_2m7.fdt
|
1588
|
-
- spec/dummy/solr/data/test/index/_2m7.fdx
|
1589
|
-
- spec/dummy/solr/data/test/index/_2m7.fnm
|
1590
|
-
- spec/dummy/solr/data/test/index/_2m7.frq
|
1591
|
-
- spec/dummy/solr/data/test/index/_2m7.nrm
|
1592
|
-
- spec/dummy/solr/data/test/index/_2m7.prx
|
1593
|
-
- spec/dummy/solr/data/test/index/_2m7.tii
|
1594
|
-
- spec/dummy/solr/data/test/index/_2m7.tis
|
1595
1564
|
- spec/dummy/solr/data/test/index/segments.gen
|
1596
|
-
- spec/dummy/solr/data/test/index/
|
1565
|
+
- spec/dummy/solr/data/test/index/segments_46s
|
1597
1566
|
- spec/dummy/solr/data/test/spellchecker/segments.gen
|
1598
1567
|
- spec/dummy/solr/data/test/spellchecker/segments_1
|
1599
|
-
- spec/dummy/tmp/cache/4AD/470/country_all
|
1600
1568
|
- spec/dummy/tmp/cache/4F7/F90/default_role
|
1601
1569
|
- spec/dummy/tmp/cache/6E4/420/search_engine_all
|
1602
1570
|
- spec/factories/basket.rb
|
Binary file
|
Binary file
|
Binary file
|
@@ -1 +0,0 @@
|
|
1
|
-
NRM�yyxyyxxxxxyttuuux��||���������������||�������������
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|