Merge "Reduce page title duplication in Admin Images"
This commit is contained in:
commit
63fac07edb
@ -2,10 +2,6 @@
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Create An Image" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Create An Image") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
{% include 'admin/images/_create.html' %}
|
||||
{% endblock %}
|
||||
|
@ -2,10 +2,6 @@
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Images" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Images") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
{{ table.render }}
|
||||
{% endblock %}
|
||||
|
@ -3,10 +3,6 @@
|
||||
|
||||
{% block title %}{% trans "Update Image" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Update Image") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
{% include 'admin/images/_update.html' %}
|
||||
{% endblock %}
|
||||
|
@ -2,10 +2,6 @@
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Update Image Metadata" %}{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_page_header.html" with title=_("Update Image Metadata") %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
{% include 'admin/images/_update_metadata.html' %}
|
||||
{% endblock %}
|
||||
|
@ -42,6 +42,7 @@ LOG = logging.getLogger(__name__)
|
||||
class IndexView(tables.DataTableView):
|
||||
table_class = project_tables.AdminImagesTable
|
||||
template_name = 'admin/images/index.html'
|
||||
page_title = _("Images")
|
||||
|
||||
def has_prev_data(self, table):
|
||||
return self._prev
|
||||
@ -108,12 +109,14 @@ class CreateView(views.CreateView):
|
||||
template_name = 'admin/images/create.html'
|
||||
form_class = project_forms.AdminCreateImageForm
|
||||
success_url = reverse_lazy('horizon:admin:images:index')
|
||||
page_title = _("Create An Image")
|
||||
|
||||
|
||||
class UpdateView(views.UpdateView):
|
||||
template_name = 'admin/images/update.html'
|
||||
form_class = project_forms.AdminUpdateImageForm
|
||||
success_url = reverse_lazy('horizon:admin:images:index')
|
||||
page_title = _("Update Image")
|
||||
|
||||
|
||||
class DetailView(views.DetailView):
|
||||
@ -125,6 +128,7 @@ class UpdateMetadataView(forms.ModalFormView):
|
||||
template_name = "admin/images/update_metadata.html"
|
||||
form_class = project_forms.UpdateMetadataForm
|
||||
success_url = reverse_lazy('horizon:admin:images:index')
|
||||
page_title = _("Update Image Metadata")
|
||||
|
||||
def get_initial(self):
|
||||
image = self.get_object()
|
||||
|
Loading…
Reference in New Issue
Block a user