#*
 * Aipo is a groupware program developed by Aimluck,Inc.
 * http://aipostyle.com/
 * 
 * Copyright(C) 2009 avanza Co.,Ltd. All rights reserved.
 * http://www.avnz.co.jp/
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU 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 General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *#
## ---------------------------------------------------------------------------
#if($!result.CurrentSubMenu == "requested")
#set ($$subnavi = "回覧板（確認依頼一覧）")
#set ($tabs = [["未確認", "unconfirmed","$!jslink.getPortletById($!portlet.ID).addQueryData('template','CirculationListScreen').addQueryData('tab','unconfirmed')"], ["確認済", "confirmed", "$!jslink.getPortletById($!portlet.ID).addQueryData('template','CirculationListScreen').addQueryData('tab','confirmed')"], ["完了", "completed", "$!jslink.getPortletById($!portlet.ID).addQueryData('template','CirculationListScreen').addQueryData('tab','completed')"]])
<script language="JavaScript" type="text/javascript">
//<![CDATA[

	aipo.circulation.menuSelected = 0;
    
//]]>
</script>
#else
#set ($$subnavi = "回覧板（作成分一覧）")
#set ($tabs = [["未完了", "unfinished","$!jslink.getPortletById($!portlet.ID).addQueryData('template','CirculationListScreen').addQueryData('tab','unfinished')"], ["完了", "finished", "$!jslink.getPortletById($!portlet.ID).addQueryData('template','CirculationListScreen').addQueryData('tab','finished')"]])
<script language="JavaScript" type="text/javascript">
//<![CDATA[

    aipo.circulation.menuSelected = 1;
    
//]]>
</script>
#end

#ALajaxtabheader($tabs $!result.currentTab)
#ALspacebothheader()
#ALajaxlistformheader('回覧板')
#ALtableheaderSimpleWide()
#ALtdcaption('カテゴリ')
#ALtditemheader()
<select onchange="aipo.viewPage(this.options[this.selectedIndex].value, '$!portlet.ID')">
<option value="$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData('template','CirculationListScreen').addQueryData("filter","").addQueryData("filtertype","category"))">（全体）</option>
#foreach( $record in $result.CategoryList )
<option value="$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData('template','CirculationListScreen').addQueryData("filter",$!record.CategoryId).addQueryData("filtertype","category"))" #if ($!result.CurrentFilter && $!result.CurrentFilter == $!record.CategoryId.toString()) selected #end>$!record.CategoryName</option>
#end
</select>
#ALtditemfooter()
#ALtablefooter()

#if($result.List.size() == 0)
<div class="message">指定された条件に該当する依頼はありません。</div>
#else
#ALajaxpageview('CirculationListScreen' $result)
#ALtableheaderWide()
<tr>
#ALtdheadThin("#ALajaxsort('priority' '重要度' $result 'CirculationListScreen')")
##ALtdheadThin("状態")
#ALtdhead("#ALajaxsort('request_name' '表題' $result 'CirculationListScreen')")
#ALtdhead("依頼者")
#ALtdheadThin("#ALajaxsort('create_date' '作成日' $result 'CirculationListScreen')")
#ALtdheadThin("#ALajaxsort('limit_date' '締切日' $result 'CirculationListScreen')")
#ALtdheadThin("進捗状況")
</tr> 

#foreach ($record in $result.List) ##レコードごとのループ
#set($limitState = ${record.limitState.Value})
#if($result.isMatch(0, $limitState)) 
#set($lsStyle = ' style="background-color:#FFFFE5"')
#elseif($result.isMatch(1, $limitState))
#set($lsStyle = ' style="background-color:#FFE5E5"')
#else
#set($lsStyle = '')
#end
<tr $lsStyle>
#ALtdcellAtt("<img src='images/circulation/$!record.PriorityImage' alt='$!record.PriorityString'  title='$!record.PriorityString'/>" 'align="center"')
#ALtdcellheader()
<a href="javascript:void(0);" onclick="aipo.common.showDialog('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","CirculationDetailScreen").addQueryData("mode","detail").addQueryData("entityid",$record.RequestId).addQueryData("previd",$record.RequestId))','$!portlet.ID',aipo.circulation.onFocusComment);">【$!record.CategoryName】#if($!record.RequestName != '') $!record.RequestName #end</a>
#ALtdcellfooter()
#ALtdcellAtt($!record.CreateUser 'nowrap="nowrap"')
#ALtdcellAtt($!record.CreateDate 'nowrap="nowrap"')
#ALtdcellAtt($!record.LimitDate 'nowrap="nowrap"')
#ALtdcellAtt($!record.ProgressString 'nowrap="nowrap"')
</tr>
#end

#ALtablefooter()
#ALajaxpageviewFooter('CirculationListScreen' $result)
#end
#ALformfooter()
#ALspacebothfooter()
#ALajaxtabfooter()

