_single_thread.html 1.33 KB
Newer Older
Rocky Duan committed
1
<%namespace name="renderer" file="_content_renderer.html"/>
2
<%! from django_comment_client.mustache_helpers import url_for_user %>
3

Matthew Mongeau committed
4 5 6
<article class="discussion-article" data-id="${discussion_id| h}">
  <a href="#" class="dogear"></a>
  <div class="discussion-post">
7
  
Matthew Mongeau committed
8
    <header>
Steve Strassmann committed
9
    %if thread['group_id']:
10 11 12
      <div class="group-visibility-label">This post visible only to group ${cohort_dictionary[thread['group_id']]}. </div>
    %endif
      
Matthew Mongeau committed
13 14 15 16
        <a href="#" class="vote-btn discussion-vote discussion-vote-up"><span class="plus-icon">+</span> <span class='votes-count-number'>${thread['votes']['up_count']}</span></a>
      <h1>${thread['title']}</h1>
      <p class="posted-details">
        <span class="timeago" title="${thread['created_at'] | h}">sometime</span> by
17
        <a href="${url_for_user(thread, thread['user_id'])}">${thread['username']}</a>
Matthew Mongeau committed
18 19 20 21 22
      </p>
    </header>
    <div class="post-body">
      ${thread['body']}
    </div>
Rocky Duan committed
23
  </div>
Matthew Mongeau committed
24 25 26 27 28 29
  <ol class="responses">
    % for reply in thread.get("children", []):
    <li>
      <div class="response-body">${reply['body']}</div>
      <ol class="comments">
        % for comment in reply.get("children", []):
30
        <li><div class="comment-body">${comment['body']}</div></li>
Matthew Mongeau committed
31 32 33 34 35 36
        % endfor
      </ol>
    </li>
    % endfor
  </ol>
</article>
37

Steve Strassmann committed
38
<%include file="_js_data.html" />