geo_concerns 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (220) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +13 -0
  3. data/.rubocop.yml +101 -0
  4. data/.travis.yml +17 -0
  5. data/Gemfile +46 -0
  6. data/LICENSE +202 -0
  7. data/README.md +46 -0
  8. data/Rakefile +21 -0
  9. data/app/actors/geo_concerns/file_actor.rb +20 -0
  10. data/app/actors/geo_concerns/file_set_actor.rb +7 -0
  11. data/app/assets/images/geo_concerns/.keep +0 -0
  12. data/app/assets/images/geo_concerns/images/geocoder.png +0 -0
  13. data/app/assets/images/geo_concerns/images/throbber.gif +0 -0
  14. data/app/assets/images/geo_concerns/img/filter-icon.png +0 -0
  15. data/app/assets/images/geo_concerns/img/move-handle.png +0 -0
  16. data/app/assets/images/geo_concerns/img/resize-handle.png +0 -0
  17. data/app/assets/javascripts/geo_concerns/Control.Geocoder.js +1056 -0
  18. data/app/assets/javascripts/geo_concerns/application.js +5 -0
  19. data/app/assets/javascripts/geo_concerns/bounding_box_selector.js +100 -0
  20. data/app/assets/javascripts/geo_concerns/leaflet-boundingbox.js +467 -0
  21. data/app/assets/stylesheets/geo_concerns/Control.Geocoder.css +104 -0
  22. data/app/assets/stylesheets/geo_concerns/application.css +18 -0
  23. data/app/assets/stylesheets/geo_concerns/bounding_box.scss +7 -0
  24. data/app/assets/stylesheets/geo_concerns/leaflet-boundingbox.css +17 -0
  25. data/app/controllers/concerns/geo_concerns/file_sets_controller_behavior.rb +19 -0
  26. data/app/controllers/concerns/geo_concerns/image_works_controller_behavior.rb +13 -0
  27. data/app/controllers/concerns/geo_concerns/raster_works_controller_behavior.rb +23 -0
  28. data/app/controllers/concerns/geo_concerns/vector_works_controller_behavior.rb +23 -0
  29. data/app/forms/geo_concerns/basic_geo_metadata_form.rb +8 -0
  30. data/app/forms/geo_concerns/external_metadata_file_form.rb +8 -0
  31. data/app/forms/geo_concerns/georeferenced_form.rb +9 -0
  32. data/app/forms/geo_concerns/image_work_form.rb +9 -0
  33. data/app/forms/geo_concerns/raster_work_form.rb +8 -0
  34. data/app/forms/geo_concerns/vector_work_form.rb +8 -0
  35. data/app/helpers/bounding_box_helper.rb +24 -0
  36. data/app/helpers/geo_concerns/application_helper.rb +4 -0
  37. data/app/models/concerns/geo_concerns/basic_geo_metadata.rb +21 -0
  38. data/app/models/concerns/geo_concerns/external_metadata_file_behavior.rb +31 -0
  39. data/app/models/concerns/geo_concerns/extractors/fgdc_helper.rb +9 -0
  40. data/app/models/concerns/geo_concerns/extractors/fgdc_metadata_extractor.rb +114 -0
  41. data/app/models/concerns/geo_concerns/extractors/iso19139_helper.rb +50 -0
  42. data/app/models/concerns/geo_concerns/extractors/mods_helper.rb +15 -0
  43. data/app/models/concerns/geo_concerns/file_set/derivatives.rb +60 -0
  44. data/app/models/concerns/geo_concerns/file_set_presenter_behavior.rb +7 -0
  45. data/app/models/concerns/geo_concerns/geo_file_format_behavior.rb +37 -0
  46. data/app/models/concerns/geo_concerns/geo_file_set_behavior.rb +11 -0
  47. data/app/models/concerns/geo_concerns/georeferenced_behavior.rb +18 -0
  48. data/app/models/concerns/geo_concerns/image_file_behavior.rb +14 -0
  49. data/app/models/concerns/geo_concerns/image_work_behavior.rb +69 -0
  50. data/app/models/concerns/geo_concerns/metadata_extraction_helper.rb +28 -0
  51. data/app/models/concerns/geo_concerns/raster_file_behavior.rb +14 -0
  52. data/app/models/concerns/geo_concerns/raster_work_behavior.rb +82 -0
  53. data/app/models/concerns/geo_concerns/solr_document_behavior.rb +25 -0
  54. data/app/models/concerns/geo_concerns/vector_file_behavior.rb +14 -0
  55. data/app/models/concerns/geo_concerns/vector_work_behavior.rb +78 -0
  56. data/app/presenters/geo_concerns/geo_concerns_show_presenter.rb +30 -0
  57. data/app/presenters/geo_concerns/image_work_show_presenter.rb +18 -0
  58. data/app/presenters/geo_concerns/raster_work_show_presenter.rb +18 -0
  59. data/app/presenters/geo_concerns/vector_work_show_presenter.rb +10 -0
  60. data/app/processors/geo_concerns/processors/base_geo_processor.rb +86 -0
  61. data/app/processors/geo_concerns/processors/raster.rb +11 -0
  62. data/app/processors/geo_concerns/processors/raster/aig.rb +44 -0
  63. data/app/processors/geo_concerns/processors/raster/base.rb +74 -0
  64. data/app/processors/geo_concerns/processors/raster/dem.rb +46 -0
  65. data/app/processors/geo_concerns/processors/raster/processor.rb +27 -0
  66. data/app/processors/geo_concerns/processors/vector.rb +11 -0
  67. data/app/processors/geo_concerns/processors/vector/base.rb +68 -0
  68. data/app/processors/geo_concerns/processors/vector/processor.rb +25 -0
  69. data/app/processors/geo_concerns/processors/vector/shapefile.rb +20 -0
  70. data/app/processors/geo_concerns/processors/zip.rb +31 -0
  71. data/app/renderers/coverage_renderer.rb +34 -0
  72. data/app/runners/geo_concerns/runners/raster_derivatives.rb +9 -0
  73. data/app/runners/geo_concerns/runners/vector_derivatives.rb +9 -0
  74. data/app/schemas/geo_concerns/basic_geo_metadata_optional.rb +39 -0
  75. data/app/schemas/geo_concerns/basic_geo_metadata_required.rb +25 -0
  76. data/app/services/authority_service.rb +23 -0
  77. data/app/services/geo_concerns/derivative_path.rb +16 -0
  78. data/app/services/image_format_service.rb +4 -0
  79. data/app/services/metadata_format_service.rb +4 -0
  80. data/app/services/raster_format_service.rb +4 -0
  81. data/app/services/vector_format_service.rb +4 -0
  82. data/app/values/geo_concerns/coverage.rb +36 -0
  83. data/app/values/geo_concerns/time_period.rb +31 -0
  84. data/app/views/curation_concerns/file_sets/_form.html.erb +48 -0
  85. data/app/views/curation_concerns/image_works/_form.html.erb +23 -0
  86. data/app/views/curation_concerns/image_works/_image_work.html.erb +2 -0
  87. data/app/views/curation_concerns/image_works/_members.html.erb +30 -0
  88. data/app/views/curation_concerns/image_works/_related_image_files.html.erb +24 -0
  89. data/app/views/curation_concerns/image_works/_show_actions.html.erb +16 -0
  90. data/app/views/curation_concerns/image_works/show.html.erb +17 -0
  91. data/app/views/curation_concerns/raster_works/_form.html.erb +25 -0
  92. data/app/views/curation_concerns/raster_works/_members.html.erb +30 -0
  93. data/app/views/curation_concerns/raster_works/_raster_work.html.erb +2 -0
  94. data/app/views/curation_concerns/raster_works/_related_raster_files.html.erb +24 -0
  95. data/app/views/curation_concerns/raster_works/_show_actions.html.erb +16 -0
  96. data/app/views/curation_concerns/raster_works/show.html.erb +17 -0
  97. data/app/views/curation_concerns/vector_works/_form.html.erb +25 -0
  98. data/app/views/curation_concerns/vector_works/_related_vector_files.html.erb +24 -0
  99. data/app/views/curation_concerns/vector_works/_show_actions.html.erb +15 -0
  100. data/app/views/curation_concerns/vector_works/_vector_work.html.erb +2 -0
  101. data/app/views/curation_concerns/vector_works/show.html.erb +15 -0
  102. data/app/views/geo_concerns/_attribute_rows.html.erb +11 -0
  103. data/app/views/geo_concerns/_attributes.html.erb +13 -0
  104. data/app/views/geo_concerns/_form_additional_information.html.erb +11 -0
  105. data/app/views/geo_concerns/_form_bounding_box.html.erb +9 -0
  106. data/app/views/geo_concerns/_form_descriptive_fields.html.erb +9 -0
  107. data/app/views/geo_concerns/_form_files_and_links.html.erb +0 -0
  108. data/app/views/geo_concerns/_form_populate_metadata.html.erb +8 -0
  109. data/app/views/geo_concerns/_form_required_information.html.erb +12 -0
  110. data/app/views/geo_concerns/_form_supplementary_fields.html.erb +15 -0
  111. data/app/views/geo_concerns/_related_external_metadata_files.html.erb +24 -0
  112. data/app/vocabs/geo_concerns/geo_terms.rb +12 -0
  113. data/bin/rails +12 -0
  114. data/config/routes.rb +6 -0
  115. data/geo_concerns.gemspec +36 -0
  116. data/lib/generators/geo_concerns/install_generator.rb +119 -0
  117. data/lib/generators/geo_concerns/templates/actors/curation_concerns/image_work_actor.rb +4 -0
  118. data/lib/generators/geo_concerns/templates/actors/curation_concerns/raster_work_actor.rb +4 -0
  119. data/lib/generators/geo_concerns/templates/actors/curation_concerns/vector_work_actor.rb +4 -0
  120. data/lib/generators/geo_concerns/templates/config/authorities/image_formats.yml +5 -0
  121. data/lib/generators/geo_concerns/templates/config/authorities/metadata_formats.yml +7 -0
  122. data/lib/generators/geo_concerns/templates/config/authorities/raster_formats.yml +9 -0
  123. data/lib/generators/geo_concerns/templates/config/authorities/vector_formats.yml +5 -0
  124. data/lib/generators/geo_concerns/templates/controllers/curation_concerns/file_sets_controller.rb +6 -0
  125. data/lib/generators/geo_concerns/templates/controllers/curation_concerns/image_works_controller.rb +5 -0
  126. data/lib/generators/geo_concerns/templates/controllers/curation_concerns/raster_works_controller.rb +6 -0
  127. data/lib/generators/geo_concerns/templates/controllers/curation_concerns/vector_works_controller.rb +6 -0
  128. data/lib/generators/geo_concerns/templates/geo_concerns.js +1 -0
  129. data/lib/generators/geo_concerns/templates/geo_concerns.scss +3 -0
  130. data/lib/generators/geo_concerns/templates/jobs/characterize_job.rb +12 -0
  131. data/lib/generators/geo_concerns/templates/models/file_set.rb +4 -0
  132. data/lib/generators/geo_concerns/templates/models/image_work.rb +6 -0
  133. data/lib/generators/geo_concerns/templates/models/raster_work.rb +7 -0
  134. data/lib/generators/geo_concerns/templates/models/vector_work.rb +7 -0
  135. data/lib/generators/geo_concerns/templates/presenters/file_set_presenter.rb +3 -0
  136. data/lib/generators/geo_concerns/templates/spec/actor_spec.rb.erb +9 -0
  137. data/lib/generators/geo_concerns/templates/spec/controller_spec.rb.erb +9 -0
  138. data/lib/generators/geo_concerns/templates/spec/model_spec.rb.erb +9 -0
  139. data/lib/geo_concerns.rb +6 -0
  140. data/lib/geo_concerns/engine.rb +4 -0
  141. data/lib/geo_concerns/version.rb +3 -0
  142. data/lib/tasks/geo_concerns_tasks.rake +4 -0
  143. data/solr/config/_rest_managed.json +3 -0
  144. data/solr/config/admin-extra.html +31 -0
  145. data/solr/config/elevate.xml +36 -0
  146. data/solr/config/mapping-ISOLatin1Accent.txt +246 -0
  147. data/solr/config/protwords.txt +21 -0
  148. data/solr/config/schema.xml +372 -0
  149. data/solr/config/scripts.conf +24 -0
  150. data/solr/config/solrconfig.xml +312 -0
  151. data/solr/config/spellings.txt +2 -0
  152. data/solr/config/stopwords.txt +58 -0
  153. data/solr/config/stopwords_en.txt +58 -0
  154. data/solr/config/synonyms.txt +31 -0
  155. data/solr/config/xslt/example.xsl +132 -0
  156. data/solr/config/xslt/example_atom.xsl +67 -0
  157. data/solr/config/xslt/example_rss.xsl +66 -0
  158. data/solr/config/xslt/luke.xsl +337 -0
  159. data/spec/actors/geo_concerns/file_actor_spec.rb +26 -0
  160. data/spec/controllers/image_works_controller_spec.rb +25 -0
  161. data/spec/controllers/raster_works_controller_spec.rb +50 -0
  162. data/spec/controllers/vector_works_controller_spec.rb +50 -0
  163. data/spec/factories/external_metadata_files.rb +20 -0
  164. data/spec/factories/image_files.rb +32 -0
  165. data/spec/factories/image_works.rb +68 -0
  166. data/spec/factories/raster_files.rb +35 -0
  167. data/spec/factories/raster_works.rb +86 -0
  168. data/spec/factories/users.rb +26 -0
  169. data/spec/factories/vector_files.rb +31 -0
  170. data/spec/factories/vector_works.rb +83 -0
  171. data/spec/features/create_raster_work_spec.rb +49 -0
  172. data/spec/forms/geo_concerns/basic_geo_metadata_form_spec.rb +27 -0
  173. data/spec/forms/geo_concerns/external_metadata_file_form_spec.rb +27 -0
  174. data/spec/forms/geo_concerns/georeferenced_form_spec.rb +29 -0
  175. data/spec/forms/geo_concerns/image_work_form_spec.rb +11 -0
  176. data/spec/forms/geo_concerns/raster_work_form_spec.rb +15 -0
  177. data/spec/forms/geo_concerns/vector_work_form_spec.rb +15 -0
  178. data/spec/helpers/bounding_box_helper_spec.rb +34 -0
  179. data/spec/models/concerns/basic_geo_metadata_spec.rb +21 -0
  180. data/spec/models/concerns/geo_concerns/file_set/derivatives_spec.rb +108 -0
  181. data/spec/models/concerns/geo_concerns/file_set/geo_file_format_behavior_spec.rb +56 -0
  182. data/spec/models/external_metadata_file_spec.rb +118 -0
  183. data/spec/models/file_set_spec.rb +9 -0
  184. data/spec/models/image_file_spec.rb +48 -0
  185. data/spec/models/image_work_spec.rb +71 -0
  186. data/spec/models/raster_file_spec.rb +48 -0
  187. data/spec/models/raster_work_spec.rb +122 -0
  188. data/spec/models/solr_document_spec.rb +35 -0
  189. data/spec/models/vector_file_spec.rb +48 -0
  190. data/spec/models/vector_work_spec.rb +113 -0
  191. data/spec/presenters/file_set_presenter_spec.rb +13 -0
  192. data/spec/presenters/geo_concerns_show_presenter_spec.rb +56 -0
  193. data/spec/presenters/image_work_show_presenter_spec.rb +52 -0
  194. data/spec/presenters/raster_work_show_presenter_spec.rb +52 -0
  195. data/spec/presenters/vector_work_show_presenter_spec.rb +41 -0
  196. data/spec/processors/geo_concerns/processors/base_geo_processor_spec.rb +109 -0
  197. data/spec/processors/geo_concerns/processors/raster/aig_spec.rb +28 -0
  198. data/spec/processors/geo_concerns/processors/raster/base_spec.rb +86 -0
  199. data/spec/processors/geo_concerns/processors/raster/dem_spec.rb +26 -0
  200. data/spec/processors/geo_concerns/processors/raster/processor_spec.rb +39 -0
  201. data/spec/processors/geo_concerns/processors/vector/base_spec.rb +67 -0
  202. data/spec/processors/geo_concerns/processors/vector/processor_spec.rb +28 -0
  203. data/spec/processors/geo_concerns/processors/vector/shapefile_spec.rb +17 -0
  204. data/spec/processors/geo_concerns/processors/zip_spec.rb +39 -0
  205. data/spec/renderers/coverage_renderer_spec.rb +21 -0
  206. data/spec/services/derivative_path_spec.rb +12 -0
  207. data/spec/services/raster_format_service_spec.rb +13 -0
  208. data/spec/spec_helper.rb +34 -0
  209. data/spec/support/controllers/engine_helpers.rb +7 -0
  210. data/spec/support/database_cleaner.rb +18 -0
  211. data/spec/support/devise.rb +10 -0
  212. data/spec/support/devise_helpers.rb +6 -0
  213. data/spec/support/factory_girl.rb +3 -0
  214. data/spec/support/features.rb +14 -0
  215. data/spec/support/features/session_helpers.rb +40 -0
  216. data/spec/support/fixture_reader.rb +7 -0
  217. data/spec/test_app_templates/lib/generators/test_app_generator.rb +20 -0
  218. data/spec/values/coverage_spec.rb +40 -0
  219. data/tasks/ci.rake +49 -0
  220. metadata +527 -0
@@ -0,0 +1,48 @@
1
+ <%= simple_form_for [main_app, curation_concern],
2
+ html: { multipart: true },
3
+ wrapper_mappings: { multifile: :horizontal_file_input } do |f| %>
4
+ <div class="row">
5
+ <div class="col-md-6">
6
+ <fieldset class="required">
7
+ <legend>Your File&#8217;s Title</legend>
8
+ <span class="control-label">
9
+ <%= label_tag 'file_set[title][]', 'Title', class: "string optional" %>
10
+ </span>
11
+ <%= text_field_tag 'file_set[title][]', curation_concern.title.first, class: 'form-control' %>
12
+ </fieldset>
13
+ <fieldset class="required">
14
+ <legend>
15
+ Attach Your File
16
+ </legend>
17
+ <% select_options = if params['type'] == 'metadata'
18
+ MetadataFormatService.select_options
19
+ elsif params['type'] == 'image-data'
20
+ ImageFormatService.select_options
21
+ elsif params['type'] == 'raster-data'
22
+ RasterFormatService.select_options
23
+ elsif params['type'] == 'vector-data'
24
+ VectorFormatService.select_options
25
+ end %>
26
+ <% if select_options %>
27
+ <%= f.input(:mime_type, as: :select, collection: select_options,
28
+ input_html: { class: 'form-control' }, label: 'Type') %>
29
+ <% end %>
30
+ <%= f.input :files, as: :multifile %>
31
+ </fieldset>
32
+ </div>
33
+
34
+ <div class="col-md-6">
35
+ <%= render "form_permission", f: f %>
36
+ </div>
37
+ </div>
38
+
39
+ <div class="row">
40
+ <div class="col-md-12 form-actions">
41
+ <%= f.submit(
42
+ (curation_concern.persisted? ? "Update Attached File" : %(Attach to #{parent.human_readable_type})),
43
+ class: 'btn btn-primary'
44
+ ) %>
45
+ <%= link_to 'Cancel', parent_path(parent), class: 'btn btn-link' %>
46
+ </div>
47
+ </div>
48
+ <% end %>
@@ -0,0 +1,23 @@
1
+ <%= simple_form_for [main_app, @form],
2
+ wrapper_mappings: { multifile: :horizontal_file_input } do |f| %>
3
+ <% if f.error_notification -%>
4
+ <div class="alert alert-danger fade in">
5
+ <strong>Wait don't go!</strong> There was a problem with your submission. Please review the errors below:
6
+ <a class="close" data-dismiss="alert" href="#">&times;</a>
7
+ </div>
8
+ <% end %>
9
+
10
+ <%= render 'geo_concerns/form_descriptive_fields', f: f %>
11
+ <%= render 'geo_concerns/form_supplementary_fields', f: f %>
12
+
13
+ <div class="row">
14
+ <div class="col-md-12 form-actions">
15
+ <%= f.submit class: 'btn btn-primary require-contributor-agreement' %>
16
+ <% if curation_concern.new_record? %>
17
+ <%= link_to 'Cancel', main_app.root_path, class: 'btn btn-link' %>
18
+ <% else %>
19
+ <%= link_to 'Cancel', polymorphic_path([main_app, curation_concern]), class: 'btn btn-link' %>
20
+ <% end %>
21
+ </div>
22
+ </div>
23
+ <% end %>
@@ -0,0 +1,2 @@
1
+ <%# This is a search result view %>
2
+ <%= render 'catalog/document', document: image_work, document_counter: image_work_counter %>
@@ -0,0 +1,30 @@
1
+ <% if presenter.raster_work_presenters.present? %>
2
+ <div class="panel panel-default raster_works">
3
+ <div class="panel-heading">
4
+ <h2>Raster Works</h2>
5
+ </div>
6
+ <table class="table">
7
+ <thead>
8
+ <tr>
9
+ <th class="col-xs-3"></th>
10
+ <th>Work Name</th>
11
+ </tr>
12
+ </thead>
13
+ <tbody>
14
+ <% presenter.raster_work_presenters.each do |res| %>
15
+ <tr class="file_set attributes">
16
+ <td class="thumbnail" style="margin-bottom: 0px">
17
+ <%= render_thumbnail_tag res %>
18
+ </td>
19
+ <td>
20
+ <%= link_to res.title, main_app.curation_concerns_raster_work_path(res.id) %>
21
+ </td>
22
+ </tr>
23
+ <% end %>
24
+ </tbody>
25
+ </table>
26
+ </div>
27
+ <% elsif can? :edit, presenter.id %>
28
+ <h2>Raster Works</h2>
29
+ <p class="center"><em>This <%= presenter.human_readable_type %> has no raster works associated with it. You can add one using the "Attach a Raster Work" button below.</em></p>
30
+ <% end %>
@@ -0,0 +1,24 @@
1
+ <% if presenter.image_file_presenters.present? %>
2
+ <div class="panel panel-default related_files">
3
+ <div class="panel-heading">
4
+ <h2>Image File</h2>
5
+ </div>
6
+ <table class="table table-striped">
7
+ <thead>
8
+ <tr>
9
+ <th>File</th>
10
+ <th>Filename</th>
11
+ <th>Date Uploaded</th>
12
+ <th>Visibility</th>
13
+ <th>Actions</th>
14
+ </tr>
15
+ </thead>
16
+ <tbody>
17
+ <%= render partial: 'member', collection: @presenter.image_file_presenters %>
18
+ </tbody>
19
+ </table>
20
+ </div>
21
+ <% elsif can? :edit, presenter.id %>
22
+ <h2>Image File</h2>
23
+ <p class="center"><em>This <%= presenter.human_readable_type %> doesn't have an image file associated with it. You can add one using the "Attach a File" button below.</em></p>
24
+ <% end %>
@@ -0,0 +1,16 @@
1
+ <% if collector || editor %>
2
+ <div class="form-actions">
3
+ <% if editor %>
4
+ <%= link_to "Edit This #{@presenter.human_readable_type}", edit_polymorphic_path([main_app, @presenter]), class: 'btn btn-default' %>
5
+ <%= link_to "Attach a Raster Work", geo_concerns_engine.new_curation_concerns_member_raster_work_path(@presenter), class: 'btn btn-default' %>
6
+ <%= link_to "Attach a Image Data File", main_app.new_curation_concerns_file_set_path(@presenter, type: 'image-data'), class: 'btn btn-default' %>
7
+ <%= link_to "Attach a Metadata File", main_app.new_curation_concerns_file_set_path(@presenter, type: 'metadata'), class: 'btn btn-default' %>
8
+ <%= link_to "Delete This #{@presenter.human_readable_type}", [main_app, @presenter], class: 'btn btn-danger pull-right', data: { confirm: "Delete this #{@presenter.human_readable_type}?" }, method: :delete %>
9
+ <%= link_to t("file_manager.link_text"), polymorphic_path([main_app, :file_manager, @presenter]), class: 'btn btn-default' %>
10
+ <% end %>
11
+ <% if collector %>
12
+ <%= render 'collections/add_to_collection_modal', collectible: @presenter %>
13
+ <%= link_to_select_collection @presenter, class: 'btn btn-default' %>
14
+ <% end %>
15
+ </div>
16
+ <% end %>
@@ -0,0 +1,17 @@
1
+ <% provide :page_title, @presenter.page_title %>
2
+ <% provide :page_header do %>
3
+ <h1><%= @presenter %> <span class="human_readable_type">(<%= @presenter.human_readable_type %>)</span></h1>
4
+ <% end %>
5
+
6
+ <% collector = can?(:collect, @presenter.id) %>
7
+ <% editor = can?(:edit, @presenter.id) %>
8
+
9
+ <%= render 'representative_media', presenter: @presenter %>
10
+ <%= render 'geo_concerns/attributes', presenter: @presenter %>
11
+
12
+ <%= render 'related_image_files', presenter: @presenter %>
13
+ <%= render 'geo_concerns/related_external_metadata_files', presenter: @presenter %>
14
+
15
+ <%= render 'members', presenter: @presenter %>
16
+
17
+ <%= render "show_actions", collector: collector, editor: editor%>
@@ -0,0 +1,25 @@
1
+ <% options = { wrapper_mappings: { multifile: :horizontal_file_input } }
2
+ options[:url] = geo_concerns_engine.curation_concerns_member_raster_work_index_path(parent_id: params[:parent_id]) if params[:parent_id] %>
3
+ <%= simple_form_for [main_app, @form], options do |f| %>
4
+ <% if f.error_notification -%>
5
+ <div class="alert alert-danger fade in">
6
+ <strong>Wait don't go!</strong> There was a problem with your submission. Please review the errors below:
7
+ <a class="close" data-dismiss="alert" href="#">&times;</a>
8
+ </div>
9
+ <% end -%>
10
+
11
+ <%= render 'geo_concerns/form_descriptive_fields', f: f %>
12
+ <%= render 'geo_concerns/form_supplementary_fields', f: f %>
13
+
14
+ <div class="row">
15
+ <div class="col-md-12 form-actions">
16
+ <%= f.submit class: 'btn btn-primary require-contributor-agreement' %>
17
+ <%- if curation_concern.new_record? -%>
18
+ <%= link_to 'Cancel', main_app.root_path, class: 'btn btn-link' %>
19
+ <%- else -%>
20
+ <%= link_to 'Cancel', polymorphic_path([main_app, @form]), class: 'btn btn-link' %>
21
+ <%- end -%>
22
+ </div>
23
+ </div>
24
+
25
+ <% end %>
@@ -0,0 +1,30 @@
1
+ <% if presenter.vector_work_presenters.present? %>
2
+ <div class="panel panel-default raster_works">
3
+ <div class="panel-heading">
4
+ <h2>Vector Works</h2>
5
+ </div>
6
+ <table class="table">
7
+ <thead>
8
+ <tr>
9
+ <th class="col-xs-3"></th>
10
+ <th>Work Name</th>
11
+ </tr>
12
+ </thead>
13
+ <tbody>
14
+ <% presenter.vector_work_presenters.each do |res| %>
15
+ <tr class="file_set attributes">
16
+ <td class="thumbnail" style="margin-bottom: 0px">
17
+ <%= render_thumbnail_tag res %>
18
+ </td>
19
+ <td>
20
+ <%= link_to res.title, main_app.curation_concerns_vector_work_path(res.id) %>
21
+ </td>
22
+ </tr>
23
+ <% end %>
24
+ </tbody>
25
+ </table>
26
+ </div>
27
+ <% elsif can? :edit, presenter.id %>
28
+ <h2>Vector Works</h2>
29
+ <p class="center"><em>This <%= @presenter.human_readable_type %> has no vector works associated with it. You can add one using the "Attach a Vector Work" button below.</em></p>
30
+ <% end %>
@@ -0,0 +1,2 @@
1
+ <%# This is a search result view %>
2
+ <%= render 'catalog/document', document: raster_work, document_counter: raster_work_counter %>
@@ -0,0 +1,24 @@
1
+ <% if presenter.raster_file_presenters.present? %>
2
+ <div class="panel panel-default related_files">
3
+ <div class="panel-heading">
4
+ <h2>Raster File</h2>
5
+ </div>
6
+ <table class="table table-striped">
7
+ <thead>
8
+ <tr>
9
+ <th>File</th>
10
+ <th>Filename</th>
11
+ <th>Date Uploaded</th>
12
+ <th>Visibility</th>
13
+ <th>Actions</th>
14
+ </tr>
15
+ </thead>
16
+ <tbody>
17
+ <%= render partial: 'member', collection: @presenter.raster_file_presenters %>
18
+ </tbody>
19
+ </table>
20
+ </div>
21
+ <% elsif can? :edit, presenter.id %>
22
+ <h2>Raster File</h2>
23
+ <p class="center"><em>This <%= presenter.human_readable_type %> doesn't have a raster file associated with it. You can add one using the "Attach a File" button below.</em></p>
24
+ <% end %>
@@ -0,0 +1,16 @@
1
+ <% if collector || editor %>
2
+ <div class="form-actions">
3
+ <% if editor %>
4
+ <%= link_to "Edit This #{@presenter.human_readable_type}", edit_polymorphic_path([main_app, @presenter]), class: 'btn btn-default' %>
5
+ <%= link_to "Attach a Vector Work", geo_concerns_engine.new_curation_concerns_member_vector_work_path(@presenter), class: 'btn btn-default' %>
6
+ <%= link_to "Attach a Raster Data File", main_app.new_curation_concerns_file_set_path(@presenter, type: 'raster-data'), class: 'btn btn-default' %>
7
+ <%= link_to "Attach a Metadata File", main_app.new_curation_concerns_file_set_path(@presenter, type: 'metadata'), class: 'btn btn-default' %>
8
+ <%= link_to "Delete This #{@presenter.human_readable_type}", [main_app, @presenter], class: 'btn btn-danger pull-right', data: { confirm: "Delete this #{@presenter.human_readable_type}?" }, method: :delete %>
9
+ <%= link_to t("file_manager.link_text"), polymorphic_path([main_app, :file_manager, @presenter]), class: 'btn btn-default' %>
10
+ <% end %>
11
+ <% if collector %>
12
+ <%= render 'collections/add_to_collection_modal', collectible: @presenter %>
13
+ <%= link_to_select_collection @presenter, class: 'btn btn-default' %>
14
+ <% end %>
15
+ </div>
16
+ <% end %>
@@ -0,0 +1,17 @@
1
+ <% provide :page_title, @presenter.page_title %>
2
+ <% provide :page_header do %>
3
+ <h1><%= @presenter %> <span class="human_readable_type">(<%= @presenter.human_readable_type %>)</span></h1>
4
+ <% end %>
5
+
6
+ <% collector = can?(:collect, @presenter.id) %>
7
+ <% editor = can?(:edit, @presenter.id) %>
8
+
9
+ <%= render 'representative_media', presenter: @presenter %>
10
+ <%= render 'geo_concerns/attributes', presenter: @presenter %>
11
+
12
+ <%= render 'related_raster_files', presenter: @presenter %>
13
+ <%= render 'geo_concerns/related_external_metadata_files', presenter: @presenter %>
14
+
15
+ <%= render 'members', presenter: @presenter %>
16
+
17
+ <%= render "show_actions", collector: collector, editor: editor%>
@@ -0,0 +1,25 @@
1
+ <% options = { wrapper_mappings: { multifile: :horizontal_file_input } }
2
+ options[:url] = geo_concerns_engine.curation_concerns_member_vector_work_index_path(parent_id: params[:parent_id]) if params[:parent_id] %>
3
+ <%= simple_form_for [main_app, @form], options do |f| %>
4
+ <% if f.error_notification -%>
5
+ <div class="alert alert-danger fade in">
6
+ <strong>Wait don't go!</strong> There was a problem with your submission. Please review the errors below:
7
+ <a class="close" data-dismiss="alert" href="#">&times;</a>
8
+ </div>
9
+ <% end -%>
10
+
11
+ <%= render 'geo_concerns/form_descriptive_fields', f: f %>
12
+ <%= render 'geo_concerns/form_supplementary_fields', f: f %>
13
+
14
+ <div class="row">
15
+ <div class="col-md-12 form-actions">
16
+ <%= f.submit class: 'btn btn-primary require-contributor-agreement' %>
17
+ <%- if curation_concern.new_record? -%>
18
+ <%= link_to 'Cancel', main_app.root_path, class: 'btn btn-link' %>
19
+ <%- else -%>
20
+ <%= link_to 'Cancel', polymorphic_path([main_app, @form]), class: 'btn btn-link' %>
21
+ <%- end -%>
22
+ </div>
23
+ </div>
24
+
25
+ <% end %>
@@ -0,0 +1,24 @@
1
+ <% if @presenter.vector_file_presenters.present? %>
2
+ <div class="panel panel-default related_files">
3
+ <div class="panel-heading">
4
+ <h2>Vector File</h2>
5
+ </div>
6
+ <table class="table table-striped">
7
+ <thead>
8
+ <tr>
9
+ <th>File</th>
10
+ <th>Filename</th>
11
+ <th>Date Uploaded</th>
12
+ <th>Visibility</th>
13
+ <th>Actions</th>
14
+ </tr>
15
+ </thead>
16
+ <tbody>
17
+ <%= render partial: 'member', collection: @presenter.vector_file_presenters %>
18
+ </tbody>
19
+ </table>
20
+ </div>
21
+ <% elsif can? :edit, @presenter.id %>
22
+ <h2>Vector Files</h2>
23
+ <p class="center"><em>This <%= @presenter.human_readable_type %> doesn't have a vector file associated with it. You can add one using the "Attach a File" button below.</em></p>
24
+ <% end %>
@@ -0,0 +1,15 @@
1
+ <% if collector || editor %>
2
+ <div class="form-actions">
3
+ <% if editor %>
4
+ <%= link_to "Edit This #{@presenter.human_readable_type}", edit_polymorphic_path([main_app, @presenter]), class: 'btn btn-default' %>
5
+ <%= link_to "Attach a Vector Data File", main_app.new_curation_concerns_file_set_path(@presenter, type: 'vector-data'), class: 'btn btn-default' %>
6
+ <%= link_to "Attach a Metadata File", main_app.new_curation_concerns_file_set_path(@presenter, type: 'metadata'), class: 'btn btn-default' %>
7
+ <%= link_to "Delete This #{@presenter.human_readable_type}", [main_app, @presenter], class: 'btn btn-danger pull-right', data: { confirm: "Delete this #{@presenter.human_readable_type}?" }, method: :delete %>
8
+ <%= link_to t("file_manager.link_text"), polymorphic_path([main_app, :file_manager, @presenter]), class: 'btn btn-default' %>
9
+ <% end %>
10
+ <% if collector %>
11
+ <%= render 'collections/add_to_collection_modal', collectible: @presenter %>
12
+ <%= link_to_select_collection @presenter, class: 'btn btn-default' %>
13
+ <% end %>
14
+ </div>
15
+ <% end %>
@@ -0,0 +1,2 @@
1
+ <%# This is a search result view %>
2
+ <%= render 'catalog/document', document: vector_work, document_counter: vector_work_counter %>
@@ -0,0 +1,15 @@
1
+ <% provide :page_title, @presenter.page_title %>
2
+ <% provide :page_header do %>
3
+ <h1><%= @presenter %> <span class="human_readable_type">(<%= @presenter.human_readable_type %>)</span></h1>
4
+ <% end %>
5
+
6
+ <% collector = can?(:collect, @presenter.id) %>
7
+ <% editor = can?(:edit, @presenter.id) %>
8
+
9
+ <%= render 'representative_media', presenter: @presenter %>
10
+ <%= render 'geo_concerns/attributes', presenter: @presenter %>
11
+
12
+ <%= render 'related_vector_files', presenter: @presenter %>
13
+ <%= render 'geo_concerns/related_external_metadata_files', presenter: @presenter %>
14
+
15
+ <%= render "show_actions", collector: collector, editor: editor%>
@@ -0,0 +1,11 @@
1
+ <%= presenter.attribute_to_html(:description) %>
2
+ <%= presenter.attribute_to_html(:creator, catalog_search_link: true ) %>
3
+ <%= presenter.attribute_to_html(:contributor, label: 'Contributors', catalog_search_link: true) %>
4
+ <%= presenter.attribute_to_html(:subject, catalog_search_link: true) %>
5
+ <%= presenter.attribute_to_html(:publisher) %>
6
+ <%= presenter.attribute_to_html(:language) %>
7
+ <%= presenter.attribute_to_html(:spatial, label: 'Place Names') %>
8
+ <%= presenter.attribute_to_html(:temporal, label: 'Time Periods') %>
9
+ <%= presenter.attribute_to_html(:issued) %>
10
+ <%= presenter.attribute_to_html(:coverage) %>
11
+ <%= presenter.attribute_to_html(:provenance) %>
@@ -0,0 +1,13 @@
1
+ <table class="table table-striped <%= dom_class(presenter) %> attributes" <%= presenter.microdata_type_to_html %>>
2
+ <caption class="table-heading"><h2>Attributes</h2></caption>
3
+ <thead>
4
+ <tr><th>Attribute Name</th><th>Values</th></tr>
5
+ </thead>
6
+ <tbody>
7
+ <%= render 'geo_concerns/attribute_rows', presenter: presenter %>
8
+ <%= presenter.attribute_to_html(:permission_badge, label: 'Visibility') %>
9
+ <%= presenter.attribute_to_html(:embargo_release_date) %>
10
+ <%= presenter.attribute_to_html(:lease_expiration_date) %>
11
+ <%= presenter.attribute_to_html(:rights) %>
12
+ </tbody>
13
+ </table>
@@ -0,0 +1,11 @@
1
+ <fieldset class="optional prompt">
2
+ <legend>Additional Information</legend>
3
+ <%= f.input :subject, as: :multi_value, input_html: { class: 'form-control' } %>
4
+ <%= f.input :publisher, as: :multi_value, input_html: { class: 'form-control' } %>
5
+ <%= f.input :source, as: :multi_value, input_html: { class: 'form-control' } %>
6
+ <%= f.input :language, as: :multi_value, input_html: { class: 'form-control' } %>
7
+ <%= f.input :spatial, as: :multi_value, input_html: { class: 'form-control' } %>
8
+ <%= f.input :temporal, as: :multi_value, input_html: { class: 'form-control' } %>
9
+ <%= f.input :issued, input_html: { class: 'form-control' } %>
10
+ <%= f.input :provenance, input_html: { class: 'form-control' } %>
11
+ </fieldset>
@@ -0,0 +1,9 @@
1
+ <div class="row with-headroom">
2
+ <legend>Add Location</legend>
3
+ <div class="col-md-12">
4
+ <fieldset>
5
+ <%= f.input :coverage, as: :hidden, label: false %>
6
+ <%= bbox(:coverage) %>
7
+ </fieldset>
8
+ </div>
9
+ </div>
@@ -0,0 +1,9 @@
1
+ <div class="row">
2
+ <div class="col-md-6" id="required-information">
3
+ <%= render "geo_concerns/form_required_information", f: f %>
4
+ </div>
5
+
6
+ <div class="col-md-6" id="additional-information">
7
+ <%= render "geo_concerns/form_additional_information", f: f %>
8
+ </div>
9
+ </div>