From 604fd47f97c1a5ed2fc0a72a0d3be346a6b96695 Mon Sep 17 00:00:00 2001 From: Tatiana Ovchinnikova Date: Thu, 14 Aug 2014 15:05:08 +0400 Subject: [PATCH] Remove redundant template from data_processing/data_plugins Remove 'project/data_processing.data_plugins/_versions_list.html' template and make a list of versions at the plugins table using standard Column class attributes. Closes-Bug: #1356821 Change-Id: I8121bb658f9799f6cfa7738cdbb5cfa9bbf39cfe --- .../project/data_processing/data_plugins/tables.py | 14 +++++--------- .../_versions_list.html | 5 ----- 2 files changed, 5 insertions(+), 14 deletions(-) delete mode 100644 openstack_dashboard/dashboards/project/data_processing/data_plugins/templates/data_processing.data_plugins/_versions_list.html diff --git a/openstack_dashboard/dashboards/project/data_processing/data_plugins/tables.py b/openstack_dashboard/dashboards/project/data_processing/data_plugins/tables.py index d1045ee3ed..c503461a5a 100644 --- a/openstack_dashboard/dashboards/project/data_processing/data_plugins/tables.py +++ b/openstack_dashboard/dashboards/project/data_processing/data_plugins/tables.py @@ -13,7 +13,7 @@ import logging -from django import template +from django.template import defaultfilters as filters from django.utils.translation import ugettext_lazy as _ from horizon import tables @@ -21,19 +21,15 @@ from horizon import tables LOG = logging.getLogger(__name__) -def render_versions(plugin): - template_name = 'project/data_processing.data_plugins/_versions_list.html' - context = {"plugin": plugin} - return template.loader.render_to_string(template_name, context) - - class PluginsTable(tables.DataTable): title = tables.Column("title", verbose_name=_("Title"), link=("horizon:project:data_processing.data_plugins:details")) - versions = tables.Column(render_versions, - verbose_name=_("Supported Versions")) + versions = tables.Column("versions", + verbose_name=_("Supported Versions"), + wrap_list=True, + filters=(filters.unordered_list,)) description = tables.Column("description", verbose_name=_("Description")) diff --git a/openstack_dashboard/dashboards/project/data_processing/data_plugins/templates/data_processing.data_plugins/_versions_list.html b/openstack_dashboard/dashboards/project/data_processing/data_plugins/templates/data_processing.data_plugins/_versions_list.html deleted file mode 100644 index f0db801ea3..0000000000 --- a/openstack_dashboard/dashboards/project/data_processing/data_plugins/templates/data_processing.data_plugins/_versions_list.html +++ /dev/null @@ -1,5 +0,0 @@ - \ No newline at end of file