Sha256: 16b66bf7abeebbc1bd72a36f78a7b7aa064a2fe2488e3e992b178b3035bf50cc

Contents?: true

Size: 1.28 KB

Versions: 9

Compression:

Stored size: 1.28 KB

Contents

%li
  .list--details
    - if !instance_variable_get("@parliament").nil? # parliament member
      %h2
        %a{:href => "/constituencies/#{constituencies.graph_id}"}= constituencies.name
      -# Constituency has a member? TRUE = Member's Name : FALSE = "Vacant" text
      - unless constituencies.members.empty?
        - constituencies.seat_incumbencies.each do |incumbency|
          %p= "#{incumbency.member.display_name} #{t('pugin.constituencies.list.from')} #{l(incumbency.start_date, format: :default)} - #{l(incumbency.end_date, format: :default)}"
          - incumbency.member.party_memberships.each do |member_party|
            %p= member_party.party.name
    - elsif constituencies.current?
      %h2
        %a{:href => "/constituencies/#{constituencies.graph_id}"}= constituencies.name
      -# Constituency has a member? TRUE = Member's Name : FALSE = "Vacant" text
      %p= constituencies.members.empty? ? I18n.t('pugin.constituencies.list.current_constituency.vacant').capitalize : constituencies.members.first.display_name
    - else 
      %h2
        %a{:href => "/constituencies/#{constituencies.graph_id}"}= constituencies.name
      %p= "#{t('pugin.constituencies.list.former_constituency.former').capitalize} #{t('pugin.constituencies.list.former_constituency.constituency')}"

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
pugin-1.0.1.pre app/views/pugin/constituencies/list/_list.html.haml
pugin-1.0.1 app/views/pugin/constituencies/list/_list.html.haml
pugin-1.0.0.pre app/views/pugin/constituencies/list/_list.html.haml
pugin-0.9.0 app/views/pugin/constituencies/list/_list.html.haml
pugin-0.8.9 app/views/pugin/constituencies/list/_list.html.haml
pugin-0.8.8 app/views/pugin/constituencies/list/_list.html.haml
pugin-0.8.7 app/views/pugin/constituencies/list/_list.html.haml
pugin-0.8.7.pre app/views/pugin/constituencies/list/_list.html.haml
pugin-0.8.6 app/views/pugin/constituencies/list/_list.html.haml