geoblacklight_admin 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (346) hide show
  1. checksums.yaml +7 -0
  2. data/.editorconfig +18 -0
  3. data/.gitignore +75 -0
  4. data/.standard.yml +4 -0
  5. data/Gemfile +59 -0
  6. data/LICENSE +21 -0
  7. data/README.md +84 -0
  8. data/Rakefile +72 -0
  9. data/app/assets/images/.keep +0 -0
  10. data/app/assets/images/aerial_photo.jpg +0 -0
  11. data/app/assets/images/archive-solid.svg +1 -0
  12. data/app/assets/images/bookmark-regular.svg +1 -0
  13. data/app/assets/images/bookmark-solid.svg +1 -0
  14. data/app/assets/images/btaa-logo.jpg +0 -0
  15. data/app/assets/images/cloud-download-alt-solid.svg +1 -0
  16. data/app/assets/images/file-import-solid.svg +1 -0
  17. data/app/assets/images/trash-alt-solid.svg +1 -0
  18. data/app/assets/javascripts/geoblacklight_admin/chosen.js +4 -0
  19. data/app/assets/javascripts/geoblacklight_admin/date_range_picker.js +173 -0
  20. data/app/assets/javascripts/geoblacklight_admin/datepicker.js +22 -0
  21. data/app/assets/javascripts/geoblacklight_admin/elements.js +38 -0
  22. data/app/assets/javascripts/geoblacklight_admin/exports.js +3 -0
  23. data/app/assets/javascripts/geoblacklight_admin/fields.js +11 -0
  24. data/app/assets/javascripts/geoblacklight_admin/geoblacklight_admin.js +2 -0
  25. data/app/assets/javascripts/geoblacklight_admin/inputmask.js +4 -0
  26. data/app/assets/javascripts/geoblacklight_admin/locale.js +5 -0
  27. data/app/assets/javascripts/geoblacklight_admin/sortable.js +2544 -0
  28. data/app/assets/javascripts/geoblacklight_admin/tooltips.js +3 -0
  29. data/app/assets/javascripts/geoblacklight_admin/truncate.js +4 -0
  30. data/app/assets/javascripts/geoblacklight_admin.js +40 -0
  31. data/app/assets/stylesheets/geoblacklight_admin/_core.scss +47 -0
  32. data/app/assets/stylesheets/geoblacklight_admin/modules/_autocomplete.scss +32 -0
  33. data/app/assets/stylesheets/geoblacklight_admin/modules/_blazer.scss +3 -0
  34. data/app/assets/stylesheets/geoblacklight_admin/modules/_code.scss +3 -0
  35. data/app/assets/stylesheets/geoblacklight_admin/modules/_datepicker.scss +477 -0
  36. data/app/assets/stylesheets/geoblacklight_admin/modules/_elements.scss +3 -0
  37. data/app/assets/stylesheets/geoblacklight_admin/modules/_forms.scss +28 -0
  38. data/app/assets/stylesheets/geoblacklight_admin/modules/_icons.scss +15 -0
  39. data/app/assets/stylesheets/geoblacklight_admin/modules/_nav.scss +9 -0
  40. data/app/assets/stylesheets/geoblacklight_admin/modules/_tables.scss +4 -0
  41. data/app/assets/stylesheets/geoblacklight_admin/modules/_toasts.scss +7 -0
  42. data/app/assets/stylesheets/geoblacklight_admin/modules/_visibility.scss +3 -0
  43. data/app/assets/stylesheets/geoblacklight_admin/settings/_variables.scss +1 -0
  44. data/app/channels/export_channel.rb +12 -0
  45. data/app/controllers/admin/admin_controller.rb +16 -0
  46. data/app/controllers/admin/advanced_search_controller.rb +365 -0
  47. data/app/controllers/admin/api_controller.rb +386 -0
  48. data/app/controllers/admin/bookmarks_controller.rb +68 -0
  49. data/app/controllers/admin/bulk_actions_controller.rb +94 -0
  50. data/app/controllers/admin/concerns/.keep +0 -0
  51. data/app/controllers/admin/concerns/upload_util.rb +8 -0
  52. data/app/controllers/admin/document_accesses_controller.rb +125 -0
  53. data/app/controllers/admin/document_assets_controller.rb +198 -0
  54. data/app/controllers/admin/document_downloads_controller.rb +127 -0
  55. data/app/controllers/admin/documents_controller.rb +219 -0
  56. data/app/controllers/admin/elements_controller.rb +81 -0
  57. data/app/controllers/admin/form_elements_controller.rb +81 -0
  58. data/app/controllers/admin/ids_controller.rb +379 -0
  59. data/app/controllers/admin/import_documents_controller.rb +18 -0
  60. data/app/controllers/admin/imports_controller.rb +105 -0
  61. data/app/controllers/admin/mappings_controller.rb +95 -0
  62. data/app/controllers/admin/notifications_controller.rb +51 -0
  63. data/app/controllers/admin/search_controller.rb +10 -0
  64. data/app/controllers/admin/users_controller.rb +10 -0
  65. data/app/helpers/bulk_actions_helper.rb +9 -0
  66. data/app/helpers/document_helper.rb +60 -0
  67. data/app/helpers/form_input_helper.rb +73 -0
  68. data/app/helpers/geoblacklight_admin_helper.rb +118 -0
  69. data/app/helpers/import_documents_helper.rb +5 -0
  70. data/app/helpers/mappings_helper.rb +27 -0
  71. data/app/indexers/document_indexer.rb +34 -0
  72. data/app/jobs/bulk_action_revert_document_job.rb +49 -0
  73. data/app/jobs/bulk_action_revert_job.rb +25 -0
  74. data/app/jobs/bulk_action_run_document_job.rb +42 -0
  75. data/app/jobs/bulk_action_run_job.rb +27 -0
  76. data/app/jobs/export_job.rb +72 -0
  77. data/app/jobs/export_json_job.rb +120 -0
  78. data/app/jobs/import_document_job.rb +25 -0
  79. data/app/jobs/import_run_job.rb +33 -0
  80. data/app/models/active_storage_attachment.rb +5 -0
  81. data/app/models/active_storage_blob.rb +5 -0
  82. data/app/models/api_search_builder.rb +12 -0
  83. data/app/models/application_record.rb +6 -0
  84. data/app/models/blacklight_api.rb +93 -0
  85. data/app/models/blacklight_api_facets.rb +15 -0
  86. data/app/models/blacklight_api_ids.rb +103 -0
  87. data/app/models/bookmark.rb +17 -0
  88. data/app/models/bulk_action.rb +88 -0
  89. data/app/models/bulk_action_document.rb +22 -0
  90. data/app/models/bulk_action_document_state_machine.rb +16 -0
  91. data/app/models/bulk_action_document_transition.rb +19 -0
  92. data/app/models/bulk_action_state_machine.rb +16 -0
  93. data/app/models/bulk_action_transition.rb +26 -0
  94. data/app/models/concerns/.keep +0 -0
  95. data/app/models/document/bbox_validator.rb +70 -0
  96. data/app/models/document/controlled_lists.rb +104 -0
  97. data/app/models/document/date_range_validator.rb +63 -0
  98. data/app/models/document/geom_validator.rb +117 -0
  99. data/app/models/document/reference.rb +107 -0
  100. data/app/models/document.rb +264 -0
  101. data/app/models/document_access.rb +35 -0
  102. data/app/models/document_download.rb +35 -0
  103. data/app/models/document_state_machine.rb +14 -0
  104. data/app/models/document_transition.rb +26 -0
  105. data/app/models/element.rb +90 -0
  106. data/app/models/form_control.rb +2 -0
  107. data/app/models/form_element.rb +19 -0
  108. data/app/models/form_feature.rb +2 -0
  109. data/app/models/form_group.rb +2 -0
  110. data/app/models/form_header.rb +2 -0
  111. data/app/models/geoblacklight_admin/field_mappings_btaa_aardvark.rb +379 -0
  112. data/app/models/geoblacklight_admin/field_mappings_gblv1.rb +344 -0
  113. data/app/models/geoblacklight_admin/iso_language_codes.rb +515 -0
  114. data/app/models/geoblacklight_admin/schema.rb +194 -0
  115. data/app/models/geoblacklight_admin.rb +3 -0
  116. data/app/models/import/csv_duplicates_validator.rb +36 -0
  117. data/app/models/import/csv_header_validator.rb +24 -0
  118. data/app/models/import.rb +186 -0
  119. data/app/models/import_btaa.rb +91 -0
  120. data/app/models/import_btaa_aardvark.rb +109 -0
  121. data/app/models/import_document.rb +34 -0
  122. data/app/models/import_document_state_machine.rb +12 -0
  123. data/app/models/import_document_transition.rb +19 -0
  124. data/app/models/import_gblv1.rb +92 -0
  125. data/app/models/import_state_machine.rb +16 -0
  126. data/app/models/import_transition.rb +26 -0
  127. data/app/models/mapping.rb +10 -0
  128. data/app/models/notification.rb +9 -0
  129. data/app/models/user.rb +26 -0
  130. data/app/notifications/export_notification.rb +30 -0
  131. data/app/services/export_csv_document_access_links_service.rb +47 -0
  132. data/app/services/export_csv_document_downloads_service.rb +47 -0
  133. data/app/services/export_csv_service.rb +44 -0
  134. data/app/services/export_json_service.rb +35 -0
  135. data/app/services/zip_file_generator.rb +56 -0
  136. data/app/views/admin/advanced_search/facets.json.jbuilder +80 -0
  137. data/app/views/admin/advanced_search/index.json.jbuilder +90 -0
  138. data/app/views/admin/api/_field.json.jbuilder +10 -0
  139. data/app/views/admin/api/fetch.json.jbuilder +86 -0
  140. data/app/views/admin/api/index.json.jbuilder +90 -0
  141. data/app/views/admin/bookmarks/_bookmark.json.jbuilder +4 -0
  142. data/app/views/admin/bookmarks/create.js.erb +7 -0
  143. data/app/views/admin/bookmarks/destroy.js.erb +7 -0
  144. data/app/views/admin/bookmarks/index.html.erb +21 -0
  145. data/app/views/admin/bookmarks/index.json.jbuilder +3 -0
  146. data/app/views/admin/bulk_actions/_bulk_action.json.jbuilder +4 -0
  147. data/app/views/admin/bulk_actions/_form.html.erb +17 -0
  148. data/app/views/admin/bulk_actions/edit.html.erb +6 -0
  149. data/app/views/admin/bulk_actions/index.html.erb +54 -0
  150. data/app/views/admin/bulk_actions/index.json.jbuilder +3 -0
  151. data/app/views/admin/bulk_actions/new.html.erb +5 -0
  152. data/app/views/admin/bulk_actions/show.html.erb +100 -0
  153. data/app/views/admin/bulk_actions/show.json.jbuilder +3 -0
  154. data/app/views/admin/devise/confirmations/new.html.erb +16 -0
  155. data/app/views/admin/devise/invitations/edit.html.erb +15 -0
  156. data/app/views/admin/devise/invitations/new.html.erb +15 -0
  157. data/app/views/admin/devise/mailer/invitation_instructions.html.erb +11 -0
  158. data/app/views/admin/devise/mailer/invitation_instructions.text.erb +11 -0
  159. data/app/views/admin/devise/passwords/edit.html.erb +26 -0
  160. data/app/views/admin/devise/passwords/new.html.erb +16 -0
  161. data/app/views/admin/devise/registrations/edit.html.erb +35 -0
  162. data/app/views/admin/devise/registrations/new.html.erb +30 -0
  163. data/app/views/admin/devise/sessions/new.html.erb +28 -0
  164. data/app/views/admin/devise/shared/_links.html.erb +27 -0
  165. data/app/views/admin/devise/unlocks/new.html.erb +16 -0
  166. data/app/views/admin/document_accesses/_document_access.json.jbuilder +4 -0
  167. data/app/views/admin/document_accesses/_form.html.erb +17 -0
  168. data/app/views/admin/document_accesses/destroy_all.html.erb +70 -0
  169. data/app/views/admin/document_accesses/edit.html.erb +5 -0
  170. data/app/views/admin/document_accesses/import.html.erb +70 -0
  171. data/app/views/admin/document_accesses/index.html.erb +74 -0
  172. data/app/views/admin/document_accesses/index.json.jbuilder +3 -0
  173. data/app/views/admin/document_accesses/new.html.erb +6 -0
  174. data/app/views/admin/document_accesses/show.html.erb +19 -0
  175. data/app/views/admin/document_accesses/show.json.jbuilder +3 -0
  176. data/app/views/admin/document_assets/display_attach_form.html.erb +44 -0
  177. data/app/views/admin/document_assets/index.html.erb +65 -0
  178. data/app/views/admin/document_downloads/_document_download.json.jbuilder +4 -0
  179. data/app/views/admin/document_downloads/_form.html.erb +15 -0
  180. data/app/views/admin/document_downloads/destroy_all.html.erb +70 -0
  181. data/app/views/admin/document_downloads/edit.html.erb +6 -0
  182. data/app/views/admin/document_downloads/import.html.erb +74 -0
  183. data/app/views/admin/document_downloads/index.html.erb +70 -0
  184. data/app/views/admin/document_downloads/index.json.jbuilder +3 -0
  185. data/app/views/admin/document_downloads/new.html.erb +5 -0
  186. data/app/views/admin/document_downloads/show.html.erb +24 -0
  187. data/app/views/admin/document_downloads/show.json.jbuilder +3 -0
  188. data/app/views/admin/documents/_document.html.erb +29 -0
  189. data/app/views/admin/documents/_document_bookmark.html.erb +17 -0
  190. data/app/views/admin/documents/_document_fields.html.erb +24 -0
  191. data/app/views/admin/documents/_form.html.erb +49 -0
  192. data/app/views/admin/documents/_form_control.html.erb +86 -0
  193. data/app/views/admin/documents/_form_group.html.erb +1 -0
  194. data/app/views/admin/documents/_form_header.html.erb +1 -0
  195. data/app/views/admin/documents/_form_nav.html.erb +21 -0
  196. data/app/views/admin/documents/_json_aardvark.jbuilder +47 -0
  197. data/app/views/admin/documents/_json_btaa_aardvark.jbuilder +16 -0
  198. data/app/views/admin/documents/_json_gbl_v1.jbuilder +32 -0
  199. data/app/views/admin/documents/_result_facets.html.erb +35 -0
  200. data/app/views/admin/documents/_result_pagination.html.erb +21 -0
  201. data/app/views/admin/documents/_result_selected_options.html.erb +54 -0
  202. data/app/views/admin/documents/_result_selection_options.html.erb +10 -0
  203. data/app/views/admin/documents/_result_toggle.html.erb +13 -0
  204. data/app/views/admin/documents/edit.html.erb +7 -0
  205. data/app/views/admin/documents/features/_assets.html.erb +3 -0
  206. data/app/views/admin/documents/features/_institutional_access_links.html.erb +3 -0
  207. data/app/views/admin/documents/features/_multiple_download_links.html.erb +27 -0
  208. data/app/views/admin/documents/fetch.json_aardvark.jbuilder +9 -0
  209. data/app/views/admin/documents/fetch.json_btaa_aardvark.jbuilder +9 -0
  210. data/app/views/admin/documents/fetch.json_gbl_v1.jbuilder +9 -0
  211. data/app/views/admin/documents/index.html.erb +49 -0
  212. data/app/views/admin/documents/index.json_aardvark.jbuilder +9 -0
  213. data/app/views/admin/documents/index.json_btaa_aardvark.jbuilder +9 -0
  214. data/app/views/admin/documents/index.json_gbl_v1.jbuilder +9 -0
  215. data/app/views/admin/documents/show.json_aardvark.jbuilder +3 -0
  216. data/app/views/admin/documents/show.json_btaa_aardvark.jbuilder +3 -0
  217. data/app/views/admin/documents/show.json_gbl_v1.jbuilder +3 -0
  218. data/app/views/admin/documents/versions.html.erb +110 -0
  219. data/app/views/admin/elements/_element.json.jbuilder +2 -0
  220. data/app/views/admin/elements/_form.html.erb +45 -0
  221. data/app/views/admin/elements/edit.html.erb +6 -0
  222. data/app/views/admin/elements/index.html.erb +68 -0
  223. data/app/views/admin/elements/index.json.jbuilder +1 -0
  224. data/app/views/admin/elements/new.html.erb +5 -0
  225. data/app/views/admin/elements/show.html.erb +121 -0
  226. data/app/views/admin/elements/show.json.jbuilder +1 -0
  227. data/app/views/admin/form_elements/_form.html.erb +46 -0
  228. data/app/views/admin/form_elements/_form_element.json.jbuilder +2 -0
  229. data/app/views/admin/form_elements/edit.html.erb +6 -0
  230. data/app/views/admin/form_elements/index.html.erb +49 -0
  231. data/app/views/admin/form_elements/index.json.jbuilder +1 -0
  232. data/app/views/admin/form_elements/new.html.erb +5 -0
  233. data/app/views/admin/form_elements/show.html.erb +19 -0
  234. data/app/views/admin/form_elements/show.json.jbuilder +1 -0
  235. data/app/views/admin/ids/fetch.json.jbuilder +86 -0
  236. data/app/views/admin/ids/index.json.jbuilder +41 -0
  237. data/app/views/admin/import_documents/show.html.haml +20 -0
  238. data/app/views/admin/imports/_form.html.erb +27 -0
  239. data/app/views/admin/imports/_import.json.jbuilder +4 -0
  240. data/app/views/admin/imports/_show_failed_tab.html.erb +37 -0
  241. data/app/views/admin/imports/_show_success_tab.html.erb +31 -0
  242. data/app/views/admin/imports/edit.html.erb +8 -0
  243. data/app/views/admin/imports/index.html.erb +56 -0
  244. data/app/views/admin/imports/index.json.jbuilder +3 -0
  245. data/app/views/admin/imports/new.html.erb +7 -0
  246. data/app/views/admin/imports/show.html.erb +123 -0
  247. data/app/views/admin/imports/show.json.jbuilder +3 -0
  248. data/app/views/admin/layouts/application.html.erb +30 -0
  249. data/app/views/admin/layouts/blazer/application.html.erb +23 -0
  250. data/app/views/admin/layouts/mailer.html.erb +13 -0
  251. data/app/views/admin/layouts/mailer.text.erb +1 -0
  252. data/app/views/admin/mappings/_form.html.erb +17 -0
  253. data/app/views/admin/mappings/_mapping.json.jbuilder +4 -0
  254. data/app/views/admin/mappings/edit.html.erb +6 -0
  255. data/app/views/admin/mappings/index.html.erb +37 -0
  256. data/app/views/admin/mappings/index.json.jbuilder +3 -0
  257. data/app/views/admin/mappings/new.html.erb +5 -0
  258. data/app/views/admin/mappings/show.html.erb +27 -0
  259. data/app/views/admin/mappings/show.json.jbuilder +3 -0
  260. data/app/views/admin/notifications/_notification.html.haml +31 -0
  261. data/app/views/admin/notifications/index.html.erb +54 -0
  262. data/app/views/admin/notifications/update.js.erb +7 -0
  263. data/app/views/admin/search/index.html.erb +38 -0
  264. data/app/views/admin/shared/_flash_messages.html.erb +5 -0
  265. data/app/views/admin/shared/_footer.html.erb +56 -0
  266. data/app/views/admin/shared/_js_behaviors.html.erb +147 -0
  267. data/app/views/admin/shared/_navbar.html.erb +78 -0
  268. data/app/views/admin/shared/_navbar_blazer.html.erb +42 -0
  269. data/app/views/admin/shared/_schema_timestamp.html.erb +16 -0
  270. data/app/views/admin/shared/_toast.html.erb +13 -0
  271. data/app/views/admin/users/index.html.erb +21 -0
  272. data/config/authorities/formats.yml +25 -0
  273. data/config/authorities/languages.yml +50 -0
  274. data/config/authorities/resource_type.yml +82 -0
  275. data/config/blazer.yml +79 -0
  276. data/config/gbl_v1_schema.json +118 -0
  277. data/config/geomg_aardvark_schema.json +211 -0
  278. data/config/geomg_schema.json +123 -0
  279. data/config/locales/devise.en.yml +65 -0
  280. data/config/locales/devise_invitable.en.yml +31 -0
  281. data/config/locales/documents.en.yml +189 -0
  282. data/config/locales/en.yml +51 -0
  283. data/config/locales/geoblacklight.en.yml +178 -0
  284. data/config/locales/simple_form.en.yml +31 -0
  285. data/config/routes.rb +162 -0
  286. data/db/migrate/20230316183001_add_geoblacklight_admin.rb +399 -0
  287. data/db/seeds.rb +26 -0
  288. data/db/seeds_elements.csv +56 -0
  289. data/db/seeds_elements.numbers +0 -0
  290. data/db/seeds_form_elements.csv +71 -0
  291. data/db/seeds_form_elements.numbers +0 -0
  292. data/db/structure.sql +816 -0
  293. data/geoblacklight_admin.gemspec +67 -0
  294. data/lib/generators/geoblacklight_admin/config_generator.rb +336 -0
  295. data/lib/generators/geoblacklight_admin/example_docs_generator.rb +18 -0
  296. data/lib/generators/geoblacklight_admin/helpers_generator.rb +18 -0
  297. data/lib/generators/geoblacklight_admin/install_generator.rb +60 -0
  298. data/lib/generators/geoblacklight_admin/jobs_generator.rb +21 -0
  299. data/lib/generators/geoblacklight_admin/models_generator.rb +23 -0
  300. data/lib/generators/geoblacklight_admin/templates/.env.development.example +28 -0
  301. data/lib/generators/geoblacklight_admin/templates/.solr_wrapper.yml +7 -0
  302. data/lib/generators/geoblacklight_admin/templates/_user_util_links.html.erb +30 -0
  303. data/lib/generators/geoblacklight_admin/templates/config/database.yml +18 -0
  304. data/lib/generators/geoblacklight_admin/templates/config/geomg_aardvark_schema.json +211 -0
  305. data/lib/generators/geoblacklight_admin/templates/config/initializers/geoblacklight_admin.rb +25 -0
  306. data/lib/generators/geoblacklight_admin/templates/config/initializers/kithe.rb +31 -0
  307. data/lib/generators/geoblacklight_admin/templates/config/initializers/pagy.rb +158 -0
  308. data/lib/generators/geoblacklight_admin/templates/config/initializers/statesman.rb +7 -0
  309. data/lib/generators/geoblacklight_admin/templates/javascript/channels/consumer.js +6 -0
  310. data/lib/generators/geoblacklight_admin/templates/javascript/channels/export_channel.js +30 -0
  311. data/lib/generators/geoblacklight_admin/templates/javascript/channels/index.js +5 -0
  312. data/lib/generators/geoblacklight_admin/templates/javascript/controllers/application_controller.js +17 -0
  313. data/lib/generators/geoblacklight_admin/templates/javascript/controllers/document_controller.js +26 -0
  314. data/lib/generators/geoblacklight_admin/templates/javascript/controllers/index.js +10 -0
  315. data/lib/generators/geoblacklight_admin/templates/javascript/controllers/results_controller.js +310 -0
  316. data/lib/generators/geoblacklight_admin/templates/javascript/packs/application.js +23 -0
  317. data/lib/generators/geoblacklight_admin/templates/javascript/src/js/admin/qa_autocomplete.js +1134 -0
  318. data/lib/generators/geoblacklight_admin/templates/package.json +32 -0
  319. data/lib/generators/geoblacklight_admin/templates/solr/README-geoblacklight-solr-development.txt +3 -0
  320. data/lib/generators/geoblacklight_admin/templates/solr/conf/_rest_managed.json +3 -0
  321. data/lib/generators/geoblacklight_admin/templates/solr/conf/admin-extra.html +31 -0
  322. data/lib/generators/geoblacklight_admin/templates/solr/conf/core.properties +5 -0
  323. data/lib/generators/geoblacklight_admin/templates/solr/conf/elevate.xml +36 -0
  324. data/lib/generators/geoblacklight_admin/templates/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
  325. data/lib/generators/geoblacklight_admin/templates/solr/conf/protwords.txt +21 -0
  326. data/lib/generators/geoblacklight_admin/templates/solr/conf/schema.xml +229 -0
  327. data/lib/generators/geoblacklight_admin/templates/solr/conf/scripts.conf +24 -0
  328. data/lib/generators/geoblacklight_admin/templates/solr/conf/solrconfig.xml +266 -0
  329. data/lib/generators/geoblacklight_admin/templates/solr/conf/spellings.txt +2 -0
  330. data/lib/generators/geoblacklight_admin/templates/solr/conf/stopwords.txt +58 -0
  331. data/lib/generators/geoblacklight_admin/templates/solr/conf/stopwords_en.txt +58 -0
  332. data/lib/generators/geoblacklight_admin/templates/solr/conf/synonyms.txt +43 -0
  333. data/lib/generators/geoblacklight_admin/templates/solr/conf/xslt/example.xsl +132 -0
  334. data/lib/generators/geoblacklight_admin/templates/solr/conf/xslt/example_atom.xsl +67 -0
  335. data/lib/generators/geoblacklight_admin/templates/solr/conf/xslt/example_rss.xsl +66 -0
  336. data/lib/generators/geoblacklight_admin/templates/solr/conf/xslt/luke.xsl +337 -0
  337. data/lib/generators/geoblacklight_admin/templates/solr/snapshots/.keep +0 -0
  338. data/lib/generators/geoblacklight_admin/views_generator.rb +19 -0
  339. data/lib/geoblacklight_admin/engine.rb +20 -0
  340. data/lib/geoblacklight_admin/version.rb +5 -0
  341. data/lib/geoblacklight_admin.rb +7 -0
  342. data/lib/tasks/.keep +0 -0
  343. data/lib/tasks/geoblacklight_admin.rake +209 -0
  344. data/spec/test_app_templates/lib/generators/test_app_generator.rb +35 -0
  345. data/template.rb +16 -0
  346. metadata +1037 -0
@@ -0,0 +1,17 @@
1
+
2
+ <%= simple_form_for(@bulk_action) do |f| %>
3
+ <%= f.error_notification %>
4
+ <%= f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present? %>
5
+
6
+ <div class="form-inputs">
7
+ <%= f.input :name, hint: "Short description" %>
8
+ <%= f.input :scope, hint: "Result Set Query", input_html: { value: params[:scope] } %>
9
+ <%= f.input :field_name, collection: bulk_actions_collection, hint: "Field" %>
10
+ <%= f.input :field_value, hint: "New Field Value" %>
11
+ <%= f.input :notes, hint: "Longer description" %>
12
+ </div>
13
+
14
+ <div class="form-actions">
15
+ <%= f.button :submit, {class: 'btn btn-primary'} %>
16
+ </div>
17
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <h1>Editing Bulk Action</h1>
2
+
3
+ <%= render 'form', bulk_action: @bulk_action %>
4
+
5
+ <%= link_to 'Show', @bulk_action %> |
6
+ <%= link_to 'Back', bulk_actions_path %>
@@ -0,0 +1,54 @@
1
+ <%- @page_title = "GEOMG - Bulk Actions" %>
2
+
3
+ <h1 style="width:100%;">
4
+ Bulk Actions
5
+ <%= link_to '+ Bulk Action', new_bulk_action_path, { class: 'btn btn-primary float-right invisible' } %>
6
+ </h1>
7
+
8
+ <h6>
9
+ <span class='float-left mt-3'>
10
+ <%== pagy_info(@pagy, 'bulk actions'.pluralize(@pagy.count)) %>
11
+ </span>
12
+ <span class='float-right'>
13
+ <%== pagy_bootstrap_nav(@pagy) %>
14
+ </span>
15
+ </h6>
16
+
17
+ <table class="table table-striped table-bordered sortable">
18
+ <thead class="thead-dark">
19
+ <tr>
20
+ <th class="header">Name</th>
21
+ <th class="header">Scope</th>
22
+ <th class="header">Field</th>
23
+ <th class="header">Value</th>
24
+ <th class="header">Date</th>
25
+ <th class="header" colspan="3"></th>
26
+ </tr>
27
+ </thead>
28
+
29
+ <tbody>
30
+ <% @bulk_actions.each do |bulk_action| %>
31
+ <tr>
32
+ <td><%= bulk_action.name %></td>
33
+ <td><%= CGI.unescape(bulk_action.scope) %></td>
34
+ <td><%= bulk_action.field_name %></td>
35
+ <td><%= bulk_action.field_value %></td>
36
+ <td><%= bulk_action.created_at %></td>
37
+ <td><%= link_to 'Show', bulk_action %></td>
38
+ <td><%= link_to 'Edit', edit_bulk_action_path(bulk_action) %></td>
39
+ <td><%= link_to 'Destroy', bulk_action, method: :delete, data: { confirm: 'Are you sure?' } %></td>
40
+ </tr>
41
+ <% end %>
42
+ </tbody>
43
+ </table>
44
+
45
+ <h6>
46
+ <span class='float-left mt-3'>
47
+ <%== pagy_info(@pagy, 'imports'.pluralize(@pagy.count)) %>
48
+ </span>
49
+ <span class='float-right'>
50
+ <%== pagy_bootstrap_nav(@pagy) %>
51
+ </span>
52
+ </h6>
53
+
54
+ <br/>
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ json.array! @bulk_actions, partial: "bulk_actions/bulk_action", as: :bulk_action
@@ -0,0 +1,5 @@
1
+ <h1>New Bulk Action</h1>
2
+
3
+ <%= render 'form', bulk_action: @bulk_action %>
4
+
5
+ <%= link_to 'Back', bulk_actions_path %>
@@ -0,0 +1,100 @@
1
+ <%= link_to 'Edit', edit_admin_bulk_action_path(@bulk_action) %> |
2
+ <%= link_to 'Back', admin_bulk_actions_path %>
3
+
4
+ <div class="row">
5
+ <div class="col-md-6">
6
+ <h1>Bulk Action</h1>
7
+ <p>
8
+ <strong>Change:</strong>
9
+ <%= @bulk_action.field_name %>
10
+ <% if @bulk_action.field_name != "Delete" %>
11
+ /
12
+ <strong>To:</strong>
13
+ <%= @bulk_action.field_value %></p>
14
+ <% end %>
15
+ <p>
16
+ <strong>Notes:</strong>
17
+ <%= @bulk_action.notes %></p>
18
+
19
+ <p>
20
+ <strong>Scope:</strong>
21
+ <%= @bulk_action.scope %></p>
22
+ </div>
23
+ <div class="col-md-3">
24
+ <div class="card">
25
+ <div class="card-header text-center">
26
+ <h3 class="h5">Documents</h3>
27
+ </div>
28
+ <ul class="list-group list-group-flush">
29
+ <li class="list-group-item text-center">
30
+ <%= @bulk_action.documents.size %>
31
+ </li>
32
+ </ul>
33
+ </div>
34
+ </div>
35
+
36
+ <div class="col-md-3">
37
+ <div class="card">
38
+ <div class="card-header text-center">
39
+ <h3 class="h5">Bulk Action</h3>
40
+ </div>
41
+ <ul class="list-group list-group-flush">
42
+ <li class="list-group-item text-center">
43
+ <% if @bulk_action.state_machine.current_state == 'created' %>
44
+ <%= form_tag run_admin_bulk_action_path(@bulk_action), method: :patch do -%>
45
+ <%= hidden_field_tag :run, true -%>
46
+ <%= submit_tag 'Run Bulk Action' -%>
47
+ <%- end -%>
48
+ <% else %>
49
+ <%= @bulk_action.state_machine.current_state %>
50
+ <% if @bulk_action.state_machine.current_state == 'complete' %>
51
+ <%= form_tag revert_admin_bulk_action_path(@bulk_action), method: :patch do -%>
52
+ <%= hidden_field_tag :run, true -%>
53
+ <%= submit_tag 'Revert Bulk Action' -%>
54
+ <%- end -%>
55
+ <%- end -%>
56
+ <% end %>
57
+ </li>
58
+ </ul>
59
+ </div>
60
+ </div>
61
+
62
+ <div class="col-12">
63
+ <h3 class="sr-only">Documents</h3>
64
+ <h6>
65
+ <span class='float-left mt-3'>
66
+ <%== pagy_info(@pagy, 'documents'.pluralize(@pagy.count)) %>
67
+ </span>
68
+ <span class='float-right'>
69
+ <%== pagy_bootstrap_nav(@pagy) %>
70
+ </span>
71
+ </h6>
72
+ <table class="table table-striped">
73
+ <thead>
74
+ <tr>
75
+ <th>Rails/Database ID</th>
76
+ <th>Aardvark ID</th>
77
+ <th>View in...</th>
78
+ <th>Version</th>
79
+ <th>State</th>
80
+ </tr>
81
+ </thead>
82
+ <tbody>
83
+ <% @documents.each_with_index do |doc, index| %>
84
+ <tr>
85
+ <td><%= doc.document_id %></td>
86
+ <td>
87
+ <%= doc.friendlier_id %>
88
+ </td>
89
+ <td>
90
+ <%= link_to "GBL Admin", admin_document_url(doc.friendlier_id), { class: 'btn btn-primary' } %>
91
+ <%= link_to "Geoblacklight", blacklight_link(doc), { class: 'btn btn-primary', target: :_blank } %>
92
+ </td>
93
+ <td><%= doc.version %></td>
94
+ <td><%= doc.state_machine.current_state %></td>
95
+ </tr>
96
+ <% end %>
97
+ </tbody>
98
+ </table>
99
+ </div>
100
+ </div>
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ json.partial! "bulk_actions/bulk_action", bulk_action: @bulk_action
@@ -0,0 +1,16 @@
1
+ <h1><%= t('.resend_confirmation_instructions') %></h1>
2
+
3
+ <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
4
+ <%= bootstrap_devise_error_messages! %>
5
+
6
+ <div class="form-group">
7
+ <%= f.label :email %>
8
+ <%= f.email_field :email, autofocus: true, autocomplete: 'email', value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email), class: 'form-control' %>
9
+ </div>
10
+
11
+ <div class="form-group">
12
+ <%= f.submit t('.resend_confirmation_instructions'), class: 'btn btn-primary' %>
13
+ </div>
14
+ <% end %>
15
+
16
+ <%= render 'devise/shared/links' %>
@@ -0,0 +1,15 @@
1
+ <h2><%= t "devise.invitations.edit.header" %></h2>
2
+
3
+ <%= simple_form_for(resource, as: resource_name, url: invitation_path(resource_name), html: { method: :put }) do |f| %>
4
+ <%= f.error_notification %>
5
+ <%= f.hidden_field :invitation_token %>
6
+
7
+ <div class="form-inputs">
8
+ <%= f.input :password %>
9
+ <%= f.input :password_confirmation %>
10
+ </div>
11
+
12
+ <div class="form-actions">
13
+ <%= f.button :submit, t("devise.invitations.edit.submit_button"), class: 'btn btn-primary' %>
14
+ </div>
15
+ <% end %>
@@ -0,0 +1,15 @@
1
+ <h2><%= t "devise.invitations.new.header" %></h2>
2
+
3
+ <%= simple_form_for(resource, as: resource_name, url: invitation_path(resource_name), html: { method: :post }) do |f| %>
4
+ <%= f.error_notification %>
5
+
6
+ <% resource.class.invite_key_fields.each do |field| -%>
7
+ <div class="form-inputs">
8
+ <%= f.input field %>
9
+ </div>
10
+ <% end -%>
11
+
12
+ <div class="form-actions">
13
+ <%= f.button :submit, t("devise.invitations.new.submit_button"), class: 'btn btn-primary' %>
14
+ </div>
15
+ <% end %>
@@ -0,0 +1,11 @@
1
+ <p><%= t("devise.mailer.invitation_instructions.hello", email: @resource.email) %></p>
2
+
3
+ <p><%= t("devise.mailer.invitation_instructions.someone_invited_you", url: root_url) %></p>
4
+
5
+ <p><%= link_to t("devise.mailer.invitation_instructions.accept"), accept_invitation_url(@resource, invitation_token: @token) %></p>
6
+
7
+ <% if @resource.invitation_due_at %>
8
+ <p><%= t("devise.mailer.invitation_instructions.accept_until", due_date: l(@resource.invitation_due_at, format: :'devise.mailer.invitation_instructions.accept_until_format')) %></p>
9
+ <% end %>
10
+
11
+ <p><%= t("devise.mailer.invitation_instructions.ignore") %></p>
@@ -0,0 +1,11 @@
1
+ <%= t("devise.mailer.invitation_instructions.hello", email: @resource.email) %>
2
+
3
+ <%= t("devise.mailer.invitation_instructions.someone_invited_you", url: root_url) %>
4
+
5
+ <%= accept_invitation_url(@resource, invitation_token: @token) %>
6
+
7
+ <% if @resource.invitation_due_at %>
8
+ <%= t("devise.mailer.invitation_instructions.accept_until", due_date: l(@resource.invitation_due_at, format: :'devise.mailer.invitation_instructions.accept_until_format')) %>
9
+ <% end %>
10
+
11
+ <%= t("devise.mailer.invitation_instructions.ignore") %>
@@ -0,0 +1,26 @@
1
+ <h1><%= t('.change_your_password') %></h1>
2
+
3
+ <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
4
+ <%= bootstrap_devise_error_messages! %>
5
+ <%= f.hidden_field :reset_password_token %>
6
+
7
+ <div class="form-group">
8
+ <%= f.label :password, t('.new_password') %>
9
+ <%= f.password_field :password, autofocus: true, class: 'form-control' %>
10
+
11
+ <% if @minimum_password_length %>
12
+ <small class="form-text text-muted"><%= t('devise.shared.minimum_password_length', count: @minimum_password_length) %></small>
13
+ <% end %>
14
+ </div>
15
+
16
+ <div class="form-group">
17
+ <%= f.label :password_confirmation, t('.confirm_new_password') %>
18
+ <%= f.password_field :password_confirmation, autocomplete: 'off', class: 'form-control' %>
19
+ </div>
20
+
21
+ <div class="form-group">
22
+ <%= f.submit t('.change_my_password'), class: 'btn btn-primary' %>
23
+ </div>
24
+ <% end %>
25
+
26
+ <%= render 'devise/shared/links' %>
@@ -0,0 +1,16 @@
1
+ <h1><%= t('.forgot_your_password') %></h1>
2
+
3
+ <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
4
+ <%= bootstrap_devise_error_messages! %>
5
+
6
+ <div class="form-group">
7
+ <%= f.label :email %>
8
+ <%= f.email_field :email, autofocus: true, autocomplete: 'email', class: 'form-control' %>
9
+ </div>
10
+
11
+ <div class="form-group">
12
+ <%= f.submit t('.send_me_reset_password_instructions'), class: 'btn btn-primary' %>
13
+ </div>
14
+ <% end %>
15
+
16
+ <%= render 'devise/shared/links' %>
@@ -0,0 +1,35 @@
1
+ <h1><%= t('.title', resource: resource_name.to_s.humanize) %></h1>
2
+
3
+ <%= form_for(resource, as: resource_name, url: user_registration_path(resource_name), html: { method: :put }) do |f| %>
4
+ <%= bootstrap_devise_error_messages! %>
5
+
6
+ <div class="form-group">
7
+ <%= f.label :email %>
8
+ <%= f.email_field :email, autofocus: true, autocomplete: 'email', class: 'form-control' %>
9
+ </div>
10
+
11
+ <div class="form-group">
12
+ <%= f.label :password %>
13
+ <%= f.password_field :password, autocomplete: 'new-password', class: 'form-control' %>
14
+
15
+ <small class="form-text text-muted"><%= t('.leave_blank_if_you_don_t_want_to_change_it') %></small>
16
+ </div>
17
+
18
+ <div class="form-group">
19
+ <%= f.label :password_confirmation %>
20
+ <%= f.password_field :password_confirmation, autocomplete: 'new-password', class: 'form-control' %>
21
+ </div>
22
+
23
+ <div class="form-group">
24
+ <%= f.label :current_password %>
25
+ <%= f.password_field :current_password, autocomplete: 'current-password', class: 'form-control' %>
26
+
27
+ <small class="form-text text-muted"><%= t('.we_need_your_current_password_to_confirm_your_changes') %></small>
28
+ </div>
29
+
30
+ <div class="form-group">
31
+ <%= f.submit t('.update'), class: 'btn btn-primary' %>
32
+ </div>
33
+ <% end %>
34
+
35
+ <%= link_to t('.back'), :back %>
@@ -0,0 +1,30 @@
1
+ <h1><%= t('.sign_up') %></h1>
2
+
3
+ <%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
4
+ <%= bootstrap_devise_error_messages! %>
5
+
6
+ <div class="form-group">
7
+ <%= f.label :email %>
8
+ <%= f.email_field :email, autofocus: true, autocomplete: 'email', class: 'form-control' %>
9
+ </div>
10
+
11
+ <div class="form-group">
12
+ <%= f.label :password %>
13
+ <%= f.password_field :password, autocomplete: 'current-password', class: 'form-control' %>
14
+
15
+ <% if @minimum_password_length %>
16
+ <small class="form-text text-muted"><%= t('devise.shared.minimum_password_length', count: @minimum_password_length) %></small>
17
+ <% end %>
18
+ </div>
19
+
20
+ <div class="form-group">
21
+ <%= f.label :password_confirmation %>
22
+ <%= f.password_field :password_confirmation, autocomplete: 'current-password', class: 'form-control' %>
23
+ </div>
24
+
25
+ <div class="form-group">
26
+ <%= f.submit t('.sign_up'), class: 'btn btn-primary' %>
27
+ </div>
28
+ <% end %>
29
+
30
+ <%= render 'devise/shared/links' %>
@@ -0,0 +1,28 @@
1
+ <h1><%= t('.sign_in') %></h1>
2
+
3
+ <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
4
+ <div class="form-group">
5
+ <%= f.label :email %>
6
+ <%= f.email_field :email, autofocus: true, autocomplete: 'email', class: 'form-control' %>
7
+ </div>
8
+
9
+ <div class="form-group">
10
+ <%= f.label :password %>
11
+ <%= f.password_field :password, autocomplete: 'current-password', class: 'form-control' %>
12
+ </div>
13
+
14
+ <% if devise_mapping.rememberable? %>
15
+ <div class="form-group form-check">
16
+ <%= f.check_box :remember_me, class: 'form-check-input' %>
17
+ <%= f.label :remember_me, class: 'form-check-label' do %>
18
+ <%= resource.class.human_attribute_name('remember_me') %>
19
+ <% end %>
20
+ </div>
21
+ <% end %>
22
+
23
+ <div class="form-group">
24
+ <%= f.submit t('.sign_in'), class: 'btn btn-primary' %>
25
+ </div>
26
+ <% end %>
27
+
28
+ <%= render 'devise/shared/links' %>
@@ -0,0 +1,27 @@
1
+ <div class="form-group">
2
+ <%- if controller_name != 'sessions' %>
3
+ <%= link_to t(".sign_in"), new_session_path(resource_name) %><br />
4
+ <% end -%>
5
+
6
+ <%- if devise_mapping.registerable? && controller_name != 'registrations' %>
7
+ <%= link_to t(".sign_up"), new_registration_path(resource_name) %><br />
8
+ <% end -%>
9
+
10
+ <%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
11
+ <%= link_to t(".forgot_your_password"), new_password_path(resource_name) %><br />
12
+ <% end -%>
13
+
14
+ <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
15
+ <%= link_to t('.didn_t_receive_confirmation_instructions'), new_confirmation_path(resource_name) %><br />
16
+ <% end -%>
17
+
18
+ <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
19
+ <%= link_to t('.didn_t_receive_unlock_instructions'), new_unlock_path(resource_name) %><br />
20
+ <% end -%>
21
+
22
+ <%- if devise_mapping.omniauthable? %>
23
+ <%- resource_class.omniauth_providers.each do |provider| %>
24
+ <%= link_to t('.sign_in_with_provider', provider: OmniAuth::Utils.camelize(provider)), omniauth_authorize_path(resource_name, provider) %><br />
25
+ <% end -%>
26
+ <% end -%>
27
+ </div>
@@ -0,0 +1,16 @@
1
+ <h1><%= t('.resend_unlock_instructions') %></h1>
2
+
3
+ <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
4
+ <%= bootstrap_devise_error_messages! %>
5
+
6
+ <div class="form-group">
7
+ <%= f.label :email %>
8
+ <%= f.email_field :email, autofocus: true, autocomplete: 'email', class: 'form-control' %>
9
+ </div>
10
+
11
+ <div class="form-group">
12
+ <%= f.submit t('.resend_unlock_instructions'), class: 'btn btn-primary'%>
13
+ </div>
14
+ <% end %>
15
+
16
+ <%= render 'devise/shared/links' %>
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ json.extract! document_access, :id, :kithe_model_id, :institution_code, :access_url, :created_at, :updated_at
4
+ json.url document_access_url(document_access, format: :json)
@@ -0,0 +1,17 @@
1
+
2
+ <%= simple_form_for [@document, @document_access] do |f| %>
3
+ <%= f.error_notification %>
4
+ <%= f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present? %>
5
+
6
+ <div class="form-inputs">
7
+ <%= f.input :friendlier_id, input_html: { value: @document.friendlier_id, readonly: true } %>
8
+
9
+ <%= f.input :institution_code, collection: b1g_institution_codes, label_method: ->(obj){ "#{obj[0]} - #{obj[1]}" }, value_method: :first, include_blank: true, input_html: { autofocus: true } %>
10
+
11
+ <%= f.input :access_url %>
12
+ </div>
13
+
14
+ <div class="form-actions">
15
+ <%= f.button :submit, 'Create Access URL', {class: 'btn btn-primary'} %>
16
+ </div>
17
+ <% end %>
@@ -0,0 +1,70 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <h1 style="width:100%; border-bottom:dotted;" class="mb-4">
4
+ Document &middot; Destroy Document Access Links
5
+ <% if params[:document_id] %>
6
+ <%= link_to '+ New Access URL', new_document_document_access_path(@document), { class: 'btn btn-primary float-right' } %>
7
+ <% end %>
8
+ </h1>
9
+
10
+ <div class="row">
11
+ <div class="col-6">
12
+ <% if params[:document_id] %>
13
+ <h2 class='h3'><%= @document.title %></h2>
14
+ <% else %>
15
+ <h2 class='h3'>Destroy Multiple Document Access Links</h2>
16
+ <% end %>
17
+
18
+ <p class="alert alert-danger" role="alert">
19
+ <strong>Warning:</strong> All matching Document Access Links will be destroyed. There is <strong>NO UNDO</strong> here.
20
+ </p>
21
+ <h3 class='h4'>Upload a CSV File</h3>
22
+
23
+ <%= simple_form_for DocumentAccess.new, url: destroy_all_document_accesses_path, method: :post, multipart: true do |f| %>
24
+ <div class="form-group">
25
+ <div class="form-inputs">
26
+ <%= f.simple_fields_for :assets do |asset_fields| %>
27
+ <%= asset_fields.input :file, as: :file, input_html: {} %>
28
+ <%- end %>
29
+ </div>
30
+
31
+ <div class="form-actions">
32
+ <%= submit_tag "- Destroy All", {class: 'btn btn-danger'} %>
33
+ </div>
34
+ </div>
35
+ <% end %>
36
+ </div>
37
+ <div class="col-6">
38
+ <h4>Example CSV File</h4>
39
+ <table class="table table-bordered">
40
+ <thead>
41
+ <tr>
42
+ <th>id</th>
43
+ <th>friendlier_id</th>
44
+ </tr>
45
+ </thead>
46
+ <tbody>
47
+ <tr>
48
+ <td>1</td>
49
+ <td>a35bf4a4-e3ef-483e-98c4-7ea1b04b0f0d</td>
50
+ </tr>
51
+ <tr>
52
+ <td>207</td>
53
+ <td>a35bf4a4-e3ef-483e-98c4-7ea1b04b0f0d</td>
54
+ </tr>
55
+ <tr>
56
+ <td>...</td>
57
+ <td>...</td>
58
+ </tr>
59
+ </tbody>
60
+ </table>
61
+
62
+ <h5>CSV File Column Definitions</h5>
63
+ <dl>
64
+ <dt>id</dt>
65
+ <dd>The database table row identifier</dd>
66
+ <dt>friendlier_id</dt>
67
+ <dd>The associated GEOMG document's friendlier id</dd>
68
+ </dl>
69
+ </div>
70
+ </div>
@@ -0,0 +1,5 @@
1
+ <h1>Editing Document Access</h1>
2
+
3
+ <%= render 'form', document_access: @document_access %>
4
+
5
+ <%= link_to 'Back', document_document_accesses_path(@document) %>
@@ -0,0 +1,70 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <h1 style="width:100%; border-bottom:dotted;" class="mb-4">
4
+ Document &middot; Institutional Access
5
+ <% if params[:document_id] %>
6
+ <%= link_to '+ New Access URL', new_document_document_access_path(@document), { class: 'btn btn-primary float-right' } %>
7
+ <% end %>
8
+ </h1>
9
+
10
+ <div class="row">
11
+ <div class="col-6">
12
+ <% if params[:document_id] %>
13
+ <h2 class='h3'><%= @document.title %></h2>
14
+ <% else %>
15
+ <h2 class='h3'>Import for Multiple Documents</h2>
16
+ <% end %>
17
+
18
+ <h3 class='h4'>Import a CSV File</h3>
19
+ <%= simple_form_for DocumentAccess.new, url: import_document_accesses_path, method: :post, multipart: true do |f| %>
20
+ <div class="form-inputs">
21
+ <%= f.simple_fields_for :assets do |asset_fields| %>
22
+ <%= asset_fields.input :file, as: :file, input_html: {} %>
23
+ <%- end %>
24
+ </div>
25
+
26
+ <div class="form-actions">
27
+ <%= submit_tag "Import CSV", {class: 'btn btn-primary'} %>
28
+ </div>
29
+ <% end %>
30
+ </div>
31
+ <div class="col-6">
32
+ <h4>Example CSV File</h4>
33
+ <table class="table table-bordered">
34
+ <thead>
35
+ <tr>
36
+ <th>friendlier_id</th>
37
+ <th>institution_code</th>
38
+ <th>access_url</th>
39
+ </tr>
40
+ </thead>
41
+ <tbody>
42
+ <tr>
43
+ <td>999-0010</td>
44
+ <td>12</td>
45
+ <td>http://pi.lib.uchicago.edu/1001/cat/bib/11538549</td>
46
+ </tr>
47
+ <tr>
48
+ <td>999-0010-alabama</td>
49
+ <td>12</td>
50
+ <td>http://pi.lib.uchicago.edu/1001/cat/bib/11538549</td>
51
+ </tr>
52
+ <tr>
53
+ <td>...</td>
54
+ <td>...</td>
55
+ <td>...</td>
56
+ </tr>
57
+ </tbody>
58
+ </table>
59
+
60
+ <h5>CSV File Column Definitions</h5>
61
+ <dl>
62
+ <dt>friendlier_id</dt>
63
+ <dd>The associated GEOMG document's friendlier id</dd>
64
+ <dt>institution_code</dt>
65
+ <dd>The <a target="_blank" href="https://github.com/geobtaa/geomg/blob/be1b6ac6628bd8f537ab10ecb88e5f4804540e2b/app/helpers/application_helper.rb#L28-L44">code</a> for the institution</dd>
66
+ <dt>access_url</dt>
67
+ <dd>The URL for the Access link</dd>
68
+ </dl>
69
+ </div>
70
+ </div>