Commit b8d2276d by Greg Price

Remove dashboard links for unstarted courses

If a course is not started, the course image and title on the dashboard link
to the course about page. Because the LMS course about pages do not exist
(i.e. 404) with the marketing site enabled, we simply do not use a link if
the course has not started.
parent ff2ba68d
......@@ -327,7 +327,7 @@
color: $lighter-base-font-color;
}
h3 a {
h3 a, h3 span {
display: block;
margin-bottom: 10px;
font-family: $sans-serif;
......
......@@ -194,17 +194,20 @@
<article class="my-course">
<%
if has_access(user, course, 'load'):
course_target = reverse('info', args=[course.id])
else:
course_target = reverse('about_course', args=[course.id])
%>
% if course.id in show_courseware_links_for:
<a href="${course_target}" class="cover">
<img src="${course_image_url(course)}" />
</a>
% else:
<div class="cover">
<img src="${course_image_url(course)}" />
</div>
% endif
<section class="info">
<hgroup>
......@@ -218,7 +221,13 @@
% endif
</p>
<h2 class="university">${get_course_about_section(course, 'university')}</h2>
<h3><a href="${course_target}">${course.number} ${course.display_name_with_default}</a></h3>
<h3>
% if course.id in show_courseware_links_for:
<a href="${course_target}">${course.number} ${course.display_name_with_default}</a>
% else:
<span>${course.number} ${course.display_name_with_default}</span>
% endif
</h3>
</hgroup>
<%
......
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