diff --git a/lms/static/sass/_course_about.scss b/lms/static/sass/_course_about.scss index e44989c2e0..f074ba795d 100644 --- a/lms/static/sass/_course_about.scss +++ b/lms/static/sass/_course_about.scss @@ -97,6 +97,20 @@ color: rgb(255,255,255); } } + + span.register { + @include button(shiny, lighten(grayscale($blue), 50%)); + @include box-sizing(border-box); + @include border-radius(3px); + color: #888; + display: block; + font: normal 1.2rem/1.6rem $sans-serif; + letter-spacing: 1px; + padding: 10px 0px; + text-transform: uppercase; + text-align: center; + width: flex-grid(12); + } } } diff --git a/lms/templates/portal/course_about.html b/lms/templates/portal/course_about.html index 51e769a3a4..ce9f0f0ac3 100644 --- a/lms/templates/portal/course_about.html +++ b/lms/templates/portal/course_about.html @@ -1,4 +1,5 @@ <%! from django.core.urlresolvers import reverse %> +<%! from student.models import CourseEnrollment %> <%namespace name='static' file='../static_content.html'/> <%block name="js_extra"> @@ -16,7 +17,11 @@
%if user.is_authenticated(): - Register + %if not CourseEnrollment.objects.filter(user=user, course_id=course.id).exists(): + Register + %else: + Registered + %endif %else: Register %endif