<% @plan.features.include?(feature).tap do |enabled| %>
  <tr id="<%= dom_id(feature) %>" class="<%= enabled ? 'enabled' : 'disabled' %>">
    <td class="title"><%= feature_name(feature) %></td>
    <td><%= feature_description(feature) %></td>

    <td>
      <%- if enabled -%>
        <%= form_tag admin_plan_featuring_path(@plan, feature, :type => @plan.class.name.underscore),
          :method => :delete, :class => 'remote button-to' do %>
          <%= image_submit_tag 'tick.png' %>
        <% end %>
      <% else %>
        <%= form_tag admin_plan_featurings_path(@plan, :type => @plan.class.name.underscore),
          :class => 'remote button-to' do %>
          <%= hidden_field_tag :id, feature.id %>
          <%= image_submit_tag 'cross.png' %>
        <% end %>
      <% end %>
    </td>

    <td class="operations">
      <%= link_to 'Edit', edit_admin_plan_feature_path(@plan, feature, :type => @plan.class.name.underscore),
        :class => 'fancybox action edit', 'data-autodimensions' => 'true' %>

      <%= delete_button_for admin_plan_feature_path(@plan, feature, :method => :delete, :type => @plan.class.name.underscore), :remote => true, data: {:confirm => "Are you sure?"} %>
    </td>
  </tr>
<% end %>
