#*
 * Aipo is a groupware program developed by Aimluck,Inc.
 * Copyright (C) 2004-2010 Aimluck,Inc.
 * http://aipostyle.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/>.
 *#

## ---------------------------------------------------------------------------
#set ($event_submit = "eventSubmit_doSchedule_form")
#set($link = "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_list','1')")
###set($methodlist = [["登録(1日)へ", "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_form_oneday','1').addQueryData('entityid','new').addQueryData('view_date', $!{result.ViewDate.toString()})"], ["登録(繰り返し)へ", "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_form_repeat','1').addQueryData('entityid','new').addQueryData('view_date', $!{result.ViewDate.toString()})"], ["登録(期間)へ", "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_form_span','1').addQueryData('entityid','new').addQueryData('view_date', $!{result.ViewDate.toString()})"]])
#set($linklist = [["$result.TargerUser.AliasName さんのスケジュール(1日)一覧へ", "$!jslink.addQueryData('js_peid',$!portlet.ID).addQueryData('eventSubmit_doSchedule_list_select_member','1').addQueryData('selectedmember', $result.TargerUser.UserId)"], ["$result.TargerUser.AliasName さんのスケジュールへ", "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_menu_select_member','1').addQueryData('selectedmember', $result.TargerUser.UserId)"]])
#set ($hasMember = false)
#ALcell_pagetitle_iphone($career "$result.TargerUser.AliasName さんのスケジュール詳細")
#ALcell_linklist_iphone($career $linklist)
#ALcell_contents_header($career)
<table border="1">
<tr>
#ALtdhead('名前')
#ALtdcell("$!{result.Detail.User.AliasName}")
</tr>
<tr>
#ALtdhead('日時')
<td>
#if($!{result.Detail.isSpan()})
$!{result.Detail.StartDate.Year}/$!{result.Detail.StartDate.Month}/$!{result.Detail.StartDate.Day}$!{result.Detail.StartDate.DayOfWeek}から
$!{result.Detail.EndDate.Year}/$!{result.Detail.EndDate.Month}/$!{result.Detail.EndDate.Day}$!{result.Detail.EndDate.DayOfWeek}
#if(! ${result.Detail.isPublic()})
(非公開)
#end
#elseif($!{result.Detail.isRepeat()})
$!{result.Detail.Text}
$!{result.Detail.DateForCell}
#if(! ${result.Detail.isPublic()})
(非公開)
#end
(繰り返し)
#else
$!{result.Detail.StartDate.Year}/$!{result.Detail.StartDate.Month}/$!{result.Detail.StartDate.Day}$!{result.Detail.StartDate.DayOfWeek}
$!{result.Detail.DateForCell}
#if(! ${result.Detail.isPublic()})
(非公開)
#end
#end
#if($!{result.Detail.isTmpreserve()})
(仮)
#end
</td>
</tr>
<tr>
#ALtdhead('予定')
#ALtdcell("$!{result.Detail.Name}")
</tr>
<tr>
#ALtdhead('場所')
#ALtdcell("$!{result.Detail.Place}")
</tr>
<tr>
#ALtdhead('内容')
#ALtdcell("$!{result.Detail.Note}")
</tr>
<tr>
#ALtdhead('公開区分')
<td>
#if($!result.Detail.isPublic())
公開
#elseif($!result.Detail.isPrivate())
非公開
#elseif($!result.Detail.isHidden())
完全に隠す
#end
</td>
</tr>
<tr>
#ALtdhead('参加者')
<td>
#if($!result.MemberList.size() > 1)
#set($counter = 0)
#foreach($record in $!result.MemberList)
#if(!($!{record.Name.toString()} == $!{result.Detail.User.Name.toString()}))
$!record.AliasName
#if($result.getStatus($record.UserId.Value) == "T")
(仮)
#elseif($result.getStatus($record.UserId.Value) == "R" || $result.getStatus($record.UserId.Value) == "D")
#set($counter = $counter + 1)
(削除)
#end
<br />
#end
#end
#if($counter < ($!result.MemberList.size() - 1))
#set ($hasMember = true)
#end
#if($hasMember)
#if($!{result.Detail.isEditable()})[編集/削除：可]#else[編集/削除：不可]#end
#end
#end
</td>
</tr>
<tr>
#ALtdhead('共有施設')
<td>
#foreach($record in $!result.FacilityList)
${record.FacilityName}<br />
#end
</td>
</tr>
<tr>
#ALtdhead('登録者名')
#ALtdcell("$!{result.Detail.CreateUser.AliasName}<br />($!{result.Detail.CreateDate})")
</tr>
<tr>
#ALtdhead('更新者名')
#ALtdcell("$!{result.Detail.UpdateUser.AliasName}<br />($!{result.Detail.UpdateDate})")
</tr>
</table>
#ALcell_contents_footer($career)
#ALcell_linklist_iphone($career $linklist)