Sha256: 6752b3628231b2e8f200b068ca19f515497e4418c2b37f2b19b2ab461e9363ad

Contents?: true

Size: 1.8 KB

Versions: 19

Compression:

Stored size: 1.8 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_response", 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

19 entries across 19 versions & 1 rubygems

Version Path
decidim-consultations-0.19.1 app/views/decidim/consultations/admin/responses/index.html.erb
decidim-consultations-0.18.1 app/views/decidim/consultations/admin/responses/index.html.erb
decidim-consultations-0.19.0 app/views/decidim/consultations/admin/responses/index.html.erb
decidim-consultations-0.17.2 app/views/decidim/consultations/admin/responses/index.html.erb
decidim-consultations-0.18.0 app/views/decidim/consultations/admin/responses/index.html.erb
decidim-consultations-0.17.1 app/views/decidim/consultations/admin/responses/index.html.erb
decidim-consultations-0.16.1 app/views/decidim/consultations/admin/responses/index.html.erb
decidim-consultations-0.17.0 app/views/decidim/consultations/admin/responses/index.html.erb
decidim-consultations-0.16.0 app/views/decidim/consultations/admin/responses/index.html.erb
decidim-consultations-0.15.2 app/views/decidim/consultations/admin/responses/index.html.erb
decidim-consultations-0.15.1 app/views/decidim/consultations/admin/responses/index.html.erb
decidim-consultations-0.15.0 app/views/decidim/consultations/admin/responses/index.html.erb
decidim-consultations-0.14.4 app/views/decidim/consultations/admin/responses/index.html.erb
decidim-consultations-0.14.3 app/views/decidim/consultations/admin/responses/index.html.erb
decidim-consultations-0.14.2 app/views/decidim/consultations/admin/responses/index.html.erb
decidim-consultations-0.14.1 app/views/decidim/consultations/admin/responses/index.html.erb
decidim-consultations-0.13.1 app/views/decidim/consultations/admin/responses/index.html.erb
decidim-consultations-0.13.0 app/views/decidim/consultations/admin/responses/index.html.erb
decidim-consultations-0.13.0.pre1 app/views/decidim/consultations/admin/responses/index.html.erb