Repository URL to install this package:
|
Version:
1.0.0 ▾
|
<%= render "header", page_title: "Merge code \"#{page.resource.localized_name_with_path}\" into another code", action: :merge, page: page %>
<section class="main-content__body">
<% content_for(:javascript) do %>
<script>
$('#code_merge_into_code_id').selectize();
</script>
<% end %>
<%= form_for([namespace, page.resource], url: merge_into_annotator_discourse_annotator_project_code_path(project_id: @project.id, id:page.resource.id), method: :put, html: {class: "form"}) do |f| %>
<% if page.resource.errors.any? %>
<div id="error_explanation">
<h2>
<%= pluralize(page.resource.errors.count, "error") %>
prohibited this <%= page.resource_name %> from being saved:
</h2>
<ul>
<% page.resource.errors.full_messages.each do |message| %>
<li class="flash-error"><%= message %></li>
<% end %>
</ul>
</div>
<% end %>
<% attributes = page.attributes.select {|a| a.name == 'merge_into_code_id'} %>
<% attributes.each do |attribute| -%>
<div class="field-unit field-unit--<%= attribute.html_class %>">
<%= render_field attribute, f: f, resource: page.resource %>
</div>
<% end -%>
<div class="form-actions">
<%= f.submit 'Merge' %>
</div>
<% end %>
</section>