#*
 * 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/>.
 *#
## ---------------------------------------------------------------------------
#set ($indicator_id = "indicator-dlg-")
## ---------------------------------------------------------------------------
#ALdialogheader("回覧板詳細")
#ALajaxIndicator("$indicator_id" "$!portlet.ID" "")
#ALerrmsg($errmsgs)
<div id="messageDiv"></div>
##ALajaxdetailformheader("circulationForm")
<form name="circulationForm$!portlet.ID" id="circulationForm$!portlet.ID" action="$!jslink.getPortletById($!portlet.ID).addQueryData('template','CirculationFormJSONScreen').addQueryData('entityid',$!{result.Detail.RequestId})" method="post" onsubmit="aimluck.io.submit(this,'$indicator_id','$!portlet.ID',aipo.circulation.onReceiveMessage);return false;">
<input type="hidden" name="mode" value="none" />
<input type="hidden" name="secid" value="$secid" />
<input type="hidden" name="_name" value="回覧板" />
#ALtableheaderWide()
#ALtdcaption('表題')
#ALtditemheader()
【$!result.Detail.CategoryName】<br/> $!result.Detail.RequestName
#ALtditemfooter()
#ALtdcaption('依頼日')
#ALtditem($!result.Detail.CreateDate)
#ALtdcaption('依頼者')
#ALtditem($!result.Detail.CreateUser)
#ALtdcaption('重要度')
#ALtditem($!result.Detail.PriorityString)
#ALtdcaption('進捗状況')
#ALtditem($!result.Detail.ProgressString)
#ALtdcaption('回覧内容')
#ALtditem($!result.Detail.Note)
#ALtdcaption('締切日')
#ALtditem($!result.Detail.LimitDate)
#if($!result.Detail.AttachmentFileList && $!result.Detail.AttachmentFileList.size() > 0)
#ALtdcaption('添付ファイル')
#ALtditemheader()
#foreach( $attachmentFile in $!result.Detail.AttachmentFileList )
<img src="images/circulation/circulation_item.gif">&nbsp;<a href="$jslink.getTemplate("CirculationFileRawScreen").addQueryData("attachmentIndex", $attachmentFile.FileId).addQueryData("ownerid", $!{result.Detail.OwnerId}).addQueryData("entityid", $!result.Detail.RequestId)">$attachmentFile.FileName</a><br>
#end
#ALtditemfooter()
#end
#ALtablefooter()

#ALtableheaderWide()
<tr>
#ALtdheadAtt("回覧状況一覧" "colspan='4' align='center'")
</tr>
<tr>
#ALtdheadThin("状況")
#ALtdheadThin("ユーザー名")
#ALtdheadThin("日時")
#ALtdhead("コメント")
</tr>

#foreach ($record in $result.Detail.ResponseRecords)
<tr>
#ALtdcellheaderAtt("nowrap='nowrap'")
#if($!record.Status.Value == "C")
<span class="caution">$!{record.StatusString}</span>
#elseif($!record.Status.Value == "R")
$!{record.StatusString}
#end
#ALtdcellfooter()
#ALtdcellAtt("$!record.UserAliasName" 'nowrap')
#ALtdcellheaderAtt("nowrap='nowrap'")
#if($!record.Status.Value == "C") $!{record.UpdateDate} #end
#ALtdcellfooter()
#ALtditemheaderAtt('colspan="1"')
#if($!record.Status.Value == "R" && $!record.UserId.Value == $!result.LoginUser)
#ALtextarea('comment' $!record.Note 10 40)
<div class="alignleft">
<div class="alignleft">#ALsubmitJS('eventSubmit_doCirculation_accept' '確認済みにする' "aipo.circulation.onConfirm('$!portlet.ID');")</div>
</div>
#else
$!record.Note
#end
#ALtdcellfooter()
</tr>
#if($!record.Status.Value == "C")
#set ($confirm_view_flg = false)
#end
#end
#ALtablefooter()
#ALbuttonheader()
#if( "$!{result.LoginUser}" == "$!{result.Detail.OwnerId.Value}" )
#ALajaxbuttonEditCallback("$!jslink.getPortletById($!portlet.ID).addQueryData('template','CirculationFormScreen').addQueryData('entityid',$entityid)" "$!portlet.ID" "aipo.circulation.onLoadCirculationDialog")
#ALajaxbuttonDelete("$!jslink.getPortletById($!portlet.ID).addQueryData('template','CirculationFormJSONScreen').addQueryData('entityid',$entityid).addQueryData('mode', 'delete')" "$indicator_id" "$!portlet.ID" "aipo.circulation.onReceiveMessage")
#end
#ALajaxbuttonClose()
#ALbuttonfooter()
#ALformfooter()
#ALdialogfooter()
