From b54f73d61915b48d45bf07b1c85f5a28ee318b9b Mon Sep 17 00:00:00 2001 From: Diana Whitten Date: Tue, 5 Jan 2016 16:18:08 -0700 Subject: [PATCH] Branding: Horizon needs global footer override Horizon footer is now configurable at a global level and can live within a theme. It was noted that the login page will usually want its own footer. Change-Id: I61d7876b02cbff2d36b076c201847a39b0454136 Closes-bug: #1531335 --- doc/source/topics/customizing.rst | 8 ++++++++ horizon/templates/auth/login.html | 4 ++++ openstack_dashboard/templates/_footer.html | 3 +++ openstack_dashboard/templates/_login_footer.html | 3 +++ openstack_dashboard/templates/base.html | 4 +++- 5 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 openstack_dashboard/templates/_footer.html create mode 100644 openstack_dashboard/templates/_login_footer.html diff --git a/doc/source/topics/customizing.rst b/doc/source/topics/customizing.rst index 92783a640..fe55e21f3 100644 --- a/doc/source/topics/customizing.rst +++ b/doc/source/topics/customizing.rst @@ -277,6 +277,14 @@ The logo also acts as a hyperlink. The default behavior is to redirect to the desired url target e.g., ``http://sample-company.com`` in ``local_settings.py``, the target of the hyperlink can be changed. +Customizing the Footer +====================== + +It is possible to customize the global and login footers using a theme's +template override. Simply add ``_footer.html`` for a global footer +override or ``_login_footer.html`` for the login page's footer to your +theme's template directory. + Modifying Existing Dashboards and Panels ======================================== diff --git a/horizon/templates/auth/login.html b/horizon/templates/auth/login.html index 6fa7746bb..9d2c751ac 100644 --- a/horizon/templates/auth/login.html +++ b/horizon/templates/auth/login.html @@ -8,3 +8,7 @@ {% block content %} {% include 'auth/_login.html' %} {% endblock %} + +{% block footer %} + {% include '_login_footer.html' %} +{% endblock %} diff --git a/openstack_dashboard/templates/_footer.html b/openstack_dashboard/templates/_footer.html new file mode 100644 index 000000000..881e6d748 --- /dev/null +++ b/openstack_dashboard/templates/_footer.html @@ -0,0 +1,3 @@ +{% comment %} + A simple placeholder template for custom global footer content +{% endcomment %} \ No newline at end of file diff --git a/openstack_dashboard/templates/_login_footer.html b/openstack_dashboard/templates/_login_footer.html new file mode 100644 index 000000000..68dec4cbd --- /dev/null +++ b/openstack_dashboard/templates/_login_footer.html @@ -0,0 +1,3 @@ +{% comment %} + A simple placeholder template for custom login footer content +{% endcomment %} diff --git a/openstack_dashboard/templates/base.html b/openstack_dashboard/templates/base.html index a1ebbc35e..dd1fca694 100644 --- a/openstack_dashboard/templates/base.html +++ b/openstack_dashboard/templates/base.html @@ -47,7 +47,9 @@ {% endblock %} {% block js %} {% include "horizon/_scripts.html" %}