# HG changeset patch
# User Brian Neal """ % (
- params[0], params[1], params[1])
+ return {'flag': flag}
@register.inclusion_tag('core/comment_dialogs.html')
def comment_dialogs():
- return {'STATIC_URL': settings.STATIC_URL}
+ return {}
@register.inclusion_tag('core/max_users_tag.html')
@@ -79,7 +73,6 @@
return {
'title': title,
'url': url,
- 'STATIC_URL': settings.STATIC_URL,
}
@@ -182,7 +175,6 @@
birthdays.sort(key=lambda b: b.day)
return {
- 'STATIC_URL': settings.STATIC_URL,
'birthdays': birthdays,
'today': today,
}
diff -r c6bd7308de49 -r a34daec7f936 core/templatetags/script_tags.py
--- a/core/templatetags/script_tags.py Sat Nov 28 22:16:29 2015 -0600
+++ b/core/templatetags/script_tags.py Tue Dec 01 20:58:31 2015 -0600
@@ -6,22 +6,22 @@
register = template.Library()
-@register.simple_tag
+@register.inclusion_tag('core/script_tags.html')
def script_tags(libraries):
- s = ''
+ css = []
+ js = []
for library in libraries.split():
if library in settings.GPP_THIRD_PARTY_CSS:
for path in settings.GPP_THIRD_PARTY_CSS[library]:
- prefix = ''
- if not path.startswith('http'):
- prefix = settings.STATIC_URL
- s += '' % (prefix, path)
+ local = not path.startswith('http')
+ css.append((local, path))
if library in settings.GPP_THIRD_PARTY_JS:
for path in settings.GPP_THIRD_PARTY_JS[library]:
- prefix = ''
- if not path.startswith('http'):
- prefix = settings.STATIC_URL
- s += '' % (prefix, path)
+ local = not path.startswith('http')
+ js.append((local, path))
- return s
+ return {
+ 'css_sources': css,
+ 'js_sources': js,
+ }
diff -r c6bd7308de49 -r a34daec7f936 forums/templatetags/forum_tags.py
--- a/forums/templatetags/forum_tags.py Sat Nov 28 22:16:29 2015 -0600
+++ b/forums/templatetags/forum_tags.py Tue Dec 01 20:58:31 2015 -0600
@@ -37,7 +37,6 @@
def last_post_info(context, post):
return {
'post': post,
- 'STATIC_URL': context['STATIC_URL'],
'user': context['user'],
}
@@ -53,7 +52,6 @@
return {
'post': post,
'show_button': show_button,
- 'STATIC_URL': settings.STATIC_URL,
}
@@ -122,7 +120,6 @@
'form': form,
'submit_value': submit_value,
'is_ajax': is_ajax,
- 'STATIC_URL': settings.STATIC_URL,
}
@@ -155,7 +152,6 @@
"""Displays the "unread", "sticky", and "locked" icons for a given topic."""
return {
'topic': topic,
- 'STATIC_URL': settings.STATIC_URL,
}
@@ -194,4 +190,4 @@
if subtitle:
nav_list.append(dict(name=subtitle, url=None))
- return dict(nav_list=nav_list, STATIC_URL=settings.STATIC_URL)
+ return dict(nav_list=nav_list)
diff -r c6bd7308de49 -r a34daec7f936 news/templatetags/news_tags.py
--- a/news/templatetags/news_tags.py Sat Nov 28 22:16:29 2015 -0600
+++ b/news/templatetags/news_tags.py Tue Dec 01 20:58:31 2015 -0600
@@ -4,7 +4,6 @@
import datetime
from django import template
-from django.conf import settings
from news.models import Story
from news.utils import attach_extra_attrs
@@ -26,6 +25,5 @@
return {
'stories': stories,
- 'STATIC_URL': settings.STATIC_URL,
'on_home': True,
}
diff -r c6bd7308de49 -r a34daec7f936 sg101/templates/bio/elsewhere_links.html
--- a/sg101/templates/bio/elsewhere_links.html Sat Nov 28 22:16:29 2015 -0600
+++ b/sg101/templates/bio/elsewhere_links.html Tue Dec 01 20:58:31 2015 -0600
@@ -1,15 +1,20 @@
+{% load static from staticfiles %}
{% if social_nets or ims or websites %}
{% for net in social_nets %}
-
diff -r c6bd7308de49 -r a34daec7f936 sg101/templates/bio/flag_icon.html
--- a/sg101/templates/bio/flag_icon.html Sat Nov 28 22:16:29 2015 -0600
+++ b/sg101/templates/bio/flag_icon.html Tue Dec 01 20:58:31 2015 -0600
@@ -1,10 +1,6 @@
-{% if code != 'zz' %}
- {% if size == 'large' %}
-
+ {% with 'elsewhere/'|add:net.icon_name as src %}
+
{{ net.name }}
+ {% with 'elsewhere/'|add:im.icon_name as src %}
+
{{ im.name }}
+
{{ site.name }}
- {{ name }}
-
- {% endif %}
+{% load static from staticfiles %}
+{% if src %}
+
{{ name }}
+
{% endfor %}
+
{% endif %}
{{ today|date:"F" }} Birthdays
{% endblock %}
+{% load static from staticfiles %}
+{% block block_title %}
{{ today|date:"F" }} Birthdays
{% endblock %}
{% block block_content %}
{% if birthdays %}
diff -r c6bd7308de49 -r a34daec7f936 sg101/templates/core/bool_icon.html
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sg101/templates/core/bool_icon.html Tue Dec 01 20:58:31 2015 -0600
@@ -0,0 +1,6 @@
+{% load static from staticfiles %}
+{% if flag %}
+
+{% else %}
+
+{% endif %}
diff -r c6bd7308de49 -r a34daec7f936 sg101/templates/core/comment_dialogs.html
--- a/sg101/templates/core/comment_dialogs.html Sat Nov 28 22:16:29 2015 -0600
+++ b/sg101/templates/core/comment_dialogs.html Tue Dec 01 20:58:31 2015 -0600
@@ -1,10 +1,11 @@
+{% load static from staticfiles %}
-
+
-
+
+
+
+
{% forum_date post.creation_date user %}
{% profile_link post.user.username %}
{% else %}
diff -r c6bd7308de49 -r a34daec7f936 sg101/templates/forums/navigation_tag.html
--- a/sg101/templates/forums/navigation_tag.html Sat Nov 28 22:16:29 2015 -0600
+++ b/sg101/templates/forums/navigation_tag.html Tue Dec 01 20:58:31 2015 -0600
@@ -1,10 +1,11 @@
+{% load static from staticfiles %}
SurfGuitar101 Forums »
{% for nav_item in nav_list %}
{% if not forloop.last %}
{{ nav_item.name }} »
{% else %}
-
{% if nav_item.url %}
+{% endif %} {{ nav_item.name }}
{% if nav_item.url %}
{% endif %}
{% empty %}
diff -r c6bd7308de49 -r a34daec7f936 sg101/templates/forums/post_edit_button.html
--- a/sg101/templates/forums/post_edit_button.html Sat Nov 28 22:16:29 2015 -0600
+++ b/sg101/templates/forums/post_edit_button.html Tue Dec 01 20:58:31 2015 -0600
@@ -1,3 +1,4 @@
+{% load static from staticfiles %}
{% if show_button %}
-{% endif %} {{ nav_item.name }}
+
{% endif %}
diff -r c6bd7308de49 -r a34daec7f936 sg101/templates/forums/show_form.html
--- a/sg101/templates/forums/show_form.html Sat Nov 28 22:16:29 2015 -0600
+++ b/sg101/templates/forums/show_form.html Tue Dec 01 20:58:31 2015 -0600
@@ -1,3 +1,4 @@
+{% load static from staticfiles %}
{% load core_tags %}
{{ form.body.errors }}{{ form.body }}
diff -r c6bd7308de49 -r a34daec7f936 sg101/templates/forums/topic_icons_tag.html --- a/sg101/templates/forums/topic_icons_tag.html Sat Nov 28 22:16:29 2015 -0600 +++ b/sg101/templates/forums/topic_icons_tag.html Tue Dec 01 20:58:31 2015 -0600 @@ -1,4 +1,5 @@ -{% if topic.has_unread %}
-
+
There is more to this story, continue reading ...
Category: {{ story.category.title }}
-
+
{% if story.version == 0 %}
{{ story.comment_count }} comment{{ story.comment_count|pluralize }}
{% else %}
@@ -39,15 +40,15 @@
Comments are disabled
{% endif %}
{% endif %}
-
+
{% if user.is_authenticated %}
-
{% endif %}