<div class="col-md-12">
<!-- IF SEARCH_MATCHES -->
<div class="page-header m-b-0">
    <h1><i class="page-header-icon ion-ios-search"></i>{SEARCH_MATCHES}</h1>
</div>
<br>
<!-- ENDIF -->

<!-- IF DISPLAY_AS_POSTS -->
<div class="widget-timeline">
    <!-- BEGIN t -->
	<div class="widget-timeline-section font-weight-semibold bg-primary">
		<a href="{FORUM_URL}{t.FORUM_ID}" class="med normal"><i>{t.FORUM_NAME}</i></a>
		<em>&raquo;</em>
		<a href="{TOPIC_URL}{t.TOPIC_ID}" class="med">{t.TOPIC_TITLE}</a>
	</div>
	<!-- BEGIN p -->
	<div class="widget-timeline-item">
        <div class="widget-timeline-info">
			<div class="widget-timeline-icon bg-success"><i class="{t.TOPIC_ICON}"></i></div>
			<div class="widget-timeline-time">
				<a class=" text-muted" href="{POST_URL}{t.p.POST_ID}#{t.p.POST_ID}" title="{L_POST_LINK}">{t.p.POST_DATE}</a>
				<!-- IF t.p.POSTED_AFTER -->
					<span class="posted_since">({L_POSTED_AFTER} {t.p.POSTED_AFTER})</span>
				<!-- ENDIF -->
			</div>
        </div>
        <div class="panel">
			<div class="panel-body p-a-1 font-size-14">
				{t.p.POSTER}
			</div>
			<hr class="m-a-0">
			<div class="panel-body p-a-1">
				<div class="post_wrap">
					<div class="post_body">{t.p.MESSAGE}</div>
				</div>
			</div>
		</div>
    </div>
	<!-- END p -->
	<!-- END t -->
</div>

<!-- ELSE / start of !DISPLAY_AS_POSTS -->

<!-- IF DL_CONTROLS -->
<form method="POST" action="{DL_ACTION}">
<!-- ELSEIF MY_POSTS -->
<script type="text/javascript">
ajax.in_edit_mode = false;

$(document).ready(function(){
	$('#show-edit-btn a').click(function(){
		show_edit_options();
		$('#show-edit-btn').html( $('#edit-sel-topics').html() );
		return false;
	});

	$('div.topic_id').click(function(){
		if (!ajax.in_edit_mode) {
			$('#show-edit-btn a').click();
			$(this).find('input').click();
		}
	});
});

function show_edit_options ()
{
	$('div.topic_id').each(function(){
		var topic_id = $(this).attr('id');
		var input = '<input id="sel-'+ topic_id +'" type="checkbox" value="'+ topic_id +'" class="topic-chbox" />';
		$(this).html(input);
	});

	$('input.topic-chbox').click(function(){
		if ($.browser.mozilla) {
			$('#tr-'+this.value+' td').toggleClass('hl-selected-row');
		}	else {
			$('#tr-'+this.value).toggleClass('hl-selected-row');
		}
	});
	$('#pagination a.pg').each(function(){ this.href += '&mod=1'; });
	$('#ed-list-desc').hide();
	$('#mod-action-cell').append( $('#mod-action-content')[0] );
	$('#mod-action-row, #mod-action-content').show();

	$('#mod-action').submit(function(){
		var $form = $(this);
		$('input[name~=topic_id_list]', $form).remove();
		$('input.topic-chbox:checked').each(function(){
			$form.append('<input type="hidden" name="topic_id_list[]" value="'+ this.value +'" />');
			$('#tr-'+this.value).remove();
		});
	});
	ajax.in_edit_mode = true;
}
</script>

<div id="mod-action-content" style="display: none;">
<form id="mod-action" method="POST" action="{U_SEARCH}" target="_blank">
	<table class="borderless pad_0" cellpadding="0" cellspacing="0">
	    <tr>
		    <td class="pad_4">
		        <input type="submit" name="del_my_post" value="{L_DEL_LIST_MY_MESSAGE}" class="bold" onclick="if (!window.confirm( this.value +'?' )){ return false };" />
	        </td>
			<td class="med" style="padding: 0 8px;">{L_DEL_LIST_MY_MESSAGE_INFO}</td>
		</tr>
	</table>
</form>
</div>
<!-- ENDIF -->

<!-- BEGIN t -->
<div id="tr-{t.TOPIC_ID}" class="page-forum-topics-item box panel p-a-1">
    <div class="box-row">
        <div class="box-cell col-md-7 col-lg-8 col-xl-9 p-r-4">
          <div id="{t.TOPIC_ID}" class="topic_id page-forum-topics-title font-size-14" onmousedown="$p('tid_{t.TOPIC_ID}').className='opened'">
            <i class="{t.TOPIC_ICON}"></i>
			<!-- IF t.IS_UNREAD --><a href="{TOPIC_URL}{t.HREF_TOPIC_ID}{NEWEST_URL}">{ICON_NEWEST_REPLY}</a><!-- ENDIF -->
			<!-- IF t.STATUS == MOVED --><span class="topicMoved">{L_TOPIC_MOVED}</span>
				<!-- ELSEIF t.TYPE == ANNOUNCE --><span class="topicAnnounce">{L_TOPIC_ANNOUNCEMENT}</span>
				<!-- ELSEIF t.DL_CLASS --><span class="{t.DL_CLASS} iconDL">{L_TOPIC_DL}</span>
				<!-- ELSEIF t.ATTACH and not t.DL -->{TOPIC_ATTACH_ICON}
			<!-- ENDIF -->
			<!-- IF t.POLL --><span class="topicPoll">{L_TOPIC_POLL}</span><!-- ENDIF -->
			<a href="{TOPIC_URL}{t.TOPIC_ID}" class="font-weight-semibold"><span id="tid_{t.TOPIC_ID}">{t.TOPIC_TITLE}</span></a>
			<!-- IF t.PAGINATION --><span class="topicPG">[{ICON_GOTOPOST}{L_GOTO_SHORT} {t.PAGINATION} ]</span><!-- ENDIF -->

			</div>
          <div class="font-size-11 text-muted">{L_FORUM}: <a href="{FORUM_URL}{t.FORUM_ID}">{t.FORUM_NAME}</a></div>
        </div>

        <hr class="visible-xs visible-sm m-y-2">

        <div class="box-cell col-md-5 col-lg-4 col-xl-3 valign-middle text-md-center">
          <div class="pull-md-right">
            <div class="box-container width-md-auto valign-middle">
              <div class="box-cell p-l-1 p-r-3">
                <div class="font-size-14 text-primary"><strong>{t.TOPIC_AUTHOR}</strong></div>
                <div class="font-size-11 text-muted line-height-1">{L_AUTHOR}</div>
              </div>
              <div data-toggle="tooltip" title="{L_REPLIES}: {t.REPLIES}" class="box-cell p-x-3 b-l-1">
                <div class="font-size-14"><strong>{t.REPLIES}</strong></div>
                <div class="font-size-11 text-muted line-height-1">{L_REPLIES_SHORT}</div>
              </div>
              <div class="box-cell p-l-3 p-r-1 b-l-1">
                <div class="font-size-14"><strong>{t.LAST_POSTER}<span onmousedown="$p('tid_{t.TOPIC_ID}').className='opened'"><a href="{POST_URL}{t.LAST_POST_ID}#{t.LAST_POST_ID}">{ICON_LATEST_REPLY}</a></span></strong></div>
                <div class="font-size-11 text-muted line-height-1">{t.LAST_POST_TIME}</div>
              </div>
            </div>
          </div>
        </div>
    </div>
</div>
<!-- END t -->

<!-- IF DL_CONTROLS -->
</form>
<!-- ENDIF -->

<!-- ENDIF -->

<nav>
    <ul class="pagination pagination-sm m-y-0">
        {PAGINATION}
    </ul>
	<p class="pull-right">{PAGE_NUMBER}</p>
</nav>

</div><!--/bottom_info-->
