#*
 * Aipo is a groupware program developed by Aimluck,Inc.
 * Copyright (C) 2004-2011 Aimluck,Inc.
 * http://www.aipo.com
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *#

## ---------------------------------------------------------------------------
#ALtableheaderSimpleWide()
#ALtdcaption('カテゴリ')
#ALtditemheaderAtt("style='width: 80%;'")
#ALselectpdheader("topic" "99%" "aipo.viewPage(this.options[this.selectedIndex].value, '$!portlet.ID')")
<option value="$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","MsgboardTopicScreen").addQueryData("filter","").addQueryData("filtertype","category"))">（全体）</option>
#foreach( $record in $result.CategoryList )
<option value="$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","MsgboardTopicScreen").addQueryData("filter",$!record.CategoryId).addQueryData("filtertype","category"))" #if ($!result.CurrentFilter && $!result.CurrentFilter == $!record.CategoryId.toString()) selected="selected" #end>$!record.CategoryName</option>
#end
#ALselectfooter()
#ALtditemfooter()
#ALtablefooter()

#set($flag = true)
#if($result.List.size() == 0)
<div class="message">指定された条件に該当するトピックはありません。</div>
#else
<div class="p">
#ALajaxpageview('MsgboardTopicScreen' $result)
</div>
<div class="p clearfix">
<table class="rowTable wide">
#foreach ($record in $result.List)
<tr #if($flag) class="even" #end>
<td width="20%" nowrap="nowrap">$!{record.UpdateDate.Year}年$!{record.UpdateDate.Month}月$!{record.UpdateDate.Day}日$!{record.UpdateDate.DayOfWeek}</td>
<td width="40%">
<a href="javascript:void(0);" onclick="aipo.common.showDialog('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","MsgboardTopicDetailScreen").addQueryData("entityid",$record.TopicId))', '$!portlet.ID', aipo.msgboard.onLoadMsgboardDetail);">$!record.TopicName #if($record.ReplyCount.toString() != "0")（$record.ReplyCount）#end</a>
</td>
<td width="30%" style="padding:1px 0px 1px 5px;">
#if ($!record.CategoryId.toString() != "1")
<a href="javascript:void(0);" onclick="aipo.common.showDialog('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","MsgboardCategoryDetailScreen").addQueryData("entityid",$!record.CategoryId))');">$!record.CategoryName</a>
#if(! ${record.isPublic()})
<img class="img_icon" src="images/msgboard/msgboard_secret.gif" alt="非公開" title="非公開" />
#end
#else
$!record.CategoryName
#end
</td>
<td width="10%" style="padding:1px 0px 1px 5px; white-space:nowrap;">$!{record.OwnerName}</td>
</tr>
#if($flag) #set($flag = false) #else #set($flag = true) #end
#end
</table>
</div>
#end
