Parent: [feae3e] (diff)

Download this file

threads_table.html    58 lines (54 with data), 2.2 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{% import 'jinja_master/lib.html' as lib with context %}
<div>
<table id="forum-list" class="clear">
<thead>
<tr>
<th>&nbsp;</th>
<th class="topic">Topic</th>
<th>Replies</th>
<th>Views</th>
<th>Last Post</th>
</tr>
</thead>
<tbody class="forum-list">
{% for thread in value %}
<tr>
<td>
<input type="checkbox" name="threads-{{loop.index0}}.subscription"
{% if thread.subscription %}checked="checked"{% endif %}/>
<input type="hidden" name="threads-{{loop.index0}}._id" value="{{thread._id}}"/>
</td>
{% if not thread.first_post %}
<td class="topic">
{% if 'flags' in thread and 'Sticky' in thread.flags %}
<a href="{{thread.url()}}" class="btn ico"><b class="ui-icon ui-icon-pin-s"></b> <span>Sticky</span></a>
{% endif %}
<h3><a href="{{thread.url()}}">{{thread.subject and h.text.truncate(thread.subject, 72) or '(no subject)'}}</a></h3>
</td>
{% else %}
<td class="topic">
{% set author = thread.first_post.author() %}
{% if 'flags' in thread and 'Sticky' in thread.flags %}
<a href="{{thread.url()}}" class="btn ico"><b class="ui-icon ui-icon-pin-s"></b> <span>Sticky</span></a>
{% endif %}
<h3><a href="{{thread.url()}}">{{thread.subject and h.text.truncate(thread.subject, 72) or '(no subject)'}}</a></h3>
<span>By <a href="{{author.url()}}">{{author.display_name}}</a></span> on {{thread.first_post.timestamp.strftime('%a %b %d, %Y %I:%M %p')}}
</td>
{% endif %}
<td>{{thread.num_replies}}</td>
<td>{{thread.num_views}}</td>
{% if not thread.last_post %}
<td>&nbsp;</td>
{% else %}
{% set author = thread.last_post.author() %}
<td>
<p class="gravatar sm">
By {{lib.gravatar(author, size=16)}}<a href="{{author.url()}}">{{author.display_name}}</a><br />on {{thread.last_post.timestamp.strftime('%a %b %d, %Y %I:%M %p')}}
</p>
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>