Issue #56, Remove remaining SIDEBAR_SEARCH and web_main_settings code
This commit is contained in:
@@ -3,11 +3,9 @@
|
|||||||
|
|
||||||
{% load compress %}
|
{% load compress %}
|
||||||
|
|
||||||
{% load main_settings_tags %}
|
|
||||||
{% load navigation_tags %}
|
{% load navigation_tags %}
|
||||||
{% load project_tags %}
|
{% load project_tags %}
|
||||||
{% load registration_tags %}
|
{% load registration_tags %}
|
||||||
{% load search_tags %}
|
|
||||||
{% load settings %}
|
{% load settings %}
|
||||||
{% load variable_tags %}
|
{% load variable_tags %}
|
||||||
|
|
||||||
@@ -260,19 +258,6 @@
|
|||||||
{% block footer %}{% endblock %}
|
{% block footer %}{% endblock %}
|
||||||
</div><!--end #main-->
|
</div><!--end #main-->
|
||||||
<div id="sidebar">
|
<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 %}
|
{% get_object_navigation_links "secondary_menu" as object_navigation_links %}
|
||||||
{% if object_navigation_links %}
|
{% if object_navigation_links %}
|
||||||
<div class="block">
|
<div class="block">
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
{% load navigation_tags %}
|
{% load navigation_tags %}
|
||||||
{% load non_breakable %}
|
{% load non_breakable %}
|
||||||
{% load variable_tags %}
|
{% load variable_tags %}
|
||||||
{% load main_settings_tags %}
|
|
||||||
|
|
||||||
{% if side_bar %}
|
{% if side_bar %}
|
||||||
<div class="block">
|
<div class="block">
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
{% load navigation_tags %}
|
{% load navigation_tags %}
|
||||||
{% load non_breakable %}
|
{% load non_breakable %}
|
||||||
{% load variable_tags %}
|
{% load variable_tags %}
|
||||||
{% load main_settings_tags %}
|
|
||||||
{% load multiselect_tags %}
|
{% load multiselect_tags %}
|
||||||
|
|
||||||
{% if side_bar %}
|
{% if side_bar %}
|
||||||
|
|||||||
@@ -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)
|
|
||||||
@@ -6,8 +6,6 @@ from django.conf import settings
|
|||||||
from django.template import Library, Node, TemplateSyntaxError
|
from django.template import Library, Node, TemplateSyntaxError
|
||||||
from django.utils.safestring import mark_safe
|
from django.utils.safestring import mark_safe
|
||||||
|
|
||||||
from main import settings as web_theme_settings
|
|
||||||
|
|
||||||
register = Library()
|
register = Library()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
{% load main_settings_tags %}
|
|
||||||
|
|
||||||
{% if link.disabled %}
|
{% 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 %}
|
<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 %}
|
{% else %}
|
||||||
|
|||||||
Reference in New Issue
Block a user