Commit 3ec658df by Brittany Cheng

merge tom's styles, warning: LOTS OF STUFF BROKE

parents 1f1ea8ad dc5b8b51
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<% <article class="sidebar-module">
def url_for(commentable): <a href="#" class="sidebar-new-post-button">New Post</a>
return reverse('django_comment_client.forum.views.forum_form_discussion', args=[course.id, commentable['discussion_id']]) </article>
%>
<%def name="make_category(category, commentables)"> <article class="discussion-sidebar-following sidebar-module">
<h3><a href="#">${category}</a></h3> <header>
<h4>Following</h4>
<a href="#" class="sidebar-view-all">view all &rsaquo;</a>
</header>
<ol class="discussion-sidebar-following-list">
<li><a href="#"><span class="sidebar-following-name">Hints on HW4</span> <span class="sidebar-vote-count">1348</span></a></li>
<li><a href="#"><span class="sidebar-following-name">Answers to Mi-term</span> <span class="sidebar-vote-count">-37</span></a></li>
<li><a href="#"><span class="sidebar-following-name">Summaries for Lectures 1 to 12 (more added, links fixed)</span> <span class="sidebar-vote-count">128</span></a></li>
<ol>
</article>
<ul> <article class="discussion-sidebar-tags sidebar-module">
% for commentable in commentables: <header>
<li${' class="active"' if active == commentable['discussion_id'] else ''}> <h4>Recent Tags</h4>
<a href="${url_for(commentable)}"> <a href="#" class="sidebar-view-all">view all &rsaquo;</a>
<p>${commentable['title']}</p> </header>
</a> <ol class="discussion-sidebar-tags-list">
% endfor <li><a href="#" class="thread-tag">week-1</a><span class="sidebar-tag-count">&times;1348</span></li>
</ul> <li><a href="#" class="thread-tag">S2V8: Method 3</a><span class="sidebar-tag-count">&times;37</span></li>
</%def> <li><a href="#" class="thread-tag">artificial-intelligence</a><span class="sidebar-tag-count">&times;128</span></li>
<ol>
% for category, commentables in discussion_info.items(): </article>
${make_category(category, commentables)} \ No newline at end of file
% endfor
<%namespace name="renderer" file="_thread.html"/> <%namespace name="renderer" file="_thread.html"/>
<section class="discussion inline-discussion" _id="${discussion_id}"> <section class="discussion inline-discussion" _id="${discussion_id}">
<div class="discussion-non-content discussion-local">
<div class="discussion-title-wrapper"> <div class="discussion-non-content">
<a class="discussion-title" href="javascript:void(0)">Discussion</a>
</div>
<div class="search-wrapper"> <div class="search-wrapper">
<%include file="_search_bar.html" /> <%include file="_search_bar.html" />
</div> </div>
<div class="search-within">
<input type="checkbox" id="discussion-search-within-board-${discussion_id}" class="discussion-search-within-board" checked/>
<label for="discussion-search-within-board-${discussion_id}" class="discussion-search-within-board">Search within board</label>
</div>
<div class="discussion-new-post control-button" href="javascript:void(0)">New Post</div>
</div> </div>
% if len(threads) == 0: % if len(threads) == 0:
<div class="blank"> <div class="blank">
......
<%namespace name="renderer" file="_thread.html"/> <%namespace name="renderer" file="_thread.html"/>
<script type="text/javascript">
$('#wmd-input-reply-body').bind('focus', function(e) {
$('.new-post-form').removeClass('collapsed');
});
</script>
<section class="discussion inline-discussion" _id="${discussion_id}"> <section class="discussion inline-discussion" _id="${discussion_id}">
<div class="discussion-non-content discussion-local">
<div class="search-wrapper-inline search-wrapper"> <div class="discussion-non-content">
<%include file="_search_bar.html" /> <form class="new-post-form collapsed" id="new-post-form" style="display: block; ">
<ul class="discussion-errors"></ul>
<div class="reply-body"><div class="wmd-panel"><div id="wmd-button-bar-reply-body-502021ba30e78e7d4d00031d"><ul id="wmd-button-row-reply-body-502021ba30e78e7d4d00031d" class="wmd-button-row"><li class="wmd-button" style="left: 0px; " id="wmd-bold-button-reply-body-502021ba30e78e7d4d00031d" title="Strong &lt;strong&gt; Ctrl+B"><span style="background-position: 0px 0px; "></span></li><li class="wmd-button" style="left: 25px; " id="wmd-italic-button-reply-body-502021ba30e78e7d4d00031d" title="Emphasis &lt;em&gt; Ctrl+I"><span style="background-position: -20px 0px; "></span></li><li class="wmd-spacer wmd-spacer1" id="wmd-spacer1-reply-body-502021ba30e78e7d4d00031d"></li><li class="wmd-button" style="left: 75px; " id="wmd-link-button-reply-body-502021ba30e78e7d4d00031d" title="Hyperlink &lt;a&gt; Ctrl+L"><span style="background-position: -40px 0px; "></span></li><li class="wmd-button" style="left: 100px; " id="wmd-quote-button-reply-body-502021ba30e78e7d4d00031d" title="Blockquote &lt;blockquote&gt; Ctrl+Q"><span style="background-position: -60px 0px; "></span></li><li class="wmd-button" style="left: 125px; " id="wmd-code-button-reply-body-502021ba30e78e7d4d00031d" title="Code Sample &lt;pre&gt;&lt;code&gt; Ctrl+K"><span style="background-position: -80px 0px; "></span></li><li class="wmd-button" style="left: 150px; " id="wmd-image-button-reply-body-502021ba30e78e7d4d00031d" title="Image &lt;img&gt; Ctrl+G"><span style="background-position: -100px 0px; "></span></li><li class="wmd-spacer wmd-spacer2" id="wmd-spacer2-reply-body-502021ba30e78e7d4d00031d"></li><li class="wmd-button" style="left: 200px; " id="wmd-olist-button-reply-body-502021ba30e78e7d4d00031d" title="Numbered List &lt;ol&gt; Ctrl+O"><span style="background-position: -120px 0px; "></span></li><li class="wmd-button" style="left: 225px; " id="wmd-ulist-button-reply-body-502021ba30e78e7d4d00031d" title="Bulleted List &lt;ul&gt; Ctrl+U"><span style="background-position: -140px 0px; "></span></li><li class="wmd-button" style="left: 250px; " id="wmd-heading-button-reply-body-502021ba30e78e7d4d00031d" title="Heading &lt;h1&gt;/&lt;h2&gt; Ctrl+H"><span style="background-position: -160px 0px; "></span></li><li class="wmd-button" style="left: 275px; " id="wmd-hr-button-reply-body-502021ba30e78e7d4d00031d" title="Horizontal Rule &lt;hr&gt; Ctrl+R"><span style="background-position: -180px 0px; "></span></li><li class="wmd-spacer wmd-spacer3" id="wmd-spacer3-reply-body-502021ba30e78e7d4d00031d"></li><li class="wmd-button" style="left: 325px; " id="wmd-undo-button-reply-body-502021ba30e78e7d4d00031d" title="Undo - Ctrl+Z"><span style="background-position: -200px -20px; "></span></li><li class="wmd-button" style="left: 350px; " id="wmd-redo-button-reply-body-502021ba30e78e7d4d00031d" title="Redo - Ctrl+Shift+Z"><span style="background-position: -220px -20px; "></span></li></ul></div><textarea class="wmd-input" id="wmd-input-reply-body" placeholder="Post a question or comment…"></textarea><div id="wmd-preview-reply-body-502021ba30e78e7d4d00031d" class="wmd-panel wmd-preview"></div></div></div>
<div class="post-options">
<input type="checkbox" class="discussion-post-anonymously" id="discussion-post-anonymously-502021ba30e78e7d4d00031d">
<label for="discussion-post-anonymously-502021ba30e78e7d4d00031d">post anonymously</label>
<input type="checkbox" class="discussion-auto-watch" id="discussion-autowatch-502021ba30e78e7d4d00031d" checked="">
<label for="discussion-auto-watch-502021ba30e78e7d4d00031d">follow this thread</label>
</div> </div>
<div class="discussion-new-post control-button" href="javascript:void(0)">New Post</div> <div class="reply-post-control">
<a class="discussion-submit-post control-button" href="javascript:void(0)">Submit</a>
</div> </div>
% if len(threads) == 0: </form>
<div class="blank">
<%include file="_blank_slate.html" />
</div> </div>
<div class="threads"></div>
% else:
<%include file="_sort.html" />
<div class="threads"> <div class="threads">
% for thread in threads: % for thread in threads:
${renderer.render_thread(course_id, thread, show_comments=False)} ${renderer.render_thread(course_id, thread, show_comments=False)}
% endfor % endfor
</div> </div>
<%include file="_paginator.html" /> <%include file="_paginator.html" />
% endif
</section> </section>
<%! <%!
...@@ -36,3 +48,5 @@ ...@@ -36,3 +48,5 @@
} }
$$annotated_content_info = $.extend($$annotated_content_info, JSON.parse("${annotated_content_info | escape_quotes}")); $$annotated_content_info = $.extend($$annotated_content_info, JSON.parse("${annotated_content_info | escape_quotes}"));
</script> </script>
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
<%def name="link_to_sort(key, title)"> <%def name="link_to_sort(key, title)">
% if key == sort_key: % if key == sort_key:
% if sort_order.lower() == 'desc': % if sort_order.lower() == 'desc':
${_link_to_sort(key, 'asc', title + ' &#x25BC;', 'sorted')} ${_link_to_sort(key, 'asc', title + '', 'sorted')}
% else: % else:
${_link_to_sort(key, 'desc', title + ' &#x25B2;', 'sorted')} ${_link_to_sort(key, 'desc', title + '', 'sorted')}
% endif % endif
% else: % else:
${_link_to_sort(key, 'desc', title)} ${_link_to_sort(key, 'desc', title)}
...@@ -23,13 +23,13 @@ ...@@ -23,13 +23,13 @@
<a class="discussion-sort-link ${cls}" href="javascript:void(0)" sort-url="${url_for_sort(key, order)}">${title}</a> <a class="discussion-sort-link ${cls}" href="javascript:void(0)" sort-url="${url_for_sort(key, order)}">${title}</a>
</%def> </%def>
<div class="discussion-sort discussion-local"> <div class="discussion-sort">
Sort by: <span class="discussion-label">Sort by:</span>
${link_to_sort('top', 'top')}
${link_to_sort('date', 'date')} ${link_to_sort('date', 'date')}
|
${link_to_sort('activity', 'activity')}
|
${link_to_sort('votes', 'votes')} ${link_to_sort('votes', 'votes')}
|
${link_to_sort('comments', 'comments')} ${link_to_sort('comments', 'comments')}
</div> </div>
...@@ -36,10 +36,10 @@ ...@@ -36,10 +36,10 @@
<%def name="render_content(content, type, **kwargs)"> <%def name="render_content(content, type, **kwargs)">
<div class="discussion-content"> <div class="discussion-content">
<div class="discussion-content-wrapper clearfix"> <div class="discussion-content-wrapper clearfix">
<div class="follow-wrapper">
</div>
${render_vote(content)} ${render_vote(content)}
<div class="discussion-right-wrapper clearfix"> <div class="discussion-right-wrapper clearfix">
${render_title(content, type, **kwargs)} ${render_title(content, type, **kwargs)}
<div class="discussion-content-view"> <div class="discussion-content-view">
% if content.get('highlighted_body', None): % if content.get('highlighted_body', None):
...@@ -85,8 +85,11 @@ ...@@ -85,8 +85,11 @@
<%def name="render_bottom_bar(content, type, **kwargs)"> <%def name="render_bottom_bar(content, type, **kwargs)">
<div class="info"> <div class="info">
${render_info(content)} ${render_info(content)}
${render_link("discussion-link discussion-reply discussion-reply-" + type, "Reply")} <ul class="discussion-actions">
${render_link("discussion-link discussion-edit", "Edit")} <li>${render_link("discussion-link discussion-reply discussion-reply-" + type, "Reply")}</li>
<li><div class="follow-wrapper"></div></li>
<li>${render_link("discussion-link discussion-edit", "Edit")}</li>
<li>
% if type == "comment" and request.user.is_staff: % if type == "comment" and request.user.is_staff:
% if content['endorsed']: % if content['endorsed']:
<input type="checkbox" checked="checked" class="discussion-link discussion-endorse" id="discussion-endorse-${content['id']}"> <input type="checkbox" checked="checked" class="discussion-link discussion-endorse" id="discussion-endorse-${content['id']}">
...@@ -95,6 +98,8 @@ ...@@ -95,6 +98,8 @@
% endif % endif
<label class="discussion-link" for="discussion-endorse-${content['id']}">Endorsed</label> <label class="discussion-link" for="discussion-endorse-${content['id']}">Endorsed</label>
% endif % endif
</li>
</ul>
</div> </div>
</%def> </%def>
...@@ -109,7 +114,13 @@ ...@@ -109,7 +114,13 @@
</div> </div>
<div class="comment-count"> <div class="comment-count">
% if content.get('comments_count', -1) >= 0: % if content.get('comments_count', -1) >= 0:
<a href="javascript:void(0)" class="discussion-show-comments"> Show ${content['comments_count']} comment(s)</a> <a href="javascript:void(0)" class="discussion-show-comments">
% if content.get('comments_count', -1) >= 2:
Show ${content['comments_count']} comments
% else:
Show ${content['comments_count']} comment
% endif
</a>
% endif % endif
</div> </div>
</%def> </%def>
...@@ -120,8 +131,8 @@ ...@@ -120,8 +131,8 @@
<%def name="render_vote(content)"> <%def name="render_vote(content)">
<div class="discussion-votes"> <div class="discussion-votes">
${render_link("discussion-vote discussion-vote-up", "&#x2C4;")} ${render_link("discussion-vote discussion-vote-up", "&#9650;")}
<div class="discussion-votes-point">${content['votes']['point']}</div> <div class="discussion-votes-point">${content['votes']['point']}</div>
${render_link("discussion-vote discussion-vote-down", "&#x2C5;")} ${render_link("discussion-vote discussion-vote-down", "&#9660;")}
</div> </div>
</%def> </%def>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment