Merge "Fix "_data_table_action.html" template usage"

This commit is contained in:
Zuul 2019-09-10 09:27:58 +00:00 committed by Gerrit Code Review
commit c82c955160
3 changed files with 5 additions and 5 deletions

View File

@ -376,7 +376,7 @@ class LinkAction(BaseAction):
def render(self, **kwargs): def render(self, **kwargs):
action_dict = copy.copy(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", return render_to_string("horizon/common/_data_table_action.html",
action_dict) action_dict)

View File

@ -3,7 +3,7 @@
{% spaceless %} {# This makes sure whitespace doesn't affect positioning for dropdown. #} {% spaceless %} {# This makes sure whitespace doesn't affect positioning for dropdown. #}
{% if row_actions|length == 1 %} {% 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 %} {% elif row_actions|length > 1 %}
<div class="btn-group"> <div class="btn-group">
{% for action in row_actions %} {% for action in row_actions %}
@ -15,7 +15,7 @@
<ul class="dropdown-menu dropdown-menu-right row_actions"> <ul class="dropdown-menu dropdown-menu-right row_actions">
{% else %} {% else %}
<li> <li>
{% include "horizon/common/_data_table_action.html" %} {% include "horizon/common/_data_table_action.html" with is_small=0 %}
</li> </li>
{% endif %} {% endif %}
{% if forloop.last %} {% if forloop.last %}

View File

@ -39,7 +39,7 @@
For each single action in the Table Actions area For each single action in the Table Actions area
{% endcomment %} {% endcomment %}
{% for action in table_actions_buttons %} {% for action in table_actions_buttons %}
{% include "horizon/common/_data_table_action.html" with is_table_action=1 is_single=1 %} {% include "horizon/common/_data_table_action.html" with is_table_action=1 is_single=1 is_small=0 %}
{% endfor %} {% endfor %}
{% comment %} {% comment %}
@ -58,7 +58,7 @@
<ul class="dropdown-menu dropdown-menu-right"> <ul class="dropdown-menu dropdown-menu-right">
{% for action in table_actions_menu %} {% for action in table_actions_menu %}
<li> <li>
{% include "horizon/common/_data_table_action.html" with is_table_action=1 %} {% include "horizon/common/_data_table_action.html" with is_table_action=1 is_small=0 %}
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>