zendesk/arturo

View on GitHub
app/views/arturo/features/index.html.erb

Summary

Maintainability
Test Coverage
<%# frozen_string_literal: true %>
<h2><%= t('.title') %></h2>

<%= arturo_flash_messages %>

<%= form_tag(arturo_engine.features_path, :method => 'put', 'data-update-path' => arturo_engine.feature_path(:id => ':id'), :remote => true) do %>
  <fieldset>
    <legend><%= t('.title') %></legend>
    <table class='features'>
      <col class='name' />
      <col class='deployment_percentage' />
      <col class='edit' />
      <thead>
        <tr>
          <th><%= t('activerecord.attributes.arturo/feature.name') %></th>
          <th><%= t('activerecord.attributes.arturo/feature.deployment_percentage') %></th>
          <th>&nbsp;</th>
        </tr>
      </thead>
      <tfoot>
        <tr><th colspan='4'><%= link_to t('.new'), arturo_engine.new_feature_path %> <%= submit_tag %></th></tr>
      </tfoot>
      <tbody>
        <% @features.each do |f| %>
          <%= render :partial => 'feature', :locals => { :feature => f } %>
        <% end %>
        <% if @features.none? %>
        <tr class='if_no_features'><td colspan='4'><%= t('.none_yet') %></td></tr>
        <% end %>
      </tbody>
    </table>
  </fieldset>
<% end %>