From: Charles Connell Date: Tue, 11 Mar 2014 14:36:01 +0000 (-0400) Subject: Working through course detail page X-Git-Tag: release-20150131~144^2~38 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3f0a5c500fbeee5efdd5a4233b74d0ed3058e952;p=oweals%2Fkarmaworld.git Working through course detail page --- diff --git a/karmaworld/assets/css/global.css b/karmaworld/assets/css/global.css index 66a2de9..f4612bf 100644 --- a/karmaworld/assets/css/global.css +++ b/karmaworld/assets/css/global.css @@ -46,3 +46,7 @@ margin: 20px 0 20px 0; } +label.inline-label +{ + display: inline; +} diff --git a/karmaworld/assets/css/note_course_pages.css b/karmaworld/assets/css/note_course_pages.css index 8245fdc..115c631 100644 --- a/karmaworld/assets/css/note_course_pages.css +++ b/karmaworld/assets/css/note_course_pages.css @@ -19,4 +19,42 @@ span.course-header-school { margin-top: 20px; border-bottom: 1px solid black; -} \ No newline at end of file +} + +#edit-button, +#flag-button +{ + cursor: pointer; +} + +button.add-note { + background: grey; + color: white; + border: none; + padding: 5px; + border-radius: 0.3em; + display: inline; +} + +input.search-notes { + width: 15em; + display: inline; + margin-right: 0; +} + +#note-sort-wrapper { + float: right; + display: inline; +} + +select.note-sort { + width: 10em; +} + +#note-search-bar { + margin-top: 20px; + border: 1px solid grey; + padding: 10px 0 0 0; +} + + diff --git a/karmaworld/assets/js/add-course.js b/karmaworld/assets/js/add-course.js index 25a4f3f..8a438f0 100644 --- a/karmaworld/assets/js/add-course.js +++ b/karmaworld/assets/js/add-course.js @@ -34,7 +34,7 @@ $(function() { autoOpen: false, modal: true, show: { effect: 'fade', duration: 500 }, - width: dialogWidth + width: dialogWidth() }); if (jump_to_form) { diff --git a/karmaworld/assets/js/course-detail.js b/karmaworld/assets/js/course-detail.js index d119eb2..9c2e15c 100644 --- a/karmaworld/assets/js/course-detail.js +++ b/karmaworld/assets/js/course-detail.js @@ -24,7 +24,7 @@ $(function() { autoOpen: false, modal: true, show: { effect: 'fade', duration: 500 }, - width: dialogWidth + width: dialogWidth() }); $('#edit-button').click(function(event) { @@ -44,7 +44,6 @@ $(function() { // We might want to use a template here instead of rehashing logic // on both the client and server side - $('#edit-course-form').slideUp(); $('.validation_error').remove() $('#course_form_errors').empty(); $('#course_name').text(data.fields.name); diff --git a/karmaworld/assets/js/course.js b/karmaworld/assets/js/course.js index 26c4338..bb2b9a6 100644 --- a/karmaworld/assets/js/course.js +++ b/karmaworld/assets/js/course.js @@ -57,9 +57,11 @@ window.KARMAWORLD.Course = { } }; -var bodyWidth = $('body').width(); -if (bodyWidth < 700) { - var dialogWidth = bodyWidth; -} else { - var dialogWidth = 700; -} \ No newline at end of file +function dialogWidth() { + var bodyWidth = $('body').width(); + if (bodyWidth < 700) { + return bodyWidth; + } else { + return 700; + } +} diff --git a/karmaworld/templates/courses/course_detail.html b/karmaworld/templates/courses/course_detail.html index 7fd63d3..50e91dc 100644 --- a/karmaworld/templates/courses/course_detail.html +++ b/karmaworld/templates/courses/course_detail.html @@ -18,6 +18,12 @@ {% block pagestyle %} + + +{% endblock %} + +{% block bodyscripts %} + {% endblock %} @@ -45,13 +51,13 @@ {% if user.is_authenticated %} {% if user.get_profile.can_edit_items %} - + Edit this course   {% endif %} {% if already_flagged %} You have reported this course as inappropriate {% else %} - Report course as inappropriate + Report course as inappropriate {% endif %} {% else %} Log in to flag a course as inappropraite @@ -128,20 +134,22 @@ {% endif %} -