summaryrefslogtreecommitdiff
path: root/templates/list_posts.tpl
blob: 8085056b5d39badf8f480d1282be704d8aa451b8 (plain)
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
{* $Header$ *}
{strip}
<div class="listing boards">

	<div class="navbar">
		<div class="boards breadcrumb">
			<a href="{$smarty.const.BOARDS_PKG_URL}">Message Boards</a> &raquo; <a href="{$board->mInfo.display_url}">{$board->getTitle()|escape}</a>
		</div>
	</div>

	<div class="floaticon floatctrl">
		{* not happy with this yet - xing *}
		{form action="$comments_return_url" class="form-inline mb-threading"}
			<input type="hidden" name="t" value="{$smarty.request.t}" />
			{* always go back to page 1 since changing any of these values
			   repaginates and makes the current page number meaningless *}
			<input type="hidden" name="comment_page" value="1" />
			<i class="icon-sort"></i> <select name="comments_sort_mode" id="comments-sort">
				<option value="commentDate_desc" {if $comments_sort_mode eq "commentDate_desc"}selected="selected"{/if}>Newest</option>
				<option value="commentDate_asc" {if $comments_sort_mode eq "commentDate_asc"}selected="selected"{/if}>Oldest</option>
			</select>
			&nbsp;&nbsp;
			<label>
				<input type="checkbox" name="comments_style" id="comments-style" value="threaded" {if $comments_style eq "threaded"}checked="checked"{/if} onchange="this.form.submit()"/> Threaded
			</label>
			&nbsp; &nbsp;
			<label>
				<select name="comments_maxComments" id="comments-maxcomm" onchange="this.form.submit()">
					<option value="5" {if $maxComments eq 5}selected="selected"{/if}>5</option>
					<option value="10" {if $maxComments eq 10}selected="selected"{/if}>10</option>
					<option value="20" {if $maxComments eq 20}selected="selected"{/if}>20</option>
					<option value="50" {if $maxComments eq 50}selected="selected"{/if}>50</option>
					<option value="100" {if $maxComments eq 100}selected="selected"{/if}>100</option>
					<option value="999999" {if $maxComments eq 999999}selected="selected"{/if}>All</option>
				</select> Messages 
			</label>
		{/form}
		{if $gBitSystem->isPackageActive( 'rss' )}
			<a title="Get RSS Feed" href="{$smarty.const.BOARDS_PKG_URL}rss.php?t={$smarty.request.t}">{booticon iname="icon-rss"  ipackage="icons"  iexplain="Get RSS Feed"}</a>
		{/if}
		{assign var=flip value=$thread->getFlipFlop()}
		{foreach from=$flip item=flip_s key=flip_name}
			{include file="bitpackage:boards/flipswitch.tpl"}
		{/foreach}
	</div>

	<div class="header">
		<h1>{$thread->getTitle()|escape}</h1>
		{if $thread->getField('root_content_type_guid') != $smarty.const.BITBOARD_CONTENT_TYPE_GUID}
			Comment on <a href="{$smarty.const.BIT_ROOT_URL}index.php?content_id={$thread->getField('root_content_id')}">{$thread->getField('root_title')|default:$thread->getField('root_content_id')|escape}</a>
		{/if}
	</div>

	<div class="body">
		{if !$topic_locked and $board->hasPostCommentsPermission()}
			<div class="form-group submit">
				<a title="Post Reply" class="btn btn-default" href="{$comments_return_url}&amp;post_comment_reply_id={$thread->mInfo.flc_content_id}&amp;post_comment_request=1#editcomments">{booticon iname="icon-comment-alt"  ipackage="icons"  iexplain="Post Reply" iforce="icon"} Post Reply</a>
			</div>
		{/if}

		{formfeedback hash=$formfeedback}

		{foreach item=comment from=$comments}
			<div class="mb-post {if $gBitSystem->isFeatureActive('boards_post_anon_moderation') and $comment.user_id<0 and $comment.is_approved==0} unapproved{/if}">
				{assign var=thread_mInfo value=$thread->mInfo}
				{displaycomment comment=$comment template=$comment_template}
			</div>
		{foreachelse}
			<p class="norecords">
				No posts found
			</p>
		{/foreach}

		{if $post_comment_preview}
			<h2>Preview</h2>
			<div class="preview mb-post">
				{assign var=post_is_preview value=1}
				{displaycomment comment=$postComment template=$comment_template}
				{assign var=post_is_preview value=0}
			</div><!-- end .preview -->
		{/if}

		{if !$topic_locked and $board->hasPostCommentsPermission()}
			<div class="form-group submit">
				<a title="Post Reply" class="btn btn-default" href="{$comments_return_url}&amp;post_comment_reply_id={$thread->mInfo.flc_content_id}&amp;post_comment_request=1#editcomments">{booticon iname="icon-comment-alt"  ipackage="icons"  iexplain="Post Reply" iforce="icon"} Post Reply</a>
			</div>
		{/if}

		{pagination ihash=$commentsPgnHash}
	</div><!-- end .body -->
</div><!-- end .boards -->

{if $gBitSystem->isFeatureActive('boards_post_anon_moderation') and ($smarty.request.post_comment_request or !empty($smarty.request.post_comment_submit)) and !$gBitUser->isRegistered()}
	{formfeedback warning="Your post will not be shown immediately it will have to be approved by a moderator"}
{/if}

{include file="bitpackage:liberty/comments_post_inc.tpl"  post_title="Post" hide=1 preview_override=1}

{include file="bitpackage:boards/legend_inc.tpl"  posticons=1}
{/strip}