Reduce page title duplication in settings and test
Patch https://review.openstack.org/#/c/142802 adds a method of reducing duplication of page title logic, this patch applies that change to the project settings and the test panel views. Change-Id: I4af59bb3c051dcd24e46aacd91c49b8fcc6c10c7 Partial-Bug: 1413749
This commit is contained in:
@@ -2,10 +2,6 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% block title %}{% trans "Change Password" %}{% endblock %}
|
{% block title %}{% trans "Change Password" %}{% endblock %}
|
||||||
|
|
||||||
{% block page_header %}
|
|
||||||
{% include "horizon/common/_page_header.html" with title=_("Change Password") %}
|
|
||||||
{% endblock page_header %}
|
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
{% include "settings/password/_change.html" %}
|
{% include "settings/password/_change.html" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@@ -12,6 +12,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
|
|
||||||
from openstack_dashboard.dashboards.settings.password \
|
from openstack_dashboard.dashboards.settings.password \
|
||||||
@@ -21,3 +23,4 @@ from openstack_dashboard.dashboards.settings.password \
|
|||||||
class PasswordView(forms.ModalFormView):
|
class PasswordView(forms.ModalFormView):
|
||||||
form_class = pass_forms.PasswordForm
|
form_class = pass_forms.PasswordForm
|
||||||
template_name = 'settings/password/change.html'
|
template_name = 'settings/password/change.html'
|
||||||
|
page_title = _("Change Password")
|
||||||
|
@@ -2,10 +2,6 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% block title %}{% trans "User Settings" %}{% endblock %}
|
{% block title %}{% trans "User Settings" %}{% endblock %}
|
||||||
|
|
||||||
{% block page_header %}
|
|
||||||
{% include "horizon/common/_page_header.html" with title=_("User Settings") %}
|
|
||||||
{% endblock page_header %}
|
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
{% include "settings/user/_settings.html" %}
|
{% include "settings/user/_settings.html" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@@ -13,6 +13,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
from horizon.utils import functions as utils
|
from horizon.utils import functions as utils
|
||||||
@@ -22,6 +23,7 @@ from openstack_dashboard.dashboards.settings.user import forms as user_forms
|
|||||||
class UserSettingsView(forms.ModalFormView):
|
class UserSettingsView(forms.ModalFormView):
|
||||||
form_class = user_forms.UserSettingsForm
|
form_class = user_forms.UserSettingsForm
|
||||||
template_name = 'settings/user/settings.html'
|
template_name = 'settings/user/settings.html'
|
||||||
|
page_title = _("User Settings")
|
||||||
|
|
||||||
def get_initial(self):
|
def get_initial(self):
|
||||||
return {
|
return {
|
||||||
|
@@ -2,10 +2,6 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% block title %}Plugin-based Panel{% endblock %}
|
{% block title %}Plugin-based Panel{% endblock %}
|
||||||
|
|
||||||
{% block page_header %}
|
|
||||||
{% include "horizon/common/_page_header.html" with title="Plugin-based Panel"%}
|
|
||||||
{% endblock page_header %}
|
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
|
@@ -10,8 +10,11 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from django.views.generic import TemplateView # noqa
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
|
from horizon import views
|
||||||
|
|
||||||
|
|
||||||
class IndexView(TemplateView):
|
class IndexView(views.HorizonTemplateView):
|
||||||
template_name = 'admin/plugin_panel/index.html'
|
template_name = 'admin/plugin_panel/index.html'
|
||||||
|
page_title = _("Plugin-based Panel")
|
||||||
|
Reference in New Issue
Block a user