Sha256: b5e07aa0142f2ed087deda87e5eba5abe170e4019195cb8b8d1fa5ee3ded2e97

Contents?: true

Size: 1.59 KB

Versions: 33

Compression:

Stored size: 1.59 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
      - if !constituencies.members.empty?
        %p= constituencies.current_member_display_name
        %p= constituencies.current_member_party_name
      - else
        %p= I18n.t('pugin.constituencies.list.current_constituency.vacant').capitalize
    - else
      %h2
        - date_string = " (#{l(constituencies.start_date, format: :year_only)} - #{l(constituencies.end_date, format: :year_only)})" if constituencies.respond_to?(:start_date) && constituencies.respond_to?(:end_date)
        %a{:href => "/constituencies/#{constituencies.graph_id}"}= "#{constituencies.name}#{date_string}"
      %p= "#{t('pugin.constituencies.list.former_constituency.former').capitalize} #{t('pugin.constituencies.list.former_constituency.constituency')}"

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
pugin-1.6.23 app/views/pugin/constituencies/list/_list.html.haml
pugin-1.6.22 app/views/pugin/constituencies/list/_list.html.haml
pugin-1.6.21 app/views/pugin/constituencies/list/_list.html.haml
pugin-1.6.20 app/views/pugin/constituencies/list/_list.html.haml
pugin-1.6.19 app/views/pugin/constituencies/list/_list.html.haml
pugin-1.6.18 app/views/pugin/constituencies/list/_list.html.haml
pugin-1.6.17 app/views/pugin/constituencies/list/_list.html.haml
pugin-1.6.16 app/views/pugin/constituencies/list/_list.html.haml
pugin-1.6.15 app/views/pugin/constituencies/list/_list.html.haml
pugin-1.6.14 app/views/pugin/constituencies/list/_list.html.haml
pugin-1.6.13 app/views/pugin/constituencies/list/_list.html.haml
pugin-1.6.12 app/views/pugin/constituencies/list/_list.html.haml
pugin-1.6.11 app/views/pugin/constituencies/list/_list.html.haml
pugin-1.6.10 app/views/pugin/constituencies/list/_list.html.haml
pugin-1.6.9 app/views/pugin/constituencies/list/_list.html.haml
pugin-1.6.8 app/views/pugin/constituencies/list/_list.html.haml
pugin-1.6.7 app/views/pugin/constituencies/list/_list.html.haml
pugin-1.6.6 app/views/pugin/constituencies/list/_list.html.haml
pugin-1.6.5 app/views/pugin/constituencies/list/_list.html.haml
pugin-1.6.4 app/views/pugin/constituencies/list/_list.html.haml