Issue #56, Remove remaining SIDEBAR_SEARCH and web_main_settings code

This commit is contained in:
Roberto Rosario
2014-10-08 14:06:13 -04:00
parent 0cb9c2aa21
commit b9cdcd80f4
6 changed files with 0 additions and 55 deletions

View File

@@ -3,11 +3,9 @@
{% load compress %}
{% load main_settings_tags %}
{% load navigation_tags %}
{% load project_tags %}
{% load registration_tags %}
{% load search_tags %}
{% load settings %}
{% load variable_tags %}
@@ -260,19 +258,6 @@
{% block footer %}{% endblock %}
</div><!--end #main-->
<div id="sidebar">
{% get_main_setting "SIDE_BAR_SEARCH" as side_bar_search %}
{% if side_bar_search and not web_theme_hide_menus %}
{% with 'true' as side_bar %}
{% with 'true' as form_hide_required_text %}
{% with '' as read_only %}
{% with '' as object %}
{% search_form %}
{% endwith %}
{% endwith %}
{% endwith %}
{% endwith %}
{% endif %}
{% get_object_navigation_links "secondary_menu" as object_navigation_links %}
{% if object_navigation_links %}
<div class="block">

View File

@@ -5,7 +5,6 @@
{% load navigation_tags %}
{% load non_breakable %}
{% load variable_tags %}
{% load main_settings_tags %}
{% if side_bar %}
<div class="block">

View File

@@ -5,7 +5,6 @@
{% load navigation_tags %}
{% load non_breakable %}
{% load variable_tags %}
{% load main_settings_tags %}
{% load multiselect_tags %}
{% if side_bar %}

View File

@@ -1,34 +0,0 @@
import re
from django.template import Library, Node, TemplateSyntaxError
from main import settings
register = Library()
class SettingsNode(Node):
def __init__(self, format_string, var_name):
self.format_string = format_string
self.var_name = var_name
def render(self, context):
context[self.var_name] = getattr(settings, self.format_string, '')
return ''
@register.tag
def get_main_setting(parser, token):
# This version uses a regular expression to parse tag contents.
try:
# Splitting by None == splitting by spaces.
tag_name, arg = token.contents.split(None, 1)
except ValueError:
raise TemplateSyntaxError('%r tag requires arguments' % token.contents.split()[0])
m = re.search(r'(.*?) as (\w+)', arg)
if not m:
raise TemplateSyntaxError('%r tag had invalid arguments' % tag_name)
format_string, var_name = m.groups()
if not (format_string[0] == format_string[-1] and format_string[0] in ('"', "'")):
raise TemplateSyntaxError('%r tag\'s argument should be in quotes' % tag_name)
return SettingsNode(format_string[1:-1], var_name)

View File

@@ -6,8 +6,6 @@ from django.conf import settings
from django.template import Library, Node, TemplateSyntaxError
from django.utils.safestring import mark_safe
from main import settings as web_theme_settings
register = Library()

View File

@@ -1,5 +1,3 @@
{% load main_settings_tags %}
{% if link.disabled %}
<a class="{{ link.class }}" style="cursor: default;" href="#">{% if link.famfam %}<span class="famfam inactive famfam-{{ link.famfam|default:'link' }}"></span>{% endif %}{{ link.text }}{% if link.error %} - {{ link.error }}{% endif %}{% if link.active and not hide_active_anchor %}<span class="famfam active famfam-resultset_previous"></span>{% endif %}</a>{% if horizontal %}{% if not forloop.last %} | {% endif %}{% endif %}
{% else %}