Sha256: 4697d6f81371bbb63eca9382db6ce9d62a8bfab92ce1d873378e7198ab8bef3f

Contents?: true

Size: 1.85 KB

Versions: 4

Compression:

Stored size: 1.85 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 allowed_to? :create, :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 allowed_to? :update, :response, response: 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 allowed_to? :update, :response, response: 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

4 entries across 4 versions & 1 rubygems

Version Path
decidim-consultations-0.12.2 app/views/decidim/consultations/admin/responses/index.html.erb
decidim-consultations-0.12.1 app/views/decidim/consultations/admin/responses/index.html.erb
decidim-consultations-0.12.0 app/views/decidim/consultations/admin/responses/index.html.erb
decidim-consultations-0.12.0.pre app/views/decidim/consultations/admin/responses/index.html.erb