diff --git a/.gitignore b/.gitignore index 493df5a7fd..a1af40ffec 100644 --- a/.gitignore +++ b/.gitignore @@ -28,4 +28,5 @@ nosetests.xml cover_html/ .idea/ .redcar/ -chromedriver.log \ No newline at end of file +chromedriver.log +/nbproject diff --git a/lms/djangoapps/django_comment_client/forum/views.py b/lms/djangoapps/django_comment_client/forum/views.py index a3120c563a..a41cf6c45a 100644 --- a/lms/djangoapps/django_comment_client/forum/views.py +++ b/lms/djangoapps/django_comment_client/forum/views.py @@ -210,6 +210,9 @@ def forum_form_discussion(request, course_id): user_cohort_id = get_cohort_id(request.user, course_id) + + + context = { 'csrf': csrf(request)['csrf_token'], 'course': course, diff --git a/lms/static/images/__MACOSX/._pinned.png b/lms/static/images/__MACOSX/._pinned.png new file mode 100644 index 0000000000..1073ea4c42 Binary files /dev/null and b/lms/static/images/__MACOSX/._pinned.png differ diff --git a/lms/static/images/__MACOSX/._unpinned.png b/lms/static/images/__MACOSX/._unpinned.png new file mode 100644 index 0000000000..1073ea4c42 Binary files /dev/null and b/lms/static/images/__MACOSX/._unpinned.png differ diff --git a/lms/static/images/pinned.png b/lms/static/images/pinned.png new file mode 100644 index 0000000000..76bb207fff Binary files /dev/null and b/lms/static/images/pinned.png differ diff --git a/lms/static/images/unpinned.png b/lms/static/images/unpinned.png new file mode 100644 index 0000000000..030198f7e8 Binary files /dev/null and b/lms/static/images/unpinned.png differ diff --git a/lms/static/sass/_discussion.scss b/lms/static/sass/_discussion.scss index e5134837fe..fe4f37f7aa 100644 --- a/lms/static/sass/_discussion.scss +++ b/lms/static/sass/_discussion.scss @@ -2442,4 +2442,39 @@ body.discussion { color:#000; font-style: italic; background-color:#fff; - } \ No newline at end of file + } + +.discussion-flag-abuse { + font-size: 12px; + float:right; + padding-right: 5px; + font-style: italic; + } + +.notpinned .icon +{ + display: inline-block; + width: 10px; + height: 14px; + padding-right: 3px; + background: transparent url('../images/notpinned.png') no-repeat 0 0; +} + +.pinned .icon +{ + display: inline-block; + width: 10px; + height: 14px; + padding-right: 3px; + background: transparent url('../images/pinned.png') no-repeat 0 0; +} + +.pinned span { + color: #B82066; + font-style: italic; +} + +.notpinned span { + color: #888; + font-style: italic; +} \ No newline at end of file diff --git a/lms/templates/discussion/_underscore_templates.html b/lms/templates/discussion/_underscore_templates.html index de1ff394bd..7faef4195c 100644 --- a/lms/templates/discussion/_underscore_templates.html +++ b/lms/templates/discussion/_underscore_templates.html @@ -45,6 +45,11 @@
${'<%- body %>'}
+ + % if has_permission(user, 'create_comment', course.id): +
+ Pin Thread
+ % endif ${'<% if (obj.courseware_url) { %>'}
(this post is about ${'<%- courseware_title %>'})