From 2a23757fbc12dbf266828184e9991ee4e5017a40 Mon Sep 17 00:00:00 2001 From: Chris Rodriguez Date: Fri, 8 Apr 2016 15:45:10 -0400 Subject: [PATCH] Sending skip links to single main, making more relevant --- cms/templates/base.html | 10 +- cms/templates/course-create-rerun.html | 2 +- lms/static/js/fixtures/edxnotes/edxnotes.html | 4 +- lms/templates/ccx/coach_dashboard.html | 115 +++--- lms/templates/courseware/courses.html | 82 ++-- .../courseware/courseware-chromeless.html | 2 - lms/templates/courseware/courseware.html | 10 +- lms/templates/courseware/info.html | 103 ++--- lms/templates/courseware/progress.html | 352 +++++++++--------- lms/templates/courseware/static_tab.html | 12 +- lms/templates/dashboard.html | 217 +++++------ lms/templates/discussion/index.html | 12 +- lms/templates/edxnotes/edxnotes.html | 4 +- lms/templates/index.html | 78 ++-- .../instructor_dashboard_2.html | 64 ++-- lms/templates/learner_dashboard/programs.html | 11 +- lms/templates/main.html | 4 +- lms/templates/main_django.html | 4 +- lms/templates/static_templates/404.html | 18 +- lms/templates/static_templates/about.html | 10 +- lms/templates/static_templates/blog.html | 10 +- lms/templates/static_templates/contact.html | 10 +- lms/templates/static_templates/donate.html | 10 +- lms/templates/static_templates/embargo.html | 24 +- lms/templates/static_templates/faq.html | 10 +- lms/templates/static_templates/help.html | 10 +- lms/templates/static_templates/honor.html | 10 +- lms/templates/static_templates/jobs.html | 10 +- lms/templates/static_templates/media-kit.html | 10 +- lms/templates/static_templates/news.html | 10 +- lms/templates/static_templates/press.html | 10 +- lms/templates/static_templates/privacy.html | 10 +- .../static_templates/server-down.html | 28 +- .../static_templates/server-error.html | 30 +- .../static_templates/server-overloaded.html | 28 +- lms/templates/static_templates/tos.html | 10 +- .../student_account/account_settings.html | 3 +- .../account_settings.underscore | 2 + .../student_account/login_and_register.html | 4 +- .../student_profile/learner_profile.html | 11 +- lms/templates/wiki/article.html | 19 +- lms/templates/wiki/base.html | 4 +- themes/edx.org/lms/templates/dashboard.html | 5 +- 43 files changed, 723 insertions(+), 669 deletions(-) diff --git a/cms/templates/base.html b/cms/templates/base.html index 82e4100119..92e66608ba 100644 --- a/cms/templates/base.html +++ b/cms/templates/base.html @@ -54,7 +54,7 @@ from openedx.core.djangolib.js_utils import ( <%block name="view_notes"> - ${_("Skip to main content")} + ${_("Skip to main content")} @@ -37,188 +36,189 @@ from django.utils.http import urlquote_plus
-
- % if staff_access and studio_url is not None: - - % endif - -
-

${_("Course Progress for Student '{username}' ({email})").format(username=student.username, email=student.email) | h}

-
- - %if show_generate_cert_btn: -
-
- %if passed: -
-
- <% post_url = reverse('generate_user_cert', args=[unicode(course.id)]) %> - % if is_downloadable: -
-

${_("Your certificate is available")}

-

- ${_("You can keep working for a higher grade, or request your certificate now.")} -

-
-
- %if show_cert_web_view and cert_web_view_url: - - ${_("View Certificate")} - - %elif download_url: - - ${_("Download Your Certificate")} - - %endif -
- %elif is_generating: -
- ## Translators: This message appears to users when the system is processessing course certificates, which can take a few hours. -

${_("We're working on it...")}

-

${_("We're creating your certificate. You can keep working in your courses and a link to it will appear here and on your Dashboard when it is ready.")}

-
-
- %else: -
-

${_("Congratulations, you qualified for a certificate!")}

-

${_("You can keep working for a higher grade, or request your certificate now.")}

-
-
- -
- %endif -
-
- %endif -
- %endif - - %if not course.disable_progress_graph: - - %endif - - % if credit_course_requirements: -
-
-
-

${_("Requirements for Course Credit")}

-
- %if credit_course_requirements['eligibility_status'] == 'not_eligible': - ${_("{student_name}, you are no longer eligible for credit in this course.").format(student_name=student.profile.name) | h} - %elif credit_course_requirements['eligibility_status'] == 'eligible': - ${_("{student_name}, you have met the requirements for credit in this course.").format(student_name=student.profile.name) | h} - ${_("{a_start}Go to your dashboard{a_end} to purchase course credit.").format( - a_start=u"".format(url=reverse('dashboard')), - a_end="" - )} - - %elif credit_course_requirements['eligibility_status'] == 'partial_eligible': - ${_("{student_name}, you have not yet met the requirements for credit.").format(student_name=student.profile.name) | h} - %endif - ${_("Information about course credit requirements")}
-
- %for requirement in credit_course_requirements['requirements']: -
-
- ${_(requirement['display_name']) | h} - %if requirement['namespace'] == 'grade': - ${int(requirement['criteria']['min_grade'] * 100) | h}% - %endif -
-
- %if requirement['status']: - %if requirement['status'] == 'submitted': - - %elif requirement['status'] == 'failed': - - ${_("Verification Failed" )} - %elif requirement['status'] == 'declined': - - ${_("Verification Declined" )} - %elif requirement['status'] == 'satisfied': - - ${_("Completed by")} ${get_time_display(requirement['status_date'], DEFAULT_SHORT_DATE_FORMAT, settings.TIME_ZONE)} - %endif - %else: - ${_("Upcoming")} - %endif -
-
- %endfor -
- +
+
+ % if staff_access and studio_url is not None: + -
- %endif + % endif -
- %for chapter in courseware_summary: - %if not chapter['display_name'] == "hidden": -
-

${ chapter['display_name'] | h}

+
+

${_("Course Progress for Student '{username}' ({email})").format(username=student.username, email=student.email) | h}

+
-
- %for section in chapter['sections']: -
- <% - earned = section['section_total'].earned - total = section['section_total'].possible - percentageString = "{0:.0%}".format( float(earned)/total) if earned > 0 and total > 0 else "" - %> - -

- ${ section['display_name'] | h} - %if total > 0 or earned > 0: - - ${_("{earned} of {total} possible points").format(earned='{:.3n}'.format(float(earned)), total='{:.3n}'.format(float(total))) | h} - - %endif - - %if total > 0 or earned > 0: - ${"({0:.3n}/{1:.3n}) {2}".format( float(earned), float(total), percentageString ) | h} - %endif -

-

- ${section['format'] | h} - - %if section.get('due') is not None: - <% - formatted_string = get_time_display(section['due'], course.due_date_display_format, coerce_tz=settings.TIME_ZONE_DISPLAYED_FOR_DEADLINES) - due_date = '' if len(formatted_string)==0 else _(u'due {date}').format(date=formatted_string) - %> - - ${due_date | h} - - %endif -

- -
- %if len(section['scores']) > 0: -

${ _("Problem Scores: ") if section['graded'] else _("Practice Scores: ")}

-
    - %for score in section['scores']: -
  1. ${"{0:.3n}/{1:.3n}".format(float(score.earned),float(score.possible)) | h}
  2. - %endfor -
- %else: -

${_("No problem scores in this section")}

- %endif + %if show_generate_cert_btn: +
+
+ %if passed: +
+
+ <% post_url = reverse('generate_user_cert', args=[unicode(course.id)]) %> + % if is_downloadable: +
+

${_("Your certificate is available")}

+

+ ${_("You can keep working for a higher grade, or request your certificate now.")} +

+
+
+ %if show_cert_web_view and cert_web_view_url: + + ${_("View Certificate")} + + %elif download_url: + + ${_("Download Your Certificate")} + + %endif +
+ %elif is_generating: +
+ ## Translators: This message appears to users when the system is processessing course certificates, which can take a few hours. +

${_("We're working on it...")}

+

${_("We're creating your certificate. You can keep working in your courses and a link to it will appear here and on your Dashboard when it is ready.")}

+
+
+ %else: +
+

${_("Congratulations, you qualified for a certificate!")}

+

${_("You can keep working for a higher grade, or request your certificate now.")}

+
+
+ +
+ %endif
+
+ %endif +
+ %endif + + %if not course.disable_progress_graph: + + %endif + + % if credit_course_requirements: +
+
+
+

${_("Requirements for Course Credit")}

+
+ %if credit_course_requirements['eligibility_status'] == 'not_eligible': + ${_("{student_name}, you are no longer eligible for credit in this course.").format(student_name=student.profile.name) | h} + %elif credit_course_requirements['eligibility_status'] == 'eligible': + ${_("{student_name}, you have met the requirements for credit in this course.").format(student_name=student.profile.name) | h} + ${_("{a_start}Go to your dashboard{a_end} to purchase course credit.").format( + a_start=u"".format(url=reverse('dashboard')), + a_end="" + )} + + %elif credit_course_requirements['eligibility_status'] == 'partial_eligible': + ${_("{student_name}, you have not yet met the requirements for credit.").format(student_name=student.profile.name) | h} + %endif + ${_("Information about course credit requirements")}
+
+ %for requirement in credit_course_requirements['requirements']: +
+
+ ${_(requirement['display_name']) | h} + %if requirement['namespace'] == 'grade': + ${int(requirement['criteria']['min_grade'] * 100) | h}% + %endif +
+
+ %if requirement['status']: + %if requirement['status'] == 'submitted': + + %elif requirement['status'] == 'failed': + + ${_("Verification Failed" )} + %elif requirement['status'] == 'declined': + + ${_("Verification Declined" )} + %elif requirement['status'] == 'satisfied': + + ${_("Completed by")} ${get_time_display(requirement['status_date'], DEFAULT_SHORT_DATE_FORMAT, settings.TIME_ZONE)} + %endif + %else: + ${_("Upcoming")} + %endif +
+
+ %endfor +
+ +
+
+ %endif + +
+ %for chapter in courseware_summary: + %if not chapter['display_name'] == "hidden": +
+

${ chapter['display_name'] | h}

+ +
+ %for section in chapter['sections']: +
+ <% + earned = section['section_total'].earned + total = section['section_total'].possible + percentageString = "{0:.0%}".format( float(earned)/total) if earned > 0 and total > 0 else "" + %> + +

+ ${ section['display_name'] | h} + %if total > 0 or earned > 0: + + ${_("{earned} of {total} possible points").format(earned='{:.3n}'.format(float(earned)), total='{:.3n}'.format(float(total))) | h} + + %endif + + %if total > 0 or earned > 0: + ${"({0:.3n}/{1:.3n}) {2}".format( float(earned), float(total), percentageString ) | h} + %endif +

+

+ ${section['format'] | h} + + %if section.get('due') is not None: + <% + formatted_string = get_time_display(section['due'], course.due_date_display_format, coerce_tz=settings.TIME_ZONE_DISPLAYED_FOR_DEADLINES) + due_date = '' if len(formatted_string)==0 else _(u'due {date}').format(date=formatted_string) + %> + + ${due_date | h} + + %endif +

+ +
+ %if len(section['scores']) > 0: +

${ _("Problem Scores: ") if section['graded'] else _("Practice Scores: ")}

+
    + %for score in section['scores']: +
  1. ${"{0:.3n}/{1:.3n}".format(float(score.earned),float(score.possible)) | h}
  2. + %endfor +
+ %else: +

${_("No problem scores in this section")}

+ %endif +
-
+
+ %endfor +
+
+ %endif %endfor -
- - %endif - %endfor -
+
-
+ + - diff --git a/lms/templates/courseware/static_tab.html b/lms/templates/courseware/static_tab.html index 01ebd2fde7..56310061d0 100644 --- a/lms/templates/courseware/static_tab.html +++ b/lms/templates/courseware/static_tab.html @@ -16,8 +16,10 @@ <%include file="/courseware/course_navigation.html" args="active_page='static_tab_{0}'.format(tab['url_slug'])" /> -
-
- ${tab_contents} -
-
+
+
+
+ ${tab_contents} +
+
+
diff --git a/lms/templates/dashboard.html b/lms/templates/dashboard.html index be5a13baa9..ecb8447cca 100644 --- a/lms/templates/dashboard.html +++ b/lms/templates/dashboard.html @@ -19,7 +19,6 @@ from openedx.core.djangolib.markup import Text, HTML <%block name="pagetitle">${_("Dashboard")} <%block name="bodyclass">view-dashboard is-authenticated -<%block name="nav_skip">#my-courses <%block name="header_extras"> % for template_name in ["donation"]: @@ -75,120 +74,122 @@ from openedx.core.djangolib.markup import Text, HTML %endif -
-
-
-

${_("My Courses")}

-
+
+
+
+
+

${_("My Courses")}

+
- % if len(course_enrollments) > 0: -
    - <% share_settings = getattr(settings, 'SOCIAL_SHARING_SETTINGS', {}) %> - % for dashboard_index, enrollment in enumerate(course_enrollments): - <% show_courseware_link = (enrollment.course_id in show_courseware_links_for) %> - <% cert_status = cert_statuses.get(enrollment.course_id) %> - <% can_unenroll = (not cert_status) or cert_status.get('can_unenroll') %> - <% credit_status = credit_statuses.get(enrollment.course_id) %> - <% show_email_settings = (enrollment.course_id in show_email_settings_for) %> - <% course_mode_info = all_course_modes.get(enrollment.course_id) %> - <% show_refund_option = (enrollment.course_id in show_refund_option_for) %> - <% is_paid_course = (enrollment.course_id in enrolled_courses_either_paid) %> - <% is_course_blocked = (enrollment.course_id in block_courses) %> - <% course_verification_status = verification_status_by_course.get(enrollment.course_id, {}) %> - <% course_requirements = courses_requirements_not_met.get(enrollment.course_id) %> - <% course_program_info = course_programs.get(unicode(enrollment.course_id)) %> - <%include file = 'dashboard/_dashboard_course_listing.html' args="course_overview=enrollment.course_overview, enrollment=enrollment, show_courseware_link=show_courseware_link, cert_status=cert_status, can_unenroll=can_unenroll, credit_status=credit_status, show_email_settings=show_email_settings, course_mode_info=course_mode_info, show_refund_option=show_refund_option, is_paid_course=is_paid_course, is_course_blocked=is_course_blocked, verification_status=course_verification_status, course_requirements=course_requirements, dashboard_index=dashboard_index, share_settings=share_settings, user=user, course_program_info=course_program_info" /> - % endfor - -
- % else: -
-

${_("You are not enrolled in any courses yet.")}

- - % if settings.FEATURES.get('COURSES_ARE_BROWSABLE'): - - ${_("Explore courses")} - - - %endif -
- % endif - - % if staff_access and len(errored_courses) > 0: -
-

${_("Course-loading errors")}

- - % for course_dir, errors in errored_courses.items(): -

${course_dir}

-
    - % for (msg, err) in errors: -
  • ${msg} -
    • ${err}
    -
  • - % endfor -
- % endfor -
- % endif -
- - % if settings.FEATURES.get('ENABLE_DASHBOARD_SEARCH'): - - % endif - - % if settings.FEATURES.get('ENABLE_DASHBOARD_SEARCH'): -
- % endif - -
-
- -
- + + % if settings.FEATURES.get('ENABLE_DASHBOARD_SEARCH'): + + % endif + + % if settings.FEATURES.get('ENABLE_DASHBOARD_SEARCH'): +
+ % endif + +
+
+ +
+ +
+ % if xseries_credentials: +
+

${_("XSeries Program Certificates")}

+

${_("You have received a certificate for the following XSeries programs:")}

+ +
+ % endif
-
- % if xseries_credentials: -
-

${_("XSeries Program Certificates")}

-

${_("You have received a certificate for the following XSeries programs:")}

- -
- % endif -
+ diff --git a/lms/templates/edxnotes/edxnotes.html b/lms/templates/edxnotes/edxnotes.html index 04a08dacbe..37146f4a4b 100644 --- a/lms/templates/edxnotes/edxnotes.html +++ b/lms/templates/edxnotes/edxnotes.html @@ -20,7 +20,7 @@ from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_str
- +

@@ -93,7 +93,7 @@ from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_str

% endif
- + diff --git a/lms/templates/index.html b/lms/templates/index.html index ddb0d66603..ea3ad096ef 100644 --- a/lms/templates/index.html +++ b/lms/templates/index.html @@ -5,48 +5,50 @@ from django.utils.translation import ugettext as _ from django.core.urlresolvers import reverse %> -
-
-
-
-
- % if homepage_overlay_html: - ${homepage_overlay_html} - % else: - ## Translators: 'Open edX' is a brand, please keep this untranslated. See http://openedx.org for more information. -

${_("Welcome to Open edX!")}

- ## Translators: 'Open edX' is a brand, please keep this untranslated. See http://openedx.org for more information. -

${_("It works! This is the default homepage for this Open edX instance.")}

+
+
+
+
+
+
+ % if homepage_overlay_html: + ${homepage_overlay_html} + % else: + ## Translators: 'Open edX' is a brand, please keep this untranslated. See http://openedx.org for more information. +

${_("Welcome to Open edX!")}

+ ## Translators: 'Open edX' is a brand, please keep this untranslated. See http://openedx.org for more information. +

${_("It works! This is the default homepage for this Open edX instance.")}

+ % endif +
+ % if settings.FEATURES.get('ENABLE_COURSE_DISCOVERY'): + + % endif + +
+ + % if show_homepage_promo_video: + +
+
+
+
% endif
- % if settings.FEATURES.get('ENABLE_COURSE_DISCOVERY'): - - % endif -
+
+ <%include file="${courses_list}" /> - % if show_homepage_promo_video: - -
-
-
-
- % endif - - - - <%include file="${courses_list}" /> - -
+ + % if show_homepage_promo_video: