Changeset 406 for veekun/trunk/templates/forum/common.tt
- Timestamp:
- 02/08/08 02:44:39 (2 years ago)
- Files:
-
- 1 modified
-
veekun/trunk/templates/forum/common.tt (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
veekun/trunk/templates/forum/common.tt
r386 r406 34 34 [% END %] 35 35 [% END %] 36 [% '<dt>' IF style == 2 %]<img src="/images/icons/pm/[% user.pm icon %].png" alt="Send private message" title="Send private message" class="disabled"/> [% 'PM<dd>not yet' IF style == 2 %]36 [% '<dt>' IF style == 2 %]<img src="/images/icons/pm/[% user.pm_icon %].png" alt="Send private message" title="Send private message" class="disabled"/> [% 'PM<dd>not yet' IF style == 2 %] 37 37 </dl> 38 38 [% END %] … … 44 44 <p>[% IF form.exists('subject'); '<label>Subject: '; form.get_tag('subject'); '</label>'; END %]</p> 45 45 <p>[% IF form.exists('blurb'); '<label>Blurb: '; form.get_tag('blurb'); '</label>'; END %]</p> 46 <p>[% form.get_tag('id') %][% IF form.exists(' message'); form.get_tag('message'); END %]</p>46 <p>[% form.get_tag('id') %][% IF form.exists('content'); form.get_tag('content'); END %]</p> 47 47 <p> <input type="submit" name="submit" value="Post"/> <input type="submit" name="submit" value="Preview"/> <input type="reset" value="Clear"/> </p> 48 48 </form> … … 53 53 [% BLOCK post_buttons -%][%# post, thread, forum %] 54 54 [% is_deleted = post.flags.match('deleted') %] 55 [% IF c.can_i("postedit", post) OR post.user id == c.user.obj.id; can_edit = 1; END %]56 [% IF c.can_i("postdelete", post) OR (post.user id == c.user.obj.id AND post.id == thread.lastpostid); can_delete = 1; END %]55 [% IF c.can_i("postedit", post) OR post.user_id == c.user.obj.id; can_edit = 1; END %] 56 [% IF c.can_i("postdelete", post) OR (post.user_id == c.user.obj.id AND post.id == thread.last_post_id); can_delete = 1; END %] 57 57 [% IF c.can_i("postnuke"); can_nuke = 1; END %] 58 58 [% RETURN UNLESS can_edit || can_delete || can_nuke %] … … 93 93 <div class="sidebar"> 94 94 <img src="/images/icons/delete.png" alt=""/> 95 This post by <a href="[% c.uri('Users', 'info', post.user id) %]">[% post.user.name %]</a> has been deleted.95 This post by <a href="[% c.uri('Users', 'info', post.user_id) %]">[% post.user.name %]</a> has been deleted. 96 96 [% IF c.can_i("postdelete", post) %] 97 97 <a href="/forum/post/[% post.id %]/undelete">Restore it?</a> Or <a href="/forum/post/[% post.id %]/edits">read it</a>? … … 103 103 <div class="sidebar-wrapper"><div class="sidebar"> 104 104 [% groups = post.user.groups.split(' '); primary_group = groups.shift %] 105 <div class="username"><a href="[% c.uri('Users', 'info', post.user id) %]"><img src="/images/groups/[% UserGroups.$primary_group.icon %]" alt="[% UserGroups.$primary_group.name %]" title="[% UserGroups.$primary_group.name %]"/> [% post.user.name %]</a></div>106 <div class="title[% IF post.user.custom title -%] custom">[% post.user.customtitle %][% ELSE %]">[% UserGroups.$primary_group.name %][% END %]</div>105 <div class="username"><a href="[% c.uri('Users', 'info', post.user_id) %]"><img src="/images/groups/[% UserGroups.$primary_group.icon %]" alt="[% UserGroups.$primary_group.name %]" title="[% UserGroups.$primary_group.name %]"/> [% post.user.name %]</a></div> 106 <div class="title[% IF post.user.custom_title -%] custom">[% post.user.custom_title %][% ELSE %]">[% UserGroups.$primary_group.name %][% END %]</div> 107 107 <div class="avatar">[% IF post.user.is_dumb %]<img src="/images/dumb.png" alt="PSA: THIS USER IS DUMB" class="dumb"/>[% END %][% IF post.user.avatar %]<img src="/images/avatars/[% post.user.avatar %]" alt="">[% ELSE %]No avatar[% END %]</div> 108 108 <div class="postbar"> 109 <span class="postrank">[%# postrank(post.user.post ct) %]</span>110 <span class="postcount">Posts: [% post.user.post ct %]</span>111 [% INCLUDE postbar posts=post.user.post ct %]109 <span class="postrank">[%# postrank(post.user.post_count) %]</span> 110 <span class="postcount">Posts: [% post.user.post_count %]</span> 111 [% INCLUDE postbar posts=post.user.post_count %] 112 112 </div> 113 113 </div></div> … … 124 124 </div> 125 125 <div class="content"> 126 [% IF post.news pic %]127 <img src="/images/news/[% post.user.news pic %]" alt="[% post.name %]'s newspic" class="forum-post-newspic"/>126 [% IF post.news_pic %] 127 <img src="/images/news/[% post.user.news_pic %]" alt="[% post.name %]'s news pic" class="forum-post-newspic"/> 128 128 [% END %] 129 129 [% IF post.lastedit %] … … 131 131 [% END %] 132 132 <div class="message"> 133 [%+ post. message| bbcode | indent(12) %]133 [%+ post.content | bbcode | indent(12) %] 134 134 </div> 135 135 [% IF post.user.signature %] … … 172 172 </a> <!-- [ <a>2</a>, <a>3</a>, <a>4</a>, ... <a>9</a>, <a>10</a> ] --> 173 173 [% IF show_forum %] 174 <div class="inforum">in forum "<a href="/forum/[% thread.forum id %]">[% thread.forum.name %]</a>"</div>175 [% END %] 176 </td> 177 <td class="postinfo"><a href="[% c.uri('Users', 'info', thread.firstpost.user id) %]">[% thread.firstpost.user.name %]</a> <a href="/forum/post/[% thread.firstpost.id %]">[% thread.firstpost.time | date %]</a></td>178 <td class="count">[%# this is stupid fix it lati, but if all posts are deleted this will show -1 %][% IF thread.post ct > 0; thread.postct - 1; ELSE; thread.postct; END %]</td><td class="count">[% thread.hitct %]</td>174 <div class="inforum">in forum "<a href="/forum/[% thread.forum_id %]">[% thread.forum.name %]</a>"</div> 175 [% END %] 176 </td> 177 <td class="postinfo"><a href="[% c.uri('Users', 'info', thread.firstpost.user_id) %]">[% thread.firstpost.user.name %]</a> <a href="/forum/post/[% thread.firstpost.id %]">[% thread.firstpost.time | date %]</a></td> 178 <td class="count">[%# this is stupid fix it lati, but if all posts are deleted this will show -1 %][% IF thread.post_count > 0; thread.post_count - 1; ELSE; thread.post_count; END %]</td><td class="count">[% thread.view_count %]</td> 179 179 <td class="postinfo"> 180 [% IF thread.post ct <= 1 -%]180 [% IF thread.post_count <= 1 -%] 181 181 - 182 182 [% ELSE %] 183 <a href="[% c.uri('Users', 'info', thread.lastpost.user id) %]">[% thread.lastpost.user.name %]</a> <a href="/forum/post/[% thread.lastpost.id %]">[% thread.lastpost.time | date %]</a>183 <a href="[% c.uri('Users', 'info', thread.lastpost.user_id) %]">[% thread.lastpost.user.name %]</a> <a href="/forum/post/[% thread.lastpost.id %]">[% thread.lastpost.time | date %]</a> 184 184 [% END -%] 185 185 </td> … … 188 188 [% END -%] 189 189 190 [% BLOCK threads_message %][%# message-%]191 <tr><td class="forum-message" colspan="7">[% message%]</td></tr>190 [% BLOCK threads_message %][%# content -%] 191 <tr><td class="forum-message" colspan="7">[% content %]</td></tr> 192 192 [% END -%] 193 193 … … 222 222 </a> 223 223 </td> 224 <td class="count">[% forum.thread ct %]</td><td class="count">[% forum.postct %]</td>224 <td class="count">[% forum.thread_count %]</td><td class="count">[% forum.post_count %]</td> 225 225 <td class="postinfo"> 226 [% IF forum.last postid %]226 [% IF forum.last_post_id %] 227 227 [% IF 25 < forum.lastpost.thread.subject.length; subject = last_thread.subject.substr(0, 22) _ '...'; ELSE; subject = forum.lastpost.thread.subject; END -%] 228 [% subject %] <a href="[% c.uri('Users', 'info', forum.lastpost.user id) %]">[% forum.lastpost.user.name %]</a> <a href="/forum/post/[% forum.lastpostid %]">[% forum.lastpost.time | date %]</a>228 [% subject %] <a href="[% c.uri('Users', 'info', forum.lastpost.user_id) %]">[% forum.lastpost.user.name %]</a> <a href="/forum/post/[% forum.last_post_id %]">[% forum.lastpost.time | date %]</a> 229 229 [% ELSE %] 230 230 (no posts) … … 235 235 [% END %] 236 236 237 [% BLOCK forums_message %][%# message-%]238 <tr><td class="message" colspan="5">[% message%]</td></tr>237 [% BLOCK forums_message %][%# content -%] 238 <tr><td class="message" colspan="5">[% content %]</td></tr> 239 239 [% END %] 240 240
