Merge "Reduce page title duplication in Admin Images"

This commit is contained in:
Jenkins 2015-02-16 10:56:54 +00:00 committed by Gerrit Code Review
commit 63fac07edb
5 changed files with 4 additions and 16 deletions

View File

@ -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 %}

View File

@ -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 %}

View File

@ -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 %}

View File

@ -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 %}

View File

@ -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()