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