geoblacklight_admin 0.5.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -9
  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 +1 -1
  10. data/app/controllers/admin/assets_controller.rb +41 -5
  11. data/app/controllers/admin/bookmarks_controller.rb +14 -2
  12. data/app/controllers/admin/bulk_actions_controller.rb +31 -0
  13. data/app/controllers/admin/document_accesses_controller.rb +38 -0
  14. data/app/controllers/admin/document_assets_controller.rb +46 -9
  15. data/app/controllers/admin/document_distributions_controller.rb +172 -0
  16. data/app/controllers/admin/documents_controller.rb +41 -55
  17. data/app/controllers/admin/elements_controller.rb +22 -0
  18. data/app/controllers/admin/form_elements_controller.rb +31 -0
  19. data/app/controllers/admin/import_documents_controller.rb +11 -1
  20. data/app/controllers/admin/imports_controller.rb +32 -2
  21. data/app/controllers/admin/mappings_controller.rb +15 -0
  22. data/app/controllers/admin/notifications_controller.rb +27 -0
  23. data/app/controllers/admin/reference_types_controller.rb +106 -0
  24. data/app/controllers/admin/search_controller.rb +7 -0
  25. data/app/controllers/admin/users_controller.rb +10 -0
  26. data/app/helpers/asset_helper.rb +6 -0
  27. data/app/helpers/bulk_actions_helper.rb +9 -0
  28. data/app/helpers/document_helper.rb +36 -0
  29. data/app/helpers/geoblacklight_admin_helper.rb +88 -8
  30. data/app/helpers/mappings_helper.rb +26 -0
  31. data/app/indexers/document_indexer.rb +22 -2
  32. data/app/javascript/channels/consumer.js +6 -0
  33. data/app/javascript/channels/export_channel.js +30 -0
  34. data/app/javascript/channels/index.js +3 -0
  35. data/app/javascript/controllers/results_controller.js +14 -0
  36. data/app/javascript/index.js +8 -2
  37. data/app/jobs/export_job.rb +35 -8
  38. data/app/jobs/geoblacklight_admin/delete_thumbnail_job.rb +19 -0
  39. data/app/jobs/geoblacklight_admin/remove_parent_dct_references_uri_job.rb +16 -0
  40. data/app/jobs/geoblacklight_admin/set_parent_dct_references_uri_job.rb +17 -0
  41. data/app/jobs/geoblacklight_admin/store_image_job.rb +22 -0
  42. data/app/models/asset.rb +20 -0
  43. data/app/models/bulk_action.rb +2 -1
  44. data/app/models/document/geom_validator.rb +8 -0
  45. data/app/models/document/reference.rb +65 -65
  46. data/app/models/document.rb +128 -71
  47. data/app/models/document_distribution.rb +145 -0
  48. data/app/models/element.rb +2 -0
  49. data/app/models/geoblacklight_admin/schema.rb +10 -2
  50. data/app/models/import_document_state_machine.rb +1 -0
  51. data/app/models/reference_type.rb +40 -0
  52. data/app/models/user.rb +4 -2
  53. data/app/services/export_csv_document_distributions_service.rb +61 -0
  54. data/app/services/geoblacklight_admin/image_service/tms.rb +0 -4
  55. data/app/services/geoblacklight_admin/image_service.rb +1 -1
  56. data/app/services/geoblacklight_admin/item_viewer.rb +4 -4
  57. data/app/views/admin/bulk_actions/show.html.erb +1 -1
  58. data/app/views/admin/document_accesses/import.html.erb +6 -2
  59. data/app/views/admin/document_assets/_assets_table.html.erb +49 -0
  60. data/app/views/admin/document_assets/_form.html.erb +2 -3
  61. data/app/views/admin/document_assets/index.html.erb +1 -47
  62. data/app/views/admin/document_distributions/_document_distribution.html.erb +39 -0
  63. data/app/views/admin/document_distributions/_document_distribution.json.jbuilder +2 -0
  64. data/app/views/admin/document_distributions/_form.html.erb +34 -0
  65. data/app/views/admin/document_distributions/destroy_all.html.erb +82 -0
  66. data/app/views/admin/document_distributions/edit.html.erb +12 -0
  67. data/app/views/admin/document_distributions/import.html.erb +80 -0
  68. data/app/views/admin/document_distributions/index.html.erb +143 -0
  69. data/app/views/admin/document_distributions/index.json.jbuilder +1 -0
  70. data/app/views/admin/document_distributions/new.html.erb +11 -0
  71. data/app/views/admin/document_distributions/show.html.erb +10 -0
  72. data/app/views/admin/document_distributions/show.json.jbuilder +1 -0
  73. data/app/views/admin/documents/_document.html.erb +1 -3
  74. data/app/views/admin/documents/_form.html.erb +2 -4
  75. data/app/views/admin/documents/_form_control.html.erb +5 -2
  76. data/app/views/admin/documents/_form_nav.html.erb +14 -5
  77. data/app/views/admin/documents/_form_nav_kithe.html.erb +4 -1
  78. data/app/views/admin/documents/_json_aardvark.jbuilder +1 -1
  79. data/app/views/admin/documents/_json_gbl_v1.jbuilder +1 -1
  80. data/app/views/admin/documents/_result_selected_options.html.erb +5 -2
  81. data/app/views/admin/documents/admin.html.erb +5 -5
  82. data/app/views/admin/documents/features/_document_references.html.erb +23 -0
  83. data/app/views/admin/documents/features/_multiple_download_links.html.erb +29 -26
  84. data/app/views/admin/ids/fetch.json.jbuilder +0 -2
  85. data/app/views/admin/ids/index.json.jbuilder +0 -2
  86. data/app/views/admin/imports/_form.html.erb +1 -1
  87. data/app/views/admin/imports/show.html.erb +1 -1
  88. data/app/views/admin/layouts/application.html.erb +4 -2
  89. data/app/views/admin/reference_types/_form.html.erb +25 -0
  90. data/app/views/admin/reference_types/_reference_type.html.erb +52 -0
  91. data/app/views/admin/reference_types/_reference_type.json.jbuilder +2 -0
  92. data/app/views/admin/reference_types/edit.html.erb +12 -0
  93. data/app/views/admin/reference_types/index.html.erb +52 -0
  94. data/app/views/admin/reference_types/index.json.jbuilder +1 -0
  95. data/app/views/admin/reference_types/new.html.erb +11 -0
  96. data/app/views/admin/reference_types/show.html.erb +3 -0
  97. data/app/views/admin/reference_types/show.json.jbuilder +1 -0
  98. data/app/views/admin/shared/_footer.html.erb +5 -2
  99. data/app/views/admin/shared/_js_behaviors.html.erb +2 -3
  100. data/app/views/admin/shared/_navbar.html.erb +9 -2
  101. data/app/views/admin/users/index.html.erb +0 -1
  102. data/app/views/catalog/_show_gbl_admin.html.erb +1 -1
  103. data/config/initializers/defaults.yml +310 -0
  104. data/config/initializers/rails_config.rb +8 -0
  105. data/config/locales/documents.en.yml +14 -0
  106. data/config/routes.rb +30 -5
  107. data/db/import_references_schema_support.numbers +0 -0
  108. data/db/migrate/20230316183001_add_geoblacklight_admin_gem.rb +0 -12
  109. data/db/migrate/20241009200524_create_admin_reference_types.rb +13 -0
  110. data/db/migrate/20241010161420_create_document_references.rb +14 -0
  111. data/db/migrate/20241120238823_rename_references_to_distributions.rb +5 -0
  112. data/db/seeds.rb +5 -0
  113. data/db/seeds_elements.csv +1 -1
  114. data/db/seeds_elements.numbers +0 -0
  115. data/db/seeds_reference_types.csv +29 -0
  116. data/db/seeds_reference_types.numbers +0 -0
  117. data/db/structure.sql +1 -38
  118. data/lib/compose.yml +31 -0
  119. data/lib/generators/geoblacklight_admin/config_generator.rb +48 -12
  120. data/lib/generators/geoblacklight_admin/install_generator.rb +8 -0
  121. data/lib/generators/geoblacklight_admin/templates/config/database.yml +1 -1
  122. data/lib/generators/geoblacklight_admin/templates/config/initializers/devise.rb +0 -2
  123. data/lib/generators/geoblacklight_admin/templates/config/initializers/mime_types.rb +1 -0
  124. data/lib/generators/geoblacklight_admin/templates/demo-app/Dockerfile +31 -0
  125. data/lib/generators/geoblacklight_admin/templates/demo-app/compose.yml +42 -0
  126. data/lib/generators/geoblacklight_admin/templates/demo-app/start-server.sh +21 -0
  127. data/lib/geoblacklight_admin/engine.rb +4 -0
  128. data/lib/geoblacklight_admin/tasks/distributions.rake +69 -0
  129. data/lib/geoblacklight_admin/tasks/images.rake +1 -0
  130. data/lib/geoblacklight_admin/tasks/solr.rake +31 -0
  131. data/lib/geoblacklight_admin/version.rb +1 -1
  132. data/lib/geoblacklight_admin.rb +4 -0
  133. metadata +78 -41
  134. data/app/javascript/entrypoints/engine.js +0 -8
  135. data/config/locales/devise_invitable.en.yml +0 -31
  136. data/lib/generators/geoblacklight_admin/templates/devise/invitations/edit.html.erb +0 -15
  137. data/lib/generators/geoblacklight_admin/templates/devise/invitations/new.html.erb +0 -15
  138. data/lib/generators/geoblacklight_admin/templates/devise/mailer/invitation_instructions.html.erb +0 -11
  139. data/lib/generators/geoblacklight_admin/templates/devise/mailer/invitation_instructions.text.erb +0 -11
@@ -20,8 +20,10 @@
20
20
  </head>
21
21
 
22
22
  <body data-locale="en">
23
- <%= render "admin/shared/navbar" %>
24
- <main class="container-fluid">
23
+ <header>
24
+ <%= render "admin/shared/navbar" %>
25
+ </header>
26
+ <main id="gbl-admin" class="container-fluid">
25
27
  <%= render "admin/shared/schema_timestamp" %>
26
28
  <%= render "admin/shared/flash_messages" %>
27
29
  <div id="toast-wrapper" aria-live="polite" aria-atomic="true"></div>
@@ -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: