Sha256: 7ec9a07ebdffbc4b65d695711f247d690ee472c9467de05e043862dcf030acdf

Contents?: true

Size: 1.72 KB

Versions: 7

Compression:

Stored size: 1.72 KB

Contents

<div class="election__section-title">
  <%= icon "bar-chart-box-line" %>
  <h2 class="h4"><%= t("decidim.elections.elections.results.title") %></h2>
</div>

<p class="election__section-desc"><%= t("decidim.elections.elections.results.description") %></p>

<ul id="accordion-results" class="space-y-8" data-component="accordion">
  <% model.questions.each_with_index do |question, ix| %>
    <li class="election__accordion">
      <button id="accordion-trigger-<%= ix %>" data-controls="accordion-panel-<%= ix %>" class="election__accordion-trigger" <%= " data-open='true'" if ix.zero? %>>
        <%= translated_attribute(question.title) %>
        <%= icon "arrow-down-s-line" %>
        <%= icon "arrow-up-s-line" %>
      </button>

      <div id="accordion-panel-<%= ix %>" class="election__accordion-panel" aria-hidden="true">
        <% question.answers.each do |answer| %>
          <div>
            <p>
              <%= translated_attribute(answer.title) %>

              <% if answer.selected? %>
                <span class="label">
                  <%= t("decidim.elections.elections.results.selected") %>
                </span>
              <% end %>
            </p>

            <%= render view: :progress_bar, locals: { id: answer.id, results_percentage: answer.results_percentage, results_total: answer.results_total } %>
          </div>
        <% end %>

        <% if question.results.blank_answers.any? %>
          <div>
            <p><%= t("decidim.elections.votes.new.nota_option") %></p>
            <%= render view: :progress_bar, locals: { id: answer.id, results_percentage: question.blank_votes_percentage, results_total: question.blank_votes } %>
          </div>
        <% end %>
      </div>
    </li>
  <% end %>
</ul>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
decidim-elections-0.28.4 app/cells/decidim/elections/election_results/show.erb
decidim-elections-0.28.3 app/cells/decidim/elections/election_results/show.erb
decidim-elections-0.28.2 app/cells/decidim/elections/election_results/show.erb
decidim-elections-0.28.1 app/cells/decidim/elections/election_results/show.erb
decidim-elections-0.28.0 app/cells/decidim/elections/election_results/show.erb
decidim-elections-0.28.0.rc5 app/cells/decidim/elections/election_results/show.erb
decidim-elections-0.28.0.rc4 app/cells/decidim/elections/election_results/show.erb