PageRenderTime 45ms CodeModel.GetById 37ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/BlogEngine/BlogEngine.NET/Templates/comments.htm

#
HTML | 96 lines | 94 code | 2 blank | 0 comment | 0 complexity | 065c3f8872864e519ad9207cd10d2118 MD5 | raw file
 1{#if $T.d.length == 0}
 2<div class="info">
 3    {#if window.location.href.indexOf('Spam.aspx') > 0}
 4    Hooray, no spam here!
 5    {#/if}
 6    {#if window.location.href.indexOf('Pending.aspx') > 0}
 7    There are no pending comments.
 8    {#/if}
 9    {#if window.location.href.indexOf('Approved.aspx') > 0}
10    There are no approved comments.
11    {#/if}
12    {#if window.location.href.indexOf('Pingbacks.aspx') > 0}
13    There are no pingbacks or trackback. Make sure you enabled sending and recieving trackbacks/pingbacks in <a href="../settings/Advanced.aspx">Advanced settings</a> section.
14    {#/if}
15</div>
16{#else}
17<table id="Comments" class="beTable rounded" style="width:100%">
18    <thead>
19        <tr>
20	        <th width="20"><input type="checkbox" id="selectall" onclick="toggleAllChecks(this)" /></th>
21            <th width="38">&nbsp;</th>
22            <th width="auto">Comment</th>
23	        <th width="120">Ip</th>
24	        <th width="100">Created on</th>
25            <th width="70">&nbsp;</th>
26        </tr>
27    </thead>
28    <tbody>
29        {#foreach $T.d as cmt}
30        <tr id="{$T.cmt.Id}" class="{#cycle values=['','alt']}">
31            <td><input type="checkbox" {#if $T.cmt.HasChildren} disabled {#/if} class="chk"/></td>
32            <td>{$T.cmt.Avatar}</td>
33            <td><span class="commenttitle">{$T.cmt.Title}</span>
34                {$T.cmt.Teaser}</td>
35            <td>{$T.cmt.Ip}</td>
36            <td><span class="comment_date">{$T.cmt.Date}</span><span class="comment_time">{$T.cmt.Time}</span></td>
37            <td>
38                <ul class="rowTools">
39                    <li>
40                        <a class="toolsAction" href="#"><span class="">Tools</span></a>
41                        <ul class="rowToolsMenu">
42                            <li><a class="editAction" href="#" onclick="return EditComment('{$T.cmt.Id}');">Edit</a></li>
43                            {#if window.location.href.indexOf('Spam.aspx') > 0 || window.location.href.indexOf('Pending.aspx') > 0}
44                            <li><a class="approveAction" href="#" onclick="return CommentAction('Approve','{$T.cmt.Id}');">Approve</a></li>
45                            {#/if}
46                            {#if window.location.href.indexOf('Approved.aspx') > 0 && $T.cmt.HasChildren == false}
47                            <li><a class="unapproveAction" href="#" onclick="return CommentAction('Reject','{$T.cmt.Id}');">Unapprove</a></li>
48                            {#/if}
49                            {#if $T.cmt.HasChildren == false}
50                            <li><a href="#" class="deleteAction" onclick="return CommentAction('Delete','{$T.cmt.Id}');">Delete</a></li>
51                            {#/if}
52                       </ul>
53                    </li>
54               </ul>
55            </td>
56        </tr>
57        {#/for}
58    </tbody>
59</table>
60{#/if}
61
62{#if $T.d.length > 0}
63    {#if window.location.href.indexOf('Spam.aspx') > 0}
64    <div class="action_buttons">
65        <input type="submit" class="btn" value="Restore Selected" onclick="return ProcessSelected('Approve','Spam');" />&nbsp;
66		<input type="submit" class="btn" value="Delete Selected" onclick="return ProcessSelected('Delete', 'Spam');" />&nbsp;
67        <input type="submit" class="btn" value="Delete All" onclick="return DeleteAllSpam();" />&nbsp;
68        <span class="loader">&nbsp;</span>
69    </div>
70    {#/if}
71    {#if window.location.href.indexOf('Pending.aspx') > 0}
72    <div class="action_buttons">
73		<input type="submit" class="btn" value="Approve Selected" onclick="return ProcessSelected('Approve', 'Pending');" />&nbsp;
74        <input type="submit" class="btn" value="Reject Selected" onclick="return ProcessSelected('Reject', 'Pending');" />&nbsp;
75        <input type="submit" class="btn" value="Delete Selected" onclick="return ProcessSelected('Delete', 'Pending');" />&nbsp;
76        <span class="loader">&nbsp;</span>
77    </div>
78    {#/if}
79    {#if window.location.href.indexOf('Approved.aspx') > 0}
80    <div class="action_buttons">
81        <input type="submit" class="btn" value="Reject Selected" onclick="return ProcessSelected('Reject', 'Approved');" />&nbsp;
82        <input type="submit" class="btn" value="Delete Selected" onclick="return ProcessSelected('Delete', 'Approved');" />&nbsp;
83        <span class="loader">&nbsp;</span>
84    </div>
85    {#/if}
86    {#if window.location.href.indexOf('Pingbacks.aspx') > 0}
87    <div class="action_buttons">
88		<input type="submit" class="btnAddNew btn" value="Delete Selected" onclick="return ProcessSelected('Delete', 'Pingback');" />&nbsp;
89        <span class="loader">&nbsp;</span>
90    </div>
91    {#/if}
92{#/if}
93
94<script type="text/javascript">
95    $('.loader').hide();
96</script>