From d314829805e662e82f999197dbc404967093f9cf Mon Sep 17 00:00:00 2001 From: Nicolas Joyard <joyard.nicolas@gmail.com> Date: Mon, 18 Apr 2016 08:55:09 +0200 Subject: [PATCH] Use rep.chamber shortcut where applicable --- templates/representatives/_representative_block.haml | 4 ++-- templates/representatives/representative_grid.haml | 4 ++-- templates/representatives/representative_list.haml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/representatives/_representative_block.haml b/templates/representatives/_representative_block.haml index 769f0853..e4d2a4c1 100644 --- a/templates/representatives/_representative_block.haml +++ b/templates/representatives/_representative_block.haml @@ -21,8 +21,8 @@ %tr %th Chamber %td< - %a{'href': "{% url 'representatives:representative-list' group_kind='chamber' group=representative.main_mandate.group.chamber.name %}"} - = representative.main_mandate.group.chamber|chamber_icon + %a{'href': "{% url 'representatives:representative-list' group_kind='chamber' group=representative.chamber.name %}"} + = representative.chamber|chamber_icon %tr %th Country %td< diff --git a/templates/representatives/representative_grid.haml b/templates/representatives/representative_grid.haml index f28e9647..5ec3681e 100644 --- a/templates/representatives/representative_grid.haml +++ b/templates/representatives/representative_grid.haml @@ -16,8 +16,8 @@ %a{'href': "{{ representative.get_absolute_url }}"} = representative.full_name %li.chamber - %a{'href': "{% url 'representatives:representative-list' group_kind='chamber' group=representative.main_mandate.group.chamber.name %}"} - = representative.main_mandate.group.chamber|chamber_icon + %a{'href': "{% url 'representatives:representative-list' group_kind='chamber' group=representative.chamber.name %}"} + = representative.chamber|chamber_icon %li.country %a{'href': "{{ representative.country.get_absolute_url }}"} = representative.country|country_flag diff --git a/templates/representatives/representative_list.haml b/templates/representatives/representative_list.haml index 5cb5e7f3..43f9db06 100644 --- a/templates/representatives/representative_list.haml +++ b/templates/representatives/representative_list.haml @@ -47,8 +47,8 @@ = representative.full_name %td - %a{'href': "{% url 'representatives:representative-list' group_kind='chamber' group=representative.main_mandate.group.chamber.name %}"} - = representative.main_mandate.group.chamber + %a{'href': "{% url 'representatives:representative-list' group_kind='chamber' group=representative.chamber.name %}"} + = representative.chamber %td %a{'href': "{{ representative.country.get_absolute_url }}"} -- GitLab