enju_circulation 0.1.0.pre28 → 0.1.0.pre29

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
  SHA1:
3
- metadata.gz: 7614545d4d02474d17463e6ad8ec31b633fa70b0
4
- data.tar.gz: bf94c2558f49d871971c52efd33811146cc3c9f9
3
+ metadata.gz: 6f818abc7b9566cdf39f95005c822f9895ae70a4
4
+ data.tar.gz: 1c6fd9aa80c1631f0c9f21a28168e277a821f1bd
5
5
  SHA512:
6
- metadata.gz: 5654c425686b7f03368d987259de994cb145745f7037947faf02149acda54562cb34f84da81e73ff0ca45f39b84ae73962c4c4b28ed14f2d0cd874bc13f69881
7
- data.tar.gz: cdb45767a7c3a473cae38ff73b41068ac0cf80525f7b8cefc796ff538c3fd2b7b26a9b4fca99ce56999b622ea95da3e8b6984d948125a7c5ef20067b1a0a6e51
6
+ metadata.gz: 1e767dba30b7f1168927a819a2f1dabc7ce7a6170017768ecec84442b487f05d5dfa387a6dbfc05495efcb02cb3fd560ad1b039afdb356d0238ab257741ea570
7
+ data.tar.gz: 27f19d72a3818702207bdafaa4537d2ec75c9a49a35328b6f9d4ebb83811418e16b6a614e308e925b047c4f40c0fb503485e97295120725fe17710931626f0c7
@@ -5,7 +5,7 @@
5
5
  <%= render 'manifestations/title', :manifestation => @checkout.item.manifestation if @checkout.item -%>
6
6
 
7
7
  <h3><%= t('checkout.renewal') -%></h3>
8
- <%- if @checkout.checkout_renewable? -%>
8
+ <%- if @checkout.renewable? -%>
9
9
  <%= form_for(@checkout) do |f| -%>
10
10
  <%= t('checkout.new_due_date') -%>: <%= l(@new_due_date, :format => :only_date) if @new_due_date -%>
11
11
  <%= f.hidden_field :due_date, :value => @new_due_date -%>
@@ -1,3 +1,3 @@
1
1
  module EnjuCirculation
2
- VERSION = "0.1.0.pre28"
2
+ VERSION = "0.1.0.pre29"
3
3
  end
@@ -0,0 +1,13 @@
1
+ class LocalPatron
2
+ def initialize(user)
3
+ @user = user
4
+ end
5
+
6
+ def id
7
+ end
8
+
9
+ def full_name
10
+ # TODO: 外部サービスから取得
11
+ @user.email
12
+ end
13
+ end
Binary file
@@ -0,0 +1,58 @@
1
+ class CreatePatrons < ActiveRecord::Migration
2
+ def change
3
+ create_table :patrons do |t|
4
+ t.integer :user_id
5
+ t.string :last_name
6
+ t.string :middle_name
7
+ t.string :first_name
8
+ t.string :last_name_transcription
9
+ t.string :middle_name_transcription
10
+ t.string :first_name_transcription
11
+ t.string :corporate_name
12
+ t.string :corporate_name_transcription
13
+ t.string :full_name
14
+ t.text :full_name_transcription
15
+ t.text :full_name_alternative
16
+ t.timestamps
17
+ t.datetime :deleted_at
18
+ t.string :zip_code_1
19
+ t.string :zip_code_2
20
+ t.text :address_1
21
+ t.text :address_2
22
+ t.text :address_1_note
23
+ t.text :address_2_note
24
+ t.string :telephone_number_1
25
+ t.string :telephone_number_2
26
+ t.string :fax_number_1
27
+ t.string :fax_number_2
28
+ t.text :other_designation
29
+ t.text :place
30
+ t.string :postal_code
31
+ t.text :street
32
+ t.text :locality
33
+ t.text :region
34
+ t.datetime :date_of_birth
35
+ t.datetime :date_of_death
36
+ t.integer :language_id, :default => 1, :null => false
37
+ t.integer :country_id, :default => 1, :null => false
38
+ t.integer :patron_type_id, :default => 1, :null => false
39
+ t.integer :lock_version, :default => 0, :null => false
40
+ t.text :note
41
+ t.integer :creates_count, :default => 0, :null => false
42
+ t.integer :realizes_count, :default => 0, :null => false
43
+ t.integer :produces_count, :default => 0, :null => false
44
+ t.integer :owns_count, :default => 0, :null => false
45
+ #t.integer :resource_has_subjects_count, :default => 0, :null => false
46
+ t.integer :required_role_id, :default => 1, :null => false
47
+ t.integer :required_score, :default => 0, :null => false
48
+ t.string :state
49
+ t.text :email
50
+ t.text :url
51
+ end
52
+ add_index :patrons, :user_id, :unique => true
53
+ add_index :patrons, :language_id
54
+ add_index :patrons, :country_id
55
+ add_index :patrons, :required_role_id
56
+ add_index :patrons, :full_name
57
+ end
58
+ end
@@ -0,0 +1,12 @@
1
+ class CreatePatronTypes < ActiveRecord::Migration
2
+ def change
3
+ create_table :patron_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
+ end
@@ -0,0 +1,12 @@
1
+ class CreatePatronRelationshipTypes < ActiveRecord::Migration
2
+ def change
3
+ create_table :patron_relationship_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
+ end
@@ -0,0 +1,13 @@
1
+ class CreatePatronRelationships < ActiveRecord::Migration
2
+ def change
3
+ create_table :patron_relationships do |t|
4
+ t.integer :parent_id
5
+ t.integer :child_id
6
+ t.integer :patron_relationship_type_id
7
+
8
+ t.timestamps
9
+ end
10
+ add_index :patron_relationships, :parent_id
11
+ add_index :patron_relationships, :child_id
12
+ end
13
+ end
@@ -0,0 +1,11 @@
1
+ class AddPositionToPatronRelationship < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :manifestation_relationships, :position, :integer
4
+ add_column :patron_relationships, :position, :integer
5
+ end
6
+
7
+ def self.down
8
+ remove_column :patron_relationships, :position
9
+ remove_column :manifestation_relationships, :position
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ class AddBirthDateAndDeathDateToPatron < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :patrons, :birth_date, :string
4
+ add_column :patrons, :death_date, :string
5
+ end
6
+
7
+ def self.down
8
+ remove_column :patrons, :death_date
9
+ remove_column :patrons, :birth_date
10
+ end
11
+ end
Binary file
@@ -0,0 +1,35 @@
1
+ ---
2
+ patron_type_00001:
3
+ id: 1
4
+ name: Person
5
+ display_name: Person
6
+ note:
7
+ position: 1
8
+
9
+ patron_type_00002:
10
+ id: 2
11
+ name: CorporateBody
12
+ display_name: CorporateBody
13
+ note:
14
+ position: 2
15
+
16
+ patron_type_00003:
17
+ id: 3
18
+ name: Conference
19
+ display_name: Conference
20
+ note:
21
+ position: 3
22
+
23
+ # == Schema Information
24
+ #
25
+ # Table name: patron_types
26
+ #
27
+ # id :integer not null, primary key
28
+ # name :string(255) not null
29
+ # display_name :text
30
+ # note :text
31
+ # position :integer
32
+ # created_at :datetime
33
+ # updated_at :datetime
34
+ #
35
+
@@ -0,0 +1,338 @@
1
+ ---
2
+ patron_00001:
3
+ place: ""
4
+ last_name: Administrator
5
+ first_name:
6
+ full_name: Administrator
7
+ updated_at: 2007-11-21 22:01:56.137409 +09:00
8
+ other_designation: ""
9
+ id: 1
10
+ date_of_birth: 2000-01-01
11
+ date_of_death:
12
+ address_1:
13
+ language_id: 1
14
+ country_id: 1
15
+ patron_type_id: 1
16
+ required_role_id: 1
17
+ created_at: 2007-11-19 17:06:06.507237 +09:00
18
+ user_id: 1
19
+ patron_00002:
20
+ place: ""
21
+ last_name: Librarian1
22
+ first_name:
23
+ full_name: Librarian1
24
+ updated_at: 2007-11-21 22:02:10.359793 +09:00
25
+ other_designation: ""
26
+ id: 2
27
+ date_of_birth: 2000-01-01
28
+ date_of_death:
29
+ address_1:
30
+ language_id: 1
31
+ country_id: 1
32
+ patron_type_id: 1
33
+ required_role_id: 4
34
+ created_at: 2007-11-19 17:06:07.724517 +09:00
35
+ user_id: 2
36
+ patron_00003:
37
+ place:
38
+ last_name: Kosuke
39
+ first_name: Tanabe
40
+ full_name: Kosuke Tanabe
41
+ updated_at: 2007-12-04 16:25:01.523618 +09:00
42
+ other_designation:
43
+ id: 3
44
+ date_of_birth: 2000-01-01
45
+ date_of_death:
46
+ address_1:
47
+ language_id: 1
48
+ country_id: 1
49
+ patron_type_id: 1
50
+ required_role_id: 3
51
+ created_at: 2007-12-04 16:25:01.523618 +09:00
52
+ user_id: 3
53
+ patron_00004:
54
+ place:
55
+ last_name: Librarian2
56
+ first_name:
57
+ full_name: Librarian2
58
+ updated_at: 2007-12-04 16:25:01.785027 +09:00
59
+ other_designation:
60
+ id: 4
61
+ date_of_birth: 2000-01-01
62
+ date_of_death:
63
+ address_1:
64
+ language_id: 1
65
+ country_id: 1
66
+ patron_type_id: 1
67
+ required_role_id: 1
68
+ created_at: 2007-12-04 16:25:01.785027 +09:00
69
+ user_id: 4
70
+ patron_00005:
71
+ place: ""
72
+ last_name: User2
73
+ first_name:
74
+ full_name: User2
75
+ updated_at: 2007-11-21 22:02:35.579396 +09:00
76
+ other_designation: ""
77
+ id: 5
78
+ date_of_birth: 2000-01-01
79
+ date_of_death:
80
+ address_1:
81
+ language_id: 1
82
+ country_id: 1
83
+ patron_type_id: 1
84
+ required_role_id: 2
85
+ created_at: 2007-11-19 17:24:50.153417 +09:00
86
+ user_id: 5
87
+ patron_00006:
88
+ place: ""
89
+ last_name: New patron 1
90
+ first_name:
91
+ full_name: New patron 1
92
+ updated_at: 2007-11-21 22:02:35.579396 +09:00
93
+ other_designation: ""
94
+ id: 6
95
+ date_of_birth: 2000-01-01
96
+ date_of_death:
97
+ address_1:
98
+ language_id: 1
99
+ country_id: 1
100
+ patron_type_id: 1
101
+ required_role_id: 1
102
+ created_at: 2007-11-19 17:24:50.153417 +09:00
103
+ patron_00007:
104
+ place: ""
105
+ last_name: New patron 2
106
+ first_name:
107
+ full_name: New patron 2
108
+ updated_at: 2007-11-21 22:02:35.579396 +09:00
109
+ other_designation: ""
110
+ id: 7
111
+ date_of_birth: 2000-01-01
112
+ date_of_death:
113
+ address_1:
114
+ language_id: 1
115
+ country_id: 1
116
+ patron_type_id: 1
117
+ required_role_id: 1
118
+ created_at: 2007-11-19 17:24:50.153417 +09:00
119
+ patron_00008:
120
+ place: ""
121
+ last_name: New patron 3
122
+ first_name:
123
+ full_name: New patron 3
124
+ updated_at: 2007-11-21 22:02:35.579396 +09:00
125
+ other_designation: ""
126
+ id: 8
127
+ date_of_birth: 2000-01-01
128
+ date_of_death:
129
+ address_1:
130
+ language_id: 1
131
+ country_id: 1
132
+ patron_type_id: 1
133
+ required_role_id: 1
134
+ created_at: 2007-11-19 17:24:50.153417 +09:00
135
+ patron_00009:
136
+ place: ""
137
+ last_name: New patron 4
138
+ first_name:
139
+ full_name: New patron 4
140
+ updated_at: 2007-11-21 22:02:35.579396 +09:00
141
+ other_designation: ""
142
+ id: 9
143
+ date_of_birth: 2000-01-01
144
+ date_of_death:
145
+ address_1:
146
+ language_id: 1
147
+ country_id: 1
148
+ patron_type_id: 1
149
+ required_role_id: 1
150
+ created_at: 2007-11-19 17:24:50.153417 +09:00
151
+ patron_00010:
152
+ place: ""
153
+ last_name: New patron 5
154
+ first_name:
155
+ full_name: New patron 5
156
+ updated_at: 2007-11-21 22:02:35.579396 +09:00
157
+ other_designation: ""
158
+ id: 10
159
+ date_of_birth: 2000-01-01
160
+ date_of_death:
161
+ address_1:
162
+ language_id: 1
163
+ country_id: 1
164
+ patron_type_id: 1
165
+ required_role_id: 1
166
+ created_at: 2007-11-19 17:24:50.153417 +09:00
167
+ patron_00011:
168
+ place: ""
169
+ last_name: User3
170
+ first_name:
171
+ full_name: User3
172
+ updated_at: 2007-11-21 22:02:35.579396 +09:00
173
+ other_designation: ""
174
+ id: 11
175
+ date_of_birth: 2000-01-01
176
+ date_of_death:
177
+ address_1:
178
+ language_id: 1
179
+ country_id: 1
180
+ patron_type_id: 1
181
+ required_role_id: 1
182
+ created_at: 2007-11-19 17:24:50.153417 +09:00
183
+ user_id: 6
184
+ patron_00101:
185
+ place: ""
186
+ last_name: テスト名字
187
+ first_name: テスト名前
188
+ full_name: テスト正式名称
189
+ updated_at: 2010-03-03 17:00:00.579396 +09:00
190
+ other_designation: ""
191
+ id: 101
192
+ date_of_birth: 2000-01-01
193
+ date_of_death:
194
+ address_1:
195
+ language_id: 1
196
+ country_id: 1
197
+ patron_type_id: 1
198
+ required_role_id: 1
199
+ created_at: 2010-03-03 17:00:00.579396 +09:00
200
+ patron_00102:
201
+ place: ""
202
+ last_name:
203
+ first_name:
204
+ full_name: 出版社テスト
205
+ updated_at: 2010-03-03 17:00:00.579396 +09:00
206
+ other_designation: ""
207
+ id: 102
208
+ date_of_birth:
209
+ date_of_death:
210
+ address_1:
211
+ language_id: 1
212
+ country_id: 1
213
+ patron_type_id: 1
214
+ required_role_id: 1
215
+ created_at: 2010-03-03 17:00:00.579396 +09:00
216
+ patron_00103:
217
+ place: ""
218
+ last_name:
219
+ first_name:
220
+ full_name: 作者ダミー
221
+ updated_at: 2010-03-16 19:00:00.579396 +09:00
222
+ other_designation: ""
223
+ id: 103
224
+ date_of_birth:
225
+ date_of_death:
226
+ address_1:
227
+ language_id: 1
228
+ country_id: 1
229
+ patron_type_id: 1
230
+ required_role_id: 1
231
+ created_at: 2010-03-16 19:00:00.579396 +09:00
232
+ patron_00104:
233
+ place: ""
234
+ last_name:
235
+ first_name:
236
+ full_name: 試験用会社
237
+ updated_at: 2010-03-16 19:00:00.579396 +09:00
238
+ other_designation: ""
239
+ id: 104
240
+ date_of_birth:
241
+ date_of_death:
242
+ address_1:
243
+ language_id: 1
244
+ country_id: 1
245
+ patron_type_id: 1
246
+ required_role_id: 1
247
+ created_at: 2010-03-16 19:00:00.579396 +09:00
248
+ patron_00201:
249
+ place: ""
250
+ last_name:
251
+ first_name:
252
+ full_name: オーム社
253
+ updated_at: 2010-03-15 17:00:00.579396 +09:00
254
+ other_designation: ""
255
+ id: 201
256
+ date_of_birth:
257
+ date_of_death:
258
+ address_1:
259
+ language_id: 1
260
+ country_id: 1
261
+ patron_type_id: 1
262
+ required_role_id: 1
263
+ created_at: 2010-03-15 17:00:00.579396 +09:00
264
+ patron_00202:
265
+ place: ""
266
+ last_name:
267
+ first_name:
268
+ full_name: Ruby社
269
+ updated_at: 2010-03-15 17:00:00.579396 +09:00
270
+ other_designation: ""
271
+ id: 202
272
+ date_of_birth:
273
+ date_of_death:
274
+ address_1:
275
+ language_id: 1
276
+ country_id: 1
277
+ patron_type_id: 1
278
+ required_role_id: 1
279
+ created_at: 2010-03-15 17:00:00.579396 +09:00
280
+
281
+
282
+
283
+
284
+
285
+
286
+ # == Schema Information
287
+ #
288
+ # Table name: patrons
289
+ #
290
+ # id :integer not null, primary key
291
+ # user_id :integer
292
+ # last_name :string(255)
293
+ # middle_name :string(255)
294
+ # first_name :string(255)
295
+ # last_name_transcription :string(255)
296
+ # middle_name_transcription :string(255)
297
+ # first_name_transcription :string(255)
298
+ # corporate_name :string(255)
299
+ # corporate_name_transcription :string(255)
300
+ # full_name :string(255)
301
+ # full_name_transcription :text
302
+ # full_name_alternative :text
303
+ # created_at :datetime
304
+ # updated_at :datetime
305
+ # deleted_at :datetime
306
+ # zip_code_1 :string(255)
307
+ # zip_code_2 :string(255)
308
+ # address_1 :text
309
+ # address_2 :text
310
+ # address_1_note :text
311
+ # address_2_note :text
312
+ # telephone_number_1 :string(255)
313
+ # telephone_number_2 :string(255)
314
+ # fax_number_1 :string(255)
315
+ # fax_number_2 :string(255)
316
+ # other_designation :text
317
+ # place :text
318
+ # street :text
319
+ # locality :text
320
+ # region :text
321
+ # date_of_birth :datetime
322
+ # date_of_death :datetime
323
+ # language_id :integer default(1), not null
324
+ # country_id :integer default(1), not null
325
+ # patron_type_id :integer default(1), not null
326
+ # lock_version :integer default(0), not null
327
+ # note :text
328
+ # required_role_id :integer default(1), not null
329
+ # required_score :integer default(0), not null
330
+ # state :string(255)
331
+ # email :text
332
+ # url :text
333
+ # full_name_alternative_transcription :text
334
+ # title :string(255)
335
+ # birth_date :string(255)
336
+ # death_date :string(255)
337
+ #
338
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enju_circulation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre28
4
+ version: 0.1.0.pre29
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-06-01 00:00:00.000000000 Z
11
+ date: 2013-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: enju_biblio
@@ -459,12 +459,10 @@ files:
459
459
  - spec/dummy/app/helpers/application_helper.rb
460
460
  - spec/dummy/app/mailers/notifier.rb
461
461
  - spec/dummy/app/models/ability.rb
462
+ - spec/dummy/app/models/local_agent.rb
462
463
  - spec/dummy/app/models/local_patron.rb
463
- - spec/dummy/app/models/role.rb
464
464
  - spec/dummy/app/models/setting.rb
465
465
  - spec/dummy/app/models/user.rb
466
- - spec/dummy/app/models/user_group.rb
467
- - spec/dummy/app/models/user_has_role.rb
468
466
  - spec/dummy/app/views/layouts/application.html.erb
469
467
  - spec/dummy/app/views/page/403.html.erb
470
468
  - spec/dummy/app/views/page/403.mobile.erb
@@ -495,6 +493,7 @@ files:
495
493
  - spec/dummy/config/routes.rb
496
494
  - spec/dummy/config.ru
497
495
  - spec/dummy/db/development.sqlite3
496
+ - spec/dummy/db/migrate/001_create_agents.rb
498
497
  - spec/dummy/db/migrate/001_create_patrons.rb
499
498
  - spec/dummy/db/migrate/005_create_manifestations.rb
500
499
  - spec/dummy/db/migrate/006_create_items.rb
@@ -517,10 +516,12 @@ files:
517
516
  - spec/dummy/db/migrate/20080819181903_create_message_requests.rb
518
517
  - spec/dummy/db/migrate/20080830154109_create_realizes.rb
519
518
  - spec/dummy/db/migrate/20080830172106_create_exemplifies.rb
519
+ - spec/dummy/db/migrate/20080905191442_create_agent_types.rb
520
520
  - spec/dummy/db/migrate/20080905191442_create_patron_types.rb
521
521
  - spec/dummy/db/migrate/20081025083323_create_countries.rb
522
522
  - spec/dummy/db/migrate/20081025083905_create_languages.rb
523
523
  - spec/dummy/db/migrate/20081027150907_create_picture_files.rb
524
+ - spec/dummy/db/migrate/20090812151902_create_agent_relationship_types.rb
524
525
  - spec/dummy/db/migrate/20090812151902_create_patron_relationship_types.rb
525
526
  - spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb
526
527
  - spec/dummy/db/migrate/20091202124834_create_versions.rb
@@ -530,13 +531,16 @@ files:
530
531
  - spec/dummy/db/migrate/20100223121519_rename_series_statement_title_to_original_title.rb
531
532
  - spec/dummy/db/migrate/20100321235924_add_series_statement_identifier_to_series_statement.rb
532
533
  - spec/dummy/db/migrate/20100525124311_create_manifestation_relationships.rb
534
+ - spec/dummy/db/migrate/20100606073747_create_agent_relationships.rb
533
535
  - spec/dummy/db/migrate/20100606073747_create_patron_relationships.rb
534
536
  - spec/dummy/db/migrate/20100607044753_create_manifestation_relationship_types.rb
537
+ - spec/dummy/db/migrate/20100814091104_add_position_to_agent_relationship.rb
535
538
  - spec/dummy/db/migrate/20100814091104_add_position_to_patron_relationship.rb
536
539
  - spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.rb
537
540
  - spec/dummy/db/migrate/20110115022329_add_position_to_library_group.rb
538
541
  - spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb
539
542
  - spec/dummy/db/migrate/20110301035123_add_pub_date_to_manifestation.rb
543
+ - spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_agent.rb
540
544
  - spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_patron.rb
541
545
  - spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb
542
546
  - spec/dummy/db/migrate/20110425133109_add_issn_to_series_statement.rb
@@ -621,6 +625,8 @@ files:
621
625
  - spec/factories/user_group.rb
622
626
  - spec/factories/user_group_has_checkout_type.rb
623
627
  - spec/factories/user_reserve_stat.rb
628
+ - spec/fixtures/agent_types.yml
629
+ - spec/fixtures/agents.yml
624
630
  - spec/fixtures/baskets.yml
625
631
  - spec/fixtures/carrier_type_has_checkout_types.yml
626
632
  - spec/fixtures/carrier_types.yml
@@ -705,7 +711,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
705
711
  version: 1.3.1
706
712
  requirements: []
707
713
  rubyforge_project:
708
- rubygems_version: 2.0.2
714
+ rubygems_version: 2.0.3
709
715
  signing_key:
710
716
  specification_version: 4
711
717
  summary: enju_circulation plugin
@@ -737,12 +743,10 @@ test_files:
737
743
  - spec/dummy/app/helpers/application_helper.rb
738
744
  - spec/dummy/app/mailers/notifier.rb
739
745
  - spec/dummy/app/models/ability.rb
746
+ - spec/dummy/app/models/local_agent.rb
740
747
  - spec/dummy/app/models/local_patron.rb
741
- - spec/dummy/app/models/role.rb
742
748
  - spec/dummy/app/models/setting.rb
743
749
  - spec/dummy/app/models/user.rb
744
- - spec/dummy/app/models/user_group.rb
745
- - spec/dummy/app/models/user_has_role.rb
746
750
  - spec/dummy/app/views/layouts/application.html.erb
747
751
  - spec/dummy/app/views/page/403.html.erb
748
752
  - spec/dummy/app/views/page/403.mobile.erb
@@ -773,6 +777,7 @@ test_files:
773
777
  - spec/dummy/config/routes.rb
774
778
  - spec/dummy/config.ru
775
779
  - spec/dummy/db/development.sqlite3
780
+ - spec/dummy/db/migrate/001_create_agents.rb
776
781
  - spec/dummy/db/migrate/001_create_patrons.rb
777
782
  - spec/dummy/db/migrate/005_create_manifestations.rb
778
783
  - spec/dummy/db/migrate/006_create_items.rb
@@ -795,10 +800,12 @@ test_files:
795
800
  - spec/dummy/db/migrate/20080819181903_create_message_requests.rb
796
801
  - spec/dummy/db/migrate/20080830154109_create_realizes.rb
797
802
  - spec/dummy/db/migrate/20080830172106_create_exemplifies.rb
803
+ - spec/dummy/db/migrate/20080905191442_create_agent_types.rb
798
804
  - spec/dummy/db/migrate/20080905191442_create_patron_types.rb
799
805
  - spec/dummy/db/migrate/20081025083323_create_countries.rb
800
806
  - spec/dummy/db/migrate/20081025083905_create_languages.rb
801
807
  - spec/dummy/db/migrate/20081027150907_create_picture_files.rb
808
+ - spec/dummy/db/migrate/20090812151902_create_agent_relationship_types.rb
802
809
  - spec/dummy/db/migrate/20090812151902_create_patron_relationship_types.rb
803
810
  - spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb
804
811
  - spec/dummy/db/migrate/20091202124834_create_versions.rb
@@ -808,13 +815,16 @@ test_files:
808
815
  - spec/dummy/db/migrate/20100223121519_rename_series_statement_title_to_original_title.rb
809
816
  - spec/dummy/db/migrate/20100321235924_add_series_statement_identifier_to_series_statement.rb
810
817
  - spec/dummy/db/migrate/20100525124311_create_manifestation_relationships.rb
818
+ - spec/dummy/db/migrate/20100606073747_create_agent_relationships.rb
811
819
  - spec/dummy/db/migrate/20100606073747_create_patron_relationships.rb
812
820
  - spec/dummy/db/migrate/20100607044753_create_manifestation_relationship_types.rb
821
+ - spec/dummy/db/migrate/20100814091104_add_position_to_agent_relationship.rb
813
822
  - spec/dummy/db/migrate/20100814091104_add_position_to_patron_relationship.rb
814
823
  - spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.rb
815
824
  - spec/dummy/db/migrate/20110115022329_add_position_to_library_group.rb
816
825
  - spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb
817
826
  - spec/dummy/db/migrate/20110301035123_add_pub_date_to_manifestation.rb
827
+ - spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_agent.rb
818
828
  - spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_patron.rb
819
829
  - spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb
820
830
  - spec/dummy/db/migrate/20110425133109_add_issn_to_series_statement.rb
@@ -899,6 +909,8 @@ test_files:
899
909
  - spec/factories/user_group.rb
900
910
  - spec/factories/user_group_has_checkout_type.rb
901
911
  - spec/factories/user_reserve_stat.rb
912
+ - spec/fixtures/agent_types.yml
913
+ - spec/fixtures/agents.yml
902
914
  - spec/fixtures/baskets.yml
903
915
  - spec/fixtures/carrier_type_has_checkout_types.yml
904
916
  - spec/fixtures/carrier_types.yml
@@ -1,46 +0,0 @@
1
- class Role < ActiveRecord::Base
2
- include MasterModel
3
- default_scope :order => "roles.position"
4
- has_many :user_has_roles
5
- has_many :users, :through => :user_has_roles
6
- after_save :clear_all_cache
7
- after_destroy :clear_all_cache
8
-
9
- extend FriendlyId
10
- friendly_id :name
11
-
12
- def localized_name
13
- display_name.localize
14
- end
15
-
16
- def self.all_cache
17
- if Rails.env == 'production'
18
- Rails.cache.fetch('role_all'){Role.select(:name).all}
19
- else
20
- Role.select(:name)
21
- end
22
- end
23
-
24
- def clear_all_cache
25
- Rails.cache.delete('role_all')
26
- end
27
-
28
- def self.default_role
29
- Rails.cache.fetch('default_role'){Role.find('Guest')}
30
- end
31
- end
32
-
33
- # == Schema Information
34
- #
35
- # Table name: roles
36
- #
37
- # id :integer not null, primary key
38
- # name :string(255) not null
39
- # display_name :string(255)
40
- # note :text
41
- # created_at :datetime
42
- # updated_at :datetime
43
- # score :integer default(0), not null
44
- # position :integer
45
- #
46
-
@@ -1,40 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- class UserGroup < ActiveRecord::Base
3
- attr_accessible :name, :display_name, :note, :valid_period_for_new_user,
4
- :expired_at, :number_of_day_to_notify_overdue,
5
- :number_of_day_to_notify_overdue,
6
- :number_of_day_to_notify_due_date,
7
- :number_of_time_to_notify_overdue
8
-
9
- include MasterModel
10
- default_scope :order => "user_groups.position"
11
- has_many :users
12
-
13
- validates_numericality_of :valid_period_for_new_user,
14
- :greater_than_or_equal_to => 0,
15
- :allow_blank => true
16
-
17
- paginates_per 10
18
-
19
- enju_circulation_user_group_model if defined?(EnjuCirculation)
20
- end
21
-
22
- # == Schema Information
23
- #
24
- # Table name: user_groups
25
- #
26
- # id :integer not null, primary key
27
- # name :string(255)
28
- # display_name :text
29
- # note :text
30
- # position :integer
31
- # created_at :datetime
32
- # updated_at :datetime
33
- # deleted_at :datetime
34
- # valid_period_for_new_user :integer default(0), not null
35
- # expired_at :datetime
36
- # number_of_day_to_notify_overdue :integer default(1), not null
37
- # number_of_day_to_notify_due_date :integer default(7), not null
38
- # number_of_time_to_notify_overdue :integer default(3), not null
39
- #
40
-
@@ -1,22 +0,0 @@
1
- class UserHasRole < ActiveRecord::Base
2
- attr_accessible :user_id, :role_id
3
- attr_accessible :user_id, :role_id, :as => :admin
4
- belongs_to :user
5
- belongs_to :role
6
- accepts_nested_attributes_for :role
7
-
8
- # validates_uniqueness_of :role_id, :scope => :user_id
9
- # validates_presence_of :role_id, :user_id
10
- end
11
-
12
- # == Schema Information
13
- #
14
- # Table name: user_has_roles
15
- #
16
- # id :integer not null, primary key
17
- # user_id :integer
18
- # role_id :integer
19
- # created_at :datetime
20
- # updated_at :datetime
21
- #
22
-