Sha256: 50b9da73124e7edd6e5aaca9170cf01ca150b40d22c04884fe992f80e70a68f5

Contents?: true

Size: 1.76 KB

Versions: 25

Compression:

Stored size: 1.76 KB

Contents

<div class="card" id="areas">
  <div class="card-divider">
    <h2 class="card-title">
      <%= t "decidim.admin.titles.areas" %>
      <% if allowed_to? :create, :area %>
        <%= link_to t("actions.add", scope: "decidim.admin"), new_area_path, class: "button tiny button--title new" %>
      <% end %>
    </h2>
  </div>
  <div class="card-section">
    <% if @areas.any? %>
      <div class="table-scroll">
        <table class="table-list">
        <thead>
          <tr>
            <th><%= t("models.area.fields.name", scope: "decidim.admin") %></th>
            <th><%= t("models.area.fields.area_type", scope: "decidim.admin") %></th>
            <th></th>
          </tr>
        </thead>
        <tbody>
          <% @areas.each do |area| %>
            <tr>
              <td>
                <%= translated_attribute(area.name) %>
              </td>
              <td>
                <%= area.area_type ? translated_attribute(area.area_type.name) : "-" %>
              </td>
              <td class="table-list__actions">
                <% if allowed_to? :update, :area, area: area %>
                  <%= icon_link_to "pencil", [:edit, area], t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit", method: :get, data: {} %>
                <% end %>

                <% if allowed_to? :destroy, :area, area: area %>
                  <%= icon_link_to "circle-x", area, t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %>
                <% end %>
              </td>
            </tr>
          <% end %>
        </tbody>
        </table>
      </div>
    <% else %>
      <p><%= t("decidim.admin.areas.no_areas") %></p>
    <% end %>
  </div>
</div>

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
decidim-admin-0.27.3 app/views/decidim/admin/areas/index.html.erb
decidim-admin-0.26.7 app/views/decidim/admin/areas/index.html.erb
decidim-admin-0.26.5 app/views/decidim/admin/areas/index.html.erb
decidim-admin-0.27.2 app/views/decidim/admin/areas/index.html.erb
decidim-admin-0.27.1 app/views/decidim/admin/areas/index.html.erb
decidim-admin-0.26.4 app/views/decidim/admin/areas/index.html.erb
decidim-admin-0.27.0 app/views/decidim/admin/areas/index.html.erb
decidim-admin-0.26.3 app/views/decidim/admin/areas/index.html.erb
decidim-admin-0.27.0.rc2 app/views/decidim/admin/areas/index.html.erb
decidim-admin-0.27.0.rc1 app/views/decidim/admin/areas/index.html.erb
decidim-admin-0.26.2 app/views/decidim/admin/areas/index.html.erb
decidim-admin-0.26.1 app/views/decidim/admin/areas/index.html.erb
decidim-admin-0.26.0 app/views/decidim/admin/areas/index.html.erb
decidim-admin-0.26.0.rc2 app/views/decidim/admin/areas/index.html.erb
decidim-admin-0.26.0.rc1 app/views/decidim/admin/areas/index.html.erb
decidim-admin-0.25.2 app/views/decidim/admin/areas/index.html.erb
decidim-admin-0.25.1 app/views/decidim/admin/areas/index.html.erb
decidim-admin-0.25.0 app/views/decidim/admin/areas/index.html.erb
decidim-admin-0.25.0.rc4 app/views/decidim/admin/areas/index.html.erb
decidim-admin-0.25.0.rc3 app/views/decidim/admin/areas/index.html.erb