<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;
	});

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

function show_edit_options ()
{
	$('td.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>

<style type="text/css">
td.topic_id { cursor: pointer; }
</style>

<div id="mod-action-content" style="display: none;">
<form id="mod-action" name="watch_form" method="post" action="{S_FORM_ACTION}">
	<table class="borderless pad_0" cellpadding="0" cellspacing="0">
	<tr><td class="pad_4">
		<input type="submit" name="del_from_ut" value="{L_DEL_LIST_MY_MESSAGE}" onclick="if (!window.confirm( this.value +'?' )){ return false };" />
	</tr></table>
</form>
</div>

<table id="post-row" style="display: none;">
<tr>
	<td class="row2" colspan="7">
		<div class="post_watch_wrap row1">
			<div class="post_body pad_6"></div>
			<div class="clear"></div>
		</div>
	</td>
</tr>
</table>

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

<!-- BEGIN watch -->
<div id="tr-{watch.TOPIC_ID}" class="page-forum-topics-item box panel p-a-1 m-b-1">
    <div class="box-row">
        <div class="box-cell col-md-7 col-lg-8 col-xl-9 p-r-4">
          <div id="{watch.TOPIC_ID}" class="topic_id page-forum-topics-title font-size-14">
            <i class="{watch.TOPIC_ICON}"></i>
			<a class="font-weight-semibold" title="{watch.FULL_TOPIC_TITLE}" href="{watch.U_TOPIC}">{watch.TOPIC_TITLE}</a>
			<!-- IF watch.PAGINATION --><span class="topicPG">&nbsp;{watch.PAGINATION}</span><!-- ENDIF -->
            </div>
          <div class="font-size-11 text-muted">{L_FORUM}: <a href="{watch.U_FORUM}">{watch.FORUM_TITLE}</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>{watch.AUTHOR}</strong></div>
                <div class="font-size-11 text-muted line-height-1">{L_AUTHOR}</div>
              </div>
              <div class="box-cell p-x-3 b-l-1">
                <div class="font-size-14"><strong>{watch.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-11 text-muted line-height-1">{watch.LAST_POST}</div>
              </div>
            </div>
          </div>
        </div>
    </div>
</div>
<!-- END watch -->

</div>