diff --git a/cms/djangoapps/contentstore/views.py b/cms/djangoapps/contentstore/views.py index 53923e5c6b..1ac82bc213 100644 --- a/cms/djangoapps/contentstore/views.py +++ b/cms/djangoapps/contentstore/views.py @@ -155,8 +155,8 @@ def edit_subsection(request, location): # code. We should probably refactor template = modulestore().get_item(Location('i4x', 'edx', 'templates', 'vertical', 'Empty')) - return render_to_response('edit_subsection.html', - {'subsection':item, + return render_to_response('edit_subsection.html', + {'subsection': item, 'create_new_unit_template' : template.location }) @@ -179,7 +179,7 @@ def edit_unit(request, location): lms_link = "{lms_base}/courses/{course_id}/jump_to/{location}".format( lms_base=settings.LMS_BASE, # TODO: These will need to be changed to point to the particular instance of this problem in the particular course - course_id= modulestore().get_containing_courses(item.location)[0].id, + course_id = modulestore().get_containing_courses(item.location)[0].id, location=item.location, ) else: @@ -201,10 +201,22 @@ def edit_unit(request, location): in item.get_children() ] + # TODO (cpennington): If we share units between courses, + # this will need to change to check permissions correctly so as + # to pick the correct parent subsection + containing_subsection_locs = modulestore().get_parent_locations(location) + containing_subsection = modulestore().get_item(containing_subsection_locs[0]) + + containing_section_locs = modulestore().get_parent_locations(containing_subsection.location) + containing_section = modulestore().get_item(containing_section_locs[0]) + return render_to_response('unit.html', { 'unit': item, 'components': components, 'component_templates': component_templates, + 'lms_link': lms_link, + 'subsection': containing_subsection, + 'section': containing_section, }) @@ -673,4 +685,7 @@ def remove_user(request, org, course, name): @ensure_csrf_cookie def asset_index(request, location): return render_to_response('asset_index.html',{}) - + +# points to the temporary course landing page with log in and sign up +def landing(request, org, course, coursename): + return render_to_response('temp-course-landing.html', {}) diff --git a/cms/static/img/edx-labs-logo-small.png b/cms/static/img/edx-labs-logo-small.png new file mode 100644 index 0000000000..992e158148 Binary files /dev/null and b/cms/static/img/edx-labs-logo-small.png differ diff --git a/cms/static/sass/_cms_mixins.scss b/cms/static/sass/_cms_mixins.scss index 0d6616ad1e..8ca737f33d 100644 --- a/cms/static/sass/_cms_mixins.scss +++ b/cms/static/sass/_cms_mixins.scss @@ -194,4 +194,4 @@ margin-left: 96px; } } -} \ No newline at end of file +} diff --git a/cms/static/sass/_header.scss b/cms/static/sass/_header.scss index 0992d49210..0fa4f2eddd 100644 --- a/cms/static/sass/_header.scss +++ b/cms/static/sass/_header.scss @@ -1,3 +1,9 @@ +body.no-header { + .primary-header { + display: none; + } +} + .primary-header { width: 100%; height: 36px; diff --git a/cms/static/sass/_landing.scss b/cms/static/sass/_landing.scss new file mode 100644 index 0000000000..d8e3559635 --- /dev/null +++ b/cms/static/sass/_landing.scss @@ -0,0 +1,116 @@ +// This is a temporary page, which will be replaced once we have a more extensive course catalog and marketing site for edX labs. + +.class-landing { + + .main-wrapper { + width: 700px !important; + margin: 100px auto; + } + + .class-info { + padding: 30px 40px 40px; + @extend .window; + + hgroup { + padding-bottom: 26px; + border-bottom: 1px solid $mediumGrey; + } + + h1 { + float: none; + font-size: 30px; + font-weight: 300; + margin: 0; + } + + h2 { + color: #5d6779; + } + + .class-actions { + @include clearfix; + padding: 15px 0; + margin-bottom: 18px; + border-bottom: 1px solid $mediumGrey; + } + + .log-in-form { + @include clearfix; + padding: 15px 0 20px; + margin-bottom: 18px; + border-bottom: 1px solid $mediumGrey; + + .log-in-submit-button { + @include blue-button; + padding: 6px 20px 8px; + margin: 24px 0 0; + } + + .column { + float: left; + width: 41%; + margin-right: 1%; + + &.submit { + width: 16%; + margin-right: 0; + } + + label { + float: left; + } + } + + input { + width: 100%; + font-family: $sans-serif; + font-size: 13px; + } + + .forgot-button { + float: right; + margin-bottom: 6px; + font-size: 12px; + } + } + + .sign-up-button { + @include blue-button; + display: block; + width: 250px; + margin: auto; + } + + .log-in-button { + @include white-button; + float: right; + } + + .sign-up-button, + .log-in-button { + padding: 8px 0 12px; + font-size: 18px; + font-weight: 300; + text-align: center; + } + + .class-description { + margin-top: 30px; + font-size: 14px; + } + + p + p { + margin-top: 22px; + } + } + + .edx-labs-logo-small { + display: block; + width: 124px; + height: 30px; + margin: auto; + background: url(../img/edx-labs-logo-small.png) no-repeat; + text-indent: -9999px; + overflow: hidden; + } +} \ No newline at end of file diff --git a/cms/static/sass/_login.scss b/cms/static/sass/_login.scss index 9d228e7bab..48216636d0 100644 --- a/cms/static/sass/_login.scss +++ b/cms/static/sass/_login.scss @@ -1,6 +1,7 @@ +.sign-up-box, .log-in-box { width: 500px; - margin: 200px auto; + margin: 100px auto; border-radius: 3px; header { @@ -19,7 +20,7 @@ } } - .log-in-form { + form { padding: 40px; border: 1px solid $darkGrey; border-top-width: 0; @@ -34,22 +35,33 @@ font-weight: 700; } - .email-field, - .password-field { + input[type="text"], + input[type="email"], + input[type="password"] { width: 100%; font-size: 20px; font-weight: 300; } .row { + @include clearfix; margin-bottom: 24px; + + .split { + float: left; + width: 48%; + + &:first-child { + margin-right: 4%; + } + } } .form-actions { margin-bottom: 0; } - .log-in-button { + input[type="submit"] { @include blue-button; margin-right: 10px; padding: 8px 20px 10px; @@ -63,6 +75,5 @@ margin-top: 10px; text-align: right; font-size: 13px; - border-top: 1px solid $lightGrey; } } \ No newline at end of file diff --git a/cms/static/sass/base-style.scss b/cms/static/sass/base-style.scss index 476f9de377..8743790bba 100644 --- a/cms/static/sass/base-style.scss +++ b/cms/static/sass/base-style.scss @@ -15,6 +15,7 @@ @import "unit"; @import "assets"; @import "course-info"; +@import "landing"; @import "graphics"; @import "modal"; @import "alerts"; diff --git a/cms/templates/login.html b/cms/templates/login.html index be6968b77a..7d225678dc 100644 --- a/cms/templates/login.html +++ b/cms/templates/login.html @@ -1,6 +1,7 @@ <%inherit file="base.html" /> <%! from django.core.urlresolvers import reverse %> <%block name="title">Log in%block> +<%block name="bodyclass">no-header%block> <%block name="content"> @@ -10,11 +11,11 @@