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.
Files changed (48) hide show
  1. data/app/models/item.rb +27 -26
  2. data/app/models/manifestation.rb +1 -1
  3. data/app/views/layouts/manifestations.html.erb +32 -0
  4. data/app/views/layouts/manifestations.mobile.erb +18 -0
  5. data/app/views/layouts/patrons.html.erb +26 -0
  6. data/app/views/layouts/patrons.mobile.erb +18 -0
  7. data/app/views/manifestations/_show_detail_librarian.html.erb +0 -3
  8. data/app/views/manifestations/_show_detail_user.html.erb +0 -3
  9. data/config/locales/translation_en.yml +239 -0
  10. data/config/locales/translation_ja.yml +239 -0
  11. data/config/routes.rb +2 -0
  12. data/lib/enju_biblio/version.rb +1 -1
  13. data/spec/dummy/app/controllers/application_controller.rb +11 -1
  14. data/spec/dummy/app/models/ability.rb +0 -2
  15. data/spec/dummy/app/views/page/_footer.html.erb +4 -0
  16. data/spec/dummy/app/views/page/_header.html.erb +2 -0
  17. data/spec/dummy/app/views/page/_include.html.erb +4 -0
  18. data/spec/dummy/app/views/page/_menu.html.erb +2 -0
  19. data/spec/dummy/app/views/page/_select_locale.html.erb +2 -0
  20. data/spec/dummy/db/schema.rb +0 -11
  21. data/spec/dummy/db/test.sqlite3 +0 -0
  22. data/spec/dummy/tmp/cache/4F7/F90/default_role +0 -0
  23. data/spec/dummy/tmp/cache/6E4/420/search_engine_all +0 -0
  24. metadata +19 -42
  25. data/app/controllers/accepts_controller.rb +0 -83
  26. data/app/models/accept.rb +0 -37
  27. data/app/views/accepts/_form.html.erb +0 -11
  28. data/app/views/accepts/_list.html.erb +0 -31
  29. data/app/views/accepts/edit.html.erb +0 -13
  30. data/app/views/accepts/index.csv.erb +0 -4
  31. data/app/views/accepts/index.html.erb +0 -49
  32. data/app/views/accepts/index.js.erb +0 -1
  33. data/app/views/accepts/new.html.erb +0 -14
  34. data/app/views/accepts/show.html.erb +0 -31
  35. data/db/migrate/20120319173203_create_accepts.rb +0 -14
  36. data/spec/controllers/accepts_controller_spec.rb +0 -304
  37. data/spec/dummy/solr/data/test/index/segments.gen +0 -0
  38. data/spec/dummy/solr/data/test/index/segments_8c +0 -0
  39. data/spec/dummy/solr/data/test/spellchecker/segments.gen +0 -0
  40. data/spec/dummy/solr/data/test/spellchecker/segments_1 +0 -0
  41. data/spec/factories/accepts.rb +0 -9
  42. data/spec/models/accept_spec.rb +0 -23
  43. data/spec/requests/accepts_spec.rb +0 -11
  44. data/spec/routing/accepts_routing_spec.rb +0 -27
  45. data/spec/views/accepts/edit.html.erb_spec.rb +0 -18
  46. data/spec/views/accepts/index.html.erb_spec.rb +0 -25
  47. data/spec/views/accepts/new.html.erb_spec.rb +0 -31
  48. data/spec/views/accepts/show.html.erb_spec.rb +0 -17
@@ -37,9 +37,248 @@ ja:
37
37
  series_statement_relationship: シリーズ情報の関係
38
38
 
39
39
  attributes:
40
+ manifestation:
41
+ original_title: 原題
42
+ title_alternative: 代替タイトル
43
+ title_transcription: タイトルよみ
44
+ classification_number: 分類番号
45
+ manifestation_identifier: 識別子
46
+ date_of_publication: 出版日
47
+ pub_date: 出版日
48
+ deleted_at: 削除時刻
49
+ access_address: アクセスアドレス
50
+ start_page: 最初のページ
51
+ end_page: 最後のページ
52
+ height: 高さ
53
+ width: 幅
54
+ depth: 奥行き
55
+ isbn: ISBN
56
+ isbn10: 10桁のISBN
57
+ wrong_isbn: 間違ったISBN
58
+ nbn: NBN
59
+ price: 価格
60
+ volume_number: 巻(数字)
61
+ volume_number_string: 巻
62
+ issue_number: 号(数字)
63
+ issue_number_string: 号
64
+ serial_number: 通号
65
+ serial_number_string: 通号(文字)
66
+ edition: 版(数字)
67
+ edition_string: 版
68
+ note: 注記
69
+ repository_content: リポジトリのコンテンツ
70
+ lock_version: ロックバージョン
71
+ carrier_type: 資料の形態
72
+ language: 言語
73
+ lccn: LCCN
74
+ issn: ISSN
75
+ subscription_master: 購読マスタ
76
+ description: 説明
77
+ item:
78
+ call_number: 請求記号
79
+ item_identifier: 所蔵情報ID
80
+ deleted_at: 削除時刻
81
+ include_supplements: 付録を含む
82
+ note: 注記
83
+ url: URL
84
+ price: 購入価格
85
+ lock_version: ロックバージョン
86
+ checkout_type: 貸出区分
87
+ acquired_at: 受入日
88
+ donation: 寄贈情報
89
+ patron:
90
+ last_name: 姓
91
+ middle_name: ミドルネーム
92
+ first_name: 名
93
+ last_name_transcription: 姓(よみ)
94
+ middle_name_transcription: ミドルネーム(よみ)
95
+ first_name_transcription: 名(よみ)
96
+ corporate_name: 会社名
97
+ corporate_name_transcription: 企業名(よみ)
98
+ full_name: フルネーム
99
+ full_name_transcription: フルネーム(よみ)
100
+ full_name_alternative: フルネーム代替
101
+ deleted_at: 削除時刻
102
+ zip_code_1: 郵便番号1
103
+ zip_code_2: 郵便番号2
104
+ address_1: 住所1
105
+ address_2: 住所2
106
+ address_1_note: 住所1の注記
107
+ address_2_note: 住所2の注記
108
+ telephone_number_1: 電話番号1
109
+ telephone_number_2: 電話番号2
110
+ fax_number_1: ファックス番号1
111
+ fax_number_2: ファックス番号2
112
+ other_designation: 他の指定
113
+ place: 場所
114
+ date_of_birth: 生年月日
115
+ date_of_death: 没年月日
116
+ lock_version: ロックバージョン
117
+ note: 注記
118
+ country: 国籍
119
+ patron_type: 人物・団体の種類
120
+ language: 言語
121
+ email: 電子メール
122
+ url: URL
123
+ patron_import_file:
124
+ patron_import_file_name: ファイル名
125
+ patron_import_content_type: Content-Type
126
+ patron_import_file_size: ファイルサイズ
127
+ patron_import_fingerprint: ファイルのハッシュ
128
+ note: 注記
129
+ executed_at: 実行時刻
130
+ patron_import_updated_at: 更新時刻
131
+ state: 状態
132
+ edit_mode: 編集モード
133
+ error_message: エラーメッセージ
134
+ language:
135
+ name: 名前
136
+ native_name: ネイティブ名
137
+ display_name: 表示名
138
+ iso_639_1: ISO 639-1
139
+ iso_639_2: ISO 639-2
140
+ iso_639_3: ISO 639-3
141
+ note: 注記
142
+ position: 位置
40
143
  series_statement_relationship:
41
144
  parent_id: 親
42
145
  child_id: 子
146
+ resource_import_file:
147
+ resource_import_file_name: ファイル名
148
+ resource_import_content_type: Content-Type
149
+ resource_import_file_size: ファイルサイズ
150
+ resource_import_fingerprint: ファイルのハッシュ
151
+ note: 注記
152
+ executed_at: 実行時刻
153
+ resource_import_updated_at: 更新時刻
154
+ state: 状態
155
+ edit_mode: 編集モード
156
+ error_message: エラーメッセージ
157
+ series_statement:
158
+ original_title: シリーズ名
159
+ numbering: シリーズ番号
160
+ title_subseries: 副シリーズ名
161
+ title_subseries_transcription: 副シリーズ名よみ
162
+ numbering_subseries: 副シリーズ番号
163
+ work: 書いた資料
164
+ series_statement_identifier: シリーズ識別子
165
+ issn: ISSN
166
+ periodical: 定期刊行物
167
+ title_transcription: シリーズ名よみ
168
+ note: 注記
169
+ country:
170
+ name: 名前
171
+ display_name: 表示名
172
+ alpha_2: アルファ2
173
+ alpha_3: アルファ3
174
+ numeric_3: 数値3
175
+ note: 注記
176
+ position: 位置
177
+ medium_of_performance:
178
+ name: 名前
179
+ display_name: 表示名
180
+ note: 注記
181
+ position: 位置
182
+ extent:
183
+ name: 名前
184
+ display_name: 表示名
185
+ note: 注記
186
+ position: 位置
187
+ patron_type:
188
+ name: 名前
189
+ display_name: 表示名
190
+ note: 注記
191
+ position: 位置
192
+ patron_relationship_type:
193
+ name: 名前
194
+ display_name: 表示名
195
+ note: 注記
196
+ position: 位置
197
+ manifestation_relationship_type:
198
+ name: 名前
199
+ display_name: 表示名
200
+ note: 注記
201
+ position: 位置
202
+ license:
203
+ name: 名前
204
+ display_name: 表示名
205
+ note: 注記
206
+ position: 位置
207
+ import_request:
208
+ isbn: ISBN
209
+ state: 状態
210
+ patron_relationship:
211
+ parent: 派生元の人物・団体
212
+ child: 派生先の人物・団体
213
+ patron_relationship_type_id: 人物・団体の関係の種類
214
+ manifestation_relationship:
215
+ parent: 派生元の資料
216
+ child: 派生先の資料
217
+ manifestation_relationship_type_id: 資料の関係の種類
218
+ carrier_type:
219
+ name: 名前
220
+ display_name: 表示名
221
+ note: 注記
222
+ position: 位置
223
+ picture_file:
224
+ picture_attachable_type: 画像を添付可能な種類
225
+ picture_file_size: ファイルサイズ
226
+ picture_content_type: Content-Type
227
+ title: タイトル
228
+ picture_file_name: ファイル名
229
+ height: 高さ
230
+ width: 幅
231
+ thumbnail: サムネイル
232
+ picture_fingerprint: ファイルのハッシュ
233
+ picture_updated_at: 更新時刻
234
+ form_of_work:
235
+ name: 名前
236
+ display_name: 表示名
237
+ note: 注記
238
+ position: 位置
239
+ exemplify:
240
+ position: 位置
241
+ own:
242
+ position: 位置
243
+ produce:
244
+ position: 位置
245
+ realize:
246
+ position: 位置
247
+ frequency:
248
+ name: 名前
249
+ display_name: 表示名
250
+ note: 注記
251
+ position: 位置
252
+ content_type:
253
+ name: 名前
254
+ display_name: 表示名
255
+ note: 注記
256
+ position: 位置
257
+ patron_type:
258
+ name: 名前
259
+ display_name: 表示名
260
+ note: 注記
261
+ position: 位置
262
+ embody:
263
+ position: 位置
264
+ create:
265
+ position: 位置
266
+ resource_import_result:
267
+ body: 本文
268
+ patron_import_result:
269
+ body: 本文
270
+ create_type:
271
+ name: 名称
272
+ display_name: 表示名
273
+ note: 注記
274
+ realize_type:
275
+ name: 名称
276
+ display_name: 表示名
277
+ note: 注記
278
+ produce_type:
279
+ name: 名称
280
+ display_name: 表示名
281
+ note: 注記
43
282
 
44
283
  resource_import_file:
45
284
  update_relationship: 関連を更新
data/config/routes.rb CHANGED
@@ -103,6 +103,8 @@ Rails.application.routes.draw do
103
103
 
104
104
  resources :picture_files
105
105
 
106
+ resources :accepts
107
+
106
108
  match '/isbn/:isbn' => 'manifestations#show'
107
109
  match '/page/advanced_search' => 'page#advanced_search'
108
110
  end
@@ -1,3 +1,3 @@
1
1
  module EnjuBiblio
2
- VERSION = "0.1.0.pre15"
2
+ VERSION = "0.1.0.pre16"
3
3
  end
@@ -4,7 +4,7 @@ class ApplicationController < ActionController::Base
4
4
  rescue_from CanCan::AccessDenied, :with => :render_403
5
5
  rescue_from ActiveRecord::RecordNotFound, :with => :render_404
6
6
 
7
- before_filter :get_library_group, :set_locale
7
+ before_filter :get_library_group, :set_locale, :set_available_languages
8
8
 
9
9
  enju_biblio
10
10
  enju_library
@@ -173,4 +173,14 @@ class ApplicationController < ActionController::Base
173
173
  rescue InvalidLocaleError
174
174
  @locale = I18n.default_locale
175
175
  end
176
+
177
+ def set_available_languages
178
+ if Rails.env == 'production'
179
+ @available_languages = Rails.cache.fetch('available_languages'){
180
+ Language.where(:iso_639_1 => I18n.available_locales.map{|l| l.to_s}).select([:id, :iso_639_1, :name, :native_name, :display_name, :position]).all
181
+ }
182
+ else
183
+ @available_languages = Language.where(:iso_639_1 => I18n.available_locales.map{|l| l.to_s})
184
+ end
185
+ end
176
186
  end
@@ -4,7 +4,6 @@ class Ability
4
4
  def initialize(user, ip_addess = nil)
5
5
  case user.try(:role).try(:name)
6
6
  when 'Administrator'
7
- can :manage, Accept
8
7
  can [:read, :update], ContentType
9
8
  can [:read, :update], Country
10
9
  can :manage, Create
@@ -54,7 +53,6 @@ class Ability
54
53
  can :manage, SeriesStatement
55
54
  can :manage, SeriesStatementRelationship
56
55
  when 'Librarian'
57
- can :manage, Accept
58
56
  can [:read, :update], CarrierType
59
57
  can :read, ContentType
60
58
  can :read, Country
@@ -0,0 +1,4 @@
1
+ <div class="header_and_footer">
2
+ <div id="footer">
3
+ </div>
4
+ </div>
@@ -0,0 +1,2 @@
1
+ <div class="header_and_footer">
2
+ </div>
@@ -0,0 +1,4 @@
1
+ <%= stylesheet_link_tag 'application' %>
2
+ <%= stylesheet_link_tag 'print', :media => :print %>
3
+ <%= javascript_include_tag 'application' %>
4
+ <%= csrf_meta_tag %>
@@ -0,0 +1,2 @@
1
+ <div id="navibar">
2
+ </div>
@@ -0,0 +1,2 @@
1
+ <div id="header_select_locale">
2
+ </div>
@@ -13,17 +13,6 @@
13
13
 
14
14
  ActiveRecord::Schema.define(:version => 20121119153944) do
15
15
 
16
- create_table "accepts", :force => true do |t|
17
- t.integer "basket_id"
18
- t.integer "item_id"
19
- t.integer "librarian_id"
20
- t.datetime "created_at", :null => false
21
- t.datetime "updated_at", :null => false
22
- end
23
-
24
- add_index "accepts", ["basket_id"], :name => "index_accepts_on_basket_id"
25
- add_index "accepts", ["item_id"], :name => "index_accepts_on_item_id"
26
-
27
16
  create_table "baskets", :force => true do |t|
28
17
  t.integer "user_id"
29
18
  t.text "note"
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enju_biblio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre15
4
+ version: 0.1.0.pre16
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-12 00:00:00.000000000 Z
12
+ date: 2013-02-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -210,7 +210,7 @@ dependencies:
210
210
  requirements:
211
211
  - - ~>
212
212
  - !ruby/object:Gem::Version
213
- version: 0.1.1.pre2
213
+ version: 0.1.1.pre3
214
214
  type: :runtime
215
215
  prerelease: false
216
216
  version_requirements: !ruby/object:Gem::Requirement
@@ -218,7 +218,7 @@ dependencies:
218
218
  requirements:
219
219
  - - ~>
220
220
  - !ruby/object:Gem::Version
221
- version: 0.1.1.pre2
221
+ version: 0.1.1.pre3
222
222
  - !ruby/object:Gem::Dependency
223
223
  name: library_stdnums
224
224
  requirement: !ruby/object:Gem::Requirement
@@ -562,7 +562,6 @@ executables: []
562
562
  extensions: []
563
563
  extra_rdoc_files: []
564
564
  files:
565
- - app/controllers/accepts_controller.rb
566
565
  - app/controllers/carrier_types_controller.rb
567
566
  - app/controllers/content_types_controller.rb
568
567
  - app/controllers/countries_controller.rb
@@ -603,7 +602,6 @@ files:
603
602
  - app/helpers/patrons_helper.rb
604
603
  - app/helpers/picture_files_helper.rb
605
604
  - app/helpers/series_statements_helper.rb
606
- - app/models/accept.rb
607
605
  - app/models/carrier_type.rb
608
606
  - app/models/content_type.rb
609
607
  - app/models/country.rb
@@ -643,14 +641,6 @@ files:
643
641
  - app/models/series_has_manifestation.rb
644
642
  - app/models/series_statement.rb
645
643
  - app/models/series_statement_relationship.rb
646
- - app/views/accepts/_form.html.erb
647
- - app/views/accepts/_list.html.erb
648
- - app/views/accepts/edit.html.erb
649
- - app/views/accepts/index.csv.erb
650
- - app/views/accepts/index.html.erb
651
- - app/views/accepts/index.js.erb
652
- - app/views/accepts/new.html.erb
653
- - app/views/accepts/show.html.erb
654
644
  - app/views/carrier_types/_form.html.erb
655
645
  - app/views/carrier_types/edit.html.erb
656
646
  - app/views/carrier_types/index.html.erb
@@ -725,6 +715,10 @@ files:
725
715
  - app/views/languages/index.html.erb
726
716
  - app/views/languages/new.html.erb
727
717
  - app/views/languages/show.html.erb
718
+ - app/views/layouts/manifestations.html.erb
719
+ - app/views/layouts/manifestations.mobile.erb
720
+ - app/views/layouts/patrons.html.erb
721
+ - app/views/layouts/patrons.mobile.erb
728
722
  - app/views/licenses/_form.html.erb
729
723
  - app/views/licenses/edit.html.erb
730
724
  - app/views/licenses/index.html.erb
@@ -996,7 +990,6 @@ files:
996
990
  - db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb
997
991
  - db/migrate/20120129020544_add_budget_type_id_to_item.rb
998
992
  - db/migrate/20120319120638_add_content_type_id_to_manifestation.rb
999
- - db/migrate/20120319173203_create_accepts.rb
1000
993
  - db/migrate/20120410104851_add_year_of_publication_to_manifestation.rb
1001
994
  - db/migrate/20120413072700_add_picture_meta_to_picture_file.rb
1002
995
  - db/migrate/20120413100352_add_fingerprint_to_picture_file.rb
@@ -1028,7 +1021,6 @@ files:
1028
1021
  - README.rdoc
1029
1022
  - spec/cassette_library/enju_ndl/manifestation.yml
1030
1023
  - spec/cassette_library/enju_ndl/ndl_search.yml
1031
- - spec/controllers/accepts_controller_spec.rb
1032
1024
  - spec/controllers/carrier_types_controller_spec.rb
1033
1025
  - spec/controllers/content_types_controller_spec.rb
1034
1026
  - spec/controllers/countries_controller_spec.rb
@@ -1083,6 +1075,11 @@ files:
1083
1075
  - spec/dummy/app/views/page/404.html.erb
1084
1076
  - spec/dummy/app/views/page/404.mobile.erb
1085
1077
  - spec/dummy/app/views/page/404.xml.erb
1078
+ - spec/dummy/app/views/page/_footer.html.erb
1079
+ - spec/dummy/app/views/page/_header.html.erb
1080
+ - spec/dummy/app/views/page/_include.html.erb
1081
+ - spec/dummy/app/views/page/_menu.html.erb
1082
+ - spec/dummy/app/views/page/_select_locale.html.erb
1086
1083
  - spec/dummy/config/application.rb
1087
1084
  - spec/dummy/config/application.yml
1088
1085
  - spec/dummy/config/boot.rb
@@ -1217,13 +1214,8 @@ files:
1217
1214
  - spec/dummy/solr/conf/spellings.txt
1218
1215
  - spec/dummy/solr/conf/stopwords.txt
1219
1216
  - spec/dummy/solr/conf/synonyms.txt
1220
- - spec/dummy/solr/data/test/index/segments.gen
1221
- - spec/dummy/solr/data/test/index/segments_8c
1222
- - spec/dummy/solr/data/test/spellchecker/segments.gen
1223
- - spec/dummy/solr/data/test/spellchecker/segments_1
1224
1217
  - spec/dummy/tmp/cache/4F7/F90/default_role
1225
1218
  - spec/dummy/tmp/cache/6E4/420/search_engine_all
1226
- - spec/factories/accepts.rb
1227
1219
  - spec/factories/basket.rb
1228
1220
  - spec/factories/carrier_type.rb
1229
1221
  - spec/factories/content_type.rb
@@ -1327,7 +1319,6 @@ files:
1327
1319
  - spec/fixtures/user_has_roles.yml
1328
1320
  - spec/fixtures/user_reserve_stats.yml
1329
1321
  - spec/fixtures/users.yml
1330
- - spec/models/accept_spec.rb
1331
1322
  - spec/models/carrier_type_spec.rb
1332
1323
  - spec/models/content_type_spec.rb
1333
1324
  - spec/models/country_spec.rb
@@ -1363,7 +1354,6 @@ files:
1363
1354
  - spec/models/series_has_manifestation_spec.rb
1364
1355
  - spec/models/series_statement_relationship_spec.rb
1365
1356
  - spec/models/series_statement_spec.rb
1366
- - spec/requests/accepts_spec.rb
1367
1357
  - spec/requests/create_types_spec.rb
1368
1358
  - spec/requests/items_spec.rb
1369
1359
  - spec/requests/manifestations_spec.rb
@@ -1371,7 +1361,6 @@ files:
1371
1361
  - spec/requests/produce_types_spec.rb
1372
1362
  - spec/requests/realize_types_spec.rb
1373
1363
  - spec/requests/series_statement_relationships_spec.rb
1374
- - spec/routing/accepts_routing_spec.rb
1375
1364
  - spec/routing/content_types_routing_spec.rb
1376
1365
  - spec/routing/create_types_routing_spec.rb
1377
1366
  - spec/routing/creates_routing_spec.rb
@@ -1392,10 +1381,6 @@ files:
1392
1381
  - spec/support/controller_macros.rb
1393
1382
  - spec/support/devise.rb
1394
1383
  - spec/support/vcr.rb
1395
- - spec/views/accepts/edit.html.erb_spec.rb
1396
- - spec/views/accepts/index.html.erb_spec.rb
1397
- - spec/views/accepts/new.html.erb_spec.rb
1398
- - spec/views/accepts/show.html.erb_spec.rb
1399
1384
  - spec/views/create_types/edit.html.erb_spec.rb
1400
1385
  - spec/views/create_types/index.html.erb_spec.rb
1401
1386
  - spec/views/create_types/new.html.erb_spec.rb
@@ -1451,7 +1436,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
1451
1436
  version: '0'
1452
1437
  segments:
1453
1438
  - 0
1454
- hash: 1593504742697642523
1439
+ hash: -2202032789077842206
1455
1440
  required_rubygems_version: !ruby/object:Gem::Requirement
1456
1441
  none: false
1457
1442
  requirements:
@@ -1467,7 +1452,6 @@ summary: enju_biblio plugin
1467
1452
  test_files:
1468
1453
  - spec/cassette_library/enju_ndl/manifestation.yml
1469
1454
  - spec/cassette_library/enju_ndl/ndl_search.yml
1470
- - spec/controllers/accepts_controller_spec.rb
1471
1455
  - spec/controllers/carrier_types_controller_spec.rb
1472
1456
  - spec/controllers/content_types_controller_spec.rb
1473
1457
  - spec/controllers/countries_controller_spec.rb
@@ -1522,6 +1506,11 @@ test_files:
1522
1506
  - spec/dummy/app/views/page/404.html.erb
1523
1507
  - spec/dummy/app/views/page/404.mobile.erb
1524
1508
  - spec/dummy/app/views/page/404.xml.erb
1509
+ - spec/dummy/app/views/page/_footer.html.erb
1510
+ - spec/dummy/app/views/page/_header.html.erb
1511
+ - spec/dummy/app/views/page/_include.html.erb
1512
+ - spec/dummy/app/views/page/_menu.html.erb
1513
+ - spec/dummy/app/views/page/_select_locale.html.erb
1525
1514
  - spec/dummy/config/application.rb
1526
1515
  - spec/dummy/config/application.yml
1527
1516
  - spec/dummy/config/boot.rb
@@ -1656,13 +1645,8 @@ test_files:
1656
1645
  - spec/dummy/solr/conf/spellings.txt
1657
1646
  - spec/dummy/solr/conf/stopwords.txt
1658
1647
  - spec/dummy/solr/conf/synonyms.txt
1659
- - spec/dummy/solr/data/test/index/segments.gen
1660
- - spec/dummy/solr/data/test/index/segments_8c
1661
- - spec/dummy/solr/data/test/spellchecker/segments.gen
1662
- - spec/dummy/solr/data/test/spellchecker/segments_1
1663
1648
  - spec/dummy/tmp/cache/4F7/F90/default_role
1664
1649
  - spec/dummy/tmp/cache/6E4/420/search_engine_all
1665
- - spec/factories/accepts.rb
1666
1650
  - spec/factories/basket.rb
1667
1651
  - spec/factories/carrier_type.rb
1668
1652
  - spec/factories/content_type.rb
@@ -1766,7 +1750,6 @@ test_files:
1766
1750
  - spec/fixtures/user_has_roles.yml
1767
1751
  - spec/fixtures/user_reserve_stats.yml
1768
1752
  - spec/fixtures/users.yml
1769
- - spec/models/accept_spec.rb
1770
1753
  - spec/models/carrier_type_spec.rb
1771
1754
  - spec/models/content_type_spec.rb
1772
1755
  - spec/models/country_spec.rb
@@ -1802,7 +1785,6 @@ test_files:
1802
1785
  - spec/models/series_has_manifestation_spec.rb
1803
1786
  - spec/models/series_statement_relationship_spec.rb
1804
1787
  - spec/models/series_statement_spec.rb
1805
- - spec/requests/accepts_spec.rb
1806
1788
  - spec/requests/create_types_spec.rb
1807
1789
  - spec/requests/items_spec.rb
1808
1790
  - spec/requests/manifestations_spec.rb
@@ -1810,7 +1792,6 @@ test_files:
1810
1792
  - spec/requests/produce_types_spec.rb
1811
1793
  - spec/requests/realize_types_spec.rb
1812
1794
  - spec/requests/series_statement_relationships_spec.rb
1813
- - spec/routing/accepts_routing_spec.rb
1814
1795
  - spec/routing/content_types_routing_spec.rb
1815
1796
  - spec/routing/create_types_routing_spec.rb
1816
1797
  - spec/routing/creates_routing_spec.rb
@@ -1831,10 +1812,6 @@ test_files:
1831
1812
  - spec/support/controller_macros.rb
1832
1813
  - spec/support/devise.rb
1833
1814
  - spec/support/vcr.rb
1834
- - spec/views/accepts/edit.html.erb_spec.rb
1835
- - spec/views/accepts/index.html.erb_spec.rb
1836
- - spec/views/accepts/new.html.erb_spec.rb
1837
- - spec/views/accepts/show.html.erb_spec.rb
1838
1815
  - spec/views/create_types/edit.html.erb_spec.rb
1839
1816
  - spec/views/create_types/index.html.erb_spec.rb
1840
1817
  - spec/views/create_types/new.html.erb_spec.rb
@@ -1,83 +0,0 @@
1
- class AcceptsController < InheritedResources::Base
2
- load_and_authorize_resource :except => :index
3
- authorize_resource :only => :index
4
- respond_to :html, :json
5
- before_filter :get_basket, :only => [:index, :create]
6
-
7
- # GET /accepts
8
- # GET /accepts.json
9
- def index
10
- if params[:format] == 'csv'
11
- @accepts = Accept.order('accepts.created_at DESC').page(params[:page]).per(65534)
12
- else
13
- if params[:accept]
14
- @query = params[:accept][:item_identifier].to_s.strip
15
- item = Item.where(:item_identifier => @query).first if @query.present?
16
- end
17
-
18
- if item
19
- @accepts = Accept.order('accepts.created_at DESC').where(:item_id => item.id).page(params[:page])
20
- else
21
- if @basket
22
- @accepts = @basket.accepts.page(params[:page])
23
- else
24
- @accepts = Accept.page(params[:page])
25
- end
26
- end
27
- end
28
-
29
- respond_to do |format|
30
- format.html # index.html.erb
31
- format.json { render :json => @accepts }
32
- format.js { @accept = Accept.new }
33
- format.csv
34
- end
35
- end
36
-
37
- # GET /new
38
- # GET /new.json
39
- def new
40
- @basket = Basket.new
41
- @basket.user = current_user
42
- @basket.save!
43
- @accept = Accept.new
44
- @accepts = []
45
-
46
- respond_to do |format|
47
- format.html # new.html.erb
48
- format.json { render :json => @patron }
49
- end
50
- end
51
-
52
- # POST /accepts
53
- # POST /accepts.json
54
- def create
55
- unless @basket
56
- access_denied; return
57
- end
58
- @accept.basket = @basket
59
- @accept.librarian = current_user
60
-
61
- flash[:message] = ''
62
- if @accept.item_identifier.blank?
63
- flash[:message] << t('accept.enter_item_identifier') if @accept.item_identifier.blank?
64
- else
65
- item = Item.where(:item_identifier => @accept.item_identifier.to_s.strip).first
66
- end
67
- @accept.item = item
68
-
69
- respond_to do |format|
70
- if @accept.save
71
- flash[:message] << t('accept.successfully_accepted', :model => t('activerecord.models.accept'))
72
- format.html { redirect_to basket_accepts_url(@basket) }
73
- format.json { render :json => @accept, :status => :created, :location => @accept }
74
- format.js { redirect_to basket_accepts_url(@basket, :format => :js) }
75
- else
76
- @accepts = @basket.accepts.page(params[:page])
77
- format.html { render :action => "index" }
78
- format.json { render :json => @accept.errors, :status => :unprocessable_entity }
79
- format.js { render :action => "index" }
80
- end
81
- end
82
- end
83
- end