From aaa67b28a9f86e0ba206ddd44464ee9cd0f29d27 Mon Sep 17 00:00:00 2001 From: Brian Talbot Date: Thu, 11 Jul 2013 11:10:54 -0400 Subject: [PATCH] Studio: revises template logic, html, and styling for Dashboard UI states --- cms/static/sass/_base.scss | 18 ++ cms/static/sass/elements/_system-help.scss | 20 +- cms/static/sass/views/_dashboard.scss | 19 +- cms/templates/index.html | 247 +++++++++++++-------- 4 files changed, 195 insertions(+), 109 deletions(-) diff --git a/cms/static/sass/_base.scss b/cms/static/sass/_base.scss index fe107d7511..e9b01509fe 100644 --- a/cms/static/sass/_base.scss +++ b/cms/static/sass/_base.scss @@ -446,6 +446,24 @@ p, ul, ol, dl { } } + // actions + .list-actions { + @extend .no-list; + + .action-item { + margin-bottom: ($baseline/4); + border-bottom: 1px dotted $gray-l4; + padding-bottom: ($baseline/4); + + + &:last-child { + margin-bottom: 0; + border: none; + padding-bottom: 0; + } + } + } + // navigation .nav-related, .nav-page { diff --git a/cms/static/sass/elements/_system-help.scss b/cms/static/sass/elements/_system-help.scss index ca8fa38154..0f90d9db5c 100644 --- a/cms/static/sass/elements/_system-help.scss +++ b/cms/static/sass/elements/_system-help.scss @@ -104,6 +104,22 @@ } } } + + // list of notices all in one + &.list-notices { + + .notice-item { + margin-bottom: $baseline; + border-bottom: 1px solid $gray-l3; + padding-bottom: $baseline; + + &:last-child { + margin-bottom: 0; + border: none; + padding-bottom: 0; + } + } + } } // particular notice - warnings around a workflow for something @@ -128,11 +144,11 @@ background-color: $gray-l4; .title { - color: $gray-d1; + color: $gray-d3; } .copy { - color: $gray; + color: $gray-d2; } &.has-actions { diff --git a/cms/static/sass/views/_dashboard.scss b/cms/static/sass/views/_dashboard.scss index 7132874c14..b00306e5c5 100644 --- a/cms/static/sass/views/_dashboard.scss +++ b/cms/static/sass/views/_dashboard.scss @@ -36,7 +36,7 @@ body.dashboard { width: flexgrid(9, 9); // CASE: notice has actions { - &.has-actions { + &.has-actions, &.list-notices .notice-item.has-actions { .msg, .list-actions { display: inline-block; @@ -59,6 +59,7 @@ body.dashboard { .action-create-course { @extend .btn-primary-green; + @extend .t-action3; } } } @@ -66,8 +67,8 @@ body.dashboard { - // elements - authorship controls - .wrapper-authorshiprights { + // elements - course creation rights controls + .wrapper-creationrights { overflow: hidden; .ui-toggle-control { @@ -129,8 +130,8 @@ body.dashboard { } - // elements - authorship controls - .status-authorship { + // elements - course creation rights controls + .status-creationrights { margin-top: $baseline; .title { @@ -144,7 +145,7 @@ body.dashboard { } - .list-actions { + .list-actions, .form-actions { margin-top: ($baseline*0.75); .action-item { @@ -253,10 +254,10 @@ body.dashboard { } .class-list { - margin-top: 20px; + margin-top: $baseline; border-radius: 3px; - border: 1px solid $darkGrey; - background: #fff; + border: 1px solid $gray-d2; + background: $white; box-shadow: 0 1px 2px rgba(0, 0, 0, .1); li { diff --git a/cms/templates/index.html b/cms/templates/index.html index 0f10758dd6..4166542f35 100644 --- a/cms/templates/index.html +++ b/cms/templates/index.html @@ -2,22 +2,6 @@ <%inherit file="base.html" /> -<%block name="jsextra"> - - - - <%block name="title">${_("My Courses")} <%block name="bodyclass">is-signedin index dashboard @@ -50,6 +34,19 @@ +<%block name="jsextra"> + + + <%block name="content">
@@ -60,13 +57,12 @@

${_("Page Actions")}

@@ -75,7 +71,6 @@
- % if user.is_active:
@@ -83,86 +78,146 @@

${_("Welcome, %(name)s!") % dict(name= user.username)}

+ %if len(courses) > 0:
- %if len(courses) > 0: -

${_("Here are all of the courses you currently have access to in Studio:")}

- %else: - -

${_("Sorry, you don't have any courses!")}

- %endif +

${_("Here are all of the courses you currently have access to in Studio:")}

+ %else: +
+

${_("You currently aren't associated with any Studio Courses.")}

+
+ %endif
-
-
    - %for course, url, lms_link in sorted(courses, key=lambda s: s[0].lower() if s[0] is not None else ''): -
  • - - ${course} - - View Live -
  • - %endfor -
+ %if len(courses) > 0: +
+
+
    + %for course, url, lms_link in sorted(courses, key=lambda s: s[0].lower() if s[0] is not None else ''): +
  • + + ${course} + + View Live +
  • + %endfor +
+
+ %else: +
+
+
+

${_("Are you staff on an existing Studio course?")}

+
+

${_('You will need to be added to the course in Studio by the Course Creator. Please get in touch with the course creator or administrator for the specific course you are helping to author.')}

+
+
+
+ + %if not disable_course_creation and course_creator_status == "granted": +
+
+

${_('Create Your First Course')}

+
+

${_('Your new course is just a click away!')}

+
+
+ + +
+ % endif + +
+ % endif + % if not disable_course_creation and course_creator_status != "granted": -
-

- ${_('Becoming a Course Author in Studio')} -

-
-
-

${_('edX Studio is a hosted solution for our xConsortium partners and selected guests. Courses for which you are a team member appear above for you to edit, while Course Authorship privileges are granted by edX. Our team will evaluate your request and provide you feedback within 24 hours during the work week.')}

+ %if course_creator_status == "unrequested": +
+

+ ${_('Becoming a Course Creator in Studio')} +

+ +
+
+

${_('edX Studio is a hosted solution for our xConsortium partners and selected guests. Courses for which you are a team member appear above for you to edit, while Course Creator privileges are granted by edX. Our team will evaluate your request and provide you feedback within 24 hours during the work week.')}

+
+ +
+

${_('Your Course Creator Request Status:')}

+ +
+ + + +
+ +
+
+
- - - %if course_creator_status == "unrequested": -
-

${_('Your Authorship Request Status:')}

- - -
- - - %elif course_creator_status == "pending": -
-

${_('Your Authorship Request Status:')}

- -
-
${_('Your authorship request is:')}
-
- - ${_('Pending')} - ${_('Your request is currently being reviewed by edX staff and should be updated shortly.')} -
-
-
- - - %elif course_creator_status == "denied": -
-

${_('Your Authorship Request Status:')}

- -
-
${_('Your authorship request is:')}
-
- - ${_('Denied')} - ${_('Your request did not meet the criteria/guidelines specified by edX Staff.')} -
-
-
- % endif
-
+ + %elif course_creator_status == "denied": +
+

+ ${_('Your Course Creator Request Status')} +

+ +
+
+

${_('edX Studio is a hosted solution for our xConsortium partners and selected guests. Courses for which you are a team member appear above for you to edit, while Course Creator privileges are granted by edX. Our team is has completed evaluating your request.')}

+
+ +
+

${_('Your Course Creator Request Status:')}

+ +
+
${_('Your Course Creator request is:')}
+
+ + ${_('Denied')} + ${_('Your request did not meet the criteria/guidelines specified by edX Staff.')} +
+
+
+
+
+ + %elif course_creator_status == "pending": +
+

+ ${_('Your Course Creator Request Status')} +

+ +
+
+

${_('edX Studio is a hosted solution for our xConsortium partners and selected guests. Courses for which you are a team member appear above for you to edit, while Course Creator privileges are granted by edX. Our team is currently evaluating your request.')}

+
+ +
+

${_('Your Course Creator Request Status:')}

+ +
+
${_('Your Course Creator request is:')}
+
+ + ${_('Pending')} + ${_('Your request is currently being reviewed by edX staff and should be updated shortly.')} +
+
+
+
+
+ % endif + % endif
@@ -181,7 +236,6 @@
- % if disable_course_creation and settings.MITX_FEATURES.get('STAFF_EMAIL',''):

${_('Can I create courses in Studio?')}

@@ -189,14 +243,12 @@
% endif - % if not disable_course_creation and course_creator_status == "unrequested":

${_('Can I create courses in Studio?')}

-

${_('In order to create courses in Studio, you must have authorship rights to create your own course.')}

+

${_('In order to create courses in Studio, you must have Course Creator privileges to create your own course.')}

- % elif not disable_course_creation and course_creator_status == "denied":

${_('Can I create courses in Studio?')}

@@ -208,7 +260,6 @@ - % else: