Sha256: 53ca44b533ba45eed5c3b36e55926e9bb6e217508022346865af741ae6079924

Contents?: true

Size: 1.02 KB

Versions: 2

Compression:

Stored size: 1.02 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, 'users')
        completed
      ballots from an audience of
      = succeed('.') do
        %strong= pluralize(poll.users.count, 'total users')

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

    .effective-ballot
      %table.table.table-hover
        %thead
          %tr
            %th Poll 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

2 entries across 2 versions & 1 rubygems

Version Path
effective_polls-0.0.2 app/views/effective/poll_results/_results.html.haml
effective_polls-0.0.1 app/views/effective/poll_results/_results.html.haml