geoblacklight_admin 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.editorconfig +18 -0
- data/.gitignore +75 -0
- data/.standard.yml +4 -0
- data/Gemfile +59 -0
- data/LICENSE +21 -0
- data/README.md +84 -0
- data/Rakefile +72 -0
- data/app/assets/images/.keep +0 -0
- data/app/assets/images/aerial_photo.jpg +0 -0
- data/app/assets/images/archive-solid.svg +1 -0
- data/app/assets/images/bookmark-regular.svg +1 -0
- data/app/assets/images/bookmark-solid.svg +1 -0
- data/app/assets/images/btaa-logo.jpg +0 -0
- data/app/assets/images/cloud-download-alt-solid.svg +1 -0
- data/app/assets/images/file-import-solid.svg +1 -0
- data/app/assets/images/trash-alt-solid.svg +1 -0
- data/app/assets/javascripts/geoblacklight_admin/chosen.js +4 -0
- data/app/assets/javascripts/geoblacklight_admin/date_range_picker.js +173 -0
- data/app/assets/javascripts/geoblacklight_admin/datepicker.js +22 -0
- data/app/assets/javascripts/geoblacklight_admin/elements.js +38 -0
- data/app/assets/javascripts/geoblacklight_admin/exports.js +3 -0
- data/app/assets/javascripts/geoblacklight_admin/fields.js +11 -0
- data/app/assets/javascripts/geoblacklight_admin/geoblacklight_admin.js +2 -0
- data/app/assets/javascripts/geoblacklight_admin/inputmask.js +4 -0
- data/app/assets/javascripts/geoblacklight_admin/locale.js +5 -0
- data/app/assets/javascripts/geoblacklight_admin/sortable.js +2544 -0
- data/app/assets/javascripts/geoblacklight_admin/tooltips.js +3 -0
- data/app/assets/javascripts/geoblacklight_admin/truncate.js +4 -0
- data/app/assets/javascripts/geoblacklight_admin.js +40 -0
- data/app/assets/stylesheets/geoblacklight_admin/_core.scss +47 -0
- data/app/assets/stylesheets/geoblacklight_admin/modules/_autocomplete.scss +32 -0
- data/app/assets/stylesheets/geoblacklight_admin/modules/_blazer.scss +3 -0
- data/app/assets/stylesheets/geoblacklight_admin/modules/_code.scss +3 -0
- data/app/assets/stylesheets/geoblacklight_admin/modules/_datepicker.scss +477 -0
- data/app/assets/stylesheets/geoblacklight_admin/modules/_elements.scss +3 -0
- data/app/assets/stylesheets/geoblacklight_admin/modules/_forms.scss +28 -0
- data/app/assets/stylesheets/geoblacklight_admin/modules/_icons.scss +15 -0
- data/app/assets/stylesheets/geoblacklight_admin/modules/_nav.scss +9 -0
- data/app/assets/stylesheets/geoblacklight_admin/modules/_tables.scss +4 -0
- data/app/assets/stylesheets/geoblacklight_admin/modules/_toasts.scss +7 -0
- data/app/assets/stylesheets/geoblacklight_admin/modules/_visibility.scss +3 -0
- data/app/assets/stylesheets/geoblacklight_admin/settings/_variables.scss +1 -0
- data/app/channels/export_channel.rb +12 -0
- data/app/controllers/admin/admin_controller.rb +16 -0
- data/app/controllers/admin/advanced_search_controller.rb +365 -0
- data/app/controllers/admin/api_controller.rb +386 -0
- data/app/controllers/admin/bookmarks_controller.rb +68 -0
- data/app/controllers/admin/bulk_actions_controller.rb +94 -0
- data/app/controllers/admin/concerns/.keep +0 -0
- data/app/controllers/admin/concerns/upload_util.rb +8 -0
- data/app/controllers/admin/document_accesses_controller.rb +125 -0
- data/app/controllers/admin/document_assets_controller.rb +198 -0
- data/app/controllers/admin/document_downloads_controller.rb +127 -0
- data/app/controllers/admin/documents_controller.rb +219 -0
- data/app/controllers/admin/elements_controller.rb +81 -0
- data/app/controllers/admin/form_elements_controller.rb +81 -0
- data/app/controllers/admin/ids_controller.rb +379 -0
- data/app/controllers/admin/import_documents_controller.rb +18 -0
- data/app/controllers/admin/imports_controller.rb +105 -0
- data/app/controllers/admin/mappings_controller.rb +95 -0
- data/app/controllers/admin/notifications_controller.rb +51 -0
- data/app/controllers/admin/search_controller.rb +10 -0
- data/app/controllers/admin/users_controller.rb +10 -0
- data/app/helpers/bulk_actions_helper.rb +9 -0
- data/app/helpers/document_helper.rb +60 -0
- data/app/helpers/form_input_helper.rb +73 -0
- data/app/helpers/geoblacklight_admin_helper.rb +118 -0
- data/app/helpers/import_documents_helper.rb +5 -0
- data/app/helpers/mappings_helper.rb +27 -0
- data/app/indexers/document_indexer.rb +34 -0
- data/app/jobs/bulk_action_revert_document_job.rb +49 -0
- data/app/jobs/bulk_action_revert_job.rb +25 -0
- data/app/jobs/bulk_action_run_document_job.rb +42 -0
- data/app/jobs/bulk_action_run_job.rb +27 -0
- data/app/jobs/export_job.rb +72 -0
- data/app/jobs/export_json_job.rb +120 -0
- data/app/jobs/import_document_job.rb +25 -0
- data/app/jobs/import_run_job.rb +33 -0
- data/app/models/active_storage_attachment.rb +5 -0
- data/app/models/active_storage_blob.rb +5 -0
- data/app/models/api_search_builder.rb +12 -0
- data/app/models/application_record.rb +6 -0
- data/app/models/blacklight_api.rb +93 -0
- data/app/models/blacklight_api_facets.rb +15 -0
- data/app/models/blacklight_api_ids.rb +103 -0
- data/app/models/bookmark.rb +17 -0
- data/app/models/bulk_action.rb +88 -0
- data/app/models/bulk_action_document.rb +22 -0
- data/app/models/bulk_action_document_state_machine.rb +16 -0
- data/app/models/bulk_action_document_transition.rb +19 -0
- data/app/models/bulk_action_state_machine.rb +16 -0
- data/app/models/bulk_action_transition.rb +26 -0
- data/app/models/concerns/.keep +0 -0
- data/app/models/document/bbox_validator.rb +70 -0
- data/app/models/document/controlled_lists.rb +104 -0
- data/app/models/document/date_range_validator.rb +63 -0
- data/app/models/document/geom_validator.rb +117 -0
- data/app/models/document/reference.rb +107 -0
- data/app/models/document.rb +264 -0
- data/app/models/document_access.rb +35 -0
- data/app/models/document_download.rb +35 -0
- data/app/models/document_state_machine.rb +14 -0
- data/app/models/document_transition.rb +26 -0
- data/app/models/element.rb +90 -0
- data/app/models/form_control.rb +2 -0
- data/app/models/form_element.rb +19 -0
- data/app/models/form_feature.rb +2 -0
- data/app/models/form_group.rb +2 -0
- data/app/models/form_header.rb +2 -0
- data/app/models/geoblacklight_admin/field_mappings_btaa_aardvark.rb +379 -0
- data/app/models/geoblacklight_admin/field_mappings_gblv1.rb +344 -0
- data/app/models/geoblacklight_admin/iso_language_codes.rb +515 -0
- data/app/models/geoblacklight_admin/schema.rb +194 -0
- data/app/models/geoblacklight_admin.rb +3 -0
- data/app/models/import/csv_duplicates_validator.rb +36 -0
- data/app/models/import/csv_header_validator.rb +24 -0
- data/app/models/import.rb +186 -0
- data/app/models/import_btaa.rb +91 -0
- data/app/models/import_btaa_aardvark.rb +109 -0
- data/app/models/import_document.rb +34 -0
- data/app/models/import_document_state_machine.rb +12 -0
- data/app/models/import_document_transition.rb +19 -0
- data/app/models/import_gblv1.rb +92 -0
- data/app/models/import_state_machine.rb +16 -0
- data/app/models/import_transition.rb +26 -0
- data/app/models/mapping.rb +10 -0
- data/app/models/notification.rb +9 -0
- data/app/models/user.rb +26 -0
- data/app/notifications/export_notification.rb +30 -0
- data/app/services/export_csv_document_access_links_service.rb +47 -0
- data/app/services/export_csv_document_downloads_service.rb +47 -0
- data/app/services/export_csv_service.rb +44 -0
- data/app/services/export_json_service.rb +35 -0
- data/app/services/zip_file_generator.rb +56 -0
- data/app/views/admin/advanced_search/facets.json.jbuilder +80 -0
- data/app/views/admin/advanced_search/index.json.jbuilder +90 -0
- data/app/views/admin/api/_field.json.jbuilder +10 -0
- data/app/views/admin/api/fetch.json.jbuilder +86 -0
- data/app/views/admin/api/index.json.jbuilder +90 -0
- data/app/views/admin/bookmarks/_bookmark.json.jbuilder +4 -0
- data/app/views/admin/bookmarks/create.js.erb +7 -0
- data/app/views/admin/bookmarks/destroy.js.erb +7 -0
- data/app/views/admin/bookmarks/index.html.erb +21 -0
- data/app/views/admin/bookmarks/index.json.jbuilder +3 -0
- data/app/views/admin/bulk_actions/_bulk_action.json.jbuilder +4 -0
- data/app/views/admin/bulk_actions/_form.html.erb +17 -0
- data/app/views/admin/bulk_actions/edit.html.erb +6 -0
- data/app/views/admin/bulk_actions/index.html.erb +54 -0
- data/app/views/admin/bulk_actions/index.json.jbuilder +3 -0
- data/app/views/admin/bulk_actions/new.html.erb +5 -0
- data/app/views/admin/bulk_actions/show.html.erb +100 -0
- data/app/views/admin/bulk_actions/show.json.jbuilder +3 -0
- data/app/views/admin/devise/confirmations/new.html.erb +16 -0
- data/app/views/admin/devise/invitations/edit.html.erb +15 -0
- data/app/views/admin/devise/invitations/new.html.erb +15 -0
- data/app/views/admin/devise/mailer/invitation_instructions.html.erb +11 -0
- data/app/views/admin/devise/mailer/invitation_instructions.text.erb +11 -0
- data/app/views/admin/devise/passwords/edit.html.erb +26 -0
- data/app/views/admin/devise/passwords/new.html.erb +16 -0
- data/app/views/admin/devise/registrations/edit.html.erb +35 -0
- data/app/views/admin/devise/registrations/new.html.erb +30 -0
- data/app/views/admin/devise/sessions/new.html.erb +28 -0
- data/app/views/admin/devise/shared/_links.html.erb +27 -0
- data/app/views/admin/devise/unlocks/new.html.erb +16 -0
- data/app/views/admin/document_accesses/_document_access.json.jbuilder +4 -0
- data/app/views/admin/document_accesses/_form.html.erb +17 -0
- data/app/views/admin/document_accesses/destroy_all.html.erb +70 -0
- data/app/views/admin/document_accesses/edit.html.erb +5 -0
- data/app/views/admin/document_accesses/import.html.erb +70 -0
- data/app/views/admin/document_accesses/index.html.erb +74 -0
- data/app/views/admin/document_accesses/index.json.jbuilder +3 -0
- data/app/views/admin/document_accesses/new.html.erb +6 -0
- data/app/views/admin/document_accesses/show.html.erb +19 -0
- data/app/views/admin/document_accesses/show.json.jbuilder +3 -0
- data/app/views/admin/document_assets/display_attach_form.html.erb +44 -0
- data/app/views/admin/document_assets/index.html.erb +65 -0
- data/app/views/admin/document_downloads/_document_download.json.jbuilder +4 -0
- data/app/views/admin/document_downloads/_form.html.erb +15 -0
- data/app/views/admin/document_downloads/destroy_all.html.erb +70 -0
- data/app/views/admin/document_downloads/edit.html.erb +6 -0
- data/app/views/admin/document_downloads/import.html.erb +74 -0
- data/app/views/admin/document_downloads/index.html.erb +70 -0
- data/app/views/admin/document_downloads/index.json.jbuilder +3 -0
- data/app/views/admin/document_downloads/new.html.erb +5 -0
- data/app/views/admin/document_downloads/show.html.erb +24 -0
- data/app/views/admin/document_downloads/show.json.jbuilder +3 -0
- data/app/views/admin/documents/_document.html.erb +29 -0
- data/app/views/admin/documents/_document_bookmark.html.erb +17 -0
- data/app/views/admin/documents/_document_fields.html.erb +24 -0
- data/app/views/admin/documents/_form.html.erb +49 -0
- data/app/views/admin/documents/_form_control.html.erb +86 -0
- data/app/views/admin/documents/_form_group.html.erb +1 -0
- data/app/views/admin/documents/_form_header.html.erb +1 -0
- data/app/views/admin/documents/_form_nav.html.erb +21 -0
- data/app/views/admin/documents/_json_aardvark.jbuilder +47 -0
- data/app/views/admin/documents/_json_btaa_aardvark.jbuilder +16 -0
- data/app/views/admin/documents/_json_gbl_v1.jbuilder +32 -0
- data/app/views/admin/documents/_result_facets.html.erb +35 -0
- data/app/views/admin/documents/_result_pagination.html.erb +21 -0
- data/app/views/admin/documents/_result_selected_options.html.erb +54 -0
- data/app/views/admin/documents/_result_selection_options.html.erb +10 -0
- data/app/views/admin/documents/_result_toggle.html.erb +13 -0
- data/app/views/admin/documents/edit.html.erb +7 -0
- data/app/views/admin/documents/features/_assets.html.erb +3 -0
- data/app/views/admin/documents/features/_institutional_access_links.html.erb +3 -0
- data/app/views/admin/documents/features/_multiple_download_links.html.erb +27 -0
- data/app/views/admin/documents/fetch.json_aardvark.jbuilder +9 -0
- data/app/views/admin/documents/fetch.json_btaa_aardvark.jbuilder +9 -0
- data/app/views/admin/documents/fetch.json_gbl_v1.jbuilder +9 -0
- data/app/views/admin/documents/index.html.erb +49 -0
- data/app/views/admin/documents/index.json_aardvark.jbuilder +9 -0
- data/app/views/admin/documents/index.json_btaa_aardvark.jbuilder +9 -0
- data/app/views/admin/documents/index.json_gbl_v1.jbuilder +9 -0
- data/app/views/admin/documents/show.json_aardvark.jbuilder +3 -0
- data/app/views/admin/documents/show.json_btaa_aardvark.jbuilder +3 -0
- data/app/views/admin/documents/show.json_gbl_v1.jbuilder +3 -0
- data/app/views/admin/documents/versions.html.erb +110 -0
- data/app/views/admin/elements/_element.json.jbuilder +2 -0
- data/app/views/admin/elements/_form.html.erb +45 -0
- data/app/views/admin/elements/edit.html.erb +6 -0
- data/app/views/admin/elements/index.html.erb +68 -0
- data/app/views/admin/elements/index.json.jbuilder +1 -0
- data/app/views/admin/elements/new.html.erb +5 -0
- data/app/views/admin/elements/show.html.erb +121 -0
- data/app/views/admin/elements/show.json.jbuilder +1 -0
- data/app/views/admin/form_elements/_form.html.erb +46 -0
- data/app/views/admin/form_elements/_form_element.json.jbuilder +2 -0
- data/app/views/admin/form_elements/edit.html.erb +6 -0
- data/app/views/admin/form_elements/index.html.erb +49 -0
- data/app/views/admin/form_elements/index.json.jbuilder +1 -0
- data/app/views/admin/form_elements/new.html.erb +5 -0
- data/app/views/admin/form_elements/show.html.erb +19 -0
- data/app/views/admin/form_elements/show.json.jbuilder +1 -0
- data/app/views/admin/ids/fetch.json.jbuilder +86 -0
- data/app/views/admin/ids/index.json.jbuilder +41 -0
- data/app/views/admin/import_documents/show.html.haml +20 -0
- data/app/views/admin/imports/_form.html.erb +27 -0
- data/app/views/admin/imports/_import.json.jbuilder +4 -0
- data/app/views/admin/imports/_show_failed_tab.html.erb +37 -0
- data/app/views/admin/imports/_show_success_tab.html.erb +31 -0
- data/app/views/admin/imports/edit.html.erb +8 -0
- data/app/views/admin/imports/index.html.erb +56 -0
- data/app/views/admin/imports/index.json.jbuilder +3 -0
- data/app/views/admin/imports/new.html.erb +7 -0
- data/app/views/admin/imports/show.html.erb +123 -0
- data/app/views/admin/imports/show.json.jbuilder +3 -0
- data/app/views/admin/layouts/application.html.erb +30 -0
- data/app/views/admin/layouts/blazer/application.html.erb +23 -0
- data/app/views/admin/layouts/mailer.html.erb +13 -0
- data/app/views/admin/layouts/mailer.text.erb +1 -0
- data/app/views/admin/mappings/_form.html.erb +17 -0
- data/app/views/admin/mappings/_mapping.json.jbuilder +4 -0
- data/app/views/admin/mappings/edit.html.erb +6 -0
- data/app/views/admin/mappings/index.html.erb +37 -0
- data/app/views/admin/mappings/index.json.jbuilder +3 -0
- data/app/views/admin/mappings/new.html.erb +5 -0
- data/app/views/admin/mappings/show.html.erb +27 -0
- data/app/views/admin/mappings/show.json.jbuilder +3 -0
- data/app/views/admin/notifications/_notification.html.haml +31 -0
- data/app/views/admin/notifications/index.html.erb +54 -0
- data/app/views/admin/notifications/update.js.erb +7 -0
- data/app/views/admin/search/index.html.erb +38 -0
- data/app/views/admin/shared/_flash_messages.html.erb +5 -0
- data/app/views/admin/shared/_footer.html.erb +56 -0
- data/app/views/admin/shared/_js_behaviors.html.erb +147 -0
- data/app/views/admin/shared/_navbar.html.erb +78 -0
- data/app/views/admin/shared/_navbar_blazer.html.erb +42 -0
- data/app/views/admin/shared/_schema_timestamp.html.erb +16 -0
- data/app/views/admin/shared/_toast.html.erb +13 -0
- data/app/views/admin/users/index.html.erb +21 -0
- data/config/authorities/formats.yml +25 -0
- data/config/authorities/languages.yml +50 -0
- data/config/authorities/resource_type.yml +82 -0
- data/config/blazer.yml +79 -0
- data/config/gbl_v1_schema.json +118 -0
- data/config/geomg_aardvark_schema.json +211 -0
- data/config/geomg_schema.json +123 -0
- data/config/locales/devise.en.yml +65 -0
- data/config/locales/devise_invitable.en.yml +31 -0
- data/config/locales/documents.en.yml +189 -0
- data/config/locales/en.yml +51 -0
- data/config/locales/geoblacklight.en.yml +178 -0
- data/config/locales/simple_form.en.yml +31 -0
- data/config/routes.rb +162 -0
- data/db/migrate/20230316183001_add_geoblacklight_admin.rb +399 -0
- data/db/seeds.rb +26 -0
- data/db/seeds_elements.csv +56 -0
- data/db/seeds_elements.numbers +0 -0
- data/db/seeds_form_elements.csv +71 -0
- data/db/seeds_form_elements.numbers +0 -0
- data/db/structure.sql +816 -0
- data/geoblacklight_admin.gemspec +67 -0
- data/lib/generators/geoblacklight_admin/config_generator.rb +336 -0
- data/lib/generators/geoblacklight_admin/example_docs_generator.rb +18 -0
- data/lib/generators/geoblacklight_admin/helpers_generator.rb +18 -0
- data/lib/generators/geoblacklight_admin/install_generator.rb +60 -0
- data/lib/generators/geoblacklight_admin/jobs_generator.rb +21 -0
- data/lib/generators/geoblacklight_admin/models_generator.rb +23 -0
- data/lib/generators/geoblacklight_admin/templates/.env.development.example +28 -0
- data/lib/generators/geoblacklight_admin/templates/.solr_wrapper.yml +7 -0
- data/lib/generators/geoblacklight_admin/templates/_user_util_links.html.erb +30 -0
- data/lib/generators/geoblacklight_admin/templates/config/database.yml +18 -0
- data/lib/generators/geoblacklight_admin/templates/config/geomg_aardvark_schema.json +211 -0
- data/lib/generators/geoblacklight_admin/templates/config/initializers/geoblacklight_admin.rb +25 -0
- data/lib/generators/geoblacklight_admin/templates/config/initializers/kithe.rb +31 -0
- data/lib/generators/geoblacklight_admin/templates/config/initializers/pagy.rb +158 -0
- data/lib/generators/geoblacklight_admin/templates/config/initializers/statesman.rb +7 -0
- data/lib/generators/geoblacklight_admin/templates/javascript/channels/consumer.js +6 -0
- data/lib/generators/geoblacklight_admin/templates/javascript/channels/export_channel.js +30 -0
- data/lib/generators/geoblacklight_admin/templates/javascript/channels/index.js +5 -0
- data/lib/generators/geoblacklight_admin/templates/javascript/controllers/application_controller.js +17 -0
- data/lib/generators/geoblacklight_admin/templates/javascript/controllers/document_controller.js +26 -0
- data/lib/generators/geoblacklight_admin/templates/javascript/controllers/index.js +10 -0
- data/lib/generators/geoblacklight_admin/templates/javascript/controllers/results_controller.js +310 -0
- data/lib/generators/geoblacklight_admin/templates/javascript/packs/application.js +23 -0
- data/lib/generators/geoblacklight_admin/templates/javascript/src/js/admin/qa_autocomplete.js +1134 -0
- data/lib/generators/geoblacklight_admin/templates/package.json +32 -0
- data/lib/generators/geoblacklight_admin/templates/solr/README-geoblacklight-solr-development.txt +3 -0
- data/lib/generators/geoblacklight_admin/templates/solr/conf/_rest_managed.json +3 -0
- data/lib/generators/geoblacklight_admin/templates/solr/conf/admin-extra.html +31 -0
- data/lib/generators/geoblacklight_admin/templates/solr/conf/core.properties +5 -0
- data/lib/generators/geoblacklight_admin/templates/solr/conf/elevate.xml +36 -0
- data/lib/generators/geoblacklight_admin/templates/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
- data/lib/generators/geoblacklight_admin/templates/solr/conf/protwords.txt +21 -0
- data/lib/generators/geoblacklight_admin/templates/solr/conf/schema.xml +229 -0
- data/lib/generators/geoblacklight_admin/templates/solr/conf/scripts.conf +24 -0
- data/lib/generators/geoblacklight_admin/templates/solr/conf/solrconfig.xml +266 -0
- data/lib/generators/geoblacklight_admin/templates/solr/conf/spellings.txt +2 -0
- data/lib/generators/geoblacklight_admin/templates/solr/conf/stopwords.txt +58 -0
- data/lib/generators/geoblacklight_admin/templates/solr/conf/stopwords_en.txt +58 -0
- data/lib/generators/geoblacklight_admin/templates/solr/conf/synonyms.txt +43 -0
- data/lib/generators/geoblacklight_admin/templates/solr/conf/xslt/example.xsl +132 -0
- data/lib/generators/geoblacklight_admin/templates/solr/conf/xslt/example_atom.xsl +67 -0
- data/lib/generators/geoblacklight_admin/templates/solr/conf/xslt/example_rss.xsl +66 -0
- data/lib/generators/geoblacklight_admin/templates/solr/conf/xslt/luke.xsl +337 -0
- data/lib/generators/geoblacklight_admin/templates/solr/snapshots/.keep +0 -0
- data/lib/generators/geoblacklight_admin/views_generator.rb +19 -0
- data/lib/geoblacklight_admin/engine.rb +20 -0
- data/lib/geoblacklight_admin/version.rb +5 -0
- data/lib/geoblacklight_admin.rb +7 -0
- data/lib/tasks/.keep +0 -0
- data/lib/tasks/geoblacklight_admin.rake +209 -0
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +35 -0
- data/template.rb +16 -0
- metadata +1037 -0
@@ -0,0 +1,86 @@
|
|
1
|
+
<% # Input Options hash %>
|
2
|
+
<%- options = Hash.new %>
|
3
|
+
<%- options[:hint] = element.data_entry_hint if element.data_entry_hint.present? %>
|
4
|
+
<%- options[:as] = "boolean" if element.field_type == "boolean" %>
|
5
|
+
<%- options[:required] = "true" if element.required? %>
|
6
|
+
<%- options[:input_html] = { data: { js: element.js_behaviors }} if element.js_behaviors.present? %>
|
7
|
+
<%- options[:label] = element.label %>
|
8
|
+
<%- html_attributes = Hash.new %>
|
9
|
+
<%- html_attributes[:placeholder] = element.placeholder_text if element.placeholder_text.present? %>
|
10
|
+
<%- element.html_attributes.each{ |key,value| html_attributes[key] = value } if element.html_attributes.present? %>
|
11
|
+
<%- options[:html_attributes] = html_attributes %>
|
12
|
+
|
13
|
+
<% # @TODO: Check the local application file system for a named partial, %>
|
14
|
+
<% # if we find one there render it, if not render via the logic below... %>
|
15
|
+
|
16
|
+
<% # Title is a special case - saved in the database outside of JSON Attributes %>
|
17
|
+
<% if element.solr_field == "dct_title_s" %>
|
18
|
+
<%= f.input :title, hint: "Theme: city, state, temporal coverage" %>
|
19
|
+
|
20
|
+
<% # Created At and Updated At are a special case - saved in the database outside of JSON Attributes %>
|
21
|
+
<% elsif element.solr_field == "date_created_dtsi" %>
|
22
|
+
<% if @document.persisted? %>
|
23
|
+
<%= f.input :created_at, as: 'string', label: "Created At", input_html: { disabled: true } %>
|
24
|
+
<% end %>
|
25
|
+
<% elsif element.solr_field == "date_modified_dtsi" %>
|
26
|
+
<% if @document.persisted? %>
|
27
|
+
<%= f.input :updated_at, as: 'string', label: "Last Updated", input_html: { disabled: true } %>
|
28
|
+
<% end %>
|
29
|
+
|
30
|
+
<% # Publication State is a special case - saved in the database outside of JSON Attributes %>
|
31
|
+
<% elsif element.solr_field == "b1g_publication_state_s" %>
|
32
|
+
<% if @document.persisted? %>
|
33
|
+
<%= f.input :publication_state, label: 'Publication State', required: true, collection: Document::ControlledLists::PUBLICATION_STATE %>
|
34
|
+
<% else %>
|
35
|
+
<%= f.hidden_field :publication_state %>
|
36
|
+
<% end %>
|
37
|
+
|
38
|
+
<% # References are a special, special case %>
|
39
|
+
<% elsif element.solr_field == 'dct_references_s' %>
|
40
|
+
<%= f.repeatable_attr_input(element.solr_field.to_sym, build: :at_least_one, html_attributes: options[:html_attributes], simple_form_input_args: { label: element.label }) do |sub_form| %>
|
41
|
+
<%= category_and_value(sub_form, category_list: Document::Reference::REFERENCE_VALUES.keys) %>
|
42
|
+
<% end %>
|
43
|
+
|
44
|
+
<% elsif element.repeatable? %>
|
45
|
+
|
46
|
+
<% # Text Fields %>
|
47
|
+
<% if element.field_type == 'text' %>
|
48
|
+
<%= f.repeatable_attr_input(element.solr_field.to_sym, build: :at_least_one, html_attributes: options[:html_attributes], simple_form_input_args: { label: element.label }) do |input_name, value| %>
|
49
|
+
<div class="form-group">
|
50
|
+
<%= f.input_field element.solr_field.to_sym, name: input_name, value: value, as: :text, class: "form-control", rows: 4 %>
|
51
|
+
</div>
|
52
|
+
<% end %>
|
53
|
+
|
54
|
+
<% # Autocomplete - Language %>
|
55
|
+
<% elsif element.solr_field == 'dct_language_sm' %>
|
56
|
+
<%= f.repeatable_attr_input element.solr_field.to_sym, build: :at_least_one, html_attributes: { "data-scihist-qa-autocomplete" => qa_search_vocab_path("local", "languages")}, simple_form_input_args: { label: element.label } %>
|
57
|
+
|
58
|
+
<% # Autocomplete - Resource Type %>
|
59
|
+
<% elsif element.solr_field == 'gbl_resourceType_sm' %>
|
60
|
+
<%= f.repeatable_attr_input element.solr_field.to_sym, build: :at_least_one, html_attributes: { "data-scihist-qa-autocomplete" => qa_search_vocab_path("local", "resource_type")}, simple_form_input_args: { label: element.label } %>
|
61
|
+
|
62
|
+
<% # Local Controlled Vocabularies %>
|
63
|
+
<% elsif element.controlled_vocabulary.present? %>
|
64
|
+
<%= f.repeatable_attr_input element.solr_field.to_sym, build: :at_least_one, html_attributes: options[:html_attributes], simple_form_input_args: { label: element.label } do |input_name, value| %>
|
65
|
+
<%= f.input_field element.solr_field.to_sym, selected: value, include_blank: true, id: nil,
|
66
|
+
collection: "Document::ControlledLists::#{element.constantized_label}".constantize,
|
67
|
+
name: input_name,
|
68
|
+
class: "form-control input-primitive" %>
|
69
|
+
<% end %>
|
70
|
+
|
71
|
+
<% # Simple Repeatable Elements %>
|
72
|
+
<% else %>
|
73
|
+
<%= f.repeatable_attr_input element.solr_field.to_sym, build: :at_least_one, html_attributes: options[:html_attributes], simple_form_input_args: { label: element.label } %>
|
74
|
+
<% end %>
|
75
|
+
|
76
|
+
<% else %>
|
77
|
+
<% # Local %>
|
78
|
+
<% if element.controlled_vocabulary? && element.js_behaviors != 'autocomplete' %>
|
79
|
+
<%= f.input element.solr_field.to_sym, collection: "Document::ControlledLists::#{element.constantized_label}".constantize %>
|
80
|
+
<% elsif element.controlled_vocabulary? && element.js_behaviors == 'autocomplete' %>
|
81
|
+
<%= f.input element.solr_field.to_sym, :input_html => { :data => { "scihist-qa-autocomplete" => qa_search_vocab_path("local", element.controlled_vocabulary)}}, label: element.label %>
|
82
|
+
<% else %>
|
83
|
+
<% # Simple String Fields %>
|
84
|
+
<%= f.input element.solr_field.to_sym, options %>
|
85
|
+
<% end %>
|
86
|
+
<% end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<h3 id="<%= form_element.label.parameterize %>" class="grouping"><%= form_element.label %></h3>
|
@@ -0,0 +1 @@
|
|
1
|
+
<h2 id="<%= form_element.label.parameterize %>"><%= form_element.label %></h2>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<div class="make-me-sticky mt-4 ml-4">
|
2
|
+
<nav class="nav flex-column ml-4 mt-6">
|
3
|
+
<strong class="mt-4"><%= link_to "View in Geoportal", blacklight_link(@document), { class: 'mt-6', target: :_blank } %></strong>
|
4
|
+
|
5
|
+
<%- form_elements = FormElement.all.order(position: :asc) %>
|
6
|
+
<%- form_elements.each do |form_element| %>
|
7
|
+
<% if form_element.kind_of? FormHeader %>
|
8
|
+
<strong class="mt-2"><a data-controller="scroll-to" class="mt-4" href="#<%= form_element.label.parameterize(separator: '-') %>"><%= form_element.label %></a></strong>
|
9
|
+
<% end %>
|
10
|
+
<% if form_element.kind_of? FormGroup %>
|
11
|
+
<a data-controller="scroll-to" class="ml-2" href="#<%= form_element.label.parameterize(separator: '-') %>"><%= form_element.label %></a>
|
12
|
+
<% end %>
|
13
|
+
<% end %>
|
14
|
+
|
15
|
+
<% if @document.persisted? %>
|
16
|
+
<%= link_to "Institutional Access Links", admin_document_document_accesses_url(@document), class: "ml-2" %>
|
17
|
+
<%= link_to "Multiple Download Links", admin_document_document_downloads_url(@document), class: "ml-2" %>
|
18
|
+
<%= link_to "Additional Assets", admin_document_document_assets_url(@document), class: "ml-2" %>
|
19
|
+
<% end %>
|
20
|
+
</nav>
|
21
|
+
</div>
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# See GBL Aardvark Schema
|
4
|
+
# https://docs.google.com/spreadsheets/d/1QQjUzRe8YdPGKK4h0GYoNPTow2zZ1f0KFA0zzZyHAsk/edit?ts=602d52f2#gid=252925024
|
5
|
+
|
6
|
+
# Schema
|
7
|
+
json.dct_title_s no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:title])
|
8
|
+
json.dct_alternative_sm no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:alternative_title])
|
9
|
+
json.dct_description_sm no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:description])
|
10
|
+
json.dct_language_sm no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:language])
|
11
|
+
json.dct_creator_sm no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:creator])
|
12
|
+
json.dct_publisher_sm no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:publisher])
|
13
|
+
json.schema_provider_s no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:provider])
|
14
|
+
json.gbl_resourceClass_sm no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:resource_class])
|
15
|
+
json.gbl_resourceType_sm no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:resource_type])
|
16
|
+
json.dct_subject_sm no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:subject])
|
17
|
+
json.dcat_theme_sm no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:theme])
|
18
|
+
json.dcat_keyword_sm no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:keyword])
|
19
|
+
json.dct_temporal_sm no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:temporal_coverage])
|
20
|
+
json.dct_issued_s no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:date_issued])
|
21
|
+
json.gbl_indexYear_im no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:index_year])
|
22
|
+
json.gbl_dateRange_drsim no_json_blanks document.date_range_json
|
23
|
+
json.dct_spatial_sm no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:spatial_coverage])
|
24
|
+
json.locn_geometry no_json_blanks document.derive_locn_geometry
|
25
|
+
json.dcat_bbox no_json_blanks document.derive_dcat_bbox
|
26
|
+
json.dcat_centroid no_json_blanks document.derive_dcat_centroid
|
27
|
+
json.dct_relation_sm no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:relation])
|
28
|
+
json.pcdm_memberOf_sm no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:member_of])
|
29
|
+
json.dct_isPartOf_sm no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:is_part_of])
|
30
|
+
json.dct_source_sm no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:source])
|
31
|
+
json.dct_isVersionOf_sm no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:is_version_of])
|
32
|
+
json.dct_replaces_sm no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:replaces])
|
33
|
+
json.dct_isReplacedBy_sm no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:is_replaced_by])
|
34
|
+
json.dct_rights_sm no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:rights])
|
35
|
+
json.dct_rightsHolder_sm no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:rights_holder])
|
36
|
+
json.dct_license_sm no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:license])
|
37
|
+
json.dct_accessRights_s no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:access_rights])
|
38
|
+
json.dct_format_s no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:format])
|
39
|
+
json.gbl_fileSize_s no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:file_size])
|
40
|
+
json.gbl_wxsIdentifier_s no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:wxs_identifier])
|
41
|
+
json.dct_references_s no_json_blanks document.references_json
|
42
|
+
json.id no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:id])
|
43
|
+
json.dct_identifier_sm no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:identifier])
|
44
|
+
json.gbl_mdModified_dt no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:updated_at])
|
45
|
+
json.gbl_mdVersion_s no_json_blanks "Aardvark"
|
46
|
+
json.gbl_suppressed_b no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:suppressed_record])
|
47
|
+
json.gbl_georeferenced_b no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:georeferenced])
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Required
|
4
|
+
json.set! :gbl_mdVersion_s, "BTAA Aardvark"
|
5
|
+
|
6
|
+
Element.exportable.each do |elm|
|
7
|
+
if document.send(elm.export_value).is_a?(Array)
|
8
|
+
if document.send(elm.export_value).any?(&:present?)
|
9
|
+
json.set! elm.solr_field.to_s.to_sym, document.send(elm.export_value)
|
10
|
+
end
|
11
|
+
else
|
12
|
+
unless document.send(elm.export_value).blank?
|
13
|
+
json.set! elm.solr_field.to_s.to_sym, document.send(elm.export_value)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# See OpenGeoMetadata Legacy Versions
|
4
|
+
# https://opengeometadata.org/docs/gbl-1.0
|
5
|
+
|
6
|
+
# Required
|
7
|
+
json.geoblacklight_version "1.0"
|
8
|
+
json.dc_identifier_s no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:identifier]).join("|")
|
9
|
+
json.dc_rights_s no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:access_rights])
|
10
|
+
json.dc_title_s no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:title])
|
11
|
+
json.dct_provenance_s no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:provider])
|
12
|
+
json.layer_slug_s no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:id])
|
13
|
+
json.solr_geom no_json_blanks document.derive_dcat_bbox
|
14
|
+
|
15
|
+
# Recommended
|
16
|
+
json.solr_year_i no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:index_year])&.first
|
17
|
+
json.dc_creator_sm no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:creator])
|
18
|
+
json.dc_description_s no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:description]).join("|")
|
19
|
+
json.dc_format_s no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:format])
|
20
|
+
json.dc_subject_sm no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:subject])
|
21
|
+
json.dct_references_s no_json_blanks document.references_json
|
22
|
+
json.dct_spatial_sm no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:spatial_coverage])
|
23
|
+
json.layer_modified_dt no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:updated_at])
|
24
|
+
|
25
|
+
# Optional
|
26
|
+
json.dc_language_sm no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:language])
|
27
|
+
json.dc_publisher_s no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:publisher]).join("|")
|
28
|
+
json.dc_source_sm no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:source])
|
29
|
+
json.dct_issued_s no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:date_issued])
|
30
|
+
json.dct_temporal_sm no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:temporal_coverage])
|
31
|
+
json.layer_id_s no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:wxs_identifier])
|
32
|
+
json.suppressed_b no_json_blanks document.send(GeoblacklightAdmin::Schema.instance.solr_fields[:suppressed_record])
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<%= form_with url: '/documents', method: :get, local: true do |form| %>
|
2
|
+
<div class="input-group mb-3" style="width:300px">
|
3
|
+
<%= form.text_field("daterange", { class: 'form-control', placeholder: 'Date range filter', size: 24, 'aria-label': "Date range filter", value: params['daterange'] }) %>
|
4
|
+
<%= params_as_hidden_fields(
|
5
|
+
params
|
6
|
+
.to_hash
|
7
|
+
.with_indifferent_access
|
8
|
+
.except(:daterange, :controller, :action, :commit)
|
9
|
+
) %>
|
10
|
+
<div class="input-group-append">
|
11
|
+
<%= form.submit 'Go', class: 'btn btn-outline-secondary' %>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
<% end %>
|
15
|
+
|
16
|
+
<% if @documents.facets.present? %>
|
17
|
+
<% @documents.facets.each do |facet| %>
|
18
|
+
<% if facet['type'] == 'facet' %>
|
19
|
+
<%- next if ['b1g_code_s', 'dct_isPartOf_sm'].include?(facet['id']) %>
|
20
|
+
<h3 class="h5"><%= facet['attributes']['label'] %></h3>
|
21
|
+
<ul class="list-unstyled">
|
22
|
+
<%- facet['attributes']['items'].each do |item| %>
|
23
|
+
<% agg = link_from_api(item) %>
|
24
|
+
<li>
|
25
|
+
<%= link_to agg[:link] do %>
|
26
|
+
<%= agg[:action] == 'add' ? "+" : "-" %>
|
27
|
+
<%= item['attributes']['label'] %> (<%= item['attributes']['hits'] %>)
|
28
|
+
<%= agg[:action] == 'add' ? "" : "❌".html_safe %>
|
29
|
+
<% end %>
|
30
|
+
</li>
|
31
|
+
<% end %>
|
32
|
+
</ul>
|
33
|
+
<% end %>
|
34
|
+
<% end %>
|
35
|
+
<% end %>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<!-- @TODO: result helpers -->
|
2
|
+
<% if @documents.meta.present? && @documents.meta['pages'].present? %>
|
3
|
+
<% result_start = @documents.meta['pages']['offset_value'] + 1 %>
|
4
|
+
<% result_end = @documents.results.size + result_start - 1 %>
|
5
|
+
|
6
|
+
<span class='float-right'>
|
7
|
+
Results: <%= result_start %> - <%= result_end %> of <%= @documents.meta['pages']['total_count'] %>
|
8
|
+
<span class="dropdown">
|
9
|
+
<button class="btn btn-sm btn-outline-primary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
10
|
+
Sort by
|
11
|
+
</button>
|
12
|
+
<span class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
13
|
+
<% @documents.sorts.each do |sort| %>
|
14
|
+
<%= sort_link(sort) %>
|
15
|
+
<% end %>
|
16
|
+
</span>
|
17
|
+
</span>
|
18
|
+
<%= previous_link(@documents.links) %>
|
19
|
+
<%= next_link(@documents.links) %>
|
20
|
+
</span>
|
21
|
+
<% end %>
|
@@ -0,0 +1,54 @@
|
|
1
|
+
<span id="result-selected-options" class="hidden" data-scope="pageset" data-controller="results" data-resultset="<%= admin_documents_path( params.to_unsafe_h.merge({rows: '1000000'})) %>" data-pageset="/fetch?">
|
2
|
+
|
3
|
+
<%= form_with(model: BulkAction.new, html: { id: 'result-action-form', data: { type: "html", action: "submit->results#setPubState" }, style: 'display:inline'}, url: admin_bulk_actions_path) do |form| -%>
|
4
|
+
<%= form.hidden_field :scope, value: "-" %>
|
5
|
+
<%= form.hidden_field :field_name, value: "" %>
|
6
|
+
<%= form.hidden_field :field_value, value: "" %>
|
7
|
+
<% end %>
|
8
|
+
|
9
|
+
<span class="dropdown">
|
10
|
+
<button class="btn btn-sm btn-outline-primary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
11
|
+
<%= inline_svg_tag "cloud-download-alt-solid.svg", class: 'icon baseline' %>
|
12
|
+
Export
|
13
|
+
</button>
|
14
|
+
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
15
|
+
<a class="dropdown-item" data-action="click->results#exportCSV" href="javascript:void(0);">
|
16
|
+
CSV
|
17
|
+
</a>
|
18
|
+
<div class="dropdown-divider"></div>
|
19
|
+
<a class="dropdown-item" data-action="click->results#exportJsonAardvark" href="javascript:void(0);">JSON (Aardvark)</a>
|
20
|
+
<a class="dropdown-item" data-action="click->results#exportJsonBtaaAardvark" href="javascript:void(0);">JSON (BTAA Aardvark)</a>
|
21
|
+
<a class="dropdown-item" data-action="click->results#exportJsonGBLv1" href="javascript:void(0);">JSON (GBL v1.0)</a>
|
22
|
+
<div class="dropdown-divider"></div>
|
23
|
+
<a class="dropdown-item" data-action="click->results#exportCsvDocumentDownloads" href="javascript:void(0);">
|
24
|
+
CSV - Document Downloads
|
25
|
+
</a>
|
26
|
+
<a class="dropdown-item" data-action="click->results#exportCsvDocumentAccessLinks" href="javascript:void(0);">
|
27
|
+
CSV - Document Access Links
|
28
|
+
</a>
|
29
|
+
</div>
|
30
|
+
</span>
|
31
|
+
|
32
|
+
<span class="dropdown">
|
33
|
+
<button class="btn btn-sm btn-outline-primary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
34
|
+
<%= inline_svg_tag "file-import-solid.svg", class: 'icon baseline' %>
|
35
|
+
State
|
36
|
+
</button>
|
37
|
+
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
38
|
+
<a class="dropdown-item" data-action="click->results#setPubFieldNameValue" href="javascript:void(0);">Published</a>
|
39
|
+
<a class="dropdown-item" data-action="click->results#setPubFieldNameValue" href="javascript:void(0);">Unpublished</a>
|
40
|
+
<a class="dropdown-item" data-action="click->results#setPubFieldNameValue" href="javascript:void(0);">Draft</a>
|
41
|
+
</div>
|
42
|
+
</span>
|
43
|
+
|
44
|
+
<span>
|
45
|
+
<a class="btn btn-sm btn-outline-primary" data-action="click->results#bulkActionDelete" href="javascript:void(0);">
|
46
|
+
<%= inline_svg_tag "trash-alt-solid.svg", class: 'icon baseline' %>
|
47
|
+
Delete
|
48
|
+
</a>
|
49
|
+
</span>
|
50
|
+
|
51
|
+
<!--<span>
|
52
|
+
<a class="btn btn-sm btn-outline-primary" data-action="click->results#bulkAction" href="javascript:void(0);">Bulk Action</a>
|
53
|
+
</span>-->
|
54
|
+
</span>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<div id="result-selection-options" class="shadow-none p-3 mb-3 bg-light rounded hidden" data-controller="results">
|
2
|
+
<span id="select-pageset">
|
3
|
+
All results on this page are selected.
|
4
|
+
<a data-action="click->results#selectResultSet" href="javascript:void(0);">Select all results that match this search</a>
|
5
|
+
</span>
|
6
|
+
<span id="select-resultset" class="hidden">
|
7
|
+
All results in this search are selected.
|
8
|
+
<a href="javascript:void(0);" data-action="click->results#selectNone">Clear selection</a>
|
9
|
+
</span>
|
10
|
+
</div>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<span>
|
2
|
+
<div class="btn-group dropright" data-controller="results">
|
3
|
+
<button type="button" class="btn btn-sm btn-outline-primary"><input type="checkbox" data-action="click->results#toggleAll"></input></button>
|
4
|
+
<button type="button" class="btn btn-sm btn-outline-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
5
|
+
<span class="sr-only">Toggle Dropdown</span>
|
6
|
+
</button>
|
7
|
+
<div class="dropdown-menu">
|
8
|
+
<a class="dropdown-item" data-action="click->results#selectAll" href="javascript:void(0);">All</a>
|
9
|
+
<a class="dropdown-item" data-action="click->results#selectNone" href="javascript:void(0);">None</a>
|
10
|
+
<a class="dropdown-item" data-action="click->results#selectBookmarked" href="javascript:void(0);">Bookmarked</a>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
</span>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<%- if @document.persisted? %>
|
2
|
+
<h3 id="multiple-download-links"><%= link_to "Multiple Download Links", admin_document_document_downloads_url(@document) %></h3>
|
3
|
+
<div class="table-responsive">
|
4
|
+
<table class="table table-striped table-bordered">
|
5
|
+
<thead>
|
6
|
+
<tr>
|
7
|
+
<th colspan="2">Actions</th>
|
8
|
+
<th>Layer Slug</th>
|
9
|
+
<th>Download Label</th>
|
10
|
+
<th>Download URL</th>
|
11
|
+
</tr>
|
12
|
+
</thead>
|
13
|
+
|
14
|
+
<tbody>
|
15
|
+
<% @document.document_downloads.each do |document_download| %>
|
16
|
+
<tr>
|
17
|
+
<td><%= link_to 'Edit', edit_admin_document_document_download_path(document_download.document, document_download) %></td>
|
18
|
+
<td><%= link_to 'Destroy', document_document_download_path(document_download.document, document_download), method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
19
|
+
<td><%= link_to document_download.friendlier_id, document_path(document_download.document) %></td>
|
20
|
+
<td><%= document_download.label %></td>
|
21
|
+
<td><%= link_to document_download.value %></td>
|
22
|
+
</tr>
|
23
|
+
<% end %>
|
24
|
+
</tbody>
|
25
|
+
</table>
|
26
|
+
</div>
|
27
|
+
<% end %>
|
@@ -0,0 +1,49 @@
|
|
1
|
+
<%- @page_title= "GEOMG - Documents" %>
|
2
|
+
|
3
|
+
<h1 style="width:100%; margin-bottom:2rem;">
|
4
|
+
Documents
|
5
|
+
<%= link_to '+ New Document', new_admin_document_path, {class: 'btn btn-primary float-right'} %>
|
6
|
+
</h1>
|
7
|
+
|
8
|
+
<div id="facets" class="row">
|
9
|
+
<div class="col-4">
|
10
|
+
<%= render "result_facets" %>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<div id="resultset" class="col-8">
|
14
|
+
<p>
|
15
|
+
<%= render "result_toggle" %>
|
16
|
+
<%= render "result_selected_options" %>
|
17
|
+
<%= render "result_pagination" %>
|
18
|
+
</p>
|
19
|
+
|
20
|
+
<hr/>
|
21
|
+
|
22
|
+
<%= render "result_selection_options" %>
|
23
|
+
|
24
|
+
<% if @documents.results.present? && @documents.results.kind_of?(Array) %>
|
25
|
+
<ol id='results' class='list-unstyled' data-controller='results'>
|
26
|
+
<% @documents.results.each_with_index do |document, index| %>
|
27
|
+
<% doc = Document.find_by(friendlier_id: document['id']) %>
|
28
|
+
<% if doc.present? %>
|
29
|
+
<%= render "document", document: doc, index: index %>
|
30
|
+
<% else %>
|
31
|
+
<p><%= "#{index + 1}." %> Database is missing document <%= document['id'] %></p>
|
32
|
+
<% end %>
|
33
|
+
<% end %>
|
34
|
+
</ol>
|
35
|
+
|
36
|
+
|
37
|
+
<hr/>
|
38
|
+
|
39
|
+
<p>
|
40
|
+
<span class='float-right'>
|
41
|
+
<%= previous_link(@documents.links) %>
|
42
|
+
<%= next_link(@documents.links) %>
|
43
|
+
</span>
|
44
|
+
</p>
|
45
|
+
<% end %>
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
|
49
|
+
<%= console %>
|