enju_leaf 1.1.0.rc3 → 1.1.0.rc4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/enju_leaf.js +0 -2
  3. data/app/controllers/page_controller.rb +2 -2
  4. data/app/controllers/users_controller.rb +7 -7
  5. data/app/views/layouts/patrons.html.erb +2 -2
  6. data/app/views/my_accounts/show.html.erb +9 -1
  7. data/app/views/page/_menu.html.erb +1 -1
  8. data/app/views/page/advanced_search.html.erb +2 -2
  9. data/app/views/page/configuration.html.erb +3 -3
  10. data/app/views/page/export.html.erb +2 -2
  11. data/app/views/page/import.html.erb +1 -1
  12. data/app/views/page/statistics.html.erb +2 -2
  13. data/app/views/users/index.html.erb +0 -11
  14. data/app/views/users/new.html.erb +4 -4
  15. data/app/views/users/show.html.erb +9 -1
  16. data/config/locales/translation_en.yml +13 -13
  17. data/config/locales/translation_ja.yml +13 -13
  18. data/lib/enju_leaf/user.rb +12 -12
  19. data/lib/enju_leaf/version.rb +1 -1
  20. data/lib/enju_leaf.rb +2 -2
  21. data/lib/generators/enju_leaf/setup/setup_generator.rb +10 -3
  22. data/spec/dummy/db/migrate/001_create_patrons.rb +7 -7
  23. data/spec/dummy/db/migrate/012_create_owns.rb +2 -2
  24. data/spec/dummy/db/migrate/015_create_creates.rb +2 -2
  25. data/spec/dummy/db/migrate/047_create_produces.rb +2 -2
  26. data/spec/dummy/db/migrate/125_create_donates.rb +2 -2
  27. data/spec/dummy/db/migrate/20080830154109_create_realizes.rb +2 -2
  28. data/spec/dummy/db/migrate/20080905191442_create_patron_types.rb +1 -1
  29. data/spec/dummy/db/migrate/20081028083142_create_patron_import_files.rb +8 -8
  30. data/spec/dummy/db/migrate/20090812151902_create_patron_relationship_types.rb +1 -1
  31. data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +2 -2
  32. data/spec/dummy/db/migrate/20100606073747_create_patron_relationships.rb +4 -4
  33. data/spec/dummy/db/migrate/20100814091104_add_position_to_patron_relationship.rb +2 -2
  34. data/spec/dummy/db/migrate/20100925074559_create_patron_import_results.rb +3 -3
  35. data/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_patron.rb +4 -4
  36. data/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_patron_import_file.rb +1 -1
  37. data/spec/dummy/db/migrate/20120413170720_add_error_message_to_patron_import_file.rb +1 -1
  38. data/spec/dummy/db/migrate/20120415060323_rename_patron_import_file_imported_at_to_executed_at.rb +2 -2
  39. data/spec/dummy/db/migrate/20120511072422_add_patron_identifier_to_patron.rb +2 -2
  40. data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_patron_import_file.rb +1 -1
  41. data/spec/dummy/db/schema.rb +129 -129
  42. data/spec/dummy/db/test.sqlite3 +0 -0
  43. data/spec/dummy/solr/data/test/index/{_6z.fdt → _7z.fdt} +0 -0
  44. data/spec/dummy/solr/data/test/index/{_6z.fdx → _7z.fdx} +0 -0
  45. data/spec/dummy/solr/data/test/index/{_6z.fnm → _7z.fnm} +0 -0
  46. data/spec/dummy/solr/data/test/index/{_6z.frq → _7z.frq} +0 -0
  47. data/spec/dummy/solr/data/test/index/{_6z.nrm → _7z.nrm} +0 -0
  48. data/spec/dummy/solr/data/test/index/{_6z.prx → _7z.prx} +0 -0
  49. data/spec/dummy/solr/data/test/index/{_6z.tii → _7z.tii} +0 -0
  50. data/spec/dummy/solr/data/test/index/{_6z.tis → _7z.tis} +0 -0
  51. data/spec/dummy/solr/data/test/index/segments.gen +0 -0
  52. data/spec/dummy/solr/data/test/index/segments_g1 +0 -0
  53. data/spec/factories/{patron.rb → agent.rb} +3 -3
  54. data/spec/factories/agent_relationship.rb +6 -0
  55. data/spec/factories/agent_relationship_type.rb +5 -0
  56. data/spec/factories/agent_type.rb +5 -0
  57. data/spec/factories/create.rb +1 -1
  58. data/spec/factories/donate.rb +1 -1
  59. data/spec/factories/own.rb +1 -1
  60. data/spec/factories/produce.rb +1 -1
  61. data/spec/factories/realize.rb +1 -1
  62. data/spec/fixtures/{patron_import_files.yml → agent_import_files.yml} +18 -18
  63. data/spec/fixtures/{patron_import_results.yml → agent_import_results.yml} +7 -7
  64. data/spec/fixtures/{patron_relationship_types.yml → agent_relationship_types.yml} +4 -4
  65. data/spec/fixtures/{patron_relationships.yml → agent_relationships.yml} +4 -4
  66. data/spec/fixtures/{patron_types.yml → agent_types.yml} +4 -4
  67. data/spec/fixtures/{patrons.yml → agents.yml} +47 -47
  68. data/spec/fixtures/creates.yml +8 -8
  69. data/spec/fixtures/donates.yml +4 -4
  70. data/spec/fixtures/owns.yml +3 -3
  71. data/spec/fixtures/produces.yml +20 -20
  72. data/spec/fixtures/realizes.yml +11 -11
  73. data/spec/spec_helper.rb +0 -2
  74. data/vendor/assets/javascripts/jquery.colorbox.js +70 -33
  75. data/vendor/assets/javascripts/jquery.ui.menubar.js +342 -187
  76. data/vendor/assets/stylesheets/jquery.ui.menubar.css +25 -5
  77. metadata +61 -76
  78. data/app/assets/stylesheets/images/ajax-loader.gif +0 -0
  79. data/app/assets/stylesheets/images/border.png +0 -0
  80. data/app/assets/stylesheets/images/controls.png +0 -0
  81. data/app/assets/stylesheets/images/icons-18-black.png +0 -0
  82. data/app/assets/stylesheets/images/icons-18-white.png +0 -0
  83. data/app/assets/stylesheets/images/icons-36-black.png +0 -0
  84. data/app/assets/stylesheets/images/icons-36-white.png +0 -0
  85. data/app/assets/stylesheets/images/ie6/borderBottomCenter.png +0 -0
  86. data/app/assets/stylesheets/images/ie6/borderBottomLeft.png +0 -0
  87. data/app/assets/stylesheets/images/ie6/borderBottomRight.png +0 -0
  88. data/app/assets/stylesheets/images/ie6/borderMiddleLeft.png +0 -0
  89. data/app/assets/stylesheets/images/ie6/borderMiddleRight.png +0 -0
  90. data/app/assets/stylesheets/images/ie6/borderTopCenter.png +0 -0
  91. data/app/assets/stylesheets/images/ie6/borderTopLeft.png +0 -0
  92. data/app/assets/stylesheets/images/ie6/borderTopRight.png +0 -0
  93. data/app/assets/stylesheets/images/loading.gif +0 -0
  94. data/app/assets/stylesheets/images/loading_background.png +0 -0
  95. data/app/assets/stylesheets/images/overlay.png +0 -0
  96. data/app/assets/stylesheets/images/spinner_bar.gif +0 -0
  97. data/spec/dummy/db/development.sqlite3 +0 -0
  98. data/spec/dummy/solr/data/test/index/segments_e1 +0 -0
  99. data/spec/factories/patron_relationship.rb +0 -6
  100. data/spec/factories/patron_relationship_type.rb +0 -5
  101. data/spec/factories/patron_type.rb +0 -5
  102. data/vendor/assets/stylesheets/images/ie6/borderBottomCenter.png +0 -0
  103. data/vendor/assets/stylesheets/images/ie6/borderBottomLeft.png +0 -0
  104. data/vendor/assets/stylesheets/images/ie6/borderBottomRight.png +0 -0
  105. data/vendor/assets/stylesheets/images/ie6/borderMiddleLeft.png +0 -0
  106. data/vendor/assets/stylesheets/images/ie6/borderMiddleRight.png +0 -0
  107. data/vendor/assets/stylesheets/images/ie6/borderTopCenter.png +0 -0
  108. data/vendor/assets/stylesheets/images/ie6/borderTopLeft.png +0 -0
  109. data/vendor/assets/stylesheets/images/ie6/borderTopRight.png +0 -0
@@ -1,12 +1,12 @@
1
1
  class CreateDonates < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :donates do |t|
4
- t.integer :patron_id, :null => false
4
+ t.integer :agent_id, :null => false
5
5
  t.integer :item_id, :null => false
6
6
 
7
7
  t.timestamps
8
8
  end
9
- add_index :donates, :patron_id
9
+ add_index :donates, :agent_id
10
10
  add_index :donates, :item_id
11
11
  end
12
12
  end
@@ -1,13 +1,13 @@
1
1
  class CreateRealizes < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :realizes do |t|
4
- t.references :patron, :null => false
4
+ t.references :agent, :null => false
5
5
  t.references :expression, :null => false
6
6
  t.integer :position
7
7
 
8
8
  t.timestamps
9
9
  end
10
- add_index :realizes, :patron_id
10
+ add_index :realizes, :agent_id
11
11
  add_index :realizes, :expression_id
12
12
  end
13
13
  end
@@ -1,6 +1,6 @@
1
1
  class CreatePatronTypes < ActiveRecord::Migration
2
2
  def change
3
- create_table :patron_types do |t|
3
+ create_table :agent_types do |t|
4
4
  t.string :name, :null => false
5
5
  t.text :display_name
6
6
  t.text :note
@@ -1,6 +1,6 @@
1
1
  class CreatePatronImportFiles < ActiveRecord::Migration
2
2
  def change
3
- create_table :patron_import_files do |t|
3
+ create_table :agent_import_files do |t|
4
4
  t.integer :parent_id
5
5
  t.string :content_type
6
6
  t.integer :size
@@ -8,15 +8,15 @@ class CreatePatronImportFiles < ActiveRecord::Migration
8
8
  t.text :note
9
9
  t.datetime :imported_at
10
10
  t.string :state
11
- t.string :patron_import_file_name
12
- t.string :patron_import_content_type
13
- t.integer :patron_import_file_size
14
- t.datetime :patron_import_updated_at
11
+ t.string :agent_import_file_name
12
+ t.string :agent_import_content_type
13
+ t.integer :agent_import_file_size
14
+ t.datetime :agent_import_updated_at
15
15
 
16
16
  t.timestamps
17
17
  end
18
- add_index :patron_import_files, :parent_id
19
- add_index :patron_import_files, :user_id
20
- add_index :patron_import_files, :state
18
+ add_index :agent_import_files, :parent_id
19
+ add_index :agent_import_files, :user_id
20
+ add_index :agent_import_files, :state
21
21
  end
22
22
  end
@@ -1,6 +1,6 @@
1
1
  class CreatePatronRelationshipTypes < ActiveRecord::Migration
2
2
  def change
3
- create_table :patron_relationship_types do |t|
3
+ create_table :agent_relationship_types do |t|
4
4
  t.string :name, :null => false
5
5
  t.text :display_name
6
6
  t.text :note
@@ -1,7 +1,7 @@
1
1
  class AddDcndlSchema < ActiveRecord::Migration
2
2
  def self.up
3
3
  add_column :manifestations, :title_alternative_transcription, :text
4
- add_column :patrons, :full_name_alternative_transcription, :text
4
+ add_column :agents, :full_name_alternative_transcription, :text
5
5
  add_column :manifestations, :description, :text
6
6
  add_column :manifestations, :abstract, :text
7
7
  add_column :manifestations, :available_at, :timestamp
@@ -14,7 +14,7 @@ class AddDcndlSchema < ActiveRecord::Migration
14
14
 
15
15
  def self.down
16
16
  remove_column :manifestations, :title_alternative_transcription
17
- remove_column :patrons, :full_name_alternative_transcription
17
+ remove_column :agents, :full_name_alternative_transcription
18
18
  remove_column :manifestations, :description
19
19
  remove_column :manifestations, :abstract
20
20
  remove_column :manifestations, :available_at
@@ -1,13 +1,13 @@
1
1
  class CreatePatronRelationships < ActiveRecord::Migration
2
2
  def change
3
- create_table :patron_relationships do |t|
3
+ create_table :agent_relationships do |t|
4
4
  t.integer :parent_id
5
5
  t.integer :child_id
6
- t.integer :patron_relationship_type_id
6
+ t.integer :agent_relationship_type_id
7
7
 
8
8
  t.timestamps
9
9
  end
10
- add_index :patron_relationships, :parent_id
11
- add_index :patron_relationships, :child_id
10
+ add_index :agent_relationships, :parent_id
11
+ add_index :agent_relationships, :child_id
12
12
  end
13
13
  end
@@ -1,11 +1,11 @@
1
1
  class AddPositionToPatronRelationship < ActiveRecord::Migration
2
2
  def self.up
3
3
  add_column :manifestation_relationships, :position, :integer
4
- add_column :patron_relationships, :position, :integer
4
+ add_column :agent_relationships, :position, :integer
5
5
  end
6
6
 
7
7
  def self.down
8
- remove_column :patron_relationships, :position
8
+ remove_column :agent_relationships, :position
9
9
  remove_column :manifestation_relationships, :position
10
10
  end
11
11
  end
@@ -1,8 +1,8 @@
1
1
  class CreatePatronImportResults < ActiveRecord::Migration
2
2
  def change
3
- create_table :patron_import_results do |t|
4
- t.integer :patron_import_file_id
5
- t.integer :patron_id
3
+ create_table :agent_import_results do |t|
4
+ t.integer :agent_import_file_id
5
+ t.integer :agent_id
6
6
  t.integer :user_id
7
7
  t.text :body
8
8
 
@@ -1,11 +1,11 @@
1
1
  class AddBirthDateAndDeathDateToPatron < ActiveRecord::Migration
2
2
  def self.up
3
- add_column :patrons, :birth_date, :string
4
- add_column :patrons, :death_date, :string
3
+ add_column :agents, :birth_date, :string
4
+ add_column :agents, :death_date, :string
5
5
  end
6
6
 
7
7
  def self.down
8
- remove_column :patrons, :death_date
9
- remove_column :patrons, :birth_date
8
+ remove_column :agents, :death_date
9
+ remove_column :agents, :birth_date
10
10
  end
11
11
  end
@@ -1,5 +1,5 @@
1
1
  class AddFingerprintToPatronImportFile < ActiveRecord::Migration
2
2
  def change
3
- add_column :patron_import_files, :patron_import_fingerprint, :string
3
+ add_column :agent_import_files, :agent_import_fingerprint, :string
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  class AddErrorMessageToPatronImportFile < ActiveRecord::Migration
2
2
  def change
3
- add_column :patron_import_files, :error_message, :text
3
+ add_column :agent_import_files, :error_message, :text
4
4
  end
5
5
  end
@@ -1,9 +1,9 @@
1
1
  class RenamePatronImportFileImportedAtToExecutedAt < ActiveRecord::Migration
2
2
  def up
3
- rename_column :patron_import_files, :imported_at, :executed_at
3
+ rename_column :agent_import_files, :imported_at, :executed_at
4
4
  end
5
5
 
6
6
  def down
7
- rename_column :patron_import_files, :executed_at, :imported_at
7
+ rename_column :agent_import_files, :executed_at, :imported_at
8
8
  end
9
9
  end
@@ -1,6 +1,6 @@
1
1
  class AddPatronIdentifierToPatron < ActiveRecord::Migration
2
2
  def change
3
- add_column :patrons, :patron_identifier, :string
4
- add_index :patrons, :patron_identifier
3
+ add_column :agents, :agent_identifier, :string
4
+ add_index :agents, :agent_identifier
5
5
  end
6
6
  end
@@ -1,5 +1,5 @@
1
1
  class AddEditModeToPatronImportFile < ActiveRecord::Migration
2
2
  def change
3
- add_column :patron_import_files, :edit_mode, :string
3
+ add_column :agent_import_files, :edit_mode, :string
4
4
  end
5
5
  end
@@ -24,6 +24,125 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
24
24
  add_index "accepts", ["basket_id"], :name => "index_accepts_on_basket_id"
25
25
  add_index "accepts", ["item_id"], :name => "index_accepts_on_item_id"
26
26
 
27
+ create_table "agent_import_files", :force => true do |t|
28
+ t.integer "parent_id"
29
+ t.string "content_type"
30
+ t.integer "size"
31
+ t.integer "user_id"
32
+ t.text "note"
33
+ t.datetime "executed_at"
34
+ t.string "state"
35
+ t.string "agent_import_file_name"
36
+ t.string "agent_import_content_type"
37
+ t.integer "agent_import_file_size"
38
+ t.datetime "agent_import_updated_at"
39
+ t.datetime "created_at", :null => false
40
+ t.datetime "updated_at", :null => false
41
+ t.string "agent_import_fingerprint"
42
+ t.text "error_message"
43
+ t.string "edit_mode"
44
+ end
45
+
46
+ add_index "agent_import_files", ["parent_id"], :name => "index_agent_import_files_on_parent_id"
47
+ add_index "agent_import_files", ["state"], :name => "index_agent_import_files_on_state"
48
+ add_index "agent_import_files", ["user_id"], :name => "index_agent_import_files_on_user_id"
49
+
50
+ create_table "agent_import_results", :force => true do |t|
51
+ t.integer "agent_import_file_id"
52
+ t.integer "agent_id"
53
+ t.integer "user_id"
54
+ t.text "body"
55
+ t.datetime "created_at", :null => false
56
+ t.datetime "updated_at", :null => false
57
+ end
58
+
59
+ create_table "agent_relationship_types", :force => true do |t|
60
+ t.string "name", :null => false
61
+ t.text "display_name"
62
+ t.text "note"
63
+ t.integer "position"
64
+ t.datetime "created_at", :null => false
65
+ t.datetime "updated_at", :null => false
66
+ end
67
+
68
+ create_table "agent_relationships", :force => true do |t|
69
+ t.integer "parent_id"
70
+ t.integer "child_id"
71
+ t.integer "agent_relationship_type_id"
72
+ t.datetime "created_at", :null => false
73
+ t.datetime "updated_at", :null => false
74
+ t.integer "position"
75
+ end
76
+
77
+ add_index "agent_relationships", ["child_id"], :name => "index_agent_relationships_on_child_id"
78
+ add_index "agent_relationships", ["parent_id"], :name => "index_agent_relationships_on_parent_id"
79
+
80
+ create_table "agent_types", :force => true do |t|
81
+ t.string "name", :null => false
82
+ t.text "display_name"
83
+ t.text "note"
84
+ t.integer "position"
85
+ t.datetime "created_at", :null => false
86
+ t.datetime "updated_at", :null => false
87
+ end
88
+
89
+ create_table "agents", :force => true do |t|
90
+ t.integer "user_id"
91
+ t.string "last_name"
92
+ t.string "middle_name"
93
+ t.string "first_name"
94
+ t.string "last_name_transcription"
95
+ t.string "middle_name_transcription"
96
+ t.string "first_name_transcription"
97
+ t.string "corporate_name"
98
+ t.string "corporate_name_transcription"
99
+ t.string "full_name"
100
+ t.text "full_name_transcription"
101
+ t.text "full_name_alternative"
102
+ t.datetime "created_at", :null => false
103
+ t.datetime "updated_at", :null => false
104
+ t.datetime "deleted_at"
105
+ t.string "zip_code_1"
106
+ t.string "zip_code_2"
107
+ t.text "address_1"
108
+ t.text "address_2"
109
+ t.text "address_1_note"
110
+ t.text "address_2_note"
111
+ t.string "telephone_number_1"
112
+ t.string "telephone_number_2"
113
+ t.string "fax_number_1"
114
+ t.string "fax_number_2"
115
+ t.text "other_designation"
116
+ t.text "place"
117
+ t.string "postal_code"
118
+ t.text "street"
119
+ t.text "locality"
120
+ t.text "region"
121
+ t.datetime "date_of_birth"
122
+ t.datetime "date_of_death"
123
+ t.integer "language_id", :default => 1, :null => false
124
+ t.integer "country_id", :default => 1, :null => false
125
+ t.integer "agent_type_id", :default => 1, :null => false
126
+ t.integer "lock_version", :default => 0, :null => false
127
+ t.text "note"
128
+ t.integer "required_role_id", :default => 1, :null => false
129
+ t.integer "required_score", :default => 0, :null => false
130
+ t.string "state"
131
+ t.text "email"
132
+ t.text "url"
133
+ t.text "full_name_alternative_transcription"
134
+ t.string "birth_date"
135
+ t.string "death_date"
136
+ t.string "agent_identifier"
137
+ end
138
+
139
+ add_index "agents", ["agent_identifier"], :name => "index_agents_on_agent_identifier"
140
+ add_index "agents", ["country_id"], :name => "index_agents_on_country_id"
141
+ add_index "agents", ["full_name"], :name => "index_agents_on_full_name"
142
+ add_index "agents", ["language_id"], :name => "index_agents_on_language_id"
143
+ add_index "agents", ["required_role_id"], :name => "index_agents_on_required_role_id"
144
+ add_index "agents", ["user_id"], :name => "index_agents_on_user_id", :unique => true
145
+
27
146
  create_table "baskets", :force => true do |t|
28
147
  t.integer "user_id"
29
148
  t.text "note"
@@ -100,7 +219,7 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
100
219
  end
101
220
 
102
221
  create_table "creates", :force => true do |t|
103
- t.integer "patron_id", :null => false
222
+ t.integer "agent_id", :null => false
104
223
  t.integer "work_id", :null => false
105
224
  t.integer "position"
106
225
  t.datetime "created_at", :null => false
@@ -108,18 +227,18 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
108
227
  t.integer "create_type_id"
109
228
  end
110
229
 
111
- add_index "creates", ["patron_id"], :name => "index_creates_on_patron_id"
230
+ add_index "creates", ["agent_id"], :name => "index_creates_on_agent_id"
112
231
  add_index "creates", ["work_id"], :name => "index_creates_on_work_id"
113
232
 
114
233
  create_table "donates", :force => true do |t|
115
- t.integer "patron_id", :null => false
234
+ t.integer "agent_id", :null => false
116
235
  t.integer "item_id", :null => false
117
236
  t.datetime "created_at", :null => false
118
237
  t.datetime "updated_at", :null => false
119
238
  end
120
239
 
240
+ add_index "donates", ["agent_id"], :name => "index_donates_on_agent_id"
121
241
  add_index "donates", ["item_id"], :name => "index_donates_on_item_id"
122
- add_index "donates", ["patron_id"], :name => "index_donates_on_patron_id"
123
242
 
124
243
  create_table "exemplifies", :force => true do |t|
125
244
  t.integer "manifestation_id", :null => false
@@ -377,134 +496,15 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
377
496
  end
378
497
 
379
498
  create_table "owns", :force => true do |t|
380
- t.integer "patron_id", :null => false
499
+ t.integer "agent_id", :null => false
381
500
  t.integer "item_id", :null => false
382
501
  t.integer "position"
383
502
  t.datetime "created_at", :null => false
384
503
  t.datetime "updated_at", :null => false
385
504
  end
386
505
 
506
+ add_index "owns", ["agent_id"], :name => "index_owns_on_agent_id"
387
507
  add_index "owns", ["item_id"], :name => "index_owns_on_item_id"
388
- add_index "owns", ["patron_id"], :name => "index_owns_on_patron_id"
389
-
390
- create_table "patron_import_files", :force => true do |t|
391
- t.integer "parent_id"
392
- t.string "content_type"
393
- t.integer "size"
394
- t.integer "user_id"
395
- t.text "note"
396
- t.datetime "executed_at"
397
- t.string "state"
398
- t.string "patron_import_file_name"
399
- t.string "patron_import_content_type"
400
- t.integer "patron_import_file_size"
401
- t.datetime "patron_import_updated_at"
402
- t.datetime "created_at", :null => false
403
- t.datetime "updated_at", :null => false
404
- t.string "patron_import_fingerprint"
405
- t.text "error_message"
406
- t.string "edit_mode"
407
- end
408
-
409
- add_index "patron_import_files", ["parent_id"], :name => "index_patron_import_files_on_parent_id"
410
- add_index "patron_import_files", ["state"], :name => "index_patron_import_files_on_state"
411
- add_index "patron_import_files", ["user_id"], :name => "index_patron_import_files_on_user_id"
412
-
413
- create_table "patron_import_results", :force => true do |t|
414
- t.integer "patron_import_file_id"
415
- t.integer "patron_id"
416
- t.integer "user_id"
417
- t.text "body"
418
- t.datetime "created_at", :null => false
419
- t.datetime "updated_at", :null => false
420
- end
421
-
422
- create_table "patron_relationship_types", :force => true do |t|
423
- t.string "name", :null => false
424
- t.text "display_name"
425
- t.text "note"
426
- t.integer "position"
427
- t.datetime "created_at", :null => false
428
- t.datetime "updated_at", :null => false
429
- end
430
-
431
- create_table "patron_relationships", :force => true do |t|
432
- t.integer "parent_id"
433
- t.integer "child_id"
434
- t.integer "patron_relationship_type_id"
435
- t.datetime "created_at", :null => false
436
- t.datetime "updated_at", :null => false
437
- t.integer "position"
438
- end
439
-
440
- add_index "patron_relationships", ["child_id"], :name => "index_patron_relationships_on_child_id"
441
- add_index "patron_relationships", ["parent_id"], :name => "index_patron_relationships_on_parent_id"
442
-
443
- create_table "patron_types", :force => true do |t|
444
- t.string "name", :null => false
445
- t.text "display_name"
446
- t.text "note"
447
- t.integer "position"
448
- t.datetime "created_at", :null => false
449
- t.datetime "updated_at", :null => false
450
- end
451
-
452
- create_table "patrons", :force => true do |t|
453
- t.integer "user_id"
454
- t.string "last_name"
455
- t.string "middle_name"
456
- t.string "first_name"
457
- t.string "last_name_transcription"
458
- t.string "middle_name_transcription"
459
- t.string "first_name_transcription"
460
- t.string "corporate_name"
461
- t.string "corporate_name_transcription"
462
- t.string "full_name"
463
- t.text "full_name_transcription"
464
- t.text "full_name_alternative"
465
- t.datetime "created_at", :null => false
466
- t.datetime "updated_at", :null => false
467
- t.datetime "deleted_at"
468
- t.string "zip_code_1"
469
- t.string "zip_code_2"
470
- t.text "address_1"
471
- t.text "address_2"
472
- t.text "address_1_note"
473
- t.text "address_2_note"
474
- t.string "telephone_number_1"
475
- t.string "telephone_number_2"
476
- t.string "fax_number_1"
477
- t.string "fax_number_2"
478
- t.text "other_designation"
479
- t.text "place"
480
- t.string "postal_code"
481
- t.text "street"
482
- t.text "locality"
483
- t.text "region"
484
- t.datetime "date_of_birth"
485
- t.datetime "date_of_death"
486
- t.integer "language_id", :default => 1, :null => false
487
- t.integer "country_id", :default => 1, :null => false
488
- t.integer "patron_type_id", :default => 1, :null => false
489
- t.integer "lock_version", :default => 0, :null => false
490
- t.text "note"
491
- t.integer "required_role_id", :default => 1, :null => false
492
- t.integer "required_score", :default => 0, :null => false
493
- t.string "state"
494
- t.text "email"
495
- t.text "url"
496
- t.text "full_name_alternative_transcription"
497
- t.string "birth_date"
498
- t.string "death_date"
499
- t.string "patron_identifier"
500
- end
501
-
502
- add_index "patrons", ["country_id"], :name => "index_patrons_on_country_id"
503
- add_index "patrons", ["full_name"], :name => "index_patrons_on_full_name"
504
- add_index "patrons", ["language_id"], :name => "index_patrons_on_language_id"
505
- add_index "patrons", ["patron_identifier"], :name => "index_patrons_on_patron_identifier"
506
- add_index "patrons", ["required_role_id"], :name => "index_patrons_on_required_role_id"
507
- add_index "patrons", ["user_id"], :name => "index_patrons_on_user_id", :unique => true
508
508
 
509
509
  create_table "picture_files", :force => true do |t|
510
510
  t.integer "picture_attachable_id"
@@ -535,7 +535,7 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
535
535
  end
536
536
 
537
537
  create_table "produces", :force => true do |t|
538
- t.integer "patron_id", :null => false
538
+ t.integer "agent_id", :null => false
539
539
  t.integer "manifestation_id", :null => false
540
540
  t.integer "position"
541
541
  t.datetime "created_at", :null => false
@@ -543,8 +543,8 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
543
543
  t.integer "produce_type_id"
544
544
  end
545
545
 
546
+ add_index "produces", ["agent_id"], :name => "index_produces_on_agent_id"
546
547
  add_index "produces", ["manifestation_id"], :name => "index_produces_on_manifestation_id"
547
- add_index "produces", ["patron_id"], :name => "index_produces_on_patron_id"
548
548
 
549
549
  create_table "realize_types", :force => true do |t|
550
550
  t.string "name"
@@ -556,7 +556,7 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
556
556
  end
557
557
 
558
558
  create_table "realizes", :force => true do |t|
559
- t.integer "patron_id", :null => false
559
+ t.integer "agent_id", :null => false
560
560
  t.integer "expression_id", :null => false
561
561
  t.integer "position"
562
562
  t.datetime "created_at", :null => false
@@ -564,8 +564,8 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
564
564
  t.integer "realize_type_id"
565
565
  end
566
566
 
567
+ add_index "realizes", ["agent_id"], :name => "index_realizes_on_agent_id"
567
568
  add_index "realizes", ["expression_id"], :name => "index_realizes_on_expression_id"
568
- add_index "realizes", ["patron_id"], :name => "index_realizes_on_patron_id"
569
569
 
570
570
  create_table "request_status_types", :force => true do |t|
571
571
  t.string "name", :null => false
Binary file
@@ -1,13 +1,13 @@
1
1
  FactoryGirl.define do
2
- factory :patron do |f|
2
+ factory :agent do |f|
3
3
  f.sequence(:full_name){|n| "full_name_#{n}"}
4
- f.patron_type_id{PatronType.find_by_name('Person').id}
4
+ f.agent_type_id{AgentType.find_by_name('Person').id}
5
5
  f.country_id{Country.first.id}
6
6
  f.language_id{Language.first.id}
7
7
  end
8
8
  end
9
9
 
10
10
  FactoryGirl.define do
11
- factory :invalid_patron, :class => Patron do |f|
11
+ factory :invalid_agent, :class => Agent do |f|
12
12
  end
13
13
  end
@@ -0,0 +1,6 @@
1
+ FactoryGirl.define do
2
+ factory :agent_relationship do |f|
3
+ f.parent_id{FactoryGirl.create(:agent).id}
4
+ f.child_id{FactoryGirl.create(:agent).id}
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ FactoryGirl.define do
2
+ factory :agent_relationship_type do |f|
3
+ f.sequence(:name){|n| "agent_relationship_type_#{n}"}
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ FactoryGirl.define do
2
+ factory :agent_type do |f|
3
+ f.sequence(:name){|n| "agent_type_#{n}"}
4
+ end
5
+ end
@@ -1,6 +1,6 @@
1
1
  FactoryGirl.define do
2
2
  factory :create do |f|
3
3
  f.work_id{FactoryGirl.create(:manifestation).id}
4
- f.patron_id{FactoryGirl.create(:patron).id}
4
+ f.agent_id{FactoryGirl.create(:agent).id}
5
5
  end
6
6
  end
@@ -1,6 +1,6 @@
1
1
  FactoryGirl.define do
2
2
  factory :donate do |f|
3
3
  f.item_id{FactoryGirl.create(:item).id}
4
- f.patron_id{FactoryGirl.create(:patron).id}
4
+ f.agent_id{FactoryGirl.create(:agent).id}
5
5
  end
6
6
  end
@@ -1,6 +1,6 @@
1
1
  FactoryGirl.define do
2
2
  factory :own do |f|
3
3
  f.item_id{FactoryGirl.create(:item).id}
4
- f.patron_id{FactoryGirl.create(:patron).id}
4
+ f.agent_id{FactoryGirl.create(:agent).id}
5
5
  end
6
6
  end
@@ -1,6 +1,6 @@
1
1
  FactoryGirl.define do
2
2
  factory :produce do |f|
3
3
  f.manifestation_id{FactoryGirl.create(:manifestation).id}
4
- f.patron_id{FactoryGirl.create(:patron).id}
4
+ f.agent_id{FactoryGirl.create(:agent).id}
5
5
  end
6
6
  end
@@ -1,6 +1,6 @@
1
1
  FactoryGirl.define do
2
2
  factory :realize do |f|
3
3
  f.expression_id{FactoryGirl.create(:manifestation).id}
4
- f.patron_id{FactoryGirl.create(:patron).id}
4
+ f.agent_id{FactoryGirl.create(:agent).id}
5
5
  end
6
6
  end