enju_biblio 0.1.0.pre42 → 0.1.0.pre43

Sign up to get free protection for your applications and to get access to all the features.
Files changed (319) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/creates_controller.rb +11 -11
  3. data/app/controllers/items_controller.rb +3 -3
  4. data/app/controllers/manifestations_controller.rb +14 -14
  5. data/app/controllers/owns_controller.rb +10 -10
  6. data/app/controllers/patron_import_files_controller.rb +34 -34
  7. data/app/controllers/patron_import_results_controller.rb +5 -5
  8. data/app/controllers/patron_relationship_types_controller.rb +3 -3
  9. data/app/controllers/patron_relationships_controller.rb +7 -7
  10. data/app/controllers/patron_types_controller.rb +3 -3
  11. data/app/controllers/patrons_controller.rb +61 -61
  12. data/app/controllers/picture_files_controller.rb +4 -4
  13. data/app/controllers/produces_controller.rb +11 -11
  14. data/app/controllers/realizes_controller.rb +11 -11
  15. data/app/helpers/{patrons_helper.rb → agents_helper.rb} +5 -5
  16. data/app/models/{patron.rb → agent.rb} +36 -36
  17. data/app/models/{patron_import_file.rb → agent_import_file.rb} +77 -77
  18. data/app/models/agent_import_result.rb +26 -0
  19. data/app/models/{patron_relationship.rb → agent_relationship.rb} +7 -7
  20. data/app/models/{patron_relationship_type.rb → agent_relationship_type.rb} +4 -4
  21. data/app/models/{patron_sweeper.rb → agent_sweeper.rb} +6 -6
  22. data/app/models/{patron_type.rb → agent_type.rb} +4 -4
  23. data/app/models/country.rb +1 -1
  24. data/app/models/create.rb +7 -7
  25. data/app/models/donate.rb +5 -5
  26. data/app/models/enju_biblio/ability.rb +24 -24
  27. data/app/models/item.rb +5 -5
  28. data/app/models/item_sweeper.rb +2 -2
  29. data/app/models/manifestation.rb +24 -20
  30. data/app/models/own.rb +7 -7
  31. data/app/models/page_sweeper.rb +4 -4
  32. data/app/models/picture_file.rb +1 -1
  33. data/app/models/produce.rb +7 -7
  34. data/app/models/realize.rb +7 -7
  35. data/app/models/resource_import_file.rb +19 -19
  36. data/app/views/{patron_import_files → agent_import_files}/edit.html.erb +6 -6
  37. data/app/views/agent_import_files/index.html.erb +40 -0
  38. data/app/views/{patron_import_files → agent_import_files}/new.html.erb +3 -3
  39. data/app/views/agent_import_files/show.html.erb +69 -0
  40. data/app/views/agent_import_results/index.csv.erb +3 -0
  41. data/app/views/agent_import_results/index.html.erb +52 -0
  42. data/app/views/agent_import_results/show.html.erb +38 -0
  43. data/app/views/{patron_relationship_types → agent_relationship_types}/_form.html.erb +1 -1
  44. data/app/views/{patron_relationship_types → agent_relationship_types}/edit.html.erb +3 -3
  45. data/app/views/agent_relationship_types/index.html.erb +43 -0
  46. data/app/views/{patron_relationship_types → agent_relationship_types}/new.html.erb +2 -2
  47. data/app/views/agent_relationship_types/show.html.erb +29 -0
  48. data/app/views/{patron_relationships → agent_relationships}/_form.html.erb +7 -7
  49. data/app/views/{patron_relationships → agent_relationships}/edit.html.erb +3 -3
  50. data/app/views/agent_relationships/index.html.erb +34 -0
  51. data/app/views/{patron_relationships → agent_relationships}/new.html.erb +2 -2
  52. data/app/views/agent_relationships/show.html.erb +24 -0
  53. data/app/views/{patron_types → agent_types}/_form.html.erb +1 -1
  54. data/app/views/{patron_types → agent_types}/edit.html.erb +3 -3
  55. data/app/views/agent_types/index.html.erb +43 -0
  56. data/app/views/{patron_types → agent_types}/new.html.erb +2 -2
  57. data/app/views/agent_types/show.html.erb +29 -0
  58. data/app/views/{patrons → agents}/_expression_list.html.erb +3 -3
  59. data/app/views/{patrons → agents}/_form.html.erb +9 -9
  60. data/app/views/{patrons → agents}/_form_family_name_first.html.erb +0 -0
  61. data/app/views/{patrons → agents}/_form_family_name_last.html.erb +0 -0
  62. data/app/views/{patrons → agents}/_history_list.html.erb +2 -2
  63. data/app/views/{patrons → agents}/_index.html.erb +9 -9
  64. data/app/views/{patrons → agents}/_index_expression.html.erb +15 -15
  65. data/app/views/{patrons → agents}/_index_manifestation.html.erb +16 -16
  66. data/app/views/agents/_index_patron.html.erb +71 -0
  67. data/app/views/agents/_index_patron_merge_list.html.erb +53 -0
  68. data/app/views/{patrons → agents}/_index_work.html.erb +17 -17
  69. data/app/views/{patrons → agents}/_manifestation_list.html.erb +3 -3
  70. data/app/views/agents/_patron.html.erb +13 -0
  71. data/app/views/agents/_patron_list.html.erb +18 -0
  72. data/app/views/{patrons → agents}/_work_list.html.erb +1 -1
  73. data/app/views/agents/edit.html.erb +16 -0
  74. data/app/views/agents/index.atom.builder +10 -0
  75. data/app/views/{patrons → agents}/index.html.erb +4 -4
  76. data/app/views/{patrons → agents}/index.mobile.erb +5 -5
  77. data/app/views/{patrons → agents}/index.rss.builder +11 -11
  78. data/app/views/{patrons → agents}/new.html.erb +2 -2
  79. data/app/views/agents/show.html.erb +152 -0
  80. data/app/views/{patrons → agents}/show.js.erb +0 -0
  81. data/app/views/agents/show.mobile.erb +69 -0
  82. data/app/views/creates/_form.html.erb +5 -5
  83. data/app/views/creates/_index.html.erb +2 -2
  84. data/app/views/creates/_index_patron.html.erb +6 -6
  85. data/app/views/creates/_index_work.html.erb +2 -2
  86. data/app/views/creates/index.html.erb +2 -2
  87. data/app/views/creates/new.html.erb +3 -3
  88. data/app/views/creates/show.html.erb +4 -4
  89. data/app/views/donates/edit.html.erb +2 -2
  90. data/app/views/donates/index.html.erb +2 -2
  91. data/app/views/donates/new.html.erb +2 -2
  92. data/app/views/donates/show.html.erb +2 -2
  93. data/app/views/items/index.html.erb +1 -1
  94. data/app/views/languages/index.html.erb +1 -1
  95. data/app/views/layouts/patrons.html.erb +2 -2
  96. data/app/views/manifestations/_index_form_contributor.html.erb +1 -1
  97. data/app/views/manifestations/_index_form_creator.html.erb +1 -1
  98. data/app/views/manifestations/_index_form_publisher.html.erb +1 -1
  99. data/app/views/manifestations/_manifestation_list.html.erb +6 -6
  100. data/app/views/manifestations/_show.mods.builder +4 -4
  101. data/app/views/manifestations/_show.rdf.builder +4 -4
  102. data/app/views/manifestations/_show_creators.html.erb +4 -4
  103. data/app/views/manifestations/_show_creators.mobile.erb +4 -4
  104. data/app/views/manifestations/_title.html.erb +3 -3
  105. data/app/views/manifestations/_title.mobile.erb +3 -3
  106. data/app/views/manifestations/edit.html.erb +2 -2
  107. data/app/views/manifestations/index.atom.builder +2 -2
  108. data/app/views/manifestations/index.html.erb +3 -3
  109. data/app/views/manifestations/index.opds.builder +2 -2
  110. data/app/views/manifestations/index.sru.builder +6 -6
  111. data/app/views/manifestations/new.html.erb +2 -2
  112. data/app/views/notifier/manifestation_info.en.text.erb +1 -1
  113. data/app/views/notifier/manifestation_info.ja.text.erb +1 -1
  114. data/app/views/owns/_form.html.erb +1 -1
  115. data/app/views/owns/index.html.erb +2 -2
  116. data/app/views/owns/show.html.erb +4 -4
  117. data/app/views/picture_files/_index.html.erb +1 -1
  118. data/app/views/picture_files/_index_patron.html.erb +2 -2
  119. data/app/views/picture_files/index.html.erb +2 -2
  120. data/app/views/picture_files/show.html.erb +2 -2
  121. data/app/views/produces/_form.html.erb +5 -5
  122. data/app/views/produces/_index.html.erb +2 -2
  123. data/app/views/produces/_index_manifestation.html.erb +3 -3
  124. data/app/views/produces/_index_patron.html.erb +3 -3
  125. data/app/views/produces/index.html.erb +2 -2
  126. data/app/views/produces/new.html.erb +3 -3
  127. data/app/views/produces/show.html.erb +4 -4
  128. data/app/views/realizes/_form.html.erb +5 -5
  129. data/app/views/realizes/_index.html.erb +2 -2
  130. data/app/views/realizes/_index_expression.html.erb +3 -3
  131. data/app/views/realizes/_index_patron.html.erb +3 -3
  132. data/app/views/realizes/index.html.erb +2 -2
  133. data/app/views/realizes/new.html.erb +3 -3
  134. data/app/views/realizes/show.html.erb +4 -4
  135. data/app/views/resource_import_results/show.html.erb +1 -1
  136. data/config/routes.rb +16 -16
  137. data/db/migrate/{001_create_patrons.rb → 001_create_agents.rb} +8 -8
  138. data/db/migrate/012_create_owns.rb +2 -2
  139. data/db/migrate/015_create_creates.rb +2 -2
  140. data/db/migrate/047_create_produces.rb +2 -2
  141. data/db/migrate/125_create_donates.rb +2 -2
  142. data/db/migrate/20080830154109_create_realizes.rb +2 -2
  143. data/db/migrate/{20080905191442_create_patron_types.rb → 20080905191442_create_agent_types.rb} +2 -2
  144. data/db/migrate/20081028083142_create_agent_import_files.rb +22 -0
  145. data/db/migrate/{20090812151902_create_patron_relationship_types.rb → 20090812151902_create_agent_relationship_types.rb} +2 -2
  146. data/db/migrate/20091012101112_add_dcndl_schema.rb +2 -2
  147. data/db/migrate/20100606073747_create_agent_relationships.rb +13 -0
  148. data/db/migrate/20100814091104_add_position_to_agent_relationship.rb +11 -0
  149. data/db/migrate/20100925074559_create_agent_import_results.rb +12 -0
  150. data/db/migrate/20110301121550_add_birth_date_and_death_date_to_agent.rb +11 -0
  151. data/db/migrate/20120413161403_add_fingerprint_to_agent_import_file.rb +5 -0
  152. data/db/migrate/20120413170720_add_error_message_to_agent_import_file.rb +5 -0
  153. data/db/migrate/20120511072422_add_agent_identifier_to_agent.rb +6 -0
  154. data/db/migrate/20120602141129_add_edit_mode_to_agent_import_file.rb +5 -0
  155. data/lib/enju_biblio/biblio_helper.rb +8 -8
  156. data/lib/enju_biblio/version.rb +1 -1
  157. data/lib/enju_biblio.rb +3 -3
  158. data/lib/generators/enju_biblio/setup/templates/db/fixtures/patron_relationship_types.yml +3 -3
  159. data/lib/generators/enju_biblio/setup/templates/db/fixtures/patron_types.yml +2 -2
  160. data/lib/generators/enju_biblio/setup/templates/db/fixtures/patrons.yml +4 -4
  161. data/spec/controllers/agent_import_files_controller_spec.rb +321 -0
  162. data/spec/controllers/{patron_import_results_controller_spec.rb → agent_import_results_controller_spec.rb} +17 -17
  163. data/spec/controllers/agent_relationship_types_controller_spec.rb +445 -0
  164. data/spec/controllers/agent_relationships_controller_spec.rb +446 -0
  165. data/spec/controllers/agent_types_controller_spec.rb +447 -0
  166. data/spec/controllers/agents_controller_spec.rb +644 -0
  167. data/spec/controllers/countries_controller_spec.rb +1 -1
  168. data/spec/controllers/items_controller_spec.rb +4 -4
  169. data/spec/controllers/manifestation_relationship_types_controller_spec.rb +1 -1
  170. data/spec/controllers/manifestations_controller_spec.rb +4 -4
  171. data/spec/controllers/owns_controller_spec.rb +2 -2
  172. data/spec/controllers/resource_import_files_controller_spec.rb +1 -1
  173. data/spec/dummy/app/helpers/application_helper.rb +5 -222
  174. data/spec/dummy/app/models/ability.rb +31 -31
  175. data/spec/dummy/app/models/{local_patron.rb → local_agent.rb} +1 -1
  176. data/spec/dummy/app/models/user.rb +3 -3
  177. data/spec/dummy/config/application.rb +0 -1
  178. data/spec/dummy/config/environments/test.rb +1 -0
  179. data/spec/dummy/db/development.sqlite3 +0 -0
  180. data/spec/dummy/db/migrate/035_create_reserves.rb +1 -1
  181. data/spec/dummy/db/migrate/20090519203307_create_participates.rb +2 -2
  182. data/spec/dummy/db/schema.rb +132 -132
  183. data/spec/dummy/db/test.sqlite3 +0 -0
  184. data/spec/dummy/private/system/agent_import_files/agent_imports/000/000/004/original/agent_delete_file.tsv +8 -0
  185. data/spec/dummy/private/system/agent_import_files/agent_imports/000/000/004/original/agent_import_file_sample1.tsv +5 -0
  186. data/spec/dummy/private/system/agent_import_files/agent_imports/000/000/004/original/agent_import_file_sample2.tsv +8 -0
  187. data/spec/dummy/private/system/agent_import_files/agent_imports/000/000/004/original/agent_import_file_sample3.tsv +5 -0
  188. data/spec/dummy/private/system/agent_import_files/agent_imports/000/000/004/original/agent_update_file.tsv +3 -0
  189. data/spec/dummy/solr/data/test/index/segments.gen +0 -0
  190. data/spec/dummy/solr/data/test/index/segments_q76 +0 -0
  191. data/spec/factories/{patron.rb → agent.rb} +3 -3
  192. data/spec/factories/create.rb +1 -1
  193. data/spec/factories/donate.rb +1 -1
  194. data/spec/factories/own.rb +1 -1
  195. data/spec/factories/patron_relationship.rb +3 -3
  196. data/spec/factories/patron_relationship_type.rb +2 -2
  197. data/spec/factories/patron_type.rb +2 -2
  198. data/spec/factories/produce.rb +1 -1
  199. data/spec/factories/realize.rb +1 -1
  200. data/spec/fixtures/{patron_import_files.yml → agent_import_files.yml} +18 -18
  201. data/spec/fixtures/{patron_import_results.yml → agent_import_results.yml} +7 -7
  202. data/spec/fixtures/{patron_relationship_types.yml → agent_relationship_types.yml} +4 -4
  203. data/spec/fixtures/{patron_relationships.yml → agent_relationships.yml} +4 -4
  204. data/spec/fixtures/{patron_types.yml → agent_types.yml} +4 -4
  205. data/spec/fixtures/{patrons.yml → agents.yml} +47 -47
  206. data/spec/fixtures/creates.yml +8 -8
  207. data/spec/fixtures/donates.yml +4 -4
  208. data/spec/fixtures/owns.yml +3 -3
  209. data/spec/fixtures/picture_files.yml +1 -1
  210. data/spec/fixtures/produces.yml +20 -20
  211. data/spec/fixtures/realizes.yml +11 -11
  212. data/spec/fixtures/reserves.yml +1 -1
  213. data/spec/models/agent_import_file_spec.rb +96 -0
  214. data/spec/models/{patron_import_result_spec.rb → agent_import_result_spec.rb} +4 -4
  215. data/spec/models/{patron_relationship_spec.rb → agent_relationship_spec.rb} +3 -3
  216. data/spec/models/{patron_relationship_type_spec.rb → agent_relationship_type_spec.rb} +2 -2
  217. data/spec/models/{patron_spec.rb → agent_spec.rb} +16 -16
  218. data/spec/models/{patron_type_spec.rb → agent_type_spec.rb} +2 -2
  219. data/spec/models/create_spec.rb +1 -1
  220. data/spec/models/donate_spec.rb +1 -1
  221. data/spec/models/manifestation_spec.rb +1 -1
  222. data/spec/models/own_spec.rb +1 -1
  223. data/spec/models/produce_spec.rb +1 -1
  224. data/spec/models/realize_spec.rb +1 -1
  225. data/spec/models/resource_import_file_spec.rb +8 -8
  226. data/spec/requests/agents_spec.rb +9 -0
  227. data/spec/routing/agent_relationship_types_routing_spec.rb +35 -0
  228. data/spec/routing/agent_relationships_routing_spec.rb +35 -0
  229. data/spec/routing/agents_routing_spec.rb +35 -0
  230. data/spec/views/creates/edit.html.erb_spec.rb +1 -1
  231. data/spec/views/creates/index.html.erb_spec.rb +2 -2
  232. data/spec/views/creates/new.html.erb_spec.rb +1 -1
  233. data/spec/views/creates/show.html.erb_spec.rb +1 -1
  234. data/spec/views/owns/edit.html.erb_spec.rb +1 -1
  235. data/spec/views/owns/index.html.erb_spec.rb +2 -2
  236. data/spec/views/owns/new.html.erb_spec.rb +1 -1
  237. data/spec/views/owns/show.html.erb_spec.rb +1 -1
  238. data/spec/views/produces/edit.html.erb_spec.rb +2 -2
  239. data/spec/views/produces/index.html.erb_spec.rb +2 -2
  240. data/spec/views/produces/new.html.erb_spec.rb +2 -2
  241. data/spec/views/produces/show.html.erb_spec.rb +1 -1
  242. data/spec/views/realizes/edit.html.erb_spec.rb +2 -2
  243. data/spec/views/realizes/index.html.erb_spec.rb +2 -2
  244. data/spec/views/realizes/new.html.erb_spec.rb +2 -2
  245. data/spec/views/realizes/show.html.erb_spec.rb +1 -1
  246. metadata +131 -187
  247. data/app/models/patron_import_result.rb +0 -26
  248. data/app/views/patron_import_files/index.html.erb +0 -40
  249. data/app/views/patron_import_files/show.html.erb +0 -69
  250. data/app/views/patron_import_results/index.csv.erb +0 -3
  251. data/app/views/patron_import_results/index.html.erb +0 -52
  252. data/app/views/patron_import_results/show.html.erb +0 -38
  253. data/app/views/patron_relationship_types/index.html.erb +0 -43
  254. data/app/views/patron_relationship_types/show.html.erb +0 -29
  255. data/app/views/patron_relationships/index.html.erb +0 -34
  256. data/app/views/patron_relationships/show.html.erb +0 -24
  257. data/app/views/patron_types/index.html.erb +0 -43
  258. data/app/views/patron_types/show.html.erb +0 -29
  259. data/app/views/patrons/_index_patron.html.erb +0 -71
  260. data/app/views/patrons/_index_patron_merge_list.html.erb +0 -53
  261. data/app/views/patrons/_patron.html.erb +0 -13
  262. data/app/views/patrons/_patron_list.html.erb +0 -18
  263. data/app/views/patrons/edit.html.erb +0 -16
  264. data/app/views/patrons/index.atom.builder +0 -10
  265. data/app/views/patrons/show.html.erb +0 -152
  266. data/app/views/patrons/show.mobile.erb +0 -69
  267. data/db/migrate/20081028083142_create_patron_import_files.rb +0 -22
  268. data/db/migrate/20100606073747_create_patron_relationships.rb +0 -13
  269. data/db/migrate/20100814091104_add_position_to_patron_relationship.rb +0 -11
  270. data/db/migrate/20100925074559_create_patron_import_results.rb +0 -12
  271. data/db/migrate/20110301121550_add_birth_date_and_death_date_to_patron.rb +0 -11
  272. data/db/migrate/20120413161403_add_fingerprint_to_patron_import_file.rb +0 -5
  273. data/db/migrate/20120413170720_add_error_message_to_patron_import_file.rb +0 -5
  274. data/db/migrate/20120511072422_add_patron_identifier_to_patron.rb +0 -6
  275. data/db/migrate/20120602141129_add_edit_mode_to_patron_import_file.rb +0 -5
  276. data/spec/controllers/patron_import_files_controller_spec.rb +0 -321
  277. data/spec/controllers/patron_relationship_types_controller_spec.rb +0 -445
  278. data/spec/controllers/patron_relationships_controller_spec.rb +0 -446
  279. data/spec/controllers/patron_types_controller_spec.rb +0 -447
  280. data/spec/controllers/patrons_controller_spec.rb +0 -644
  281. data/spec/dummy/app/mailers/notifier.rb +0 -40
  282. data/spec/dummy/lib/plugins/ext/event-calendar.rb +0 -38
  283. data/spec/dummy/lib/plugins/ext/sunspot/abstract_search.rb +0 -12
  284. data/spec/dummy/lib/plugins/ext/sunspot/dismax.rb +0 -41
  285. data/spec/dummy/lib/plugins/ext/sunspot/start_record.rb +0 -55
  286. data/spec/dummy/lib/plugins/ext/sunspot.rb +0 -3
  287. data/spec/dummy/lib/plugins/ext.rb +0 -1
  288. data/spec/dummy/lib/plugins.rb +0 -2
  289. data/spec/dummy/solr/data/test/index/_goc.fdt +0 -0
  290. data/spec/dummy/solr/data/test/index/_goc.fdx +0 -0
  291. data/spec/dummy/solr/data/test/index/_goc.fnm +0 -7
  292. data/spec/dummy/solr/data/test/index/_goc.frq +0 -0
  293. data/spec/dummy/solr/data/test/index/_goc.nrm +0 -1
  294. data/spec/dummy/solr/data/test/index/_goc.prx +0 -0
  295. data/spec/dummy/solr/data/test/index/_goc.tii +0 -0
  296. data/spec/dummy/solr/data/test/index/_goc.tis +0 -0
  297. data/spec/dummy/solr/data/test/index/_god.fdt +0 -0
  298. data/spec/dummy/solr/data/test/index/_god.fdx +0 -0
  299. data/spec/dummy/solr/data/test/index/_god.fnm +0 -7
  300. data/spec/dummy/solr/data/test/index/_god.frq +0 -0
  301. data/spec/dummy/solr/data/test/index/_god.nrm +0 -1
  302. data/spec/dummy/solr/data/test/index/_god.prx +0 -0
  303. data/spec/dummy/solr/data/test/index/_god.tii +0 -0
  304. data/spec/dummy/solr/data/test/index/_god.tis +0 -0
  305. data/spec/dummy/solr/data/test/index/_goe.fdt +0 -0
  306. data/spec/dummy/solr/data/test/index/_goe.fdx +0 -0
  307. data/spec/dummy/solr/data/test/index/_goe.fnm +0 -8
  308. data/spec/dummy/solr/data/test/index/_goe.frq +0 -0
  309. data/spec/dummy/solr/data/test/index/_goe.nrm +0 -1
  310. data/spec/dummy/solr/data/test/index/_goe.prx +0 -0
  311. data/spec/dummy/solr/data/test/index/_goe.tii +0 -0
  312. data/spec/dummy/solr/data/test/index/_goe.tis +0 -0
  313. data/spec/dummy/solr/data/test/index/segments_otc +0 -0
  314. data/spec/dummy/tmp/cache/4AD/470/country_all +0 -0
  315. data/spec/models/patron_import_file_spec.rb +0 -96
  316. data/spec/requests/patrons_spec.rb +0 -9
  317. data/spec/routing/patron_relationship_types_routing_spec.rb +0 -35
  318. data/spec/routing/patron_relationships_routing_spec.rb +0 -35
  319. data/spec/routing/patrons_routing_spec.rb +0 -35
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 14fdd443b0e6eaf90b096f61980dfe9bbce5fbc0
4
- data.tar.gz: 1c82d2cf2448865032d573d928e626b2fae6bfd2
3
+ metadata.gz: 05e41c2afb92e36527a3eda64e40ce1699d52245
4
+ data.tar.gz: 078c063e6952e3fd647c2f3a5b443bce2510ff88
5
5
  SHA512:
6
- metadata.gz: 037fe3bfe9f799d42bbecb15a97528f5392d3063e2ea7eff3687c9b96892bb1dd12f3d16caffc05795b84dcc35dce595b99d990d1971e95490dc0d0ae79d48fc
7
- data.tar.gz: cfe5d61be511eb83e340e11a9eff57c97d80c50144dd5a6750ffc0367d6a6970d23627d5bff5de0d3404e243681d525164bc0f46d4e0af6dbb3dac0e64a54aad
6
+ metadata.gz: 4daa909c36210b558fec08687ac3192a0ee6fc2d3339a0d9c4f64aadcda002a37148133ddd890d6febf0fd60b09a34e1795695a6e299ea4ee46b3d748bbd32fd
7
+ data.tar.gz: f9cfbe413e6d31f995cba2076b46bc20825ee6479d0a80af74a1ce0f5645b59fd6084a43273b47513c01aa638a68cf3e4becfb4d3fd39569e61fc88003d9c2c1
@@ -1,6 +1,6 @@
1
1
  class CreatesController < ApplicationController
2
2
  load_and_authorize_resource
3
- before_filter :get_patron, :get_work
3
+ before_filter :get_agent, :get_work
4
4
  before_filter :prepare_options, :only => [:new, :edit]
5
5
  after_filter :solr_commit, :only => [:create, :update, :destroy]
6
6
  cache_sweeper :page_sweeper, :only => [:create, :update, :destroy]
@@ -9,8 +9,8 @@ class CreatesController < ApplicationController
9
9
  # GET /creates.json
10
10
  def index
11
11
  case
12
- when @patron
13
- @creates = @patron.creates.order('creates.position').page(params[:page])
12
+ when @agent
13
+ @creates = @agent.creates.order('creates.position').page(params[:page])
14
14
  when @work
15
15
  @creates = @work.creates.order('creates.position').page(params[:page])
16
16
  else
@@ -34,16 +34,16 @@ class CreatesController < ApplicationController
34
34
 
35
35
  # GET /creates/new
36
36
  def new
37
- if @patron and @work.blank?
38
- redirect_to patron_works_url(@patorn)
37
+ if @agent and @work.blank?
38
+ redirect_to agent_works_url(@patorn)
39
39
  return
40
- elsif @work and @patron.blank?
41
- redirect_to work_patrons_url(@work)
40
+ elsif @work and @agent.blank?
41
+ redirect_to work_agents_url(@work)
42
42
  return
43
43
  else
44
44
  @create = Create.new
45
45
  @create.work = @work
46
- @create.patron = @patron
46
+ @create.agent = @agent
47
47
  end
48
48
  end
49
49
 
@@ -98,11 +98,11 @@ class CreatesController < ApplicationController
98
98
  respond_to do |format|
99
99
  flash[:notice] = t('controller.successfully_deleted', :model => t('activerecord.models.create'))
100
100
  case
101
- when @patron
102
- format.html { redirect_to patron_works_url(@patron) }
101
+ when @agent
102
+ format.html { redirect_to agent_works_url(@agent) }
103
103
  format.json { head :no_content }
104
104
  when @work
105
- format.html { redirect_to work_patrons_url(@work) }
105
+ format.html { redirect_to work_agents_url(@work) }
106
106
  format.json { head :no_content }
107
107
  else
108
108
  format.html { redirect_to creates_url }
@@ -1,7 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  class ItemsController < ApplicationController
3
3
  load_and_authorize_resource
4
- before_filter :get_patron, :get_manifestation, :get_shelf, :except => [:create, :update, :destroy]
4
+ before_filter :get_agent, :get_manifestation, :get_shelf, :except => [:create, :update, :destroy]
5
5
  if defined?(EnjuInventory)
6
6
  before_filter :get_inventory_file
7
7
  end
@@ -63,12 +63,12 @@ class ItemsController < ApplicationController
63
63
  end
64
64
  end
65
65
 
66
- patron = @patron
66
+ agent = @agent
67
67
  manifestation = @manifestation
68
68
  shelf = @shelf
69
69
  unless params[:mode] == 'add'
70
70
  search.build do
71
- with(:patron_ids).equal_to patron.id if patron
71
+ with(:agent_ids).equal_to agent.id if agent
72
72
  with(:manifestation_id).equal_to manifestation.id if manifestation
73
73
  with(:shelf_id).equal_to shelf.id if shelf
74
74
  end
@@ -3,7 +3,7 @@ class ManifestationsController < ApplicationController
3
3
  load_and_authorize_resource :except => :index
4
4
  authorize_resource :only => :index
5
5
  before_filter :authenticate_user!, :only => :edit
6
- before_filter :get_patron, :get_manifestation, :except => [:create, :update, :destroy]
6
+ before_filter :get_agent, :get_manifestation, :except => [:create, :update, :destroy]
7
7
  before_filter :get_expression, :only => :new
8
8
  if defined?(EnjuSubject)
9
9
  before_filter :get_subject, :except => [:create, :update, :destroy]
@@ -110,8 +110,8 @@ class ManifestationsController < ApplicationController
110
110
  reservable = nil
111
111
  end
112
112
 
113
- patron = get_index_patron
114
- @index_patron = patron
113
+ agent = get_index_agent
114
+ @index_agent = agent
115
115
  manifestation = @manifestation if @manifestation
116
116
  series_statement = @series_statement if @series_statement
117
117
  parent = @parent = Manifestation.where(:id => params[:parent_id]).first if params[:parent_id].present?
@@ -122,9 +122,9 @@ class ManifestationsController < ApplicationController
122
122
 
123
123
  unless mode == 'add'
124
124
  search.build do
125
- with(:creator_ids).equal_to patron[:creator].id if patron[:creator]
126
- with(:contributor_ids).equal_to patron[:contributor].id if patron[:contributor]
127
- with(:publisher_ids).equal_to patron[:publisher].id if patron[:publisher]
125
+ with(:creator_ids).equal_to agent[:creator].id if agent[:creator]
126
+ with(:contributor_ids).equal_to agent[:contributor].id if agent[:contributor]
127
+ with(:publisher_ids).equal_to agent[:publisher].id if agent[:publisher]
128
128
  with(:series_statement_ids).equal_to series_statement.id if series_statement
129
129
  with(:parent_ids).equal_to parent.id if parent
130
130
  end
@@ -683,19 +683,19 @@ class ManifestationsController < ApplicationController
683
683
  end
684
684
  end
685
685
 
686
- def get_index_patron
687
- patron = {}
686
+ def get_index_agent
687
+ agent = {}
688
688
  case
689
- when params[:patron_id]
690
- patron[:patron] = Patron.find(params[:patron_id])
689
+ when params[:agent_id]
690
+ agent[:agent] = Agent.find(params[:agent_id])
691
691
  when params[:creator_id]
692
- patron[:creator] = @creator = Patron.find(params[:creator_id])
692
+ agent[:creator] = @creator = Agent.find(params[:creator_id])
693
693
  when params[:contributor_id]
694
- patron[:contributor] = @contributor = Patron.find(params[:contributor_id])
694
+ agent[:contributor] = @contributor = Agent.find(params[:contributor_id])
695
695
  when params[:publisher_id]
696
- patron[:publisher] = @publisher = Patron.find(params[:publisher_id])
696
+ agent[:publisher] = @publisher = Agent.find(params[:publisher_id])
697
697
  end
698
- patron
698
+ agent
699
699
  end
700
700
 
701
701
  def set_reservable
@@ -1,14 +1,14 @@
1
1
  class OwnsController < ApplicationController
2
2
  load_and_authorize_resource
3
- before_filter :get_patron, :get_item
3
+ before_filter :get_agent, :get_item
4
4
  after_filter :solr_commit, :only => [:create, :update, :destroy]
5
5
  cache_sweeper :page_sweeper, :only => [:create, :update, :destroy]
6
6
 
7
7
  # GET /owns
8
8
  # GET /owns.json
9
9
  def index
10
- if @patron
11
- @owns = @patron.owns.order('owns.position').page(params[:page])
10
+ if @agent
11
+ @owns = @agent.owns.order('owns.position').page(params[:page])
12
12
  elsif @item
13
13
  @owns = @item.owns.order('owns.position').page(params[:page])
14
14
  else
@@ -32,16 +32,16 @@ class OwnsController < ApplicationController
32
32
 
33
33
  # GET /owns/new
34
34
  def new
35
- if @item and @patron.blank?
36
- redirect_to item_patrons_url(@item)
35
+ if @item and @agent.blank?
36
+ redirect_to item_agents_url(@item)
37
37
  return
38
- elsif @patron and @item.blank?
39
- redirect_to patron_items_url(@patron)
38
+ elsif @agent and @item.blank?
39
+ redirect_to agent_items_url(@agent)
40
40
  return
41
41
  else
42
42
  @own = Own.new
43
43
  @own.item = @item
44
- @own.patron = @patron
44
+ @own.agent = @agent
45
45
  end
46
46
  end
47
47
 
@@ -94,8 +94,8 @@ class OwnsController < ApplicationController
94
94
  format.html {
95
95
  flash[:notice] = t('controller.successfully_deleted', :model => t('activerecord.models.own'))
96
96
  case
97
- when @patron
98
- redirect_to patron_owns_url(@patron)
97
+ when @agent
98
+ redirect_to agent_owns_url(@agent)
99
99
  when @item
100
100
  redirect_to item_owns_url(@item)
101
101
  else
@@ -1,92 +1,92 @@
1
- class PatronImportFilesController < ApplicationController
1
+ class AgentImportFilesController < ApplicationController
2
2
  load_and_authorize_resource
3
3
 
4
- # GET /patron_import_files
5
- # GET /patron_import_files.json
4
+ # GET /agent_import_files
5
+ # GET /agent_import_files.json
6
6
  def index
7
- @patron_import_files = PatronImportFile.page(params[:page])
7
+ @agent_import_files = AgentImportFile.page(params[:page])
8
8
 
9
9
  respond_to do |format|
10
10
  format.html # index.html.erb
11
- format.json { render :json => @patron_import_files }
11
+ format.json { render :json => @agent_import_files }
12
12
  end
13
13
  end
14
14
 
15
- # GET /patron_import_files/1
16
- # GET /patron_import_files/1.json
15
+ # GET /agent_import_files/1
16
+ # GET /agent_import_files/1.json
17
17
  def show
18
- if @patron_import_file.patron_import.path
18
+ if @agent_import_file.agent_import.path
19
19
  unless Setting.uploaded_file.storage == :s3
20
- file = @patron_import_file.patron_import.path
20
+ file = @agent_import_file.agent_import.path
21
21
  end
22
22
  end
23
23
 
24
24
  respond_to do |format|
25
25
  format.html # show.html.erb
26
- format.json { render :json => @patron_import_file }
26
+ format.json { render :json => @agent_import_file }
27
27
  format.download {
28
28
  if Setting.uploaded_file.storage == :s3
29
- redirect_to @patron_import_file.patron_import.expiring_url(10)
29
+ redirect_to @agent_import_file.agent_import.expiring_url(10)
30
30
  else
31
- send_file file, :filename => @patron_import_file.patron_import_file_name, :type => 'application/octet-stream'
31
+ send_file file, :filename => @agent_import_file.agent_import_file_name, :type => 'application/octet-stream'
32
32
  end
33
33
  }
34
34
  end
35
35
  end
36
36
 
37
- # GET /patron_import_files/new
38
- # GET /patron_import_files/new.json
37
+ # GET /agent_import_files/new
38
+ # GET /agent_import_files/new.json
39
39
  def new
40
- @patron_import_file = PatronImportFile.new
40
+ @agent_import_file = AgentImportFile.new
41
41
 
42
42
  respond_to do |format|
43
43
  format.html # new.html.erb
44
- format.json { render :json => @patron_import_file }
44
+ format.json { render :json => @agent_import_file }
45
45
  end
46
46
  end
47
47
 
48
- # GET /patron_import_files/1/edit
48
+ # GET /agent_import_files/1/edit
49
49
  def edit
50
50
  end
51
51
 
52
- # POST /patron_import_files
53
- # POST /patron_import_files.json
52
+ # POST /agent_import_files
53
+ # POST /agent_import_files.json
54
54
  def create
55
- @patron_import_file = PatronImportFile.new(params[:patron_import_file])
56
- @patron_import_file.user = current_user
55
+ @agent_import_file = AgentImportFile.new(params[:agent_import_file])
56
+ @agent_import_file.user = current_user
57
57
 
58
58
  respond_to do |format|
59
- if @patron_import_file.save
60
- format.html { redirect_to @patron_import_file, :notice => t('controller.successfully_created', :model => t('activerecord.models.patron_import_file')) }
61
- format.json { render :json => @patron_import_file, :status => :created, :location => @patron_import_file }
59
+ if @agent_import_file.save
60
+ format.html { redirect_to @agent_import_file, :notice => t('controller.successfully_created', :model => t('activerecord.models.agent_import_file')) }
61
+ format.json { render :json => @agent_import_file, :status => :created, :location => @agent_import_file }
62
62
  else
63
63
  format.html { render :action => "new" }
64
- format.json { render :json => @patron_import_file.errors, :status => :unprocessable_entity }
64
+ format.json { render :json => @agent_import_file.errors, :status => :unprocessable_entity }
65
65
  end
66
66
  end
67
67
  end
68
68
 
69
- # PUT /patron_import_files/1
70
- # PUT /patron_import_files/1.json
69
+ # PUT /agent_import_files/1
70
+ # PUT /agent_import_files/1.json
71
71
  def update
72
72
  respond_to do |format|
73
- if @patron_import_file.update_attributes(params[:patron_import_file])
74
- format.html { redirect_to @patron_import_file, :notice => t('controller.successfully_updated', :model => t('activerecord.models.patron_import_file')) }
73
+ if @agent_import_file.update_attributes(params[:agent_import_file])
74
+ format.html { redirect_to @agent_import_file, :notice => t('controller.successfully_updated', :model => t('activerecord.models.agent_import_file')) }
75
75
  format.json { head :no_content }
76
76
  else
77
77
  format.html { render :action => "edit" }
78
- format.json { render :json => @patron_import_file.errors, :status => :unprocessable_entity }
78
+ format.json { render :json => @agent_import_file.errors, :status => :unprocessable_entity }
79
79
  end
80
80
  end
81
81
  end
82
82
 
83
- # DELETE /patron_import_files/1
84
- # DELETE /patron_import_files/1.json
83
+ # DELETE /agent_import_files/1
84
+ # DELETE /agent_import_files/1.json
85
85
  def destroy
86
- @patron_import_file.destroy
86
+ @agent_import_file.destroy
87
87
 
88
88
  respond_to do |format|
89
- format.html { redirect_to(patron_import_files_url) }
89
+ format.html { redirect_to(agent_import_files_url) }
90
90
  format.json { head :no_content }
91
91
  end
92
92
  end
@@ -1,15 +1,15 @@
1
- class PatronImportResultsController < InheritedResources::Base
1
+ class AgentImportResultsController < InheritedResources::Base
2
2
  respond_to :html, :json, :csv
3
3
  load_and_authorize_resource
4
4
  has_scope :file_id
5
5
  actions :index, :show, :destroy
6
6
 
7
7
  def index
8
- @patron_import_file = PatronImportFile.where(:id => params[:patron_import_file_id]).first
9
- if @patron_import_file
10
- @patron_import_results = @patron_import_file.patron_import_results.page(params[:page])
8
+ @agent_import_file = AgentImportFile.where(:id => params[:agent_import_file_id]).first
9
+ if @agent_import_file
10
+ @agent_import_results = @agent_import_file.agent_import_results.page(params[:page])
11
11
  else
12
- @patron_import_results = PatronImportResult.page(params[:page])
12
+ @agent_import_results = AgentImportResult.page(params[:page])
13
13
  end
14
14
  end
15
15
  end
@@ -1,12 +1,12 @@
1
- class PatronRelationshipTypesController < InheritedResources::Base
1
+ class AgentRelationshipTypesController < InheritedResources::Base
2
2
  respond_to :html, :json
3
3
  has_scope :page, :default => 1
4
4
  load_and_authorize_resource
5
5
 
6
6
  def update
7
- @patron_relationship_type = PatronRelationshipType.find(params[:id])
7
+ @agent_relationship_type = AgentRelationshipType.find(params[:id])
8
8
  if params[:move]
9
- move_position(@patron_relationship_type, params[:move])
9
+ move_position(@agent_relationship_type, params[:move])
10
10
  return
11
11
  end
12
12
  update!
@@ -1,19 +1,19 @@
1
- class PatronRelationshipsController < InheritedResources::Base
1
+ class AgentRelationshipsController < InheritedResources::Base
2
2
  respond_to :html, :json
3
3
  has_scope :page, :default => 1
4
4
  load_and_authorize_resource
5
5
  before_filter :prepare_options, :except => [:index, :destroy]
6
6
 
7
7
  def new
8
- @patron_relationship = PatronRelationship.new(params[:patron_relationship])
9
- @patron_relationship.parent = Patron.find(params[:patron_id]) rescue nil
10
- @patron_relationship.child = Patron.find(params[:child_id]) rescue nil
8
+ @agent_relationship = AgentRelationship.new(params[:agent_relationship])
9
+ @agent_relationship.parent = Agent.find(params[:agent_id]) rescue nil
10
+ @agent_relationship.child = Agent.find(params[:child_id]) rescue nil
11
11
  end
12
12
 
13
13
  def update
14
- @patron_relationship = PatronRelationship.find(params[:id])
14
+ @agent_relationship = AgentRelationship.find(params[:id])
15
15
  if params[:move]
16
- move_position(@patron_relationship, params[:move])
16
+ move_position(@agent_relationship, params[:move])
17
17
  return
18
18
  end
19
19
  update!
@@ -21,6 +21,6 @@ class PatronRelationshipsController < InheritedResources::Base
21
21
 
22
22
  private
23
23
  def prepare_options
24
- @patron_relationship_types = PatronRelationshipType.all
24
+ @agent_relationship_types = AgentRelationshipType.all
25
25
  end
26
26
  end
@@ -1,12 +1,12 @@
1
- class PatronTypesController < InheritedResources::Base
1
+ class AgentTypesController < InheritedResources::Base
2
2
  respond_to :html, :json
3
3
  has_scope :page, :default => 1
4
4
  load_and_authorize_resource
5
5
 
6
6
  def update
7
- @patron_type = PatronType.find(params[:id])
7
+ @agent_type = AgentType.find(params[:id])
8
8
  if params[:move]
9
- move_position(@patron_type, params[:move])
9
+ move_position(@agent_type, params[:move])
10
10
  return
11
11
  end
12
12
  update!