{#if $T.d.length == 0}
<br />
<div class="info">
    You haven't written any posts so far. To write a new post use the link in the right side menu.
</div>
{#else}
<table id="Posts" class="beTable rounded" style="width:100%">
    <thead>
        <tr>
            <th width="70" style="text-align:center;">Published</th>
            <th width="auto">Title</th>
            <th width="120">Author</th>
            <th width="120">Categories</th>
            <th width="120">Tags</th>
	        <th width="100">Created on</th>
            <th width="70"></th>
	        <th width="70">&nbsp;</th>
        </tr>
    </thead>
    <tbody>
        {#foreach $T.d as p}
        <tr id="{$T.p.Id}" class="{#cycle values=['','alt']}">
            <td style="text-align:center;"><span class="published-{$T.p.IsPublished}"></span></td>
            <td><span>{$T.p.Title}</span></td>
            <td><span>{$T.p.Author}</span></td>
            <td><span>{$T.p.Categories}</span></td>
            <td><span>{$T.p.Tags}</span></td>
            <td><span class="comment_date">{$T.p.Date}</span><span class="comment_time">{$T.p.Time}</span></td>
            <td><span class="comments">{$T.p.Comments}</span></td>
            <td>
                <ul class="rowTools">
                    <li>
                        <a class="toolsAction" href="#"><span class="">Tools</span></a>
                        <ul class="rowToolsMenu">
                            {#if $T.p.CanUserEdit}<li><a class="editAction" href="Add_entry.aspx?id={$T.p.Id}">Edit</a></li>{#/if}
                            {#if $T.p.CanUserDelete}<li><a class="deleteAction" href="#" onclick="return DeletePost(this);">Delete</a></li>{#/if}
                       </ul>
                    </li>
               </ul>
            </td>
        </tr>
        {#/for}
    </tbody>
</table>
{#/if}