Commit d7fc2d66 by Calen Pennington

Merge pull request #408 from MITx/feature/fix_askbot_urls

Fix askbot URLs in the theme
parents cfe712cb 3c9f0990
......@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
{% spaceless %}
<head>
<title>{% block title %}{% endblock %} - MITX 6.002</title>
<title>{% block title %}{% endblock %}</title>
{% include "meta/html_head_meta.html" %}
<link rel="shortcut icon" href="{{ settings.SITE_FAVICON|media }}" />
{% include "meta/html_head_stylesheets.html" %}
......
......@@ -33,8 +33,14 @@
<!-- Quick fix -- we should reference askbot jquery properly -->
<script
type="text/javascript"
src="{{ settings.STATIC_URL }}/js/askbot_jquery.min.js"
src="{{'/js/jquery-1.4.3.js'|media}}"
></script>
{#
<script
type="text/javascript"
src="{{ settings.STATIC_ROOT }}/js/askbot_jquery.min.js"
></script>
#}
<!-- History.js -->
<script type='text/javascript' src="{{"/js/jquery.history.js"|media }}"></script>
<script type='text/javascript' src="{{"/js/utils.js"|media }}"></script>
......
<header class="global" aria-label="Global Navigation">
<nav>
<h1 class="logo"><a href="${reverse('root')}"></a></h1>
<h1 class="logo"><a href="{% url root %}"></a></h1>
<ol class="left">
<li class="primary">
<a href="${reverse('courses')}">Find Courses</a>
<a href="{% url courses %}">Find Courses</a>
</li>
</ol>
<ol class="user">
<li class="primary">
<a href="${reverse('dashboard')}" class="user-link">
<a href="{% url dashboard %}" class="user-link">
<span class="avatar"></span>
${user.username}
{{user.username}}
</a>
</li>
<li class="primary">
<a href="#" class="dropdown">&#9662</a>
<ul class="dropdown-menu">
## <li><a href="#">Account Settings</a></li>
<li><a href="${reverse('help_edx')}">Help</a></li>
<li><a href="${reverse('logout')}">Log Out</a></li>
{# <li><a href="#">Account Settings</a></li> #}
<li><a href="{% url help_edx %}">Help</a></li>
<li><a href="{% url logout %}">Log Out</a></li>
</ul>
</li>
</ol>
......
......@@ -3,19 +3,19 @@
<nav>
<section class="top">
<section class="primary">
<a href="${reverse('root')}" class="logo"></a>
<a href="${reverse('courses')}">Find Courses</a>
<a href="${reverse('about_edx')}">About</a>
<a href="{% url root %}" class="logo"></a>
<a href="{% url courses %}">Find Courses</a>
<a href="{% url about_edx %}">About</a>
<a href="http://edxonline.tumblr.com/">Blog</a>
<a href="${reverse('jobs')}">Jobs</a>
<a href="${reverse('contact')}">Contact</a>
<a href="{% url jobs %}">Jobs</a>
<a href="{% url contact %}">Contact</a>
</section>
<section class="social">
<a href="http://youtube.com/user/edxonline"><img src="${static.url('images/social/youtube-sharing.png')}" /></a>
<a href="https://plus.google.com/108235383044095082735"><img src="${static.url('images/social/google-plus-sharing.png')}" /></a>
<a href="http://www.facebook.com/EdxOnline"><img src="${static.url('images/social/facebook-sharing.png')}" /></a>
<a href="https://twitter.com/edXOnline"><img src="${static.url('images/social/twitter-sharing.png')}" /></a>
<a href="http://youtube.com/user/edxonline"><img src='{{"images/social/youtube-sharing.png"|media}}' /></a>
<a href="https://plus.google.com/108235383044095082735"><img src="{{('images/social/google-plus-sharing.png'|media)}}" /></a>
<a href="http://www.facebook.com/EdxOnline"><img src="{{'images/social/facebook-sharing.png'|media}}" /></a>
<a href="https://twitter.com/edXOnline"><img src="{{'images/social/twitter-sharing.png'|media}}" /></a>
</section>
</section>
......@@ -25,10 +25,10 @@
</section>
<section class="secondary">
<a href="${reverse('tos')}">Terms of Service</a>
<a href="${reverse('privacy_edx')}">Privacy Policy</a>
<a href="${reverse('honor')}">Honor Code</a>
<a href="${reverse('help_edx')}">Help</a>
<a href="{% url tos %}">Terms of Service</a>
<a href="{% url privacy_edx %}">Privacy Policy</a>
<a href="{% url honor %}">Honor Code</a>
<a href="{% url help_edx %}">Help</a>
</section>
</section>
......
......@@ -222,8 +222,7 @@ STATIC_ROOT = ENV_ROOT / "staticfiles"
STATICFILES_DIRS = [
COMMON_ROOT / "static",
PROJECT_ROOT / "static",
ASKBOT_ROOT / "askbot" / "skins",
PROJECT_ROOT / "askbot" / "skins",
]
if os.path.isdir(DATA_DIR):
STATICFILES_DIRS += [
......
......@@ -41,3 +41,6 @@ def course_db_for(course_id):
}
}
def askbot_url_for(course_id):
return "courses/{0}/discussions/".format(course_id)
from .courses import *
DATABASES = course_db_for('HarvardX/CS50x/2012')
\ No newline at end of file
DATABASES = course_db_for('HarvardX/CS50x/2012')
ASKBOT_URL = askbot_url_for("HarvardX/CS50x/2012")
\ No newline at end of file
from .courses import *
DATABASES = course_db_for('MITx/6.002x/2012_Fall')
\ No newline at end of file
DATABASES = course_db_for('MITx/6.002x/2012_Fall')
ASKBOT_URL = askbot_url_for("MITx/6.002x/2012_Fall")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment