<%= params[:flaggable_type].classify %> Flags
<% if @flag_form.errors? %>
Whoops! There were some errors saving your flags:
<% @flag_form.features.each do |feature| %>
<% feature.errors.full_messages.each do |msg| %>
- <%= feature.name %>: <%= msg %>
<% end %>
<% end %>
<% end %>
<%= form_tag do %>
<%= table do %>
|
Feature |
In Code? |
<%= render partial: "detour/shared/spacer_cells", locals: { tag: "th" } %>
<% @flag_form.groups.each do |group| %>
|
<% end %>
<%= render partial: "feature_form", collection: @flag_form.features, as: :feature %>
<% end %>
<%= content_tag :span, "Create a Feature", class: "btn btn-default pull-left", data: { toggle: "modal", target: "#create-feature" } %>
<% if @flag_form.errors? %>
<%= link_to "Cancel", request.path, class: "btn btn-default" %>
<% end %>
<%= submit_tag "Save Changes", class: "btn btn-primary" %>
<% end %>
<%= modal title: "Delete Feature", id: "delete-feature" do %>
Are you sure you want to delete ?
<%= modal_footer do %>
<%= link_to "Delete Feature", "javascript:void(0)", method: :delete, class: "btn btn-danger" %>
<% end %>
<% end %>
<%= modal title: "Create a Feature", id: "create-feature", fade: true do %>
<%= form_for Detour::Feature.new, remote: true do |form| %>
<%= form.text_field :name, class: "form-control", placeholder: "feature_name" %>
<%= modal_footer do %>
<%= form.submit "Create Feature", class: "btn btn-primary" %>
<% end %>
<% end %>
<% end %>