Skip to content
This repository has been archived by the owner on May 14, 2022. It is now read-only.

Add geo works to collections in the same way as other works #904

Merged
merged 1 commit into from
Dec 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions app/views/curation_concerns/image_works/_show_actions.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<% if collector || editor %>
<div class="form-actions">
<% 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 %>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Attach Child <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<% @presenter.valid_child_concerns.each do |concern| %>
<li>
<%= link_to "Attach #{concern.human_readable_type}", polymorphic_path([main_app, :new, :curation_concerns, :parent, concern.model_name.singular], parent_id: @presenter.id) %>
</li>
<% end %>
</ul>
</div>
<% 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 %>
</div>
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<% if collector || editor %>
<div class="form-actions">
<% 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 %>
</div>
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<% if collector || editor %>
<div class="form-actions">
<% 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 %>
</div>
<% end %>
1 change: 1 addition & 0 deletions app/views/geo_concerns/_form_supplementary_fields.html.erb
Original file line number Diff line number Diff line change
@@ -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 %>

<div class="row with-headroom">
Expand Down