From fba13aa4c46a1a26b5108166f446f3b5696ccb26 Mon Sep 17 00:00:00 2001 From: Eliot Jordan Date: Wed, 21 Dec 2016 15:44:05 -0600 Subject: [PATCH] add geo works to collections in the same way as other works --- .../image_works/_show_actions.html.erb | 23 +++++++++++++++++++ .../raster_works/_show_actions.html.erb | 9 ++++++++ .../vector_works/_show_actions.html.erb | 9 ++++++++ .../_form_supplementary_fields.html.erb | 1 + 4 files changed, 42 insertions(+) create mode 100644 app/views/curation_concerns/image_works/_show_actions.html.erb create mode 100644 app/views/curation_concerns/raster_works/_show_actions.html.erb create mode 100644 app/views/curation_concerns/vector_works/_show_actions.html.erb diff --git a/app/views/curation_concerns/image_works/_show_actions.html.erb b/app/views/curation_concerns/image_works/_show_actions.html.erb new file mode 100644 index 000000000..be0ed580b --- /dev/null +++ b/app/views/curation_concerns/image_works/_show_actions.html.erb @@ -0,0 +1,23 @@ +<% if collector || editor %> +
+ <% if editor %> + <%= link_to "Edit This #{@presenter.human_readable_type}", edit_polymorphic_path([main_app, @presenter]), class: 'btn btn-default' %> + <% if @presenter.valid_child_concerns.length > 0 %> +
+ + +
+ <% end %> + <%= render 'image_actions', document: @presenter %> + <%= 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 %> + <% end %> +
+<% end %> diff --git a/app/views/curation_concerns/raster_works/_show_actions.html.erb b/app/views/curation_concerns/raster_works/_show_actions.html.erb new file mode 100644 index 000000000..25ec4f964 --- /dev/null +++ b/app/views/curation_concerns/raster_works/_show_actions.html.erb @@ -0,0 +1,9 @@ +<% if collector || editor %> +
+ <% if editor %> + <%= link_to "Edit This #{@presenter.human_readable_type}", edit_polymorphic_path([main_app, @presenter]), class: 'btn btn-default' %> + <%= render 'raster_actions', document: @presenter %> + <%= 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 %> + <% end %> +
+<% end %> diff --git a/app/views/curation_concerns/vector_works/_show_actions.html.erb b/app/views/curation_concerns/vector_works/_show_actions.html.erb new file mode 100644 index 000000000..660210044 --- /dev/null +++ b/app/views/curation_concerns/vector_works/_show_actions.html.erb @@ -0,0 +1,9 @@ +<% if collector || editor %> +
+ <% if editor %> + <%= link_to "Edit This #{@presenter.human_readable_type}", edit_polymorphic_path([main_app, @presenter]), class: 'btn btn-default' %> + <%= render 'vector_actions', document: @presenter %> + <%= 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 %> + <% end %> +
+<% end %> diff --git a/app/views/geo_concerns/_form_supplementary_fields.html.erb b/app/views/geo_concerns/_form_supplementary_fields.html.erb index 8cb1cf651..a5d91e10d 100644 --- a/app/views/geo_concerns/_form_supplementary_fields.html.erb +++ b/app/views/geo_concerns/_form_supplementary_fields.html.erb @@ -1,5 +1,6 @@ <%= render "geo_concerns/form_bounding_box", f: f %> <%= render "geo_concerns/form_files_and_links", f: f %> +<%= render "form_member_of_collections", f: f %> <%= render "form_media", f: f %>