diff --git a/templates/representatives/_address_block.haml b/templates/representatives/_address_block.haml index 232aa0f7559ef50f168e625811b90a06caa522bb..16eb4b4b5ae945cdbc29b7daab34b313fb5820ea 100644 --- a/templates/representatives/_address_block.haml +++ b/templates/representatives/_address_block.haml @@ -1,9 +1,5 @@ .address - - if address.floor or address.office_number - .detail - - if address.floor - %span.floor Floor {{ address.floor }} - - if address.office_number - %span.office Office {{ address.office_number }} + - if address.floor and address.office_number + .office Floor {{ address.floor }} - office {{ address.office_number }} .street {{ address.number }} {{ address.street }} .city {{ address.city }} {{ address.postcode }}, {{ address.country.name }} diff --git a/templates/representatives/_representative_block.haml b/templates/representatives/_representative_block.haml index 4ba44cdb1afdb9d421a27a54765c70ff580874c3..cc991450d3ff0fe258d687528f75defb04905140 100644 --- a/templates/representatives/_representative_block.haml +++ b/templates/representatives/_representative_block.haml @@ -67,9 +67,16 @@ %td = email.email|email_link + - if representative.phone_set.all|length > 0 + %tr + %th Phone numbers + %td + - for phone in representative.phone_set.all + .phone {{ phone.number }} + - for address in representative.address_set.all %tr %th = address.name %td - - include 'representatives/_address_block.html' with address=address + - include 'representatives/_address_block.html' with address=address \ No newline at end of file