Sha256: 9a337a3b5f137e189441f162eba7a96df1e776bc86289f70defbc35792b9fe22

Contents?: true

Size: 1.81 KB

Versions: 3

Compression:

Stored size: 1.81 KB

Contents

<div class="card" id="questions">
  <div class="card-divider">
    <h2 class="card-title">
      <%= t "decidim.admin.titles.responses" %>
      <%= link_to t("actions.new", scope: "decidim.admin", name: t("models.response.name", scope: "decidim.admin")),
                  new_response_path(current_question),
                  class: "button tiny button--title" if can? :create, Decidim::Consultations::Response %>
    </h2>
  </div>
  <div class="card-section">
    <div class="table-scroll">
      <table class="table-list">
        <thead>
          <tr>
            <th><%= t("models.response.fields.title", scope: "decidim.admin") %></th>
            <th><%= t("models.response.fields.created_at", scope: "decidim.admin") %></th>
            <th></th>
          </tr>
        </thead>
        <tbody>
          <% current_question.responses.each do |response| %>
            <tr>
              <td>
                <% if can? :update, response %>
                  <%= link_to translated_attribute(response.title),
                              edit_response_path(current_question, response) %>
                <% else %>
                  <%= translated_attribute(response.title) %>
                <% end %>
              </td>
              <td>
                <%= l response.created_at, format: :short %>
              </td>
              <td class="table-list__actions">
                <% if can? :update, response %>
                  <%= icon_link_to "pencil",
                                   edit_response_path(current_question, response),
                                   t("actions.configure", scope: "decidim.admin"),
                                   class: "action-icon--edit" %>
                <% end %>
              </td>
            </tr>
          <% end %>
        </tbody>
      </table>
    </div>
  </div>
</div>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
decidim-consultations-0.11.2 app/views/decidim/consultations/admin/responses/index.html.erb
decidim-consultations-0.11.1 app/views/decidim/consultations/admin/responses/index.html.erb
decidim-consultations-0.11.0.pre1 app/views/decidim/consultations/admin/responses/index.html.erb