Skip to content

Commit

Permalink
Merge pull request openedx#676 from MITx/feature/kfiedler/ocw-links
Browse files Browse the repository at this point in the history
Feature/kfiedler/ocw links
  • Loading branch information
David Ormsbee committed Sep 14, 2012
2 parents 0431d48 + cc09444 commit 8700697
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 5 deletions.
3 changes: 2 additions & 1 deletion lms/djangoapps/courseware/courses.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def get_course_about_section(course, section_key):
- textbook
- faq
- more_info
- ocw_links
"""

# Many of these are stored as html files instead of some semantic
Expand All @@ -112,7 +113,7 @@ def get_course_about_section(course, section_key):
'course_staff_short', 'course_staff_extended',
'requirements', 'syllabus', 'textbook', 'faq', 'more_info',
'number', 'instructors', 'overview',
'effort', 'end_date', 'prerequisites']:
'effort', 'end_date', 'prerequisites', 'ocw_links']:

try:
fs = course.system.resources_fs
Expand Down
Binary file added lms/static/images/link-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lms/static/images/opencourseware.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 41 additions & 4 deletions lms/static/sass/multicourse/_course_about.scss
Original file line number Diff line number Diff line change
Expand Up @@ -335,13 +335,43 @@

.course-sidebar {
@include box-sizing(border-box);
@include box-shadow(inset 0 0 3px 0 rgba(0,0,0, 0.15));
border: 1px solid rgb(200,200,200);
border-top: none;
float: left;
padding: 16px 20px 30px;
width: flex-grid(4);

> section {
@include box-shadow(inset 0 0 3px 0 rgba(0,0,0, 0.15));
border: 1px solid rgb(200,200,200);

&.course-summary {
padding: 16px 20px 30px;
margin-bottom: 220px;
border-top: none;
}

&.additional-resources {
padding: 30px;

.opencourseware {
text-indent: -9999px;
background: url('../images/opencourseware.png') 0 0 no-repeat;
width: 266px;
height: 31px;
margin-bottom: 20px;
}

ul {
padding-left: 0;
margin-bottom: 0;
}

li {
list-style: none;
padding-left: 29px;
background: url('../images/link-icon.png') left center no-repeat;
}
}
}

header {
margin-bottom: 30px;
padding-bottom: 16px;
Expand Down Expand Up @@ -441,6 +471,13 @@
}
}
}

h1 {
font: 1em $serif;
letter-spacing: 0;
color: #999;
margin-bottom: 0;
}
}

.important-dates {
Expand Down
15 changes: 15 additions & 0 deletions lms/templates/portal/course_about.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,21 @@ <h1>${course.number}: ${get_course_about_section(course, "title")}<a href="${rev
% endif
</ol>
</section>


## For now, ocw links are the only thing that goes in additional resources
% if get_course_about_section(course, "ocw_links"):
<section class="additional-resources">
<header>
<h1>Additional Resources</h1>
</header>

<section>
<h2 class="opencourseware">MITOpenCourseware</h2>
${get_course_about_section(course, "ocw_links")}
</section>
</section>
%endif
</section>

</section>
Expand Down

0 comments on commit 8700697

Please sign in to comment.