From a2be6dd4204e33593ec4d5150437c6edfde6d523 Mon Sep 17 00:00:00 2001 From: Kevin Chugh Date: Tue, 12 Mar 2013 10:31:05 -0400 Subject: [PATCH] first cut of UI --- .gitignore | 3 +- .../django_comment_client/forum/views.py | 3 ++ lms/static/images/__MACOSX/._pinned.png | Bin 0 -> 82 bytes lms/static/images/__MACOSX/._unpinned.png | Bin 0 -> 82 bytes lms/static/images/pinned.png | Bin 0 -> 518 bytes lms/static/images/unpinned.png | Bin 0 -> 498 bytes lms/static/sass/_discussion.scss | 37 +++++++++++++++++- .../discussion/_underscore_templates.html | 5 +++ 8 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 lms/static/images/__MACOSX/._pinned.png create mode 100644 lms/static/images/__MACOSX/._unpinned.png create mode 100644 lms/static/images/pinned.png create mode 100644 lms/static/images/unpinned.png 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 0000000000000000000000000000000000000000..1073ea4c42b27830690abb44fa97664a5e13ef43 GIT binary patch literal 82 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}u>uf-_(4F-5a8#Y=IiYg31VXd08sV@ Ap8x;= literal 0 HcmV?d00001 diff --git a/lms/static/images/__MACOSX/._unpinned.png b/lms/static/images/__MACOSX/._unpinned.png new file mode 100644 index 0000000000000000000000000000000000000000..1073ea4c42b27830690abb44fa97664a5e13ef43 GIT binary patch literal 82 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}u>uf-_(4F-5a8#Y=IiYg31VXd08sV@ Ap8x;= literal 0 HcmV?d00001 diff --git a/lms/static/images/pinned.png b/lms/static/images/pinned.png new file mode 100644 index 0000000000000000000000000000000000000000..76bb207ffffbe470ecfa81ff8b9b3ee9d8de9100 GIT binary patch literal 518 zcmeAS@N?(olHy`uVBq!ia0vp^AT}Qd8;}%R+`Ae`u@pObhHwBu4M$1`kk47*5m^jW z_Zoy5o4R?UfP$hWt`Q~9MX8A;nfZANA(^?U42DMfCi;d(v!?&Q1XLgcQV^VktX{it;ltjGcOqWeCoIl(?&ae(bN$ErFswPCc}s>;OShxR6tyO)XTtH` z?>|;u$lv*W-sg{VtL>V4n^xsAaxh5D`Tp(|LxKbwL&I&B>s*t~EDg`}SaPkp#!$er zfR7<0U~9wt)Bda9EnRV_<*D5)|BKgluRnY<x4}zPlJ?FI%DisZl84D{ww$S zaIcm{KtYBERi%wPeC`xU^&fk6*0s|2dg*!}nNANKK87=ATTkzs;3IP||2v~P8-u}b zpR+plha5Y8uibq!JxVh^aMHt7!8{CJMln~tesVEf$Pc@HcJk`O=i8s(&8!y@cYK;! zn7((GX4+|ntgt?p5M!RlkN@qkm}7eXTZL83Ns-OdU9K21r$3WWdbLGbcjfvfj4aIt~|b6WrZP<|q3xMhA>9RugaH2*hjA9nzwgu&C*&t;uc GLK6VR%hyE! literal 0 HcmV?d00001 diff --git a/lms/static/images/unpinned.png b/lms/static/images/unpinned.png new file mode 100644 index 0000000000000000000000000000000000000000..030198f7e8d00489d5883eb59dbd38af31c4c267 GIT binary patch literal 498 zcmeAS@N?(olHy`uVBq!ia0vp^AT}Qd8;}%R+`Ae`u@pObhHwBu4M$1`kk47*5m^jW z_Zoy5o4R?UfP$hWt`Q~9MX8A;nfZANA(^?U495C~hWduax}IV`feK_m3WD>~O3D+9 zQW+dm@{>{(+%k(&%kzt}ixr%M&0g%;)Wg8Q=mj zvL+o5HYU#-YD?cb*(szl{X10S81=Vd%1QNzi0-8(DSgs;()|wrU!fnco$2m?i?4dMm<+Kc4PUqUvZjWmu}7DQryMxfW`5` zq@ZVBo|ESAur*))Tld~eQ;@}xn_*7T&X`T|lY$n-t-n9T%l>W7yC3`h_b^HIy3I>3 zR_|K0FeocVg}EUpOUCu00K<#xt5?4)soEW*XTAIGx}%o$pKI%7+8zowc)n8>^u1*A zSEAQ#_T!HgXD#L15`Q?jbe}0uk9KzHw&**WwbiQoafHCdLw3zKTVL|l;$3_4E literal 0 HcmV?d00001 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 %>'})