From 5c14a1ce652cf43c202c12500af17c93cf5420c7 Mon Sep 17 00:00:00 2001 From: Tom Giannattasio Date: Wed, 8 Aug 2012 16:42:19 -0400 Subject: [PATCH] added admin controls to main post and comments --- lms/static/images/admin-actions-sprite.png | Bin 0 -> 2261 bytes lms/static/sass/_discussion.scss | 503 +++++++++++++-------- lms/templates/discussion/_thread.html | 7 +- 3 files changed, 309 insertions(+), 201 deletions(-) create mode 100644 lms/static/images/admin-actions-sprite.png diff --git a/lms/static/images/admin-actions-sprite.png b/lms/static/images/admin-actions-sprite.png new file mode 100644 index 0000000000000000000000000000000000000000..b07a6d6b7b797c953c1fe7e7b976d54ab9edd6a4 GIT binary patch literal 2261 zcmbVOdsGu=7N0;2Addo7fvRN)1jrilf+QpoAtZqWBtoQxus{jP1X9eyJRl&YKt%-# zi=g0YDXgYGD^*0L^~C{1Db`c6B8qT?S`_5%10NvWiHhAn-2Sn1X3l)yoqK=x-rxOw z=S*?5Al!cGM@suhKJ$3F9 z8k9?!=r~FgF-pyb(&fAy4YV;w5G%>akkF;*;B{b-fdK<3Ae|UAC^jjz3#j-s`Q6%~nGMA*5C5H4=CpGS9_en7hADWOjtBVQkRI;h~5(aa0n$0#fSu z93~q6f|tsr3}Rp)%pxs-NFx)efh1BOnatvbk~l<~KbI01NL$2sUo4yEPhyj)91cA+ zltki^=m9he-Jc#15Ee%E=Tg~=v3#XgCss#PVF9*`dGa+f1Mx_8>Gt7{`rvgp@g~$nH(}=A9 z)%lxP>HotT0WOAMmdAg|Wzhs{(7b#net7fl_&`ed%xK`lp^E&+N&r}5$>*?Q4SnPL zB6lo{Tej`k9sUg-*j-jiLXrwnLSou+{hT6!g<#y($5+%`F;leC-Lt#?fUSG_3X#|6 zJ3yZGx)Z;&JNej@;E^sR;6>}(uI%4hHzCtjRq3vuRMBfP1|DkNDS?kZdp>$}@}DnX z_V?2Dg195eKlpIZYRE`?$3r*w*FBk?4Lhg)PKa%#OXK*o2#J`Bd>I&nVf z)K#~XQ(Mmt_dGQ0&Pn3!jmT+RUP1H5j;xtr5<*TDY+!9Edv-1fsKh45CC!#Grecz4 zgN=Ix;+u5r6@!=sRk6(8_jcr@Nr)nwKEod>sWdg?uBJ<2r^j6W`I9~vEYt)SXh93Ctj zn86Ke3$JWNgj0aCR>tGmfXfd1Xw0i+ZLj)($Nb~XII7gQ6Otwbwa5kuByLt9! z`Nne*Z5?%BvnA4zQ-N?Yx-lbgL-v}Yp{8rHUvBY1jQ+|T<%kS1EF1T7%)HQbW5&v@ z{-E1ho2`$1?wr=H_WJo2zxJkgkD^Xq|94|=QYF0-d%pX5wE(Emx7L?-YU!K5@&qc|w`)IcpG~OfCU(;FRnRVIC=Y>X&$?XWu<)_2`(>p~w;xM%M$Q&}iVP8* ziO+9$-UZeEWDAL&8$tj#s?+bMKku026yLb*?b2)7NOw?pA&IAK<`j(XIJeyuG@%y=ea2I>&`@f%M{T z#K>UY)x`gqJ_)_IGGXNZ8uGe=Z+4~48=2Xwahr$gjDeiufU zR&drF!Q{@hVEX6{W?Ikc|IPby#Rb;vTth;8Qa)h8>)ss48{fTLTa;iD>axnvuXufl z%cMqA7ym# .comments { + margin-left: 68px; + } + + //COMMENT STYLES + .comments { + overflow: hidden; + + .discussion-votes { + margin-top: 8px; + } + + .discussion-right-wrapper { + margin: 10px 0 10px 68px; + } + + .comment { + .comment-body, .content-body { + @include discussion-font; + color: black; + display: block; + font-size: $comment-font-size; + margin-top: 3px; + } + + &.endorsed { + > .discussion-content { + background-color: #fcfcea; + } + } + } + } + } + + + + + /*** Sorting ***/ + .discussion-sort { float: right; font-size: 0.8em; @@ -174,7 +418,10 @@ $tag_text_color: #5b614f; } } - //SEARCH + + + /*** Search ***/ + .search-wrapper-inline { display: inline-block; margin-bottom: 6%; @@ -223,25 +470,21 @@ $tag_text_color: #5b614f; .discussion-search-within-board { font: inherit; - font-size: $post_font_size; + font-size: $post-font-size; font-style: normal; } - //BASIC BUTTON STYLES + + + /*** buttons ***/ + .control-button { @include button; @include discussion-font; background-color: #959595; - background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #959595),color-stop(100%, #7B7B7B)); - background-image: -webkit-linear-gradient(top, #959595,#7B7B7B); - background-image: -moz-linear-gradient(top, #959595,#7B7B7B); - background-image: -ms-linear-gradient(top, #959595,#7B7B7B); - background-image: -o-linear-gradient(top, #959595,#7B7B7B); - background-image: linear-gradient(top, #959595,#7B7B7B); + @include background-image(linear-gradient(top, #959595, #7B7B7B)); border: 1px solid #6F6F6F; - -webkit-box-shadow: inset 0 1px 0 #A2A2A2,0 0 3px #CCC; - -moz-box-shadow: inset 0 1px 0 #a2a2a2,0 0 3px #ccc; - box-shadow: inset 0 1px 0 #A2A2A2,0 0 3px #CCC; + @include box-shadow(inset 0 1px 0 #A2A2A2, 0 0 3px #CCC); color: white; display: inline-block; font-size: inherit; @@ -254,25 +497,20 @@ $tag_text_color: #5b614f; &:hover { background-color: #A2A2A2; - background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #A2A2A2),color-stop(100%, #7B7B7B)); - background-image: -webkit-linear-gradient(top, #A2A2A2,#7B7B7B); - background-image: -moz-linear-gradient(top, #A2A2A2,#7B7B7B); - background-image: -ms-linear-gradient(top, #A2A2A2,#7B7B7B); - background-image: -o-linear-gradient(top, #A2A2A2,#7B7B7B); - background-image: linear-gradient(top, #A2A2A2,#7B7B7B); + @include background-image(linear-gradient(top, #A2A2A2, #7B7B7B)); border: 1px solid #555; - -webkit-box-shadow: inset 0 1px 0 #BBB,0 0 3px #CCC; - -moz-box-shadow: inset 0 1px 0 #bbb,0 0 3px #ccc; - box-shadow: inset 0 1px 0 #BBB,0 0 3px #CCC; + @include box-shadow(inset 0 1px 0 #BBB, 0 0 3px #CCC); } } - //FOLLOW BUTTON .follow-wrapper { display: inline; } - //VOTES + + + /*** votes ***/ + .discussion-votes { float: left; width: 60px; @@ -326,7 +564,7 @@ $tag_text_color: #5b614f; .discussion-vote-count { @include discussion-font; - font-size: $post_font_size; + font-size: $post-font-size; } .discussion-votes-point { @@ -335,20 +573,17 @@ $tag_text_color: #5b614f; color: #9a9a9a; } } + + - //CREATE NEW AND EDIT POSTS - .discussion-right-wrapper { - min-height: 40px; - // width: flex-grid(11); - margin: 24px 0 24px 68px; - } + /*** new post ***/ .new-post-form, .discussion-thread-edit { .title-input, .body-input { display: block !important; font: inherit; font-style: normal; - width: $discussion_input_width !important; + width: $discussion-input-width !important; } .discussion-errors { @@ -414,10 +649,6 @@ $tag_text_color: #5b614f; margin-top: 1%; } - .reply-post-control { - // margin-left: 73%; - } - .edit-post-control { margin-left: 79%; margin-top: 1%; @@ -455,11 +686,11 @@ $tag_text_color: #5b614f; } .thread-tag { - background: $tag_background_color; - border: 1px solid $tag_border_color; + background: $tag-background-color; + border: 1px solid $tag-border-color; -moz-border-radius: 2px; -webkit-border-radius: 2px; - color: $tag_text_color; + color: $tag-text-color; float: left; font-size: 13px; margin: 5px 7px 5px 0; @@ -473,135 +704,12 @@ $tag_text_color: #5b614f; } } - //THREAD STYLES - .thread { - //display: none; - .thread-title { - @include discussion-font; - @include discussion-clickable; - display: block; - margin-bottom: 1em; - font-size: $comment_title_size; - font-weight: bold; - line-height: 1.4em; - } - .thread-body, .content-body { - @include discussion-font; - font-size: $post_font_size; - margin-bottom: 4px; - margin-top: 3px; + /*** pagination ***/ - p { - @include discussion-font; - } - } - - .thread-tags { - display: inline-block; - } - - .info { - @include discussion-font; - color: gray; - font-size: $comment_info_size; - font-style: italic; - margin-top: 1em; - - a:hover { - text-decoration: none; - color: #1C71DD; - } - - .comment-time { - display: inline; - float: right; - } - - .comment-count { - display: inline; - margin-right: 20px; - } - - .discussion-actions { - display: inline; - margin: 0; - padding: 0; - - li { - display: inline; - margin-right: 20px; - } - } - - .discussion-link { - @include discussion-font; - color: #1d9dd9; - display: inline; - - &.discussion-unfollow-thread { - color: #dea03e; - } - } - } - - .discussion-content { - border-top: lightgray 1px solid; - overflow: hidden; - // padding: 1.5% 0; - - .discussion-reply-new { - @include discussion-font; - margin-left: 68px; - - .reply-body { - @include discussion-font; - display: block; - font-size: $post_font_size; - margin-top: 10px; - width: 95%; - } - } - } - - .comment > .comments { - margin-left: 68px; - } - - //COMMENT STYLES - .comments { - overflow: hidden; - - .discussion-votes { - margin-top: 8px; - } - - .discussion-right-wrapper { - margin: 10px 0 10px 68px; - } - - .comment { - .comment-body, .content-body { - @include discussion-font; - color: black; - display: block; - font-size: $comment_font_size; - margin-top: 3px; - } - - &.endorsed { - > .discussion-content { - background-color: #fcfcea; - } - } - } - } - } - - //PAGES .discussion-paginator { - font-size: $post_font_size; + font-size: $post-font-size; margin-bottom: 10px; margin-top: 20px; text-align: center; @@ -650,16 +758,16 @@ $tag_text_color: #5b614f; } } -//EDITOR STYLES -.wmd-panel -{ + +/*** base editor styles ***/ + +.wmd-panel { width: 100%; min-width: 500px; } -.wmd-button-bar -{ +.wmd-button-bar { width: 100%; background-color: Silver; } @@ -719,8 +827,7 @@ $tag_text_color: #5b614f; @include transition(all, .2s, easeOut); } -.wmd-spacer -{ +.wmd-spacer { width: 1px; height: 20px; margin-left: 14px; @@ -751,26 +858,22 @@ $tag_text_color: #5b614f; display: inline-block; } -.wmd-spacer1 -{ +.wmd-spacer1 { left: 50px; } -.wmd-spacer2 -{ +.wmd-spacer2 { left: 175px; } -.wmd-spacer3 -{ + +.wmd-spacer3 { left: 300px; } -.wmd-prompt-background -{ +.wmd-prompt-background { background-color: Black; } -.wmd-prompt-dialog -{ +.wmd-prompt-dialog { border: 1px solid #999999; background-color: #F5F5F5; } @@ -786,7 +889,7 @@ $tag_text_color: #5b614f; color: black; } -.wmd-prompt-dialog > form > input[type="button"]{ +.wmd-prompt-dialog > form > input[type="button"] { border: 1px solid #888888; font-family: trebuchet MS, helvetica, sans-serif; font-size: 0.8em; diff --git a/lms/templates/discussion/_thread.html b/lms/templates/discussion/_thread.html index ea2e24361a..f0de92fc2f 100644 --- a/lms/templates/discussion/_thread.html +++ b/lms/templates/discussion/_thread.html @@ -39,7 +39,12 @@ ${render_vote(content)}
- + + ${render_title(content, type, **kwargs)}
${content['body'] | h}