Sha256: 52cac2efe54a1b16fe1e6b168ace507043ebfd12547dada48974ab2dd4d20e45

Contents?: true

Size: 2 KB

Versions: 31

Compression:

Stored size: 2 KB

Contents

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

<% questionnaire.questions.includes([:questionnaire]).each do |question| %>
  <details class="meeting-polls__question--admin text-medium 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--nomargin primary small"><%= 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--nomargin primary small margin-top-1" disabled><%= t(".send") %></button>
            <% elsif question.published? %>
              <button class="button button--nomargin primary small margin-top-1"><%= t(".send") %></button>
            <% elsif question.closed? %>
              <div class="margin-top-1"><strong><%= t(".sent") %></strong></div>
            <% end %>
          </div>
        </div>
      </div>
    <% end %>
  </details>
<% end %>

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
decidim-meetings-0.27.9 app/views/decidim/meetings/polls/questions/_index_admin.html.erb
decidim-meetings-0.27.8 app/views/decidim/meetings/polls/questions/_index_admin.html.erb
decidim-meetings-0.27.7 app/views/decidim/meetings/polls/questions/_index_admin.html.erb
decidim-meetings-0.27.6 app/views/decidim/meetings/polls/questions/_index_admin.html.erb
decidim-meetings-0.26.10 app/views/decidim/meetings/polls/questions/_index_admin.html.erb
decidim-meetings-0.26.9 app/views/decidim/meetings/polls/questions/_index_admin.html.erb
decidim-meetings-0.27.5 app/views/decidim/meetings/polls/questions/_index_admin.html.erb
decidim-meetings-0.26.8 app/views/decidim/meetings/polls/questions/_index_admin.html.erb
decidim-meetings-0.27.4 app/views/decidim/meetings/polls/questions/_index_admin.html.erb
decidim-meetings-0.27.3 app/views/decidim/meetings/polls/questions/_index_admin.html.erb
decidim-meetings-0.26.7 app/views/decidim/meetings/polls/questions/_index_admin.html.erb
decidim-meetings-0.26.5 app/views/decidim/meetings/polls/questions/_index_admin.html.erb
decidim-meetings-0.27.2 app/views/decidim/meetings/polls/questions/_index_admin.html.erb
decidim-meetings-0.27.1 app/views/decidim/meetings/polls/questions/_index_admin.html.erb
decidim-meetings-0.26.4 app/views/decidim/meetings/polls/questions/_index_admin.html.erb
decidim-meetings-0.27.0 app/views/decidim/meetings/polls/questions/_index_admin.html.erb
decidim-meetings-0.26.3 app/views/decidim/meetings/polls/questions/_index_admin.html.erb
decidim-meetings-0.27.0.rc2 app/views/decidim/meetings/polls/questions/_index_admin.html.erb
decidim-meetings-0.27.0.rc1 app/views/decidim/meetings/polls/questions/_index_admin.html.erb
decidim-meetings-0.26.2 app/views/decidim/meetings/polls/questions/_index_admin.html.erb