openaustralia/publicwhip

View on GitHub
app/views/members/_summary.html.haml

Summary

Maintainability
Test Coverage
%p.member-description
  - if !member.person.current_offices.empty?
    = member.name
    is
    -# TODO: The UK uses extra Offices data like department so this will need to be expanded
    %span.role= member.person.current_offices.map{|o| content_tag(:em, o.position) }.to_sentence(two_words_connector: ", and ").html_safe + "."

  - # TODO: add back in the rebellion and attendance rate for previous membership.
  - if member.person.members.size > 1
    = member_history_sentence(member)