{style}{literal}

.ow_forum_entity_forum .image {
    width: 100px;
    margin-right: -100px;
}
.ow_forum_entity_forum .image img {
    width: 100px;
}
.ow_forum_entity_forum .details {
    padding-left: 5px;
    position: relative;
    overflow-x: hidden;
}
.ow_forum_entity_forum .details .controls {
    position: absolute;
    right: 0;
    top: 0;
}
.ow_forum_attachment_icon {
    background-repeat: no-repeat;
    cursor: pointer;
    display: inline-block;
    height: 17px;
    width: 14px;
}
{/literal}{/style}

{script}
{literal}
$(".btn_add_topic").click(function(){
    window.location.href='{/literal}{$addTopicUrl}{literal}';
});
{/literal}
{/script}

{block_decorator name="box" type="empty"}
<div class="ow_forum_entity_forum clearfix ow_smallmargin">
    <table class="ow_table_1 ow_forum_topic">
        <tr class="ow_tr_first">
            <th class="ow_icon"></th>
            <th class="ow_title">{text key='forum+topic'}</th>
            {*<th class="ow_posts">{text key='forum+replies'}</th>
            <th class="ow_views">{text key='forum+views'}</th>*}
            <th class="ow_author">{text key='forum+last_reply'}</th>
        </tr>
    {if $topicList}
        {foreach from=$topicList item=topic}
        <tr class="{cycle values='ow_alt1, ow_alt2'}">
            <td class="ow_icon">
                {if $topic.new}<span class="ow_lbutton ow_green ow_nowrap">{text key='forum+new'}</span>{/if}
                {if $topic.locked}<span class="ow_lbutton ow_red ow_nowrap">{text key='forum+locked'}</span>{/if}
                {if $topic.sticky}<span class="ow_lbutton ow_nowrap">{text key='forum+sticky'}</span>{/if}
            </td>
            <td class="ow_title">
                {if isset($attachments[$topic.id])}
                <span class="ow_forum_attachment_icon ow_ic_attach" title="{text key='forum+topic_attachments' count=$attachments[$topic.id]}">&nbsp;</span>
                {/if}
                <a href="{$topic.topicUrl}">{$topic.title}</a></td>
            {*<td class="ow_posts">{if $topic.replyCount}{$topic.replyCount}{else}-{/if}</td>
            <td class="ow_views">{$topic.viewCount}</td>*}
            <td class="ow_author ow_small">
                <a href="{$topic.lastPost.postUrl}">{text key='forum+last_reply'}</a> {text key='forum+by'}
                {user_link username=$usernames[$topic.lastPost.userId] name=$displayNames[$topic.lastPost.userId]}
                <span class="ow_nowrap ow_remark">{$topic.lastPost.createStamp}</span>
            </td>
        </tr>
        {/foreach}
    {else}
        <tr>
            <td colspan="5">{text key='forum+no_topic'}</td>
        </tr>
	{/if}
    </table>

</div>

{/block_decorator}
