From 972e71ec85392e6dda9debdbac24b5393eb57d16 Mon Sep 17 00:00:00 2001 From: Gabriel Hurley Date: Thu, 2 Aug 2012 16:39:52 -0700 Subject: [PATCH] Adds an option for linking to external help docs. Change-Id: Iea9ab299078f8552f53ca747f48e30a0b049bd06 --- horizon/templates/_header.html | 3 +++ horizon/tests/testsettings.py | 3 ++- openstack_dashboard/local/local_settings.py.example | 3 ++- openstack_dashboard/settings.py | 3 ++- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/horizon/templates/_header.html b/horizon/templates/_header.html index e8bada76a..9a85bf54a 100644 --- a/horizon/templates/_header.html +++ b/horizon/templates/_header.html @@ -2,6 +2,9 @@
{% trans "Logged in as" %}: {{ request.user.username }} {% trans "Settings" %} + {% if HORIZON_CONFIG.help_url %} + {% trans "Help" %} + {% endif %} {% trans "Sign Out" %} {% include "horizon/common/_region_selector.html" %}
diff --git a/horizon/tests/testsettings.py b/horizon/tests/testsettings.py index 643ce47ef..a5150f42d 100644 --- a/horizon/tests/testsettings.py +++ b/horizon/tests/testsettings.py @@ -115,7 +115,8 @@ HORIZON_CONFIG = { "regex": '^.{8,18}$', "help_text": _("Password must be between 8 and 18 characters.") }, - 'user_home': None + 'user_home': None, + 'help_url': "http://docs.openstack.org" } COMPRESS_ENABLED = False diff --git a/openstack_dashboard/local/local_settings.py.example b/openstack_dashboard/local/local_settings.py.example index fa3693689..7e7886e78 100644 --- a/openstack_dashboard/local/local_settings.py.example +++ b/openstack_dashboard/local/local_settings.py.example @@ -17,7 +17,8 @@ TEMPLATE_DEBUG = DEBUG # "password_validator": { # "regex": '.*', # "help_text": _("Your password does not meet the requirements.") -# } +# }, +# 'help_url': "http://docs.openstack.org" # } LOCAL_PATH = os.path.dirname(os.path.abspath(__file__)) diff --git a/openstack_dashboard/settings.py b/openstack_dashboard/settings.py index aceacb719..bf8e3d9d5 100644 --- a/openstack_dashboard/settings.py +++ b/openstack_dashboard/settings.py @@ -52,7 +52,8 @@ HORIZON_CONFIG = { 'dashboards': ('nova', 'syspanel', 'settings',), 'default_dashboard': 'nova', 'user_home': 'horizon.views.user_home', - 'ajax_queue_limit': 10 + 'ajax_queue_limit': 10, + 'help_url': "http://docs.openstack.org" } MIDDLEWARE_CLASSES = (