Commit 62bc1aae by Rocky Duan

make following and recent tags display actual things

parent 2dde3b00
<%! from django.core.urlresolvers import reverse %>
<article class="sidebar-module">
<a href="#" class="sidebar-new-post-button">New Post</a>
</article>
<article class="discussion-sidebar-following sidebar-module">
<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>
<article class="discussion-sidebar-tags sidebar-module">
<header>
<h4>Recent Tags</h4>
</header>
<ol class="discussion-sidebar-tags-list">
<li><a href="#" class="thread-tag">week-1</a><span class="sidebar-tag-count">&times;1348</span></li>
<li><a href="#" class="thread-tag">S2V8: Method 3</a><span class="sidebar-tag-count">&times;37</span></li>
<li><a href="#" class="thread-tag">artificial-intelligence</a><span class="sidebar-tag-count">&times;128</span></li>
<ol>
</article>
\ No newline at end of file
<div class="recent-activity">
<div class="recent-activity-title">Recent Activity:</div>
<div class="recent-active-posts">
% for thread in recent_active_threads:
<a class="recent-active-post" href="javascript:void(0)">${thread['title']}</a>
% endfor
</div>
<article class="discussion-sidebar-following sidebar-module">
<header>
<h4>Following</h4>
<a href="#" class="sidebar-view-all">view all &rsaquo;</a>
</header>
<ol class="discussion-sidebar-following-list">
% for thread in recent_active_threads:
<li><a href="#"><span class="sidebar-following-name">${thread['title']}</span> <span class="sidebar-vote-count">${thread['votes']['point']}</span></a></li>
% endfor
<ol>
</article>
<div class="trending-tags">
Trending tags:
% for tag, count in trending_tags:
<div class="trending-tag">
<a class="trending-tag-link" href="javascript:void(0)">${tag}</a>
&times;
<span class="trending-tag-count">${count}</span>
</div>
% endfor
</div>
<article class="discussion-sidebar-tags sidebar-module">
<header>
<h4>Recent Tags</h4>
</header>
<ol class="discussion-sidebar-tags-list">
% for tag, count in trending_tags:
<li><a href="#" class="thread-tag">${tag}</a><span class="sidebar-tag-count">&times;${count}</span></li>
% endfor
<ol>
</article>
......@@ -20,15 +20,18 @@
<h2>Discussion Boards</h2>
<a href="#">close</a>
</header>
<nav>
<article class="sidebar-module">
<a href="#" class="sidebar-new-post-button">New Post</a>
</article>
<div id="accordion" style="display:none">
<nav>
${accordion}
</nav>
</div>
<%include file="_recent_active_posts.html" />
<%include file="_trending_tags.html" />
</section>
<%include file="_recent_active_posts.html" />
<%include file="_trending_tags.html" />
</section>
</nav>
<section class="course-content">
${content}
......
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