diff --git a/horizon/dashboards/settings/project/templates/project/_openrc.html b/horizon/dashboards/settings/project/templates/project/_openrc.html index b8deaa9c3..9c0f89e5b 100644 --- a/horizon/dashboards/settings/project/templates/project/_openrc.html +++ b/horizon/dashboards/settings/project/templates/project/_openrc.html @@ -27,6 +27,6 @@ {% endblock %} {% block modal-footer %} - + {% if hide %}{% trans "Cancel" %}{% endif %} {% endblock %} diff --git a/horizon/tables/base.py b/horizon/tables/base.py index f1d4e3815..0dd746c7c 100644 --- a/horizon/tables/base.py +++ b/horizon/tables/base.py @@ -789,10 +789,11 @@ class DataTable(object): """ __metaclass__ = DataTableMetaclass - def __init__(self, request, data=None, **kwargs): + def __init__(self, request, data=None, needs_form_wrapper=None, **kwargs): self._meta.request = request self._meta.data = data self.kwargs = kwargs + self._needs_form_wrapper = needs_form_wrapper # Create a new set columns = [] @@ -909,6 +910,28 @@ class DataTable(object): % lookup) return matches[0] + @property + def has_actions(self): + """ + Boolean. Indicates whether there are any available actions on this + table. + """ + if not self.base_actions: + return False + return any(self.get_table_actions()) or any(self._meta.row_actions) + + @property + def needs_form_wrapper(self): + """ + Boolean. Indicates whather this table should be rendered wrapped in + a ``