-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathforumpost.tpl
executable file
·77 lines (77 loc) · 3.02 KB
/
forumpost.tpl
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
<div class="well well-sm">
<h2><a href="{$smarty.const.WWW_TOP}/forum">Forum</a></h2>
{if $results|@count > 0}
<h3>{$results[0].subject|escape:"htmlall"}</h3>
<a id="top"></a>
<table style="width:100%;" class="data highlight table" id="forumtable">
<tr>
<th style="padding-top:0px; padding-bottom:0px;">By</th>
<th style="padding-top:0px; padding-bottom:0px;">Message</th>
</tr>
{foreach $results as $result name=result}
<tr class="{cycle values=",alt"}">
<td width="15%;">
{if isset($isadmin) && $isadmin == 1}<strong>{/if}
<a {if $smarty.foreach.result.last}id="last"{/if}
title="{if isset($isadmin) && $isadmin == 1}Admin{else}View profile{/if}"
href="{$smarty.const.WWW_TOP}/profile/?name={$result.username}"><h5>
<strong>{$result.username}</strong></h5></a>
{if isset($isadmin) && $isadmin == 1}</strong>{/if}
{if $result.rolename === 'Admin' || $result.rolename === 'Moderator' || $result.rolename === 'Friend'}
<span class="btn btn-success btn-xs">{$result.rolename}</span>
{elseif $result.rolename === 'Supporter'}
<span class="btn btn-warning btn-xs">{$result.rolename}</span>
{elseif $result.rolename === 'Supporter ++'}
<span class="btn btn-danger btn-xs">{$result.rolename}</span>
{else}
<span class="btn btn-info btn-xs">{$result.rolename}</span>
{/if}
<br/>
on <span title="{$result.created_at}">{$result.created_at|date_format}</span>
<div class="hint">({$result.created_at|timeago})</div>
<br/>
{if $userdata.id == $result.users_id && $result.locked != 1 || isset($isadmin)}
<div>
<a class="btn btn-sm btn-warning"
href="{$smarty.const.WWW_TOP}/post_edit?id={$result.id}"
title="Edit Post">Edit</a>
</div>
{/if}
{if isset($isadmin)}
<br/>
<div>
<a class="confirm_action btn btn-sm btn-danger"
href="{$smarty.const.WWW_TOP}/admin/forum-delete/{$result.id}"
title="Delete Post">Delete</a>
</div>
{/if}
</td>
<td>{$result.message}</td>
</tr>
{/foreach}
</table>
<div id="new" tabindex="-1" role="dialog" aria-labelledby="myLabel" aria-hidden="true">
{if $result.locked == 0}
<div class="header">
<h3 id="myLabel">Reply</h3>
</div>
<div class="body">
{{Form::open(['id' => 'forum-post-reply', 'class' => 'form-horizontal'])}}
{{csrf_field()}}
<div class="control-group">
<label class="control-label" for="addMessage">Message</label>
<div class="controls">
<textarea id="addMessage" name="addMessage"></textarea>
</div>
<input class="btn btn-success" type="submit" value="Submit"/>
<input class="btn btn-warning" value="Cancel"
onclick="if(confirm('Are you SURE you wish to cancel?')) history.back();"/>
</div>
{{Form::close()}}
</div>
{else}
<label class="label label-warning" title="Topic Locked">Topic Locked</label>
{/if}
</div>
{/if}
</div>