Sha256: 22036023d782a5487d7f4e9fa4addb0b17a5ca91c1379589a5cac6d4008461fb

Contents?: true

Size: 1.77 KB

Versions: 3

Compression:

Stored size: 1.77 KB

Contents

<div class="govuk-grid-row">
  <div class="govuk-grid-column-two-thirds">
    <h1 class="govuk-heading-l"><%= t(".heading") %></h1>

    <table class="govuk-table">
      <thead class="govuk-table__head">
        <tr class="govuk-table__row">
          <th scope="col" class="govuk-table__header"><%= t(".table.key") %></th>
          <th colspan="2" scope="col" class="govuk-table__header"><%= t(".table.status") %></th>
        </tr>
      </thead>

      <tbody class="govuk-body">
        <% @feature_toggles.each do |feature_toggle| %>
          <tr class="govuk-table__row">
            <td class="govuk-table__cell"><%= feature_toggle.key %></td>
            <td class="govuk-table__cell">
              <span class="status-tag <%= feature_toggle.active ? "status-tag--active" : "status-tag--inactive" %>">
                <%= feature_toggle.active ? t(".status.enabled") : t(".status.disabled") %>
              </span>
            </td>

            <td class="govuk-table__cell">
              <ul class="govuk-list">
                <li>
                  <%= form_for feature_toggle do |f| %>
                    <%= f.hidden_field :active, value: !feature_toggle.active %>
                    <%= f.submit t(".actions.toggle"), class: "govuk-button" %>
                  <% end %>
                </li>
                <li>
                  <%= delete_button_to t(".actions.delete"), feature_toggle_path(feature_toggle), {
                    data: { confirm: "Are you sure?" },
                    class: "govuk-button govuk-button--warning"
                  } %>

                </li>
              </ul>
            </td>
          </tr>
        <% end %>
      </tbody>
    </table>

    <p>
      <%= link_to t(".new"), new_feature_toggle_path, class: "govuk-button" %>
    </p>
  </div>
</div>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
defra_ruby_features-0.2.0 app/views/defra_ruby_features/feature_toggles/index.html.erb
defra_ruby_features-0.1.4 app/views/defra_ruby_features/feature_toggles/index.html.erb
defra_ruby_features-0.1.3 app/views/defra_ruby_features/feature_toggles/index.html.erb