Sha256: a140eb653453a9c0046340373c4f899e3ba7f5b6b2e27a384b18ca147e854140

Contents?: true

Size: 1.25 KB

Versions: 7

Compression:

Stored size: 1.25 KB

Contents

.card.mb-3
  .card-body
    %h5.card-title Results

    %p #{poll} was available from #{poll.available_date}.

    %p
      %strong
        = pluralize(poll.completed_ballots.count, 'user')
        completed
      ballots

      - users_count = (poll.users.count rescue nil)
      - if users_count.present?
        from an audience of
        = succeed('.') do
          %strong= pluralize(users_count, 'total user')

.card.mb-3
  .card-body
    %h5.card-title Question Results

    - if poll.hide_results? && !poll.ended?
      %p The results of this poll will be displayed once it has ended.
    - else
      .effective-ballot
        %table.table.table-hover
          %thead
            %tr
              %th Question
              %th Results

          %tbody
            - ballots = poll.ballots

            - poll.poll_questions.each_with_index do |poll_question, index|
              - ballot_responses = poll.poll_results(poll_question: poll_question)

              %tr
                %td
                  #{poll_question.position + 1}. #{poll_question}
                  %br
                  %small.text-muted= poll_question.category

                %td= render('effective/poll_results/poll_result', poll_question: poll_question, ballot_responses: ballot_responses)

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
effective_polls-0.7.3 app/views/effective/poll_results/_results.html.haml
effective_polls-0.7.2 app/views/effective/poll_results/_results.html.haml
effective_polls-0.7.1 app/views/effective/poll_results/_results.html.haml
effective_polls-0.7.0 app/views/effective/poll_results/_results.html.haml
effective_polls-0.6.2 app/views/effective/poll_results/_results.html.haml
effective_polls-0.6.1 app/views/effective/poll_results/_results.html.haml
effective_polls-0.6.0 app/views/effective/poll_results/_results.html.haml