oneclickorgs/one-click-orgs

View on GitHub
app/views/one_click/_open_proposals.html.haml

Summary

Maintainability
Test Coverage
.section.open-proposals
  %h3 Votes in progress
  %p.explanation
    - if proposals.count == 0
      No proposals are currently undergoing voting by
      = current_organisation.name
      members.
    - else
      These proposals are currently undergoing voting by
      = current_organisation.name
      members.
  - proposals.each do |proposal|
    = content_tag_for(:div, proposal) do
      %h4
        = proposal.title
        %span.time-ends
          (voting ends
          = proposal.end_date.to_s(:long)
          )
      = render 'proposals/description', :proposal => proposal
      %p.votes
        = proposal.votes_for
        votes for,
        = proposal.votes_against
        against
      = render 'proposals/vote', :proposal => proposal
      %br.clear