Use horizon's panel template loader.
Moves the panel templates into their respective panel's directories. This tightens the grouping of logically-related elements and reduces the need to duplicate the entire dashboard structure in the dashboard's templates directory. Implements blueprint use-template-loader. Change-Id: I05ffb6a96f4909c1285beda7874ccfa96404547f
This commit is contained in:
parent
bb29bbf874
commit
0e40bdd572
@ -7,7 +7,7 @@
|
|||||||
{% endblock page_header %}
|
{% endblock page_header %}
|
||||||
|
|
||||||
{% block dash_main %}
|
{% block dash_main %}
|
||||||
{% include 'nova/objects/_copy.html' %}
|
{% include 'nova/containers/_copy.html' %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
|||||||
{% endblock page_header %}
|
{% endblock page_header %}
|
||||||
|
|
||||||
{% block dash_main %}
|
{% block dash_main %}
|
||||||
{% include 'nova/objects/_upload.html' %}
|
{% include 'nova/containers/_upload.html' %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
@ -108,7 +108,7 @@ class ObjectViewTests(test.TestCase):
|
|||||||
|
|
||||||
res = self.client.get(reverse('horizon:nova:containers:object_index',
|
res = self.client.get(reverse('horizon:nova:containers:object_index',
|
||||||
args=[self.containers.first().name]))
|
args=[self.containers.first().name]))
|
||||||
self.assertTemplateUsed(res, 'nova/objects/index.html')
|
self.assertTemplateUsed(res, 'nova/containers/detail.html')
|
||||||
# UTF8 encoding here to ensure there aren't problems with Nose output.
|
# UTF8 encoding here to ensure there aren't problems with Nose output.
|
||||||
expected = [obj.name.encode('utf8') for obj in self.objects.list()]
|
expected = [obj.name.encode('utf8') for obj in self.objects.list()]
|
||||||
self.assertQuerysetEqual(res.context['objects_table'].data,
|
self.assertQuerysetEqual(res.context['objects_table'].data,
|
||||||
@ -118,7 +118,7 @@ class ObjectViewTests(test.TestCase):
|
|||||||
def test_upload_index(self):
|
def test_upload_index(self):
|
||||||
res = self.client.get(reverse('horizon:nova:containers:object_upload',
|
res = self.client.get(reverse('horizon:nova:containers:object_upload',
|
||||||
args=[self.containers.first().name]))
|
args=[self.containers.first().name]))
|
||||||
self.assertTemplateUsed(res, 'nova/objects/upload.html')
|
self.assertTemplateUsed(res, 'nova/containers/upload.html')
|
||||||
|
|
||||||
def test_upload(self):
|
def test_upload(self):
|
||||||
container = self.containers.first()
|
container = self.containers.first()
|
||||||
@ -215,7 +215,7 @@ class ObjectViewTests(test.TestCase):
|
|||||||
res = self.client.get(reverse('horizon:nova:containers:object_copy',
|
res = self.client.get(reverse('horizon:nova:containers:object_copy',
|
||||||
args=[self.containers.first().name,
|
args=[self.containers.first().name,
|
||||||
self.objects.first().name]))
|
self.objects.first().name]))
|
||||||
self.assertTemplateUsed(res, 'nova/objects/copy.html')
|
self.assertTemplateUsed(res, 'nova/containers/copy.html')
|
||||||
|
|
||||||
def test_copy(self):
|
def test_copy(self):
|
||||||
container_1 = self.containers.get(name=u"container_one\u6346")
|
container_1 = self.containers.get(name=u"container_one\u6346")
|
||||||
|
@ -72,7 +72,7 @@ class CreateView(forms.ModalFormView):
|
|||||||
|
|
||||||
class ObjectIndexView(tables.MultiTableView):
|
class ObjectIndexView(tables.MultiTableView):
|
||||||
table_classes = (ObjectsTable, ContainerSubfoldersTable)
|
table_classes = (ObjectsTable, ContainerSubfoldersTable)
|
||||||
template_name = 'nova/objects/index.html'
|
template_name = 'nova/containers/detail.html'
|
||||||
|
|
||||||
def has_more_data(self, table):
|
def has_more_data(self, table):
|
||||||
return self._more
|
return self._more
|
||||||
@ -131,7 +131,7 @@ class ObjectIndexView(tables.MultiTableView):
|
|||||||
|
|
||||||
class UploadView(forms.ModalFormView):
|
class UploadView(forms.ModalFormView):
|
||||||
form_class = UploadObject
|
form_class = UploadObject
|
||||||
template_name = 'nova/objects/upload.html'
|
template_name = 'nova/containers/upload.html'
|
||||||
|
|
||||||
def get_initial(self):
|
def get_initial(self):
|
||||||
return {"container_name": self.kwargs["container_name"],
|
return {"container_name": self.kwargs["container_name"],
|
||||||
@ -171,7 +171,7 @@ def object_download(request, container_name, object_path):
|
|||||||
|
|
||||||
class CopyView(forms.ModalFormView):
|
class CopyView(forms.ModalFormView):
|
||||||
form_class = CopyObject
|
form_class = CopyObject
|
||||||
template_name = 'nova/objects/copy.html'
|
template_name = 'nova/containers/copy.html'
|
||||||
|
|
||||||
def get_form_kwargs(self):
|
def get_form_kwargs(self):
|
||||||
kwargs = super(CopyView, self).get_form_kwargs()
|
kwargs = super(CopyView, self).get_form_kwargs()
|
||||||
|
Can't render this file because it contains an unexpected character in line 1 and column 46.
|
Can't render this file because it contains an unexpected character in line 1 and column 46.
|
Can't render this file because it contains an unexpected character in line 1 and column 46.
|
Loading…
x
Reference in New Issue
Block a user