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
@@ -0,0 +1,71 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.listing', :model => t('activerecord.models.agent')) -%></h1>
3
+ <div id="content_list">
4
+ <h2 class="resource_title">
5
+ [P]
6
+ <%= link_to agent.full_name, agent -%>
7
+ </h2>
8
+
9
+ <div class="search_form">
10
+ <%= form_for :agents, :url => agent_agents_path(agent), :html => {:method => 'get'} do -%>
11
+ <p>
12
+ <%= label_tag :search_form_top, t('page.search_term') -%>: <%= search_field_tag 'query', h(@query), {:id => 'search_form_top', :class => 'search_form', :placeholder => t('page.search_term')} -%>
13
+ <%- if can? :update, agent -%>
14
+ <%= render 'page/add' %>
15
+ <%- end -%>
16
+ <%= submit_tag t('page.search') -%>
17
+ </p>
18
+ <%- end -%>
19
+ </div>
20
+
21
+ <table class="table table-striped index">
22
+ <tr>
23
+ <th><%= t('activerecord.attributes.agent.full_name') -%></th>
24
+ <th><%= t('activerecord.attributes.user.username') -%></th>
25
+ <th><%= t('activerecord.models.agent_type') -%></th>
26
+ <th><%= t('activerecord.attributes.agent.date_of_birth') -%></th>
27
+ <th></th>
28
+ <th></th>
29
+ </tr>
30
+ <%- @agents.each do |agent| -%>
31
+ <tr class="line<%= cycle("0", "1") -%>">
32
+ <td>
33
+ <%= link_to agent.full_name, agent -%><br />
34
+ <%= agent.full_name_transcription -%>
35
+ </td>
36
+ <td>
37
+ <%= link_to agent.user.username, edit_user_path(agent.user) if agent.user -%>
38
+ </td>
39
+ <td><%= agent.agent_type.display_name.localize -%></td>
40
+ <td><%=l agent.date_of_birth if agent.date_of_birth -%></td>
41
+ <td>
42
+ <%- if can? :delete, agent -%>
43
+ <%= link_to t('page.edit'), edit_agent_path(agent) -%>
44
+ <% end %>
45
+ </td>
46
+ <td>
47
+ <%- if can? :delete, agent -%>
48
+ <%- if params[:mode] == "add" -%>
49
+ <%= link_to t('page.add'), new_agent_agent_relationship_path(agent, :child_id => agent.id) unless agent.derived_agents.include?(agent) or agent == agent -%>
50
+ <%- else -%>
51
+ <%- agent_relationship = agent.to_agents.where(:child_id => agent.id).first -%>
52
+ <%= link_to t('page.destroy'), agent_relationship, :data => {:confirm => t('page.are_you_sure')}, :method => :delete if agent_relationship -%>
53
+ <%- end -%>
54
+ <%- end -%>
55
+ </td>
56
+ </tr>
57
+ <%- end -%>
58
+ </table>
59
+
60
+ <%= paginate(@agents) -%>
61
+ </div>
62
+ </div>
63
+
64
+ <div id="submenu" class="ui-corner-all">
65
+ <ul>
66
+ <%- if can? :create, Agent -%>
67
+ <li><%= link_to t('agent.add'), new_agent_path -%></li>
68
+ <li><%= link_to t('page.merge', :model => t('activerecord.models.agent')), agent_merge_lists_path -%></li>
69
+ <%- end -%>
70
+ </ul>
71
+ </div>
@@ -0,0 +1,53 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.listing', :model => t('activerecord.models.agent')) -%></h1>
3
+ <div id="content_list">
4
+
5
+ <div class="search_form">
6
+ <%= form_for :agents, :url => agent_merge_list_agents_path(@agent_merge_list), :html => {:method => 'get'} do -%>
7
+ <p>
8
+ <%= label_tag :search_form_top, t('page.search_term') -%>: <%= search_field_tag 'query', h(@query), {:id => 'search_form_top', :class => 'search_form', :placeholder => t('page.search_term')} -%>
9
+ <%- if can? :update, @agent_merge_list -%>
10
+ <%= render 'page/add' %>
11
+ <%- end -%>
12
+ <%= submit_tag t('page.search') -%>
13
+ <%= link_to t('page.back_to_index'), agent_merge_list_agents_path(@agent_merge_list) -%>
14
+ </p>
15
+ <%- end -%>
16
+ </div>
17
+
18
+ <table class="table table-striped index">
19
+ <tr>
20
+ <th><%= t('activerecord.attributes.agent.full_name') -%></th>
21
+ <th><%= t('activerecord.models.agent_type') -%></th>
22
+ <th><%= t('activerecord.attributes.agent.date_of_birth') -%></th>
23
+ <th id="edit_icons"></th>
24
+ </tr>
25
+
26
+ <%- @agents.each do |agent| -%>
27
+ <tr class="line<%= cycle("0", "1") -%>">
28
+ <td><%= link_to agent.full_name, agent_merge_list_agent_path(@agent_merge_list, agent) -%></td>
29
+ <td><%= agent.agent_type.display_name.localize -%></td>
30
+ <td><%=l agent.date_of_birth if agent.date_of_birth -%></td>
31
+ <td>
32
+ <%- if can? :delete, agent -%>
33
+ <%- if params[:mode] == 'add' -%>
34
+ <%= link_to t('page.add'), new_agent_merge_list_agent_merge_path(@agent_merge_list, :agent_id => agent.id) unless @agent_merge_list.agents.include?(agent) -%>
35
+ <%- else -%>
36
+ <%- agent_merge = @agent_merge_list.agent_merges.where(:agent_id => agent.id).first -%>
37
+ <%= link_to t('page.destroy'), agent_merge_list_agent_merge_path(@agent_merge_list, agent_merge), :data => {:confirm => t('page.are_you_sure')}, :method => :delete if agent_merge -%>
38
+ <%- end -%>
39
+ <%- end -%>
40
+ </td>
41
+ </tr>
42
+ <%- end -%>
43
+ </table>
44
+
45
+ <%= paginate(@agents) -%>
46
+ </div>
47
+ </div>
48
+
49
+ <div id="submenu" class="ui-corner-all">
50
+ <ul>
51
+ <li><%= link_to t('page.listing', :model => t('activerecord.models.agent_merge_list')), @agent_merge_list -%></li>
52
+ </ul>
53
+ </div>
@@ -1,5 +1,5 @@
1
1
  <div id="content_detail" class="ui-corner-all">
2
- <h1 class="title"><%= t('page.listing', :model => t('patron.creator')) -%></h1>
2
+ <h1 class="title"><%= t('page.listing', :model => t('agent.creator')) -%></h1>
3
3
  <div id="content_list">
4
4
 
5
5
  <h2 class="resource_title">
@@ -11,39 +11,39 @@
11
11
  </h2>
12
12
 
13
13
  <div class="search_form">
14
- <%= form_for :patrons, :url => work_patrons_path(work), :html => {:method => 'get'} do -%>
14
+ <%= form_for :agents, :url => work_agents_path(work), :html => {:method => 'get'} do -%>
15
15
  <p>
16
16
  <%= label_tag :search_form_top, t('page.search_term') -%>: <%= search_field_tag 'query', h(@query), {:id => 'search_form_top', :class => 'search_form', :placeholder => t('page.search_term')} -%>
17
17
  <%- if can? :update, work -%>
18
18
  <%= render 'page/add' %>
19
19
  <% end %>
20
20
  <%= submit_tag t('page.search') -%>
21
- <%= link_to t('page.back_to_index'), work_patrons_path(work) -%>
21
+ <%= link_to t('page.back_to_index'), work_agents_path(work) -%>
22
22
  </p>
23
23
  <%- end -%>
24
24
  </div>
25
25
 
26
26
  <table class="table table-striped index">
27
27
  <tr>
28
- <th><%= t('activerecord.attributes.patron.full_name') -%></th>
28
+ <th><%= t('activerecord.attributes.agent.full_name') -%></th>
29
29
  <th><%= t('activerecord.models.create_type') -%></th>
30
- <th><%= t('activerecord.models.patron_type') -%></th>
30
+ <th><%= t('activerecord.models.agent_type') -%></th>
31
31
  <th id="edit_icons"></th>
32
32
  </tr>
33
33
 
34
- <%- @patrons.each do |patron| -%>
34
+ <%- @agents.each do |agent| -%>
35
35
  <tr class="line<%= cycle("0", "1") -%>">
36
- <td><%= link_to patron.full_name, patron -%></td>
37
- <td><%= work.created(patron).create_type.display_name.localize if params[:mode] != 'add' and work.created(patron).try(:create_type) -%></td>
38
- <td><%= patron.patron_type.display_name.localize -%></td>
36
+ <td><%= link_to agent.full_name, agent -%></td>
37
+ <td><%= work.created(agent).create_type.display_name.localize if params[:mode] != 'add' and work.created(agent).try(:create_type) -%></td>
38
+ <td><%= agent.agent_type.display_name.localize -%></td>
39
39
  <td>
40
- <%- if can? :delete, patron -%>
40
+ <%- if can? :delete, agent -%>
41
41
  <%- if params[:mode] == 'add' -%>
42
- <%= link_to t('page.add'), new_work_create_path(work, :patron_id => patron.id) unless work.creators.include?(patron) -%>
42
+ <%= link_to t('page.add'), new_work_create_path(work, :agent_id => agent.id) unless work.creators.include?(agent) -%>
43
43
  <%- else -%>
44
- <% if work.created(patron) %>
45
- <%= link_to t('page.edit'), edit_create_path(work.created(patron)) -%>
46
- <%= link_to t('page.destroy'), work_create_path(work, work.created(patron)), :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
44
+ <% if work.created(agent) %>
45
+ <%= link_to t('page.edit'), edit_create_path(work.created(agent)) -%>
46
+ <%= link_to t('page.destroy'), work_create_path(work, work.created(agent)), :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
47
47
  <% end %>
48
48
  <%- end -%>
49
49
  <%- end -%>
@@ -52,14 +52,14 @@
52
52
  <%- end -%>
53
53
  </table>
54
54
 
55
- <%= paginate(@patrons) -%>
55
+ <%= paginate(@agents) -%>
56
56
  </div>
57
57
  </div>
58
58
 
59
59
  <div id="submenu" class="ui-corner-all">
60
60
  <ul>
61
- <%- if can? :create, Patron -%>
62
- <li><%= link_to t('page.new', :model => t('activerecord.models.patron')), new_work_patron_path(work) -%></li>
61
+ <%- if can? :create, Agent -%>
62
+ <li><%= link_to t('page.new', :model => t('activerecord.models.agent')), new_work_agent_path(work) -%></li>
63
63
  <li><%= link_to t('page.rearrange_order'), work_creates_path(work) %></li>
64
64
  <%- end -%>
65
65
  </ul>
@@ -6,9 +6,9 @@
6
6
  [M]
7
7
  <%= link_to manifestation.original_title, manifestation -%>
8
8
  <%= form_icon(manifestation.carrier_type) -%>
9
- <%= patrons_list(manifestation.creators.readable_by(current_user)) -%>
10
- <%= patrons_list(manifestation.contributors.readable_by(current_user)) -%>
11
- <%= patrons_list(manifestation.publishers.readable_by(current_user)) -%>
9
+ <%= agents_list(manifestation.creators.readable_by(current_user)) -%>
10
+ <%= agents_list(manifestation.contributors.readable_by(current_user)) -%>
11
+ <%= agents_list(manifestation.publishers.readable_by(current_user)) -%>
12
12
  <%- if manifestation.pub_date? -%>
13
13
  (<%= manifestation.pub_date -%>)
14
14
  <%- end -%>
@@ -0,0 +1,13 @@
1
+ <tr class="line<%= cycle("0", "1") -%>">
2
+ <td>
3
+ <%= link_to agent.full_name, agent -%><br />
4
+ <%= agent.full_name_transcription -%>
5
+ </td>
6
+ <td><%= agent.agent_type.display_name.localize -%></td>
7
+ <td>
8
+ <%- if can? :delete, agent -%>
9
+ <%= link_to image_tag('icons/page_white_edit.png', :size => '16x16', :alt => t('page.edit')), edit_agent_path(agent) -%>
10
+ <%= link_to image_tag('icons/arrow_divide.png', :size => '16x16', :alt => t('agent.add_derivation')), agent_agents_path(agent, :mode => 'add') -%>
11
+ <%- end -%>
12
+ </td>
13
+ </tr>
@@ -0,0 +1,18 @@
1
+ <div id="related">
2
+ <ul>
3
+ <%- @agent.parents.each do |agent_relationship| -%>
4
+ <li>
5
+ [P]
6
+ (<%= agent_relationship.agent_relationship_type.display_name.localize -%>)
7
+ <%= link_to agent_relationship.parent.full_name, agent_relationship.parent -%>
8
+ </li>
9
+ <%- end -%>
10
+ <%- @agent.children.each do |agent_relationship| -%>
11
+ <li>
12
+ [P]
13
+ (<%= agent_relationship.agent_relationship_type.display_name.localize -%>)
14
+ <%= link_to agent_relationship.child.full_name, agent_relationship.child -%>
15
+ </li>
16
+ <%- end -%>
17
+ </ul>
18
+ </div>
@@ -5,7 +5,7 @@
5
5
  <li>
6
6
  [W]
7
7
  <%= link_to work.original_title, work -%>
8
- <%= patrons_list(work.creators.readable_by(current_user)) -%>
8
+ <%= agents_list(work.creators.readable_by(current_user)) -%>
9
9
  </li>
10
10
  <%- end -%>
11
11
  </ul>
@@ -0,0 +1,16 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.editing', :model => t('activerecord.models.agent')) -%></h1>
3
+ <div id="content_list">
4
+ <%= render 'form' %>
5
+ </div>
6
+ </div>
7
+
8
+ <div id="submenu" class="ui-corner-all">
9
+ <ul>
10
+ <li><%= link_to t('page.show'), @agent -%></li>
11
+ <%- if can? :delete, @agent -%>
12
+ <li><%= link_to t('page.destroy'), @agent, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%></li>
13
+ <%- end -%>
14
+ <li><%= link_to t('page.back'), agents_path -%></li>
15
+ </ul>
16
+ </div>
@@ -0,0 +1,10 @@
1
+ atom_feed(:url => agents_url(:format => :atom)) do |feed|
2
+ feed.title t('agent.library_group_agent', :library_group_name => @library_group.display_name.localize)
3
+ feed.updated(@agents.first ? @agents.first.created_at : Time.zone.now)
4
+
5
+ @agents.each do |agent|
6
+ feed.entry(agent) do |entry|
7
+ entry.title(agent.full_name)
8
+ end
9
+ end
10
+ end
@@ -4,10 +4,10 @@
4
4
  <%= render 'index_expression', :expression => @expression -%>
5
5
  <%- when @manifestation -%>
6
6
  <%= render 'index_manifestation', :manifestation => @manifestation -%>
7
- <%- when @patron -%>
8
- <%= render 'index_patron', :patron => @patron -%>
9
- <%- when @patron_merge_list -%>
10
- <%= render 'index_patron_merge_list', :patron_merge_list => @patron_merge_list -%>
7
+ <%- when @agent -%>
8
+ <%= render 'index_agent', :agent => @agent -%>
9
+ <%- when @agent_merge_list -%>
10
+ <%= render 'index_agent_merge_list', :agent_merge_list => @agent_merge_list -%>
11
11
  <%- else -%>
12
12
  <%= render 'index' -%>
13
13
  <%- end -%>
@@ -1,10 +1,10 @@
1
1
  <div data-role="header">
2
- <h1 class="title"><%= t('page.listing', :model => t('activerecord.models.patron')) -%></h1>
2
+ <h1 class="title"><%= t('page.listing', :model => t('activerecord.models.agent')) -%></h1>
3
3
  </div>
4
4
 
5
5
  <div data-role="content">
6
6
  <div data-role="fieldcontain">
7
- <%= form_for :patrons, :url => patrons_path, :html => {:method => 'get'} do -%>
7
+ <%= form_for :agents, :url => agents_path, :html => {:method => 'get'} do -%>
8
8
  <p>
9
9
  <%= label_tag :search_form_top, t('page.search_term') -%>:
10
10
  <%= search_field_tag 'query', h(@query), {:id => 'search_form_top', :class => 'search_form', :placeholder => t('page.search_term')} -%>
@@ -15,9 +15,9 @@
15
15
  </div>
16
16
 
17
17
  <ul data-role="listview">
18
- <%- @patrons.each do |patron| -%>
19
- <li><%= link_to patron.full_name, patron %></li>
18
+ <%- @agents.each do |agent| -%>
19
+ <li><%= link_to agent.full_name, agent %></li>
20
20
  <%- end -%>
21
21
  </ul>
22
22
 
23
- <%= paginate(@patrons) %>
23
+ <%= paginate(@agents) %>
@@ -3,29 +3,29 @@ xml.rss('version' => "2.0",
3
3
  'xmlns:opensearch' => "http://a9.com/-/spec/opensearch/1.1/",
4
4
  'xmlns:atom' => "http://www.w3.org/2005/Atom"){
5
5
  xml.channel{
6
- xml.title t('patron.library_group_patron', :library_group_name => @library_group.display_name.localize)
6
+ xml.title t('agent.library_group_agent', :library_group_name => @library_group.display_name.localize)
7
7
  xml.link "#{request.protocol}#{request.host_with_port}#{url_for(params.merge(:format => nil, :only_path => true))}"
8
8
  xml.description "Next-L Enju, an open source integrated library system developed by Project Next-L"
9
9
  xml.language @locale.to_s
10
10
  xml.ttl "60"
11
11
  xml.tag! "atom:link", :rel => 'self', :href => "#{request.protocol}#{request.host_with_port}#{url_for(params.merge(:format => :rss, :only_path => true))}"
12
- xml.tag! "atom:link", :rel => 'alternate', :href => patrons_url
12
+ xml.tag! "atom:link", :rel => 'alternate', :href => agents_url
13
13
  xml.tag! "atom:link", :rel => 'search', :type => 'application/opensearchdescription+xml', :href => page_opensearch_url
14
14
  unless params[:query].blank?
15
15
  xml.tag! "opensearch:totalResults", @count[:query_result]
16
- xml.tag! "opensearch:startIndex", @patrons.offset + 1
17
- xml.tag! "opensearch:itemsPerPage", @patrons.per_page
16
+ xml.tag! "opensearch:startIndex", @agents.offset + 1
17
+ xml.tag! "opensearch:itemsPerPage", @agents.per_page
18
18
  xml.tag! "opensearch:Query", :role => 'request', :searchTerms => h(params[:query]), :startPage => (h(params[:page]) || 1)
19
19
  end
20
- @patrons.each do |patron|
20
+ @agents.each do |agent|
21
21
  xml.item do
22
- xml.title patron.full_name
23
- #xml.description(patron.title)
22
+ xml.title agent.full_name
23
+ #xml.description(agent.title)
24
24
  # rfc822
25
- xml.pubDate patron.created_at.utc.rfc822
26
- xml.link patron_url(patron)
27
- xml.guid patron_url(patron), :isPermaLink => "true"
28
- #patron.tags.each do |tag|
25
+ xml.pubDate agent.created_at.utc.rfc822
26
+ xml.link agent_url(agent)
27
+ xml.guid agent_url(agent), :isPermaLink => "true"
28
+ #agent.tags.each do |tag|
29
29
  # xml.category tag
30
30
  #end
31
31
  end
@@ -1,5 +1,5 @@
1
1
  <div id="content_detail" class="ui-corner-all">
2
- <h1 class="title"><%= t('page.new', :model => t('activerecord.models.patron')) -%></h1>
2
+ <h1 class="title"><%= t('page.new', :model => t('activerecord.models.agent')) -%></h1>
3
3
  <div id="content_list">
4
4
  <%= render 'form' %>
5
5
  </div>
@@ -7,6 +7,6 @@
7
7
 
8
8
  <div id="submenu" class="ui-corner-all">
9
9
  <ul>
10
- <li><%= link_to t('page.back'), patrons_path -%></li>
10
+ <li><%= link_to t('page.back'), agents_path -%></li>
11
11
  </ul>
12
12
  </div>
@@ -0,0 +1,152 @@
1
+ <div id="content_detail" class="ui-corner-all">
2
+ <h1 class="title"><%= t('page.showing', :model => t('activerecord.models.agent')) -%></h1>
3
+ <div id="content_list">
4
+ <p id="notice"><%= notice %></p>
5
+
6
+ <h2 class="resource_title">
7
+ [P]
8
+ <%= @agent.full_name -%>
9
+ </h2>
10
+
11
+ <%- if @version -%>
12
+ <p>(<%= l(@agent.versions.find(@version).created_at) -%>)</p>
13
+ <%- end -%>
14
+ <p>
15
+ (<%= link_to_wikipedia(@agent.full_name_without_space) -%>)
16
+ </p>
17
+
18
+ <div id="tabs">
19
+ <ul>
20
+ <li title="active" class="selected"><a href="#detail"><em><%= t('page.detail') -%></em></a></li>
21
+ <%- if @agent.derived_agents.exists? or @agent.original_agents.exists? -%>
22
+ <li><a href="#related"><em><%= t('page.related') -%></em></a></li>
23
+ <%- end -%>
24
+ <%- if @agent.works.exists? -%>
25
+ <li><a href="#work"><em><%= t('activerecord.models.work') -%></em></a></li>
26
+ <%- end -%>
27
+ <%- if @agent.expressions.exists? -%>
28
+ <li><a href="#expression"><em><%= t('activerecord.models.expression') -%></em></a></li>
29
+ <%- end -%>
30
+ <%- if @agent.manifestations.exists? -%>
31
+ <li><a href="#manifestation"><em><%= t('activerecord.models.manifestation') -%></em></a></li>
32
+ <%- end -%>
33
+ <li><a href="#history"><em><%= t('page.history') -%></em></a></li>
34
+ </ul>
35
+ <div id="detail">
36
+ <table class="table table-striped index vcard">
37
+ <tr>
38
+ <td><strong><%= t('activerecord.attributes.agent.full_name') -%>:</strong></td>
39
+ <td>
40
+ <span class="fn"><%= @agent.full_name -%></span>
41
+ </td>
42
+ </tr>
43
+ <tr>
44
+ <td><strong><%= t('activerecord.attributes.agent.full_name_transcription') -%>:</strong></td>
45
+ <td><%= @agent.full_name_transcription -%></td>
46
+ </tr>
47
+ <%- if @agent.user -%>
48
+ <tr>
49
+ <td><strong><%= t('activerecord.attributes.user.username') -%>:</strong></td>
50
+ <td><%= link_to @agent.user.username, @agent.user -%></td>
51
+ </tr>
52
+ <%- end -%>
53
+ <tr>
54
+ <td><strong><%= t('activerecord.models.agent_type') -%>:</strong></td>
55
+ <td><%= @agent.agent_type.display_name.localize -%></td>
56
+ </tr>
57
+ <tr>
58
+ <td><strong><%= t('activerecord.attributes.agent.email') -%>:</strong></td>
59
+ <td>
60
+ <%= mail_to @agent.email, nil, :class => 'email' -%>
61
+ </td>
62
+ </tr>
63
+ <tr>
64
+ <td><strong><%= t('activerecord.attributes.agent.url') -%>:</strong></td>
65
+ <td>
66
+ <%= link_to @agent.url, @agent.url, :class => 'url' if @agent.url? -%>
67
+ </td>
68
+ </tr>
69
+ <tr>
70
+ <td><strong><%= t('activerecord.attributes.agent.other_designation') -%>:</strong></td>
71
+ <td><%= @agent.other_designation -%></td>
72
+ </tr>
73
+ <tr>
74
+ <td><strong><%= t('activerecord.attributes.agent.place') -%>:</strong></td>
75
+ <td><%= @agent.place -%></td>
76
+ </tr>
77
+ <tr>
78
+ <td><strong><%= t('activerecord.models.language') -%>:</strong></td>
79
+ <td><%= @agent.language.display_name.localize -%></td>
80
+ </tr>
81
+ <tr>
82
+ <td><strong><%= t('activerecord.attributes.agent.note') -%>:</strong></td>
83
+ <td><%= @agent.note -%></td>
84
+ </tr>
85
+ <tr>
86
+ <td><strong><%= t('page.created_at') -%>:</strong></td>
87
+ <td><%= l(@agent.created_at) -%></td>
88
+ </tr>
89
+ <tr>
90
+ <td><strong><%= t('page.updated_at') -%>:</strong></td>
91
+ <td><%= l(@agent.updated_at) -%></td>
92
+ </tr>
93
+ </table>
94
+ </div>
95
+ <%- unless @agent.derived_agents.empty? and @agent.original_agents.empty? -%>
96
+ <%= render 'agents/agent_list' -%>
97
+ <%- end -%>
98
+ <%- unless @works.blank? -%>
99
+ <%= render 'agents/work_list' -%>
100
+ <%- end -%>
101
+ <%- unless @expressions.blank? -%>
102
+ <%= render 'agents/expression_list' -%>
103
+ <%- end -%>
104
+ <%- unless @manifestations.blank? -%>
105
+ <%= render 'agents/manifestation_list' -%>
106
+ <%- end -%>
107
+ <%= render 'history_list' -%>
108
+ </div>
109
+ </div>
110
+ </div>
111
+
112
+ <div id="submenu" class="ui-corner-all">
113
+ <div id="manifestation_book_jacket">
114
+ <%= agent_custom_book_jacket(@agent) -%>
115
+ </div>
116
+ <ul>
117
+ <%- if @agent.picture_files.exists? -%>
118
+ <li><%= t('page.total') %>: <%= @agent.picture_files.count %> <%= t('page.number_of_pictures', :count => @agent.picture_files.count) %></li>
119
+ <li><%= link_to t('page.listing', :model => t('activerecord.models.picture_file')), agent_picture_files_path(@agent) -%></li>
120
+ <script type="text/javascript">
121
+ $(document).ready(function(){
122
+ $("a[rel='agent_<%= @agent.id -%>']").colorbox({transition:"none", photo:true});
123
+ $("a[rel='agent_<%= @agent.id -%>_other']").colorbox({transition:"none", photo:true});
124
+ })
125
+ </script>
126
+ <% end %>
127
+ <%- if can? :create, PictureFile -%>
128
+ <li><%= link_to t('page.new', :model => t('activerecord.models.picture_file')), new_agent_picture_file_path(@agent) -%></li>
129
+ <%- end -%>
130
+ </ul>
131
+ <ul>
132
+ <li><%= back_to_index(flash[:page_info]) -%></li>
133
+ <%- if can? :create, User -%>
134
+ <%- if @agent.user.blank? -%>
135
+ <li><%= link_to t('agent.activate_as_user'), new_user_path(:agent_id => @agent.id) -%></li>
136
+ <%- else -%>
137
+ <li><%= link_to t('page.editing', :model => t('activerecord.models.user')), edit_user_path(@agent.user) -%></li>
138
+ <%- end -%>
139
+ <li><%= link_to t('page.edit'), edit_agent_path(@agent) -%></li>
140
+ <li><%= link_to t('agent.add_derivation'), agent_agents_path(@agent, :mode => 'add') -%></li>
141
+ <%- end -%>
142
+ <%- if can? :delete, @agent -%>
143
+ <li><%= link_to t('page.new', :model => t('activerecord.models.agent')), new_agent_path -%></li>
144
+ <li><%= link_to t('page.destroy'), @agent, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%></li>
145
+ <%- end -%>
146
+ </ul>
147
+ <ul>
148
+ <li><%= link_to t('page.listing', :model => t('activerecord.models.work')), creator_manifestations_path(@agent) -%></li>
149
+ <li><%= link_to t('page.listing', :model => t('activerecord.models.expression')), contributor_manifestations_path(@agent) -%></li>
150
+ <li><%= link_to t('page.listing', :model => t('activerecord.models.manifestation')), publisher_manifestations_path(@agent) -%></li>
151
+ </ul>
152
+ </div>
File without changes
@@ -0,0 +1,69 @@
1
+ <div data-role="header">
2
+ <h1 class="title"><%= t('page.showing', :model => t('activerecord.models.agent')) -%></h1>
3
+ </div>
4
+ <div data-role="content">
5
+ <h2 class="resource_title">
6
+ [P]
7
+ <%= @agent.full_name -%>
8
+ </h2>
9
+ <div id="detail">
10
+ <table class="table table-striped index vcard">
11
+ <tr>
12
+ <td><strong><%= t('activerecord.attributes.agent.full_name') -%>:</strong></td>
13
+ <td>
14
+ <span class="fn"><%= @agent.full_name -%></span>
15
+ </td>
16
+ </tr>
17
+ <tr>
18
+ <td><strong><%= t('activerecord.attributes.agent.full_name_transcription') -%>:</strong></td>
19
+ <td><%= @agent.full_name_transcription -%></td>
20
+ </tr>
21
+ <%- if @agent.user -%>
22
+ <tr>
23
+ <td><strong><%= t('activerecord.attributes.user.username') -%>:</strong></td>
24
+ <td><%= link_to @agent.user.username, @agent.user -%></td>
25
+ </tr>
26
+ <%- end -%>
27
+ <tr>
28
+ <td><strong><%= t('activerecord.models.agent_type') -%>:</strong></td>
29
+ <td><%= @agent.agent_type.display_name.localize -%></td>
30
+ </tr>
31
+ <tr>
32
+ <td><strong><%= t('activerecord.attributes.agent.email') -%>:</strong></td>
33
+ <td>
34
+ <%= mail_to @agent.email, nil, :class => 'email' -%>
35
+ </td>
36
+ </tr>
37
+ <tr>
38
+ <td><strong><%= t('activerecord.attributes.agent.url') -%>:</strong></td>
39
+ <td>
40
+ <%= link_to @agent.url, @agent.url, :class => 'url' if @agent.url? -%>
41
+ </td>
42
+ </tr>
43
+ <tr>
44
+ <td><strong><%= t('activerecord.attributes.agent.other_designation') -%>:</strong></td>
45
+ <td><%= @agent.other_designation -%></td>
46
+ </tr>
47
+ <tr>
48
+ <td><strong><%= t('activerecord.attributes.agent.place') -%>:</strong></td>
49
+ <td><%= @agent.place -%></td>
50
+ </tr>
51
+ <tr>
52
+ <td><strong><%= t('activerecord.models.language') -%>:</strong></td>
53
+ <td><%= @agent.language.display_name.localize -%></td>
54
+ </tr>
55
+ <tr>
56
+ <td><strong><%= t('activerecord.attributes.agent.note') -%>:</strong></td>
57
+ <td><%= @agent.note -%></td>
58
+ </tr>
59
+ <tr>
60
+ <td><strong><%= t('page.created_at') -%>:</strong></td>
61
+ <td><%= l(@agent.created_at) -%></td>
62
+ </tr>
63
+ <tr>
64
+ <td><strong><%= t('page.updated_at') -%>:</strong></td>
65
+ <td><%= l(@agent.updated_at) -%></td>
66
+ </tr>
67
+ </table>
68
+ </div>
69
+ </div>
@@ -2,12 +2,12 @@
2
2
  <%= f.error_messages -%>
3
3
 
4
4
  <div class="field">
5
- <%= f.label t('activerecord.models.patron') -%><br />
6
- <%- if @create.patron -%>
7
- <%= link_to @create.patron.full_name, @create.patron -%>
8
- <%= f.hidden_field :patron_id -%>
5
+ <%= f.label t('activerecord.models.agent') -%><br />
6
+ <%- if @create.agent -%>
7
+ <%= link_to @create.agent.full_name, @create.agent -%>
8
+ <%= f.hidden_field :agent_id -%>
9
9
  <%- else -%>
10
- <%= f.text_field :patron_id -%>
10
+ <%= f.text_field :agent_id -%>
11
11
  <%- end -%>
12
12
  </div>
13
13