#*
 * 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/>.
 *#

## ---------------------------------------------------------------------------
#if($!result.currentTab == "received_notes")
#set($person_key = "送信者")
#set($person_value = $!result.Detail.SrcUserFullName)
#else
#set($person_key = "受信者")
#set($person_value = $!result.Detail.DestUserFullName)
#end
#set ($navilist = [["トップ", "$!jslink.getAction('controls.Restore',$!portlet.ID)"], ["伝言メモ一覧", "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doNote_list','1')"], ["伝言メモ詳細", ""]])
#set ($tabs = [["伝言メモ詳細", "",""]])
#set ($indicator_id = "indicator-dlg-")
## ---------------------------------------------------------------------------
#ALdialogheaderCloseJS("伝言メモ詳細" "aipo.note.hideDialog()")
#ALajaxIndicator("$indicator_id" "$!portlet.ID" "")
#ALajaxdetailformheader("伝言メモ")
#ALtableheaderWide()
#ALtdcaption('受付日時')
#ALtditem("$!{result.Detail.AcceptDate.Year}年$!{result.Detail.AcceptDate.Month}月$!{result.Detail.AcceptDate.Day}日 $!{result.Detail.AcceptDate.Hour}時$!{result.Detail.AcceptDate.Minute}分")
#ALtdcaption($person_key)
#ALtditemheader()
#if($!result.currentTab == "received_notes")
$person_value
#else
#foreach($record in $!result.MemberList)
#if(!($!{record.UserId.toString()} == $!{result.Detail.SrcUserId.toString()}))
$!record.AliasName
#if($result.getStatus($record.UserId.Value) == "1")
<img src="images/note/note_new_message.gif" alt="新着" title="新着"/>
#elseif($result.getStatus($record.UserId.Value) == "2")
<img src="images/note/note_unread_message.gif" alt="未読" title="未読"/>
#elseif($result.getStatus($record.UserId.Value) == "3")
<img src="images/note/note_read_message.gif" alt="既読" title="既読"/>
#else
<img src="images/note/note_deleted_message.gif" alt="削除済み" title="削除済み"/>
#end
<br/>
#end
#end
#end
#ALtditemfooter()
#ALtdcaption('依頼者')
#ALtditem($!result.Detail.ClientName)
#ALtdcaption('依頼者所属')
#ALtditem($!result.Detail.CompanyName)
#ALtdcaption('依頼者電話番号')
#ALtditem($!result.Detail.Telephone)
#ALtdcaption('依頼者メールアドレス')
#ALtditem($!result.Detail.EmailAddress)
#set($count = 0)
#if ($!result.Detail.AddDestTypePc.toString() == "1") #set ($dest_type_pc_dist = "パソコン") #set($count = $count+1) #end
#if ($!result.Detail.AddDestTypeCellphone.toString() == "1") #set ($dest_type_cellphone_dist = "携帯電話") #set($count = $count+1) #end
#ALtdcaption('追加送信先')
#if($count == 0)
#ALtditem("-----")
#else
#ALtditemheader()
$!dest_type_pc_dist #if($count == 2) と #end $!dest_type_cellphone_dist
#ALtditemfooter()
#end
#if ($!result.Detail.SubjectType.toString() == "0") #set ($subject = $!result.Detail.CustomSubject.toString()) #end
#if ($!result.Detail.SubjectType.toString() == "1") #set ($subject = "再度電話します。") #end
#if ($!result.Detail.SubjectType.toString() == "2") #set ($subject = "折返しお電話ください。") #end
#if ($!result.Detail.SubjectType.toString() == "3") #set ($subject = "連絡があったことをお伝えください。") #end
#if ($!result.Detail.SubjectType.toString() == "4") #set ($subject = "伝言をお願いします。") #end
#ALtdcaption('用件')
#ALtditem($!subject)
#ALtdcaption('本文')
#ALtditem($!result.Detail.Message)
#ALtdcaption('作成日時')
#ALtditem("$!{result.Detail.CreateDate.Year}年$!{result.Detail.CreateDate.Month}月$!{result.Detail.CreateDate.Day}日 $!{result.Detail.CreateDate.Hour}時$!{result.Detail.CreateDate.Minute}分")
#if($!result.Detail.ConfirmDate.toString() != "")
#ALtdcaption('確認日時')
#ALtditem("$!{result.Detail.ConfirmDate.Year}年$!{result.Detail.ConfirmDate.Month}月$!{result.Detail.ConfirmDate.Day}日 $!{result.Detail.ConfirmDate.Hour}時$!{result.Detail.ConfirmDate.Minute}分")
#end
#ALtablefooter()
#ALbuttonheader()
#ALajaxbuttonDelete("$!jslink.getPortletById($!portlet.ID).addQueryData('template','NoteFormJSONScreen').addQueryData('entityid',$entityid).addQueryData('mode', 'delete')" "$indicator_id" "$!portlet.ID" "aipo.note.onReceiveMessage")<input name="ajaxbuttonClose" class="button" type="button" value="　閉じる　" onclick="aipo.note.hideDialog();" />
#ALbuttonfooter()
#ALformfooter()
#ALdialogfooter()
