enju_biblio 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ef18fa14001d13dc376788b697f3a871bdc09ebd9d7e4bbc6cf657624c223859
4
- data.tar.gz: 388fe4512c27adfa434f439fefdb1abee267729ba23aeac192add823e62155d5
3
+ metadata.gz: d4aa7e9b399b5eee57078c7f9b563e0078f37cd032965aba1631edb1df7383a5
4
+ data.tar.gz: 1a3263a460b2698368f020117e5c406703b3ea7d62c405480d385e8d4fd6439a
5
5
  SHA512:
6
- metadata.gz: 620e4e29cdae3c7e3fe3d35ab0b80597aa9a7eab8f153cc71f6b782a405a6b8908ba36bfd8c6b03d76d978449f7e3502297761a9b1b220f97c94fb4b5ce1a6c5
7
- data.tar.gz: 49309d8ad2ee23c84564c6bcc6b4a5256778760a59e6ac0536d5489748acc61dca8011fdeec46ca5a1647bd1c17a9f7633a7889fdea292cd1695c12e4402b3ad
6
+ metadata.gz: c43ea21a6ee52dd3e4c5b5fcb52f50a2e2d2dba57bce56f22182d2b08231861d86ad38ec85b09a4daef980098bc1bfd6fa16a07b467e7efbc7c656c8d1d22277
7
+ data.tar.gz: 3489cd2bbb99548f80d6f435b7a02d139c67c6e27eb8b72f107c59d511d0a10771b0f76840d9addc9217b5bc127900dd85c61377e47f7be20575f68ec3b5b2ac
@@ -0,0 +1,15 @@
1
+ # EnjuBiblio
2
+ [<img src="https://travis-ci.com/next-l/enju_biblio.svg?branch=1.3" alt="Build
3
+ Status" />](https://travis-ci.com/next-l/enju_biblio) [<img
4
+ src="https://coveralls.io/repos/next-l/enju_biblio/badge.svg?branch=1.3&servic
5
+ e=github" alt="Coverage Status"
6
+ />](https://coveralls.io/github/next-l/enju_biblio?branch=1.3) [<img
7
+ src="https://hakiri.io/github/next-l/enju_biblio/1.3.svg" alt="security"
8
+ />](https://hakiri.io/github/next-l/enju_biblio/1.3)
9
+
10
+ This project rocks and uses MIT-LICENSE.
11
+
12
+ ## 製作者・貢献者 (Authors and contributors)
13
+ * [TANABE, Kosuke](https://github.com/nabeta) ([@nabeta](https://twitter.com/nabeta))
14
+ * [Project Next-L](https://www.next-l.jp) ([@ProjectNextL](https://twitter.com/ProjectNextL))
15
+
data/Rakefile CHANGED
@@ -16,7 +16,7 @@ RDoc::Task.new(:rdoc) do |rdoc|
16
16
  rdoc.rdoc_dir = 'rdoc'
17
17
  rdoc.title = 'EnjuBiblio'
18
18
  rdoc.options << '--line-numbers'
19
- rdoc.rdoc_files.include('README.rdoc')
19
+ rdoc.rdoc_files.include('README.md')
20
20
  rdoc.rdoc_files.include('lib/**/*.rb')
21
21
  end
22
22
 
@@ -182,6 +182,10 @@ class Manifestation < ApplicationRecord
182
182
  identifier_contents(:issn)
183
183
  end
184
184
  end
185
+ text :identifier do
186
+ other_identifiers = identifiers.joins(:identifier_type).merge(IdentifierType.where.not(name: [:isbn, :issn]))
187
+ other_identifiers.pluck(:body)
188
+ end
185
189
  string :sort_title
186
190
  string :doi, multiple: true do
187
191
  identifier_contents(:doi)
@@ -77,14 +77,6 @@
77
77
  <%- end -%>
78
78
  </ul>
79
79
  <% if defined?(EnjuCirculation) %>
80
- <h4><%= t('activerecord.models.circulation_status') -%></h4>
81
- <ul>
82
- <%- @circulation_status_facet.each do |facet| -%>
83
- <li><%= circulation_status_facet(facet) %></li>
84
- <%- end -%>
85
- <%- if params[:circulation_status] -%>
86
- <li><%= link_to t('page.remove_this_facet'), url_for(filtered_params.merge(circulation_status: nil, page: nil, view: nil, only_path: true)) -%></li>
87
- <%- end -%>
88
- </ul>
80
+ <%= render 'items/circulation_status_facet' %>
89
81
  <% end %>
90
82
  </div>
@@ -41,15 +41,6 @@
41
41
  <%- end -%>
42
42
  <%- end -%>
43
43
  </p>
44
-
45
- <p>
46
- <strong><%= t('activerecord.models.use_restriction') -%>:</strong>
47
- <% if @item.use_restriction %>
48
- <ul>
49
- <li><%= @item.use_restriction.display_name.localize %></li>
50
- </ul>
51
- <% end %>
52
- </p>
53
44
  <% end %>
54
45
 
55
46
  <p>
@@ -57,30 +48,41 @@
57
48
  <%= localized_boolean(@item.include_supplements) -%>
58
49
  </p>
59
50
 
60
- <p>
61
- <strong><%= t('activerecord.attributes.item.required_role_id') -%>:</strong>
62
- <%= @item.required_role.name -%>
63
- </p>
64
-
65
51
  <p>
66
52
  <strong><%= t('activerecord.attributes.item.call_number') -%>:</strong>
67
53
  <%= @item.call_number -%>
68
54
  </p>
69
55
 
70
- <p>
71
- <strong><%= t('activerecord.models.budget_type') -%>:</strong>
72
- <%= @item.budget_type.try(:display_name).try(:localize) -%>
73
- </p>
56
+ <% if current_user.try(:has_role?, 'Librarian') %>
57
+ <p>
58
+ <strong><%= t('activerecord.models.use_restriction') -%>:</strong>
59
+ <% if @item.use_restriction %>
60
+ <ul>
61
+ <li><%= @item.use_restriction.display_name.localize %></li>
62
+ </ul>
63
+ <% end %>
64
+ </p>
74
65
 
75
- <p>
76
- <strong><%= t('activerecord.models.bookstore') -%>:</strong>
77
- <%= @item.bookstore.try(:name) -%>
78
- </p>
66
+ <p>
67
+ <strong><%= t('activerecord.attributes.item.required_role_id') -%>:</strong>
68
+ <%= @item.required_role.name -%>
69
+ </p>
79
70
 
80
- <p>
81
- <strong><%= t('activerecord.attributes.item.price') -%>:</strong>
82
- <%= @item.price -%>
83
- </p>
71
+ <p>
72
+ <strong><%= t('activerecord.models.budget_type') -%>:</strong>
73
+ <%= @item.budget_type.try(:display_name).try(:localize) -%>
74
+ </p>
75
+
76
+ <p>
77
+ <strong><%= t('activerecord.models.bookstore') -%>:</strong>
78
+ <%= @item.bookstore.try(:name) -%>
79
+ </p>
80
+
81
+ <p>
82
+ <strong><%= t('activerecord.attributes.item.price') -%>:</strong>
83
+ <%= @item.price -%>
84
+ </p>
85
+ <% end %>
84
86
 
85
87
  <p>
86
88
  <strong><%= t('activerecord.attributes.item.url') -%>:</strong>
@@ -30,20 +30,7 @@
30
30
  <%= item.call_number -%>
31
31
  </td>
32
32
  <% if defined?(EnjuCirculation) %>
33
- <td>
34
- <%= item.circulation_status.display_name.localize if item.circulation_status -%>
35
- <% if item.retained? %>
36
- <br />
37
- <%= t('reserve.retained') %>
38
- <% end %>
39
- <% if item.rent? %>
40
- <br />
41
- (
42
- <%= t('activerecord.attributes.checkout.due_date') -%>:
43
- <%= l(item.latest_checkout.due_date, format: :short) -%>
44
- )
45
- <% end %>
46
- </td>
33
+ <%= render 'manifestations/circulation_status', item: item %>
47
34
  <% end %>
48
35
  </tr>
49
36
  <% if policy(item).update? %>
@@ -51,22 +51,7 @@
51
51
 
52
52
  <%- unless @manifestation.carrier_type.name == 'file' -%>
53
53
  <% if defined?(EnjuCirculation) %>
54
- <% if user_signed_in? %>
55
- <% if @manifestation.is_reservable_by?(current_user) %>
56
- <li><%= link_to_reservation(@manifestation, @reserve) %>
57
- <br />
58
- (<%= link_to_if(current_user.has_role?('Librarian'), t('page.number_of_reservations', count: @reserved_count), reserves_path(query: "manifestation_id_i:#{@manifestation.id}")) -%>)</li>
59
- <%- else -%>
60
- <% if defined?(EnjuPurchaseRequest) %>
61
- <li><%= link_to t('activerecord.models.purchase_request'), new_purchase_request_path(purchase_request: {url: manifestation_url(@manifestation)}) %></li>
62
- <% end %>
63
- <%- end -%>
64
- <% else %>
65
- <% unless @manifestation.items.for_checkout.empty? %>
66
- <li><%= link_to_reservation(@manifestation, @reserve) %><br />
67
- (<%= t('page.number_of_reservations', count: @reserved_count) -%>)</li>
68
- <% end %>
69
- <% end %>
54
+ <%= render 'manifestations/reservation' %>
70
55
  <% end %>
71
56
  <%- end -%>
72
57
  </ul>
@@ -1,3 +1,3 @@
1
1
  module EnjuBiblio
2
- VERSION = "0.3.4"
2
+ VERSION = "0.3.5"
3
3
  end
@@ -28,6 +28,13 @@ four:
28
28
  position: 4
29
29
  id: 4
30
30
 
31
+ five:
32
+ name: custom
33
+ display_name: 独自識別子
34
+ note:
35
+ position: 5
36
+ id: 5
37
+
31
38
  # == Schema Information
32
39
  #
33
40
  # Table name: identifier_types
@@ -104,6 +104,11 @@ identifier_00217:
104
104
  identifier_type_id: 4
105
105
  body: "BN15603730"
106
106
 
107
+ identifier_00001a:
108
+ manifestation_id: 1
109
+ identifier_type_id: 5
110
+ body: "custom1111"
111
+
107
112
  # == Schema Information
108
113
  #
109
114
  # Table name: identifiers
@@ -201,6 +201,12 @@ describe Manifestation, solr: true do
201
201
  manifestation.should_not be_valid
202
202
  end
203
203
 
204
+ it "should search custom identifiers" do
205
+ Manifestation.search do
206
+ fulltext 'identifier_text:custom1111'
207
+ end.results.count.should eq 1
208
+ end
209
+
204
210
  # it "should set series_statement if the manifestation is periodical" do
205
211
  # manifestation = series_statements(:two).manifestations.new
206
212
  # manifestation.set_series_statements([series_statements(:two)])
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.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kosuke Tanabe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-04 00:00:00.000000000 Z
11
+ date: 2019-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: enju_library
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.3.4
19
+ version: 0.3.5
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.3.4
26
+ version: 0.3.5
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: marc
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -128,42 +128,42 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 1.3.2
131
+ version: 1.3.3
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: 1.3.2
138
+ version: 1.3.3
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: enju_manifestation_viewer
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 0.3.2
145
+ version: 0.3.3
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: 0.3.2
152
+ version: 0.3.3
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: enju_subject
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: 0.3.0
159
+ version: 0.3.1
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: 0.3.0
166
+ version: 0.3.1
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: enju_inventory
169
169
  requirement: !ruby/object:Gem::Requirement
@@ -500,7 +500,7 @@ extensions: []
500
500
  extra_rdoc_files: []
501
501
  files:
502
502
  - MIT-LICENSE
503
- - README.rdoc
503
+ - README.md
504
504
  - Rakefile
505
505
  - app/assets/config/enju_biblio_manifest.js
506
506
  - app/assets/images/icons/book.png
@@ -1,10 +0,0 @@
1
- = EnjuBiblio
2
- {<img src="https://travis-ci.org/next-l/enju_biblio.svg?branch=1.3" alt="Build Status" />}[https://travis-ci.org/next-l/enju_biblio]
3
- {<img src="https://coveralls.io/repos/next-l/enju_biblio/badge.svg?branch=1.3&service=github" alt="Coverage Status" />}[https://coveralls.io/github/next-l/enju_biblio?branch=1.3]
4
- {<img src="https://hakiri.io/github/next-l/enju_biblio/1.3.svg" alt="security" />}[https://hakiri.io/github/next-l/enju_biblio/1.3]
5
-
6
- This project rocks and uses MIT-LICENSE.
7
-
8
- == 製作者・貢献者 (Authors and contributors)
9
- * {TANABE, Kosuke}[https://github.com/nabeta] ({@nabeta}[https://twitter.com/nabeta])
10
- * {Project Next-L}[https://www.next-l.jp] ({@ProjectNextL}[https://twitter.com/ProjectNextL])