From 8343014eceb1ada33267be4e671de5690c79d117 Mon Sep 17 00:00:00 2001 From: Ivan Kolodyazhny Date: Mon, 9 Sep 2019 15:52:33 +0300 Subject: [PATCH] Fix "_data_table_action.html" template usage "_data_table_action.html" template required "is_small" variable. Without explicit variable declaration this templates renders with errors. Partial-Bug: #1720893 Change-Id: I2c956f88a11ca6527c2e9ecf63d7ac34d2bcd971 --- horizon/tables/actions.py | 2 +- .../horizon/common/_data_table_row_actions_dropdown.html | 4 ++-- .../templates/horizon/common/_data_table_table_actions.html | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/horizon/tables/actions.py b/horizon/tables/actions.py index b2e0473a19..fd0eb57123 100644 --- a/horizon/tables/actions.py +++ b/horizon/tables/actions.py @@ -376,7 +376,7 @@ class LinkAction(BaseAction): def render(self, **kwargs): action_dict = copy.copy(kwargs) - action_dict.update({"action": self, "is_single": True}) + action_dict.update({"action": self, "is_single": True, "is_small": 0}) return render_to_string("horizon/common/_data_table_action.html", action_dict) diff --git a/horizon/templates/horizon/common/_data_table_row_actions_dropdown.html b/horizon/templates/horizon/common/_data_table_row_actions_dropdown.html index a7841c8298..9dbd07bcf1 100644 --- a/horizon/templates/horizon/common/_data_table_row_actions_dropdown.html +++ b/horizon/templates/horizon/common/_data_table_row_actions_dropdown.html @@ -3,7 +3,7 @@ {% spaceless %} {# This makes sure whitespace doesn't affect positioning for dropdown. #} {% if row_actions|length == 1 %} - {% include "horizon/common/_data_table_action.html" with action=row_actions.0 is_single=1 %} + {% include "horizon/common/_data_table_action.html" with action=row_actions.0 is_single=1 is_small=0 %} {% elif row_actions|length > 1 %}
{% for action in row_actions %} @@ -15,7 +15,7 @@