Sha256: 345bec6d9f7c73aeb0aff38a47c4eb5a7cd12ea27fe89364cdfbbf93515ec232

Contents?: true

Size: 1.97 KB

Versions: 7

Compression:

Stored size: 1.97 KB

Contents

<div class="meeting-polls__admin-label"><%= t(".admin_dashboard") %></div>

<% questionnaire.questions.includes([:questionnaire]).each do |question| %>
  <details class="meeting-polls__question meeting-polls__question--admin open" data-question="<%= question.id %>" <%= "open" if open_question == question.id %>>
    <summary><%= t(".question") %></summary>

    <%= form_tag(meeting_polls_question_path(meeting, question), method: :patch, remote: true) do %>
      <div>
        <p><%= translated_attribute(question.body) %></p>

        <%= link_to t(".edit"), Decidim::EngineRouter.admin_proxy(meeting.component).edit_meeting_poll_path(meeting), target: "_blank", rel: "noopener noreferrer" %>

        <div class="meeting-polls__admin-action meeting-polls__admin-action-question">
          <div><%= t(".question") %></div>
          <div>
            <% if question.unpublished? %>
              <button class="button button__sm button__secondary"><%= t(".send") %></button>
            <% else %>
              <div><strong><%= t(".sent") %></strong></div>
              <div><%= pluralize(question.answers_count, t(".received_answer"), t(".received_answers")) %></div>
            <% end %>
          </div>
        </div>
        <div class="meeting-polls__admin-action meeting-polls__admin-action-results">
          <div><%= t(".results") %></div>
          <div>
            <% unless question.unpublished? %>
              <%= cell "decidim/meetings/question_responses", question %>
            <% end %>

            <% if question.unpublished? %>
              <button class="button button__sm button__secondary" disabled><%= t(".send") %></button>
            <% elsif question.published? %>
              <button class="button button__sm button__secondary"><%= t(".send") %></button>
            <% elsif question.closed? %>
              <div class="mt-1"><strong><%= t(".sent") %></strong></div>
            <% end %>
          </div>
        </div>
      </div>
    <% end %>
  </details>
<% end %>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
decidim-meetings-0.28.4 app/views/decidim/meetings/polls/questions/_index_admin.html.erb
decidim-meetings-0.28.3 app/views/decidim/meetings/polls/questions/_index_admin.html.erb
decidim-meetings-0.28.2 app/views/decidim/meetings/polls/questions/_index_admin.html.erb
decidim-meetings-0.28.1 app/views/decidim/meetings/polls/questions/_index_admin.html.erb
decidim-meetings-0.28.0 app/views/decidim/meetings/polls/questions/_index_admin.html.erb
decidim-meetings-0.28.0.rc5 app/views/decidim/meetings/polls/questions/_index_admin.html.erb
decidim-meetings-0.28.0.rc4 app/views/decidim/meetings/polls/questions/_index_admin.html.erb