Commit 42e80553 by Carlos Andrés Rocha

Move courseware related templates to their own folder

Fix moved links
parent d7246207
......@@ -78,7 +78,7 @@ def courses(request):
'''
universities = get_courses_by_university(request.user,
domain=request.META.get('HTTP_HOST'))
return render_to_response("courses.html", {'universities': universities})
return render_to_response("courseware/courses.html", {'universities': universities})
def render_accordion(request, course, chapter, section):
......@@ -97,7 +97,7 @@ def render_accordion(request, course, chapter, section):
context = dict([('toc', toc),
('course_id', course.id),
('csrf', csrf(request)['csrf_token'])] + template_imports.items())
return render_to_string('accordion.html', context)
return render_to_string('courseware/accordion.html', context)
def get_current_child(xmodule):
......@@ -407,7 +407,7 @@ def course_about(request, course_id):
show_courseware_link = (has_access(request.user, course, 'load') or
settings.MITX_FEATURES.get('ENABLE_LMS_MIGRATION'))
return render_to_response('portal/course_about.html',
return render_to_response('courseware/course_about.html',
{'course': course,
'registered': registered,
'course_target': course_target,
......@@ -449,7 +449,7 @@ def render_notifications(request, course, notifications):
'get_discussion_title': partial(get_discussion_title, request=request, course=course),
'course': course,
}
return render_to_string('notifications.html', context)
return render_to_string('courseware/notifications.html', context)
@login_required
def news(request, course_id):
......@@ -462,7 +462,7 @@ def news(request, course_id):
'content': render_notifications(request, course, notifications),
}
return render_to_response('news.html', context)
return render_to_response('courseware/news.html', context)
@login_required
@cache_control(no_cache=True, no_store=True, must_revalidate=True)
......
<%inherit file="main.html" />
<%inherit file="../main.html" />
<%namespace name='static' file='static_content.html'/>
<%namespace name='static' file='../static_content.html'/>
<%block name="title"><title>Courses</title></%block>
......@@ -22,17 +22,17 @@
<section class="courses">
<section class='university-column'>
%for course in universities['MITx']:
<%include file="course.html" args="course=course" />
<%include file="../course.html" args="course=course" />
%endfor
</section>
<section class='university-column'>
%for course in universities['HarvardX']:
<%include file="course.html" args="course=course" />
<%include file="../course.html" args="course=course" />
%endfor
</section>
<section class='university-column last'>
%for course in universities['BerkeleyX']:
<%include file="course.html" args="course=course" />
<%include file="../course.html" args="course=course" />
%endfor
</section>
</section>
......
<%inherit file="main.html" />
<%namespace name='static' file='static_content.html'/>
<%namespace name='static' file='../static_content.html'/>
<%block name="bodyclass">courseware news</%block>
<%block name="title"><title>News – MITx 6.002x</title></%block>
......@@ -10,7 +10,7 @@
<%block name="js_extra">
</%block>
<%include file="/courseware/course_navigation.html" args="active_page='news'" />
<%include file="course_navigation.html" args="active_page='news'" />
<section class="container">
<div class="course-wrapper">
......
......@@ -5,7 +5,7 @@ def url_for_thread(discussion_id, thread_id):
return reverse('django_comment_client.forum.views.single_thread', args=[course.id, discussion_id, thread_id])
%>
<%
<%
def url_for_comment(discussion_id, thread_id, comment_id):
return url_for_thread(discussion_id, thread_id) + "#" + comment_id
%>
......@@ -15,7 +15,7 @@ def url_for_discussion(discussion_id):
return reverse('django_comment_client.forum.views.forum_form_discussion', args=[course.id, discussion_id])
%>
<%
<%
def discussion_title(discussion_id):
return get_discussion_title(discussion_id=discussion_id)
%>
......@@ -59,18 +59,18 @@ def url_for_user(user_id): #TODO
<%def name="render_notification(notification)">
<div class="notification">
% if notification['notification_type'] == 'post_reply':
${render_user_link(notification)} posted a ${render_comment_link(notification)}
${render_user_link(notification)} posted a ${render_comment_link(notification)}
to the thread ${render_thread_link(notification)} in discussion ${render_discussion_link(notification)}
% elif notification['notification_type'] == 'post_topic':
${render_user_link(notification)} posted a new thread ${render_thread_link(notification)}
in discussion ${render_discussion_link(notification)}
% elif notification['notification_type'] == 'at_user':
${render_user(info)} mentioned you in
${render_user(info)} mentioned you in
% if notification['info']['content_type'] == 'thread':
the thread ${render_thread_link(notification)}
in discussion ${render_discussion_link(notification)}
% else:
${render_comment_link(notification)}
${render_comment_link(notification)}
to the thread ${render_thread_link(notification)} in discussion ${render_discussion_link(notification)}
% endif
% endif
......
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