enju_biblio 0.1.0.pre15 → 0.1.0.pre16
Sign up to get free protection for your applications and to get access to all the features.
- data/app/models/item.rb +27 -26
- data/app/models/manifestation.rb +1 -1
- data/app/views/layouts/manifestations.html.erb +32 -0
- data/app/views/layouts/manifestations.mobile.erb +18 -0
- data/app/views/layouts/patrons.html.erb +26 -0
- data/app/views/layouts/patrons.mobile.erb +18 -0
- data/app/views/manifestations/_show_detail_librarian.html.erb +0 -3
- data/app/views/manifestations/_show_detail_user.html.erb +0 -3
- data/config/locales/translation_en.yml +239 -0
- data/config/locales/translation_ja.yml +239 -0
- data/config/routes.rb +2 -0
- data/lib/enju_biblio/version.rb +1 -1
- data/spec/dummy/app/controllers/application_controller.rb +11 -1
- data/spec/dummy/app/models/ability.rb +0 -2
- data/spec/dummy/app/views/page/_footer.html.erb +4 -0
- data/spec/dummy/app/views/page/_header.html.erb +2 -0
- data/spec/dummy/app/views/page/_include.html.erb +4 -0
- data/spec/dummy/app/views/page/_menu.html.erb +2 -0
- data/spec/dummy/app/views/page/_select_locale.html.erb +2 -0
- data/spec/dummy/db/schema.rb +0 -11
- data/spec/dummy/db/test.sqlite3 +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 +19 -42
- data/app/controllers/accepts_controller.rb +0 -83
- data/app/models/accept.rb +0 -37
- data/app/views/accepts/_form.html.erb +0 -11
- data/app/views/accepts/_list.html.erb +0 -31
- data/app/views/accepts/edit.html.erb +0 -13
- data/app/views/accepts/index.csv.erb +0 -4
- data/app/views/accepts/index.html.erb +0 -49
- data/app/views/accepts/index.js.erb +0 -1
- data/app/views/accepts/new.html.erb +0 -14
- data/app/views/accepts/show.html.erb +0 -31
- data/db/migrate/20120319173203_create_accepts.rb +0 -14
- data/spec/controllers/accepts_controller_spec.rb +0 -304
- data/spec/dummy/solr/data/test/index/segments.gen +0 -0
- data/spec/dummy/solr/data/test/index/segments_8c +0 -0
- data/spec/dummy/solr/data/test/spellchecker/segments.gen +0 -0
- data/spec/dummy/solr/data/test/spellchecker/segments_1 +0 -0
- data/spec/factories/accepts.rb +0 -9
- data/spec/models/accept_spec.rb +0 -23
- data/spec/requests/accepts_spec.rb +0 -11
- data/spec/routing/accepts_routing_spec.rb +0 -27
- data/spec/views/accepts/edit.html.erb_spec.rb +0 -18
- data/spec/views/accepts/index.html.erb_spec.rb +0 -25
- data/spec/views/accepts/new.html.erb_spec.rb +0 -31
- data/spec/views/accepts/show.html.erb_spec.rb +0 -17
data/app/models/item.rb
CHANGED
@@ -6,7 +6,6 @@ class Item < ActiveRecord::Base
|
|
6
6
|
:manifestation_id, :library_id, :required_role_id #,:exemplify_attributes
|
7
7
|
scope :on_shelf, where('shelf_id != 1')
|
8
8
|
scope :on_web, where(:shelf_id => 1)
|
9
|
-
scope :accepted_between, lambda{|from, to| includes(:accept).where('items.created_at BETWEEN ? AND ?', Time.zone.parse(from).beginning_of_day, Time.zone.parse(to).end_of_day)}
|
10
9
|
has_one :exemplify, :dependent => :destroy
|
11
10
|
has_one :manifestation, :through => :exemplify
|
12
11
|
has_many :owns
|
@@ -18,7 +17,6 @@ class Item < ActiveRecord::Base
|
|
18
17
|
belongs_to :required_role, :class_name => 'Role', :foreign_key => 'required_role_id', :validate => true
|
19
18
|
has_one :resource_import_result
|
20
19
|
belongs_to :budget_type
|
21
|
-
has_one :accept
|
22
20
|
#accepts_nested_attributes_for :exemplify
|
23
21
|
#before_save :create_manifestation
|
24
22
|
|
@@ -102,34 +100,10 @@ class Item < ActiveRecord::Base
|
|
102
100
|
manifestation.try(:publisher)
|
103
101
|
end
|
104
102
|
|
105
|
-
if defined?(EnjuLibrary)
|
106
|
-
belongs_to :shelf, :counter_cache => true, :validate => true
|
107
|
-
validates_associated :shelf
|
108
|
-
|
109
|
-
searchable do
|
110
|
-
string :library do
|
111
|
-
shelf.library.name if shelf
|
112
|
-
end
|
113
|
-
end
|
114
|
-
|
115
|
-
def shelf_name
|
116
|
-
shelf.name
|
117
|
-
end
|
118
|
-
end
|
119
|
-
|
120
|
-
def hold?(library)
|
121
|
-
return true if self.shelf.library == library
|
122
|
-
false
|
123
|
-
end
|
124
|
-
|
125
103
|
def owned(patron)
|
126
104
|
owns.where(:patron_id => patron.id).first
|
127
105
|
end
|
128
106
|
|
129
|
-
def library_url
|
130
|
-
"#{LibraryGroup.site_config.url}libraries/#{self.shelf.library.name}"
|
131
|
-
end
|
132
|
-
|
133
107
|
def manifestation_url
|
134
108
|
Addressable::URI.parse("#{LibraryGroup.site_config.url}manifestations/#{self.manifestation.id}").normalize.to_s if self.manifestation
|
135
109
|
end
|
@@ -151,6 +125,33 @@ class Item < ActiveRecord::Base
|
|
151
125
|
self.manifestation = Manifestation.find(manifestation_id)
|
152
126
|
end
|
153
127
|
end
|
128
|
+
|
129
|
+
if defined?(EnjuLibrary)
|
130
|
+
has_one :accept
|
131
|
+
scope :accepted_between, lambda{|from, to| includes(:accept).where('items.created_at BETWEEN ? AND ?', Time.zone.parse(from).beginning_of_day, Time.zone.parse(to).end_of_day)}
|
132
|
+
|
133
|
+
belongs_to :shelf, :counter_cache => true, :validate => true
|
134
|
+
validates_associated :shelf
|
135
|
+
|
136
|
+
searchable do
|
137
|
+
string :library do
|
138
|
+
shelf.library.name if shelf
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
def shelf_name
|
143
|
+
shelf.name
|
144
|
+
end
|
145
|
+
|
146
|
+
def hold?(library)
|
147
|
+
return true if self.shelf.library == library
|
148
|
+
false
|
149
|
+
end
|
150
|
+
|
151
|
+
def library_url
|
152
|
+
"#{LibraryGroup.site_config.url}libraries/#{self.shelf.library.name}"
|
153
|
+
end
|
154
|
+
end
|
154
155
|
end
|
155
156
|
|
156
157
|
# == Schema Information
|
data/app/models/manifestation.rb
CHANGED
@@ -186,7 +186,7 @@ class Manifestation < ActiveRecord::Base
|
|
186
186
|
time :acquired_at
|
187
187
|
end
|
188
188
|
|
189
|
-
enju_manifestation_viewer
|
189
|
+
enju_manifestation_viewer if defined?(EnjuManifestationViewer)
|
190
190
|
enju_ndl_search if defined?(EnjuNdl)
|
191
191
|
#enju_amazon
|
192
192
|
enju_oai if defined?(EnjuOai)
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%= @locale.to_s -%>" lang="<%= @locale.to_s -%>">
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8" />
|
5
|
+
<title><%= resource_title(@manifestation, controller.action_name) %></title>
|
6
|
+
<%= render 'page/include' %>
|
7
|
+
<%- if controller.action_name == 'index' -%>
|
8
|
+
<%= auto_discovery_link_tag(:rss, url_for(params.merge(:format => :rss, :page => nil, :commit => nil, :only_path => true)), :title => (t('manifestation.library_group_manifestation', :library_group_name => @library_group.display_name.localize) + " (RSS)")) %>
|
9
|
+
<%= auto_discovery_link_tag(:atom, url_for(params.merge(:format => :atom, :page => nil, :commit => nil, :only_path => true)), :title => (t('manifestation.library_group_manifestation', :library_group_name => @library_group.display_name.localize) + " (Atom)")) %>
|
10
|
+
<%- end -%>
|
11
|
+
<% if controller.action_name == 'show' %>
|
12
|
+
<% if Setting.book_jacket.source == :google %>
|
13
|
+
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
|
14
|
+
<%= render 'manifestations/google_book_thumbnail_header' %>
|
15
|
+
<% end %>
|
16
|
+
<% end %>
|
17
|
+
</head>
|
18
|
+
<body>
|
19
|
+
|
20
|
+
<%= render 'page/header' %>
|
21
|
+
<%= render 'page/menu' %>
|
22
|
+
|
23
|
+
<div id="content">
|
24
|
+
|
25
|
+
<%= yield %>
|
26
|
+
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<%= render 'page/footer' %>
|
30
|
+
|
31
|
+
</body>
|
32
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title><%= resource_title(@manifestation, controller.action_name) %></title>
|
5
|
+
<%= render 'page/mobile' %>
|
6
|
+
</head>
|
7
|
+
<body>
|
8
|
+
|
9
|
+
<div data-role="page">
|
10
|
+
|
11
|
+
<%= yield %>
|
12
|
+
|
13
|
+
<%= render 'page/footer' %>
|
14
|
+
|
15
|
+
</div>
|
16
|
+
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%= @locale.to_s -%>" lang="<%= @locale.to_s -%>">
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8" />
|
5
|
+
<title><%= title(controller.controller_name) %></title>
|
6
|
+
<%= render 'page/include' %>
|
7
|
+
<%- if controller.action_name == 'index' -%>
|
8
|
+
<%= auto_discovery_link_tag(:rss, url_for(params.merge(:format => 'rss', :page => nil, :commit => nil, :only_path => true)), :title => (t('patron.library_group_patron', :library_group_name => @library_group.display_name.localize) + " (RSS)")) %>
|
9
|
+
<%= auto_discovery_link_tag(:atom, url_for(params.merge(:format => 'atom', :page => nil, :commit => nil, :only_path => true)), :title => (t('patron.library_group_patron', :library_group_name => @library_group.display_name.localize) + " (Atom)")) %>
|
10
|
+
<%- end -%>
|
11
|
+
</head>
|
12
|
+
<body>
|
13
|
+
|
14
|
+
<%= render 'page/header' %>
|
15
|
+
<%= render 'page/menu' %>
|
16
|
+
|
17
|
+
<div id="content">
|
18
|
+
|
19
|
+
<%= yield %>
|
20
|
+
|
21
|
+
</div>
|
22
|
+
|
23
|
+
<%= render 'page/footer' %>
|
24
|
+
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title><%= title(controller.controller_name) %></title>
|
5
|
+
<%= render 'page/mobile' %>
|
6
|
+
</head>
|
7
|
+
<body>
|
8
|
+
|
9
|
+
<div data-role="page">
|
10
|
+
|
11
|
+
<%= yield %>
|
12
|
+
|
13
|
+
<%= render 'page/footer' %>
|
14
|
+
|
15
|
+
</div>
|
16
|
+
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -1,9 +1,6 @@
|
|
1
1
|
<div id="tabs">
|
2
2
|
<%= render 'manifestations/tab_menu', :manifestation => manifestation %>
|
3
3
|
<div id="detail">
|
4
|
-
<%- if manifestation.isbn -%>
|
5
|
-
<%= google_book_search_preview(manifestation.isbn) -%>
|
6
|
-
<%- end -%>
|
7
4
|
<% cache([:manifestation => manifestation.id, :fragment => 'show_detail_librarian_html', :role => current_user_role_name, :locale => @locale]) do %>
|
8
5
|
<table class="table table-striped" id="resource_detail">
|
9
6
|
<%= embed_content(manifestation) -%>
|
@@ -1,9 +1,6 @@
|
|
1
1
|
<div id="tabs">
|
2
2
|
<%= render 'manifestations/tab_menu', :manifestation => manifestation %>
|
3
3
|
<div id="detail">
|
4
|
-
<%- if manifestation.isbn -%>
|
5
|
-
<%= google_book_search_preview(manifestation.isbn) -%>
|
6
|
-
<%- end -%>
|
7
4
|
<% cache([:manifestation => manifestation.id, :fragment => 'show_detail_user_html', :role => current_user_role_name, :locale => @locale]) do %>
|
8
5
|
<table class="table table-striped" id="resource_detail">
|
9
6
|
<%= embed_content(manifestation) -%>
|
@@ -37,9 +37,248 @@ en:
|
|
37
37
|
series_statement_relationship: Series statement relationship
|
38
38
|
|
39
39
|
attributes:
|
40
|
+
manifestation:
|
41
|
+
original_title: Original title
|
42
|
+
title_alternative: Titlte alternative
|
43
|
+
title_transcription: Title transcription
|
44
|
+
classification_number: Classification number
|
45
|
+
manifestation_identifier: Manifestation identifier
|
46
|
+
date_of_publication: Date of publication
|
47
|
+
pub_date: Date of publication
|
48
|
+
deleted_at: Deleted at
|
49
|
+
access_address: Access address
|
50
|
+
start_page: Start page
|
51
|
+
end_page: End page
|
52
|
+
height: Height
|
53
|
+
width: Width
|
54
|
+
depth: Depth
|
55
|
+
isbn: ISBN
|
56
|
+
isbn10: ISBN 10
|
57
|
+
wrong_isbn: Wrong ISBN
|
58
|
+
nbn: NBN
|
59
|
+
price: Price
|
60
|
+
volume_number: Volume number (integer)
|
61
|
+
volume_number_string: Volume number
|
62
|
+
issue_number: Issue number (integer)
|
63
|
+
issue_number_string: Issue number
|
64
|
+
serial_number: Serial number
|
65
|
+
serial_number_string: Serial number (string)
|
66
|
+
edition: Edition (integer)
|
67
|
+
edition_string: Edition
|
68
|
+
note: Note
|
69
|
+
repository_content: Repository content
|
70
|
+
lock_version: Lock version
|
71
|
+
carrier_type: Manifestation form
|
72
|
+
language: Language
|
73
|
+
lccn: LCCN
|
74
|
+
issn: ISSN
|
75
|
+
subscription_master: Subscription master
|
76
|
+
description: Description
|
77
|
+
item:
|
78
|
+
call_number: Call number
|
79
|
+
item_identifier: Item identifier
|
80
|
+
deleted_at: Deleted at
|
81
|
+
include_supplements: Include supplements
|
82
|
+
note: Note
|
83
|
+
url: URL
|
84
|
+
price: Price
|
85
|
+
lock_version: Lock version
|
86
|
+
checkout_type: Checkout type
|
87
|
+
acquired_at: Acquired at
|
88
|
+
donation: Donation
|
89
|
+
patron:
|
90
|
+
last_name: Last name
|
91
|
+
middle_name: Middle name
|
92
|
+
first_name: Name
|
93
|
+
last_name_transcription: Last name transcription
|
94
|
+
middle_name_transcription: Middle name transcription
|
95
|
+
first_name_transcription: First name transcription
|
96
|
+
corporate_name: Corporate name
|
97
|
+
corporate_name_transcription: Corporate name transcription
|
98
|
+
full_name: Full name
|
99
|
+
full_name_transcription: Full name transcription
|
100
|
+
full_name_alternative: Full name alternative
|
101
|
+
deleted_at: Deleted at
|
102
|
+
zip_code_1: Zip code 1
|
103
|
+
zip_code_2: Zip code 2
|
104
|
+
address_1: Address 1
|
105
|
+
address_2: Address 2
|
106
|
+
address_1_note: Address 1 note
|
107
|
+
address_2_note: Address 2 note
|
108
|
+
telephone_number_1: Telephone number 1
|
109
|
+
telephone_number_2: Telephone number 2
|
110
|
+
fax_number_1: Fax number 1
|
111
|
+
fax_number_2: Fax number 2
|
112
|
+
other_designation: Other designation
|
113
|
+
place: Place
|
114
|
+
date_of_birth: Date of birth
|
115
|
+
date_of_death: Date of death
|
116
|
+
lock_version: Lock version
|
117
|
+
note: Note
|
118
|
+
country: Country
|
119
|
+
patron_type: Patron type
|
120
|
+
language: Language
|
121
|
+
email: Email
|
122
|
+
url: URL
|
40
123
|
series_statement_relationship:
|
41
124
|
parent_id: Parent
|
42
125
|
child_id: Child
|
126
|
+
patron_import_file:
|
127
|
+
patron_import_file_name: Filename
|
128
|
+
patron_import_content_type: Content type
|
129
|
+
patron_import_file_size: Size
|
130
|
+
patron_import_fingerprint: File hash
|
131
|
+
note: Note
|
132
|
+
executed_at: Executed at
|
133
|
+
patron_import_updated_at: Updated at
|
134
|
+
state: State
|
135
|
+
edit_mode: Edit mode
|
136
|
+
error_message: Error message
|
137
|
+
language:
|
138
|
+
name: Name
|
139
|
+
native_name: Native name
|
140
|
+
display_name: Display name
|
141
|
+
iso_639_1: ISO 639 1
|
142
|
+
iso_639_2: ISO 639 2
|
143
|
+
iso_639_3: ISO 639 3
|
144
|
+
note: Note
|
145
|
+
position: Position
|
146
|
+
resource_import_file:
|
147
|
+
resource_import_file_name: Filename
|
148
|
+
resource_import_content_type: Content type
|
149
|
+
resource_import_file_size: Size
|
150
|
+
resource_import_fingerprint: File hash
|
151
|
+
note: Note
|
152
|
+
executed_at: Executed at
|
153
|
+
resource_import_updated_at: Updated at
|
154
|
+
state: State
|
155
|
+
edit_mode: Edit mode
|
156
|
+
error_message: Error message
|
157
|
+
series_statement:
|
158
|
+
original_title: Title
|
159
|
+
numbering: Numbering
|
160
|
+
title_subseries: Title subseries
|
161
|
+
title_subseries_transcription: Title subseries transcription
|
162
|
+
numbering_subseries: Numbering subseries
|
163
|
+
work: Work
|
164
|
+
series_statement_identifier: Series statement identifier
|
165
|
+
issn: ISSN
|
166
|
+
periodical: Periodical
|
167
|
+
title_transcription: Title transcription
|
168
|
+
note: Note
|
169
|
+
country:
|
170
|
+
name: Name
|
171
|
+
display_name: Display name
|
172
|
+
alpha_2: Alpha 2
|
173
|
+
alpha_3: Alpha 3
|
174
|
+
numeric_3: Numeric 3
|
175
|
+
note: Note
|
176
|
+
position: Position
|
177
|
+
medium_of_performance:
|
178
|
+
name: Name
|
179
|
+
display_name: Displayname
|
180
|
+
note: Note
|
181
|
+
position: Position
|
182
|
+
content_type:
|
183
|
+
name: Name
|
184
|
+
display_name: Display name
|
185
|
+
note: Note
|
186
|
+
position: Position
|
187
|
+
extent:
|
188
|
+
name: Name
|
189
|
+
display_name: Display name
|
190
|
+
note: Note
|
191
|
+
position: Position
|
192
|
+
patron_relationship_type:
|
193
|
+
name: Name
|
194
|
+
display_name: Display name
|
195
|
+
note: Note
|
196
|
+
position: Position
|
197
|
+
manifestation_relationship_type:
|
198
|
+
name: Name
|
199
|
+
display_name: Display name
|
200
|
+
note: Note
|
201
|
+
position: Position
|
202
|
+
license:
|
203
|
+
name: Name
|
204
|
+
display_name: Display name
|
205
|
+
note: Note
|
206
|
+
position: Position
|
207
|
+
import_request:
|
208
|
+
isbn: ISBN
|
209
|
+
state: State
|
210
|
+
patron_relationship:
|
211
|
+
parent_id: Parent
|
212
|
+
child_id: Child
|
213
|
+
patron_relationship_type_id: Patron relationship type
|
214
|
+
manifestation_relationship:
|
215
|
+
parent_id: Parent
|
216
|
+
child_id: Child
|
217
|
+
manifestation_relationship_type_id: Manifestation relationship type
|
218
|
+
carrier_type:
|
219
|
+
name: Name
|
220
|
+
display_name: Display name
|
221
|
+
note: Note
|
222
|
+
position: Position
|
223
|
+
picture_file:
|
224
|
+
picture_attachable_type: Picture attachable type
|
225
|
+
picture_file_size: Size
|
226
|
+
picture_content_type: Content type
|
227
|
+
title: Title
|
228
|
+
picture_file_name: Filename
|
229
|
+
height: Height
|
230
|
+
width: Width
|
231
|
+
thumbnail: Thumbnail
|
232
|
+
picture_fingerprint: File hash
|
233
|
+
picture_updated_at: Updated at
|
234
|
+
form_of_work:
|
235
|
+
name: Name
|
236
|
+
display_name: Display name
|
237
|
+
note: Note
|
238
|
+
position: Position
|
239
|
+
exemplify:
|
240
|
+
position: Position
|
241
|
+
own:
|
242
|
+
position: Position
|
243
|
+
produce:
|
244
|
+
position: Position
|
245
|
+
realize:
|
246
|
+
position: Position
|
247
|
+
frequency:
|
248
|
+
name: Name
|
249
|
+
display_name: Display name
|
250
|
+
note: Note
|
251
|
+
position: Position
|
252
|
+
content_type:
|
253
|
+
name: Name
|
254
|
+
display_name: Display name
|
255
|
+
note: Note
|
256
|
+
position: Position
|
257
|
+
patron_type:
|
258
|
+
name: Name
|
259
|
+
display_name: Display name
|
260
|
+
note: Note
|
261
|
+
position: Position
|
262
|
+
embody:
|
263
|
+
position: Position
|
264
|
+
create:
|
265
|
+
position: Position
|
266
|
+
resource_import_result:
|
267
|
+
body: Body
|
268
|
+
patron_import_result:
|
269
|
+
body: Body
|
270
|
+
create_type:
|
271
|
+
name: Name
|
272
|
+
display_name: Display name
|
273
|
+
note: Note
|
274
|
+
realize_type:
|
275
|
+
name: Name
|
276
|
+
display_name: Display name
|
277
|
+
note: Note
|
278
|
+
produce_type:
|
279
|
+
name: Name
|
280
|
+
display_name: Display name
|
281
|
+
note: Note
|
43
282
|
|
44
283
|
resource_import_file:
|
45
284
|
update_relationship: Update relationship
|