From 85ed58f9bcfb9fd35823a3d986573cbe210fcd9e Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Tue, 26 Jul 2011 04:06:58 -0400 Subject: [PATCH] Added a new option MAIN_DISABLE_ICONS to turn off all the project icons, a look which goes well with the new web_app 'default' theme --- apps/common/templates/generic_list_subtemplate.html | 7 +++++-- apps/main/conf/settings.py | 8 ++++++++ apps/main/templates/base.html | 2 +- apps/navigation/templates/generic_link_instance.html | 8 ++++++-- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/apps/common/templates/generic_list_subtemplate.html b/apps/common/templates/generic_list_subtemplate.html index 29213c1d97..b665b2eca0 100644 --- a/apps/common/templates/generic_list_subtemplate.html +++ b/apps/common/templates/generic_list_subtemplate.html @@ -4,6 +4,9 @@ {% load navigation_tags %} {% load non_breakable %} {% load variable_tags %} +{% load main_settings_tags %} + +{% get_main_setting "DISABLE_ICONS" as disable_icons %} {% if side_bar %}
@@ -35,7 +38,7 @@ @@ -155,7 +158,7 @@ diff --git a/apps/main/conf/settings.py b/apps/main/conf/settings.py index 29ff65a859..7a82555ea0 100644 --- a/apps/main/conf/settings.py +++ b/apps/main/conf/settings.py @@ -19,3 +19,11 @@ register_setting( global_name=u'MAIN_DISABLE_HOME_VIEW', default=False, ) + +register_setting( + namespace=u'main', + module=u'main.conf.settings', + name=u'DISABLE_ICONS', + global_name=u'MAIN_DISABLE_ICONS', + default=False, +) diff --git a/apps/main/templates/base.html b/apps/main/templates/base.html index 5060ab8dfd..6c8c7d904a 100644 --- a/apps/main/templates/base.html +++ b/apps/main/templates/base.html @@ -25,7 +25,7 @@ {% block html_title %}{% project_name %}{{ request.new_window_url }}{% block title %}{% endblock %}{% endblock %} {% get_main_setting "SIDE_BAR_SEARCH" as debug %} -{% block web_theme_project_name %}{% project_name %}{% if debug %} {% trans "(DEBUG Mode)" %} {% endif %}{% endblock %} +{% block web_theme_project_name %}{% project_name %}{% if debug %} {% trans "(DEBUG)" %} {% endif %}{% endblock %} {% block web_theme_stylesheets %} diff --git a/apps/navigation/templates/generic_link_instance.html b/apps/navigation/templates/generic_link_instance.html index 92b5db3c72..808ed2f65b 100644 --- a/apps/navigation/templates/generic_link_instance.html +++ b/apps/navigation/templates/generic_link_instance.html @@ -1,5 +1,9 @@ +{% load main_settings_tags %} + +{% get_main_setting "DISABLE_ICONS" as disable_icons %} + {% if link.disabled %} - {% if link.famfam %}{% endif %}{{ link.text|capfirst }}{% if link.error %} - {{ link.error }}{% endif %}{% if link.active and not hide_active_anchor %}{% endif %}{% if horizontal %}{% if not forloop.last %} | {% endif %}{% endif %} + {% if link.famfam and not disable_icons %}{% endif %}{{ link.text|capfirst }}{% if link.error %} - {{ link.error }}{% endif %}{% if link.active and not hide_active_anchor %}{% endif %}{% if horizontal %}{% if not forloop.last %} | {% endif %}{% endif %} {% else %} - {% if link.famfam %}{% endif %}{{ link.text|capfirst }}{% if link.error %} - {{ link.error }}{% endif %}{% if link.active and not hide_active_anchor %}{% endif %}{% if horizontal %}{% if not forloop.last %} | {% endif %}{% endif %} + {% if link.famfam and not disable_icons %}{% endif %}{{ link.text|capfirst }}{% if link.error %} - {{ link.error }}{% endif %}{% if link.active and not hide_active_anchor %}{% endif %}{% if horizontal %}{% if not forloop.last %} | {% endif %}{% endif %} {% endif %}