geoblacklight_admin 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +24 -11
  3. data/Rakefile +83 -47
  4. data/app/assets/javascripts/geoblacklight_admin/chosen.js +1 -0
  5. data/app/assets/stylesheets/geoblacklight_admin/_core.scss +24 -0
  6. data/app/assets/stylesheets/geoblacklight_admin/modules/_nav.scss +0 -5
  7. data/app/assets/stylesheets/geoblacklight_admin/modules/_tables.scss +1 -1
  8. data/app/controllers/admin/admin_controller.rb +16 -0
  9. data/app/controllers/admin/advanced_search_controller.rb +7 -1
  10. data/app/controllers/admin/assets_controller.rb +47 -32
  11. data/app/controllers/admin/bookmarks_controller.rb +17 -5
  12. data/app/controllers/admin/bulk_actions_controller.rb +32 -1
  13. data/app/controllers/admin/document_accesses_controller.rb +38 -0
  14. data/app/controllers/admin/document_assets_controller.rb +47 -89
  15. data/app/controllers/admin/document_distributions_controller.rb +172 -0
  16. data/app/controllers/admin/documents_controller.rb +43 -57
  17. data/app/controllers/admin/elements_controller.rb +24 -0
  18. data/app/controllers/admin/form_elements_controller.rb +33 -0
  19. data/app/controllers/admin/ids_controller.rb +6 -0
  20. data/app/controllers/admin/import_documents_controller.rb +11 -1
  21. data/app/controllers/admin/imports_controller.rb +34 -4
  22. data/app/controllers/admin/mappings_controller.rb +15 -0
  23. data/app/controllers/admin/notifications_controller.rb +27 -0
  24. data/app/controllers/admin/reference_types_controller.rb +106 -0
  25. data/app/controllers/admin/search_controller.rb +7 -0
  26. data/app/controllers/admin/users_controller.rb +10 -0
  27. data/app/helpers/asset_helper.rb +6 -0
  28. data/app/helpers/bulk_actions_helper.rb +10 -1
  29. data/app/helpers/document_helper.rb +36 -0
  30. data/app/helpers/geoblacklight_admin_helper.rb +88 -8
  31. data/app/helpers/mappings_helper.rb +26 -0
  32. data/app/indexers/document_indexer.rb +22 -2
  33. data/app/javascript/channels/consumer.js +6 -0
  34. data/app/javascript/channels/export_channel.js +30 -0
  35. data/app/javascript/channels/index.js +3 -0
  36. data/app/javascript/controllers/results_controller.js +14 -0
  37. data/app/javascript/index.js +8 -2
  38. data/app/jobs/bulk_action_revert_document_job.rb +4 -12
  39. data/app/jobs/bulk_action_run_document_job.rb +2 -10
  40. data/app/jobs/export_job.rb +35 -8
  41. data/app/jobs/geoblacklight_admin/delete_thumbnail_job.rb +19 -0
  42. data/app/jobs/geoblacklight_admin/remove_parent_dct_references_uri_job.rb +16 -0
  43. data/app/jobs/geoblacklight_admin/set_parent_dct_references_uri_job.rb +17 -0
  44. data/app/jobs/geoblacklight_admin/store_image_job.rb +22 -0
  45. data/app/jobs/import_document_job.rb +1 -4
  46. data/app/jobs/import_run_job.rb +1 -1
  47. data/app/models/admin/bookmark.rb +1 -1
  48. data/app/models/asset.rb +20 -0
  49. data/app/models/bulk_action.rb +2 -1
  50. data/app/models/bulk_actions/change_publication_state.rb +0 -25
  51. data/app/models/bulk_actions/delete_thumbnails.rb +6 -0
  52. data/app/models/bulk_actions/draft_document.rb +6 -0
  53. data/app/models/bulk_actions/harvest_thumbnails.rb +6 -0
  54. data/app/models/bulk_actions/publish_document.rb +6 -0
  55. data/app/models/bulk_actions/unpublish_document.rb +6 -0
  56. data/app/models/document/geom_validator.rb +8 -0
  57. data/app/models/document/reference.rb +65 -65
  58. data/app/models/document.rb +129 -72
  59. data/app/models/document_distribution.rb +145 -0
  60. data/app/models/element.rb +2 -0
  61. data/app/models/geoblacklight_admin/schema.rb +10 -2
  62. data/app/models/import/csv_duplicates_validator.rb +2 -0
  63. data/app/models/import/csv_header_validator.rb +3 -1
  64. data/app/models/import_btaa_aardvark.rb +2 -2
  65. data/app/models/import_document_state_machine.rb +1 -0
  66. data/app/models/import_gblv1.rb +2 -2
  67. data/app/models/reference_type.rb +40 -0
  68. data/app/models/user.rb +4 -2
  69. data/app/services/export_csv_document_distributions_service.rb +61 -0
  70. data/app/services/geoblacklight_admin/image_service/iiif_manifest.rb +39 -43
  71. data/app/services/geoblacklight_admin/image_service/tms.rb +0 -8
  72. data/app/services/geoblacklight_admin/image_service.rb +1 -1
  73. data/app/services/geoblacklight_admin/item_viewer.rb +4 -4
  74. data/app/views/admin/bookmarks/index.html.erb +19 -14
  75. data/app/views/admin/bulk_actions/show.html.erb +1 -1
  76. data/app/views/admin/document_accesses/import.html.erb +6 -2
  77. data/app/views/admin/document_assets/_assets_table.html.erb +49 -0
  78. data/app/views/admin/document_assets/_form.html.erb +2 -3
  79. data/app/views/admin/document_assets/index.html.erb +1 -47
  80. data/app/views/admin/document_distributions/_document_distribution.html.erb +39 -0
  81. data/app/views/admin/document_distributions/_document_distribution.json.jbuilder +2 -0
  82. data/app/views/admin/document_distributions/_form.html.erb +34 -0
  83. data/app/views/admin/document_distributions/destroy_all.html.erb +82 -0
  84. data/app/views/admin/document_distributions/edit.html.erb +12 -0
  85. data/app/views/admin/document_distributions/import.html.erb +80 -0
  86. data/app/views/admin/document_distributions/index.html.erb +143 -0
  87. data/app/views/admin/document_distributions/index.json.jbuilder +1 -0
  88. data/app/views/admin/document_distributions/new.html.erb +11 -0
  89. data/app/views/admin/document_distributions/show.html.erb +10 -0
  90. data/app/views/admin/document_distributions/show.json.jbuilder +1 -0
  91. data/app/views/admin/documents/_document.html.erb +1 -3
  92. data/app/views/admin/documents/_form.html.erb +2 -4
  93. data/app/views/admin/documents/_form_control.html.erb +5 -2
  94. data/app/views/admin/documents/_form_nav.html.erb +14 -5
  95. data/app/views/admin/documents/_form_nav_kithe.html.erb +4 -1
  96. data/app/views/admin/documents/_json_aardvark.jbuilder +1 -1
  97. data/app/views/admin/documents/_json_gbl_v1.jbuilder +1 -1
  98. data/app/views/admin/documents/_result_selected_options.html.erb +5 -2
  99. data/app/views/admin/documents/admin.html.erb +5 -5
  100. data/app/views/admin/documents/features/_document_references.html.erb +23 -0
  101. data/app/views/admin/documents/features/_multiple_download_links.html.erb +29 -26
  102. data/app/views/admin/ids/fetch.json.jbuilder +0 -2
  103. data/app/views/admin/ids/index.json.jbuilder +0 -2
  104. data/app/views/admin/imports/_form.html.erb +1 -1
  105. data/app/views/admin/imports/show.html.erb +1 -1
  106. data/app/views/admin/layouts/application.html.erb +4 -2
  107. data/app/views/admin/mappings/index.html.erb +1 -1
  108. data/app/views/admin/notifications/_notification.html.haml +29 -28
  109. data/app/views/admin/reference_types/_form.html.erb +25 -0
  110. data/app/views/admin/reference_types/_reference_type.html.erb +52 -0
  111. data/app/views/admin/reference_types/_reference_type.json.jbuilder +2 -0
  112. data/app/views/admin/reference_types/edit.html.erb +12 -0
  113. data/app/views/admin/reference_types/index.html.erb +52 -0
  114. data/app/views/admin/reference_types/index.json.jbuilder +1 -0
  115. data/app/views/admin/reference_types/new.html.erb +11 -0
  116. data/app/views/admin/reference_types/show.html.erb +3 -0
  117. data/app/views/admin/reference_types/show.json.jbuilder +1 -0
  118. data/app/views/admin/shared/_footer.html.erb +5 -2
  119. data/app/views/admin/shared/_js_behaviors.html.erb +2 -3
  120. data/app/views/admin/shared/_navbar.html.erb +9 -2
  121. data/app/views/admin/users/index.html.erb +0 -1
  122. data/app/views/catalog/_show_gbl_admin.html.erb +1 -1
  123. data/config/initializers/defaults.yml +310 -0
  124. data/config/initializers/rails_config.rb +8 -0
  125. data/config/locales/documents.en.yml +14 -0
  126. data/config/routes.rb +30 -5
  127. data/db/import_references_schema_support.numbers +0 -0
  128. data/db/migrate/20230316183001_add_geoblacklight_admin_gem.rb +0 -12
  129. data/db/migrate/20241009200524_create_admin_reference_types.rb +13 -0
  130. data/db/migrate/20241010161420_create_document_references.rb +14 -0
  131. data/db/migrate/20241120238823_rename_references_to_distributions.rb +5 -0
  132. data/db/seeds.rb +5 -0
  133. data/db/seeds_elements.csv +1 -1
  134. data/db/seeds_elements.numbers +0 -0
  135. data/db/seeds_reference_types.csv +29 -0
  136. data/db/seeds_reference_types.numbers +0 -0
  137. data/db/structure.sql +1 -38
  138. data/lib/compose.yml +31 -0
  139. data/lib/generators/geoblacklight_admin/config_generator.rb +53 -12
  140. data/lib/generators/geoblacklight_admin/install_generator.rb +8 -0
  141. data/lib/generators/geoblacklight_admin/templates/btaa_sample_records.csv +5 -0
  142. data/lib/generators/geoblacklight_admin/templates/config/database.yml +1 -1
  143. data/lib/generators/geoblacklight_admin/templates/config/initializers/devise.rb +0 -2
  144. data/lib/generators/geoblacklight_admin/templates/config/initializers/mime_types.rb +1 -0
  145. data/lib/generators/geoblacklight_admin/templates/demo-app/Dockerfile +31 -0
  146. data/lib/generators/geoblacklight_admin/templates/demo-app/compose.yml +42 -0
  147. data/lib/generators/geoblacklight_admin/templates/demo-app/start-server.sh +21 -0
  148. data/lib/geoblacklight_admin/engine.rb +4 -0
  149. data/lib/geoblacklight_admin/rake_task.rb +2 -0
  150. data/lib/geoblacklight_admin/tasks/distributions.rake +69 -0
  151. data/lib/geoblacklight_admin/tasks/images.rake +1 -0
  152. data/lib/geoblacklight_admin/tasks/solr.rake +31 -0
  153. data/lib/geoblacklight_admin/version.rb +1 -1
  154. data/lib/geoblacklight_admin.rb +4 -0
  155. metadata +137 -53
  156. data/app/helpers/import_documents_helper.rb +0 -5
  157. data/app/javascript/entrypoints/engine.js +0 -8
  158. data/config/locales/devise_invitable.en.yml +0 -31
  159. data/lib/generators/geoblacklight_admin/templates/devise/invitations/edit.html.erb +0 -15
  160. data/lib/generators/geoblacklight_admin/templates/devise/invitations/new.html.erb +0 -15
  161. data/lib/generators/geoblacklight_admin/templates/devise/mailer/invitation_instructions.html.erb +0 -11
  162. data/lib/generators/geoblacklight_admin/templates/devise/mailer/invitation_instructions.text.erb +0 -11
@@ -0,0 +1,25 @@
1
+ <%= simple_form_for([:admin, @reference_type.becomes(ReferenceType)], html: { class: 'form-horizontal' }) do |form| %>
2
+ <% if @reference_type.errors.any? %>
3
+ <div class="alert alert-danger">
4
+ <h2><%= pluralize(@reference_type.errors.count, "error") %> prohibited this reference type from being saved:</h2>
5
+
6
+ <ul>
7
+ <% @reference_type.errors.each do |error| %>
8
+ <li><%= error.full_message %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div class="form-group">
15
+ <%= form.input :name, label: 'Name', input_html: { class: 'form-control' } %>
16
+ <%= form.input :reference_type, label: 'Reference Type', input_html: { class: 'form-control' } %>
17
+ <%= form.input :reference_uri, label: 'Reference URI', input_html: { class: 'form-control' } %>
18
+ <%= form.input :label, as: :boolean, label: 'Label', wrapper_html: { class: 'form-check' }, input_html: { class: 'form-check-input' } %>
19
+ <%= form.input :note, as: :text, label: 'Note', input_html: { class: 'form-control' } %>
20
+ </div>
21
+
22
+ <div class="form-group">
23
+ <%= form.submit class: 'btn btn-primary' %>
24
+ </div>
25
+ <% end %>
@@ -0,0 +1,52 @@
1
+ <%- @page_title = "GBL♦Admin - Reference Type - #{reference_type.label}" %>
2
+
3
+ <h1>Reference Type</h1>
4
+
5
+ <div class="row">
6
+ <div class="col-9">
7
+ <h2>
8
+ <%= reference_type.reference_type %>
9
+ <span class="float-right">
10
+ <%= link_to '~ Edit Reference Type', edit_admin_reference_type_path(reference_type), { class: 'btn btn-primary' } %>
11
+ <%= button_to "Destroy this reference type", admin_reference_type_path(reference_type), method: :delete, class: "btn btn-danger" %>
12
+ </span>
13
+ </h2>
14
+
15
+ <table class="table table-bordered">
16
+ <thead class="thead-dark">
17
+ <tr>
18
+ <th class="header" style="width:300px;">Attribute</th>
19
+ <th class="header">Value</th>
20
+ </tr>
21
+ </thead>
22
+ <tr>
23
+ <th>Reference Type</th>
24
+ <td><%= reference_type.reference_type %></td>
25
+ </tr>
26
+ <tr>
27
+ <th>Reference URI</th>
28
+ <td><%= reference_type.reference_uri %></td>
29
+ </tr>
30
+ <tr>
31
+ <th>Label</th>
32
+ <td><%= reference_type.label %></td>
33
+ </tr>
34
+ <tr>
35
+ <th>Note</th>
36
+ <td><%= reference_type.note %></td>
37
+ </tr>
38
+ </table>
39
+ </div>
40
+
41
+ <div class="col-3">
42
+ <h3><%= link_to "Reference Types", admin_reference_types_path %></h3>
43
+ <%- @reference_types = ReferenceType.all %>
44
+ <ul>
45
+ <%- @reference_types.each do |ref_type| %>
46
+ <li><%= link_to_unless_current(ref_type.reference_type, admin_reference_type_url(ref_type)) %></li>
47
+ <%- end %>
48
+ </ul>
49
+ </div>
50
+ </div>
51
+ <%= link_to 'Edit', edit_admin_reference_type_path(reference_type) %> |
52
+ <%= link_to 'Back', admin_reference_types_path %>
@@ -0,0 +1,2 @@
1
+ json.extract! reference_type, :id, :created_at, :updated_at
2
+ json.url admin_reference_type_url(reference_type, format: :json)
@@ -0,0 +1,12 @@
1
+ <% content_for :title, "Editing reference type" %>
2
+
3
+ <h1>Editing Reference Type</h1>
4
+
5
+ <%= render "form", admin_reference_type: @reference_type %>
6
+
7
+ <br>
8
+
9
+ <div>
10
+ <%= link_to "Show this reference type", admin_reference_type_path(@reference_type) %> |
11
+ <%= link_to "Back to reference types", admin_reference_types_path %>
12
+ </div>
@@ -0,0 +1,52 @@
1
+ <%- @page_title = "GBL♦Admin - Reference Types" %>
2
+
3
+ <div class="row mb-2">
4
+ <div class="col">
5
+ <h1 style="width:100%;">
6
+ Reference Types
7
+ <%= link_to '+ New Reference Type', new_admin_reference_type_path, { class: 'btn btn-primary float-right' } %>
8
+ </h1>
9
+
10
+ <p class="alert alert-warning"><strong>Notice</strong> - This table defines the keys/values pairings for dct_reference_s entries.
11
+
12
+ <table class="table table-striped table-bordered sortable">
13
+ <thead class="thead-dark">
14
+ <tr>
15
+ <th class="header">Name</th>
16
+ <th class="header">Reference Type</th>
17
+ <th class="header">Reference URI</th>
18
+ <th class="header">Label</th>
19
+ <th class="header">Note</th>
20
+ <th class="header">Reorder</th>
21
+ <th class="header" colspan="2">Actions</th>
22
+ </tr>
23
+ </thead>
24
+
25
+ <tbody>
26
+ <% @reference_types.order(:position => :asc).each do |reference_type| %>
27
+ <tr data-id="<%= reference_type.id %>">
28
+ <td><%= link_to reference_type.name, admin_reference_type_path(reference_type) %></td>
29
+ <td><%= reference_type.reference_type %></td>
30
+ <td><%= reference_type.reference_uri %></td>
31
+ <td><%= reference_type.label %></td>
32
+ <td><%= reference_type.note %></td>
33
+ <td class="handle" style="text-align:center">&varr;</td>
34
+ <td><%= link_to 'Edit', edit_admin_reference_type_path(reference_type) %></td>
35
+ <td><%= link_to 'Destroy', admin_reference_type_path(reference_type), method: :delete, data: { confirm: 'Are you sure?' } %></td>
36
+ </tr>
37
+ <% end %>
38
+ </tbody>
39
+ </table>
40
+
41
+ <br>
42
+
43
+ <%= link_to '+ New Reference Type', new_admin_reference_type_path, { class: 'btn btn-primary' } %>
44
+ </div>
45
+ </div>
46
+
47
+ <script>
48
+ GBLADMIN.SortElements(
49
+ $("tbody"),
50
+ "<%= sort_admin_reference_types_path %>"
51
+ );
52
+ </script>
@@ -0,0 +1 @@
1
+ json.array! @reference_types, partial: "admin/reference_types/reference_type", as: :reference_type
@@ -0,0 +1,11 @@
1
+ <% content_for :title, "New reference" %>
2
+
3
+ <h1>New Reference Type</h1>
4
+
5
+ <%= render "form", reference_type: @reference_type %>
6
+
7
+ <br>
8
+
9
+ <div>
10
+ <%= link_to "Back to reference types", admin_reference_types_path %>
11
+ </div>
@@ -0,0 +1,3 @@
1
+ <p class="text-success"><%= notice %></p>
2
+
3
+ <%= render @reference_type %>
@@ -0,0 +1 @@
1
+ json.partial! "admin/references/admin_reference", admin_reference: @admin_reference
@@ -6,9 +6,9 @@
6
6
 
7
7
  <!-- Grid row -->
8
8
  <div class="row">
9
- <div class="col-12 ">
9
+ <div class="col-6 ">
10
10
  <h4 style="margin-bottom:1.5rem;">
11
- GeoBlacklight \\ Admin
11
+ GeoBlacklightAdmin
12
12
  </h4>
13
13
  </div>
14
14
 
@@ -30,6 +30,9 @@
30
30
  <h5>Resources</h5>
31
31
 
32
32
  <ul class="list-unstyled">
33
+ <li>
34
+ <a href="https://geoblacklight.org" class="text-white">GeoBlacklight</a>
35
+ </li>
33
36
  <li>
34
37
  <a href="https://opengeometadata.org" class="text-white">OpenGeoMetadata</a>
35
38
  </li>
@@ -41,9 +41,8 @@
41
41
  $(this).val('');
42
42
  });
43
43
 
44
- $(document).on('ready turbolinks:load', function() {
45
- GBLADMIN.DisableIfPersisted();
46
- });
44
+
45
+ GBLADMIN.DisableIfPersisted();
47
46
  </script>
48
47
 
49
48
  <script type="module">
@@ -1,4 +1,4 @@
1
- <nav class="navbar fixed-top navbar-expand-lg navbar-light bg-light pt-2 pb-2">
1
+ <nav class="navbar navbar-expand-lg navbar-light bg-light pt-2 pb-2">
2
2
  <a class="navbar-brand gbl-admin" href="<%=admin_documents_url%>">
3
3
  <strong>GBL♦Admin</strong>
4
4
  </a>
@@ -44,19 +44,26 @@
44
44
  Admin Tools
45
45
  </a>
46
46
  <div class="dropdown-menu" aria-labelledby="navbarDropdown">
47
+ <h6 class="dropdown-header">Data Management</h6>
47
48
  <%= link_to "Documents", admin_documents_path, {class: 'dropdown-item'} %>
48
49
  <%= link_to "Imports", admin_imports_path, {class: 'dropdown-item'} %>
49
50
  <%= link_to "Bulk Actions", admin_bulk_actions_path, {class: 'dropdown-item'} %>
50
51
  <div class="dropdown-divider"></div>
51
- <%= link_to "Assets", admin_assets_path, {class: 'dropdown-item'} %>
52
+ <h6 class="dropdown-header">Document Relationships</h6>
52
53
  <%= link_to "Access Links", admin_document_accesses_path, {class: 'dropdown-item'} %>
54
+ <%= link_to "Assets", admin_assets_path, {class: 'dropdown-item'} %>
55
+ <%= link_to "Distributions", admin_document_distributions_path, {class: 'dropdown-item'} %>
53
56
  <%= link_to "Download Links", admin_document_downloads_path, {class: 'dropdown-item'} %>
54
57
  <div class="dropdown-divider"></div>
58
+ <h6 class="dropdown-header">Business Intelligence</h6>
55
59
  <%= link_to "Blazer", '/admin/blazer', {class: 'dropdown-item', data: { turbolinks: false }} %>
56
60
  <div class="dropdown-divider"></div>
61
+ <h6 class="dropdown-header">Schema Management</h6>
57
62
  <%= link_to "Elements", admin_elements_path, {class: 'dropdown-item', data: { turbolinks: false }} %>
58
63
  <%= link_to "Form Elements", admin_form_elements_path, {class: 'dropdown-item', data: { turbolinks: false }} %>
64
+ <%= link_to "Reference Types", admin_reference_types_path, {class: 'dropdown-item', data: { turbolinks: false }} %>
59
65
  <div class="dropdown-divider"></div>
66
+ <h6 class="dropdown-header">User Management</h6>
60
67
  <%= link_to "Users", admin_users_index_path, {class: 'dropdown-item'} %>
61
68
  </div>
62
69
  </li>
@@ -3,7 +3,6 @@
3
3
 
4
4
  <h1 style="width:100%; margin-bottom:2rem;">
5
5
  Users
6
- <%= link_to '+ New User', new_user_invitation_path, {class: 'btn btn-primary float-right'} %>
7
6
  </h1>
8
7
 
9
8
  <table class="table table-striped table-bordered sortable">
@@ -1,3 +1,3 @@
1
1
  <%- if current_user && current_user.admin? %>
2
- <%= link_to "GBL♦Admin | Edit Record", edit_admin_document_path(@document), { class: "btn btn-warning btn-block" } %>
2
+ <%= link_to "GBL♦Admin | Edit Record", edit_admin_document_path(@document), { class: "btn btn-gbl-admin btn-warning btn-block" } %>
3
3
  <%- end %>
@@ -0,0 +1,310 @@
1
+ # Configurable Logo Used for CartoDB export
2
+ APPLICATION_LOGO_URL: 'http://geoblacklight.org/images/geoblacklight-logo.png'
3
+
4
+ # Carto OneClick Service https://carto.com/engine/open-in-carto/
5
+ CARTO_ONECLICK_LINK: 'http://oneclick.carto.com/'
6
+
7
+ # ArcGIS Online Base URL
8
+ ARCGIS_BASE_URL: 'https://www.arcgis.com/home/webmap/viewer.html'
9
+
10
+ # Download path can be configured using this setting
11
+ #DOWNLOAD_PATH: "./tmp/cache/downloads"
12
+
13
+ # The bq boost value for spatial search matches within a bounding box
14
+ BBOX_WITHIN_BOOST: '10'
15
+
16
+ # The bf boost value for overlap ratio
17
+ OVERLAP_RATIO_BOOST: '2'
18
+
19
+ # Homepage Map Geometry
20
+ # Leave null to default to entire world
21
+ # Add a stringified GeoJSON object to scope initial render (example from UMass)
22
+ HOMEPAGE_MAP_GEOM: null
23
+ # HOMEPAGE_MAP_GEOM: '{"type":"Polygon","coordinates":[[[-73.58,42.93],[-73.58,41.20],[-69.90,41.20],[-69.90,42.93]]]}'
24
+
25
+ # Non-search-field GeoBlacklight application permitted params
26
+ GBL_PARAMS:
27
+ - :bbox
28
+ - :email
29
+ - :file
30
+ - :format
31
+ - :id
32
+ - :logo
33
+ - :provider
34
+ - :type
35
+ - :BBOX
36
+ - :HEIGHT
37
+ - :LAYERS
38
+ - :QUERY_LAYERS
39
+ - :URL
40
+ - :WIDTH
41
+ - :X
42
+ - :Y
43
+
44
+ # Solr field mappings
45
+ FIELDS:
46
+ :ACCESS_RIGHTS: 'dct_accessRights_s'
47
+ :ALTERNATIVE_TITLE: 'dct_alternative_sm'
48
+ :CENTROID: 'dcat_centroid'
49
+ :CREATOR: 'dct_creator_sm'
50
+ :DATE_ISSUED: 'dct_issued_s'
51
+ :DATE_RANGE: 'gbl_dateRange_drsim'
52
+ :DESCRIPTION: 'dct_description_sm'
53
+ :DISPLAY_NOTE: 'gbl_displayNote_sm'
54
+ :FORMAT: 'dct_format_s'
55
+ :FILE_SIZE: 'gbl_fileSize_s'
56
+ :GEOREFERENCED: 'gbl_georeferenced_b'
57
+ :ID: 'id'
58
+ :IDENTIFIER: 'dct_identifier_sm'
59
+ :INDEX_YEAR: 'gbl_indexYear_im'
60
+ :IS_PART_OF: 'dct_isPartOf_sm'
61
+ :IS_REPLACED_BY: 'dct_isReplacedBy_sm'
62
+ :THEME: 'dcat_theme_sm'
63
+ :KEYWORD: 'dcat_keyword_sm'
64
+ :LANGUAGE: 'dct_language_sm'
65
+ :LAYER_MODIFIED: 'gbl_mdModified_dt'
66
+ :LICENSE: 'dct_license_sm'
67
+ :MEMBER_OF: 'pcdm_memberOf_sm'
68
+ :METADATA_VERSION: 'gbl_mdVersion_s'
69
+ :MODIFIED: 'gbl_mdModified_dt'
70
+ :OVERLAP_FIELD: 'solr_bboxtype'
71
+ :PUBLISHER: 'dct_publisher_sm'
72
+ :PROVIDER: 'schema_provider_s'
73
+ :REFERENCES: 'dct_references_s'
74
+ :RELATION: 'dct_relation_sm'
75
+ :REPLACES: 'dct_replaces_sm'
76
+ :RESOURCE_CLASS: 'gbl_resourceClass_sm'
77
+ :RESOURCE_TYPE: 'gbl_resourceType_sm'
78
+ :RIGHTS: 'dct_rights_sm'
79
+ :RIGHTS_HOLDER: 'dct_rightsHolder_sm'
80
+ :SOURCE: 'dct_source_sm'
81
+ :SPATIAL_COVERAGE: 'dct_spatial_sm'
82
+ :GEOMETRY: 'locn_geometry'
83
+ :SUBJECT: 'dct_subject_sm'
84
+ :SUPPRESSED: 'gbl_suppressed_b'
85
+ :TEMPORAL_COVERAGE: 'dct_temporal_sm'
86
+ :TITLE: 'dct_title_s'
87
+ :VERSION: 'dct_isVersionOf_sm'
88
+ :WXS_IDENTIFIER: 'gbl_wxsIdentifier_s'
89
+ :B1G_PUBLICATION_STATE: 'b1g_publication_state_s'
90
+ :B1G_ACCRUAL_METHOD: 'b1g_dct_accrualMethod_s'
91
+ :B1G_CODE: 'b1g_code_s'
92
+ :B1G_CHILD_RECORD: 'b1g_child_record_b'
93
+ :B1G_GEOMG_ID: 'geomg_id_s'
94
+ :B1G_IMPORT_ID: 'b1g_geom_import_id_ssi'
95
+
96
+ # Institution deployed at
97
+ INSTITUTION: 'Stanford'
98
+
99
+ # Metadata shown in tool panel
100
+ METADATA_SHOWN:
101
+ - 'mods'
102
+ - 'fgdc'
103
+ - 'iso19139'
104
+ - 'html'
105
+
106
+ # (For external Download) timeout and open_timeout parameters for Faraday
107
+ TIMEOUT_DOWNLOAD: 16
108
+
109
+ # (For WMS inspection) timeout and open_timeout parameters for Faraday
110
+ TIMEOUT_WMS: 4
111
+
112
+ # Use the geometry type for the data relations icon
113
+ USE_GEOM_FOR_RELATIONS_ICON: false
114
+
115
+ # Web services shown in tool panel
116
+ WEBSERVICES_SHOWN:
117
+ - 'wms'
118
+ - 'tms'
119
+ - 'wfs'
120
+ - 'xyz'
121
+ - 'wmts'
122
+ - 'tilejson'
123
+ - 'iiif'
124
+ - 'feature_layer'
125
+ - 'tiled_map_layer'
126
+ - 'dynamic_map_layer'
127
+ - 'image_map_layer'
128
+ - 'cog'
129
+ - 'pmtiles'
130
+
131
+ # Display Notes to display / Non-prefixed default bootstrap class is alert-secondary
132
+ DISPLAY_NOTES_SHOWN:
133
+ danger:
134
+ bootstrap_alert_class: alert-danger
135
+ icon: fire-solid
136
+ note_prefix: "Danger: "
137
+ info:
138
+ bootstrap_alert_class: alert-info
139
+ icon: circle-info-solid
140
+ note_prefix: "Info: "
141
+ tip:
142
+ bootstrap_alert_class: alert-success
143
+ icon: lightbulb-solid
144
+ note_prefix: "Tip: "
145
+ warning:
146
+ bootstrap_alert_class: alert-warning
147
+ icon: triangle-exclamation-solid
148
+ note_prefix: "Warning: "
149
+
150
+ # Relationships to display
151
+ RELATIONSHIPS_SHOWN:
152
+ MEMBER_OF_ANCESTORS:
153
+ field: pcdm_memberOf_sm
154
+ icon: parent-item
155
+ inverse: :MEMBER_OF_DESCENDANTS
156
+ label: geoblacklight.relations.member_of_ancestors
157
+ query_type: ancestors
158
+ MEMBER_OF_DESCENDANTS:
159
+ field: pcdm_memberOf_sm
160
+ icon: child-item
161
+ inverse: :MEMBER_OF_ANCESTORS
162
+ label: geoblacklight.relations.member_of_descendants
163
+ query_type: descendants
164
+ PART_OF_ANCESTORS:
165
+ field: dct_isPartOf_sm
166
+ icon: parent-item
167
+ inverse: :PART_OF_DESCENDANTS
168
+ label: geoblacklight.relations.part_of_ancestors
169
+ query_type: ancestors
170
+ PART_OF_DESCENDANTS:
171
+ field: dct_isPartOf_sm
172
+ icon: child-item
173
+ inverse: :PART_OF_ANCESTORS
174
+ label: geoblacklight.relations.part_of_descendants
175
+ query_type: descendants
176
+ RELATION_ANCESTORS:
177
+ field: dct_relation_sm
178
+ icon: nil
179
+ inverse: :RELATION_DESCENDANTS
180
+ label: geoblacklight.relations.relation_ancestors
181
+ query_type: ancestors
182
+ RELATION_DESCENDANTS:
183
+ field: dct_relation_sm
184
+ icon: nil
185
+ inverse: :RELATION_ANCESTORS
186
+ label: geoblacklight.relations.relation_descendants
187
+ query_type: descendants
188
+ REPLACES_ANCESTORS:
189
+ field: dct_replaces_sm
190
+ icon: nil
191
+ inverse: :REPLACES_DESCENDANTS
192
+ label: geoblacklight.relations.replaces_ancestors
193
+ query_type: ancestors
194
+ REPLACES_DESCENDANTS:
195
+ field: dct_replaces_sm
196
+ icon: nil
197
+ inverse: :REPLACES_ANCESTORS
198
+ label: geoblacklight.relations.replaces_descendants
199
+ query_type: descendants
200
+ SOURCE_ANCESTORS:
201
+ field: dct_source_sm
202
+ icon: parent-item
203
+ inverse: :SOURCE_DESCENDANTS
204
+ label: geoblacklight.relations.source_ancestors
205
+ query_type: ancestors
206
+ SOURCE_DESCENDANTS:
207
+ field: dct_source_sm
208
+ icon: child-item
209
+ inverse: :SOURCE_ANCESTORS
210
+ label: geoblacklight.relations.source_descendants
211
+ query_type: descendants
212
+ VERSION_OF_ANCESTORS:
213
+ field: dct_isVersionOf_sm
214
+ icon: parent-item
215
+ inverse: :VERSION_OF_DESCENDANTS
216
+ label: geoblacklight.relations.version_of_ancestors
217
+ query_type: ancestors
218
+ VERSION_OF_DESCENDANTS:
219
+ field: dct_isVersionOf_sm
220
+ icon: child-item
221
+ inverse: :VERSION_OF_ANCESTORS
222
+ label: geoblacklight.relations.version_of_descendants
223
+ query_type: descendants
224
+
225
+ # WMS Parameters
226
+ WMS_PARAMS:
227
+ :SERVICE: 'WMS'
228
+ :VERSION: '1.1.1'
229
+ :REQUEST: 'GetFeatureInfo'
230
+ :STYLES: ''
231
+ :SRS: 'EPSG:4326'
232
+ :EXCEPTIONS: 'application/json'
233
+ :INFO_FORMAT: 'text/html'
234
+
235
+ # Settings for leaflet
236
+ LEAFLET:
237
+ MAP:
238
+ LAYERS:
239
+ DETECT_RETINA: true
240
+ INDEX:
241
+ DEFAULT: &default
242
+ color: "#7FCDBB"
243
+ weight: "1"
244
+ radius: "4"
245
+ UNAVAILABLE:
246
+ <<: *default
247
+ color: "#EDF8B1"
248
+ SELECTED:
249
+ <<: *default
250
+ color: "#2C7FB8"
251
+ VIEWERS:
252
+ DYNAMICMAPLAYER:
253
+ CONTROLS:
254
+ - 'Opacity'
255
+ - 'Fullscreen'
256
+ FEATURELAYER:
257
+ CONTROLS:
258
+ - 'Opacity'
259
+ - 'Fullscreen'
260
+ IIIF:
261
+ CONTROLS:
262
+ - 'Fullscreen'
263
+ IMAGEMAPLAYER:
264
+ CONTROLS:
265
+ - 'Opacity'
266
+ - 'Fullscreen'
267
+ INDEXMAP:
268
+ CONTROLS:
269
+ - 'Fullscreen'
270
+ TILEDMAPLAYER:
271
+ CONTROLS:
272
+ - 'Opacity'
273
+ - 'Fullscreen'
274
+ WMS:
275
+ CONTROLS:
276
+ - 'Opacity'
277
+ - 'Fullscreen'
278
+
279
+ # Toggle the help text feature that offers users context
280
+ HELP_TEXT:
281
+ viewer_protocol:
282
+ - 'dynamic_map_layer'
283
+ - 'feature_layer'
284
+ - 'iiif'
285
+ - 'iiif_manifest'
286
+ - 'image_map_layer'
287
+ - 'index_map'
288
+ - 'tiled_map_layer'
289
+ - 'wms'
290
+ - 'tms'
291
+ - 'oembed'
292
+ - 'cog'
293
+ - 'pmtiles'
294
+
295
+
296
+ # Enable catalog#show sidebar static map for items with the following viewer protocols
297
+ SIDEBAR_STATIC_MAP:
298
+ - 'iiif'
299
+ - 'iiif_manifest'
300
+
301
+ GBLSI_THUMBNAIL_FIELD: 'b1g_image_ss'
302
+
303
+ #########
304
+ # GBL ADMIN SETTINGS
305
+
306
+ # Used to generate derivatives in app/uploaders/asset_uploader.rb
307
+ # Hash of thumbnail sizes
308
+ GBL_ADMIN_THUMBNAIL_WIDTHS:
309
+ mini: 50
310
+ standard: 200
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ Config.setup do |config|
4
+ config.const_name = "Settings"
5
+ end
6
+
7
+ Settings.prepend_source!(File.expand_path("defaults.yml", __dir__))
8
+ Settings.reload!
@@ -191,6 +191,20 @@ en:
191
191
  wmts: Web Map Tile Service (WMTS)
192
192
  tile_json: TileJSON
193
193
  tile_map_service: Tile Map Service (TMS)
194
+ asset_enum_values:
195
+ document/reference:
196
+ category:
197
+ cog: Cloud Optimized GeoTIFF (COG)
198
+ documentation_download: Data Dictionary / documentation
199
+ download: Download
200
+ metadata_iso: Metadata in ISO 19139
201
+ metadata_fgdc: Metadata in FGDC
202
+ metadata_html: Metadata in HTML
203
+ metadata_iso: Metadata in ISO 19139
204
+ metadata_mods: Metadata in MODS
205
+ open_index_map: OpenIndexMap
206
+ pmtiles: PMTiles
207
+ image: Image file
194
208
 
195
209
  simple_form:
196
210
  hints:
data/config/routes.rb CHANGED
@@ -8,7 +8,7 @@ GeoblacklightAdmin::Engine.routes.draw do
8
8
  end
9
9
 
10
10
  # @TODO - Users
11
- # devise_for :users, controllers: {invitations: "devise/invitations"}, skip: [:registrations]
11
+ # devise_for :users, skip: [:registrations]
12
12
  # as :user do
13
13
  # get "/sign_in" => "devise/sessions#new" # custom path to login/sign_in
14
14
  # get "/sign_up" => "devise/registrations#new", :as => "new_user_registration" # custom path to sign_up/registration
@@ -38,6 +38,11 @@ GeoblacklightAdmin::Engine.routes.draw do
38
38
  post :sort, on: :collection
39
39
  end
40
40
 
41
+ # Reference Types
42
+ resources :reference_types do
43
+ post :sort, on: :collection
44
+ end
45
+
41
46
  # Form Elements
42
47
  resources :form_elements do
43
48
  post :sort, on: :collection
@@ -86,6 +91,16 @@ GeoblacklightAdmin::Engine.routes.draw do
86
91
  end
87
92
  end
88
93
 
94
+ resources :document_assets, path: "assets" do
95
+ collection do
96
+ get "display_attach_form"
97
+ post "attach_files"
98
+
99
+ get "destroy_all"
100
+ post "destroy_all"
101
+ end
102
+ end
103
+
89
104
  resources :document_downloads, path: "downloads" do
90
105
  collection do
91
106
  get "import"
@@ -96,22 +111,31 @@ GeoblacklightAdmin::Engine.routes.draw do
96
111
  end
97
112
  end
98
113
 
99
- resources :document_assets, path: "assets" do
114
+ resources :document_references, path: "references" do
100
115
  collection do
101
116
  get "display_attach_form"
102
117
  post "attach_files"
103
118
 
119
+ get "import"
120
+ post "import"
121
+
104
122
  get "destroy_all"
105
123
  post "destroy_all"
106
124
  end
107
125
  end
126
+ end
108
127
 
128
+ resources :document_accesses, path: "access" do
109
129
  collection do
110
- get "fetch"
130
+ get "import"
131
+ post "import"
132
+
133
+ get "destroy_all"
134
+ post "destroy_all"
111
135
  end
112
136
  end
113
137
 
114
- resources :document_accesses, path: "access" do
138
+ resources :document_downloads, path: "downloads" do
115
139
  collection do
116
140
  get "import"
117
141
  post "import"
@@ -121,7 +145,8 @@ GeoblacklightAdmin::Engine.routes.draw do
121
145
  end
122
146
  end
123
147
 
124
- resources :document_downloads, path: "downloads" do
148
+ # Document References
149
+ resources :document_references, path: "references" do
125
150
  collection do
126
151
  get "import"
127
152
  post "import"