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

## ---------------------------------------------------------------------------
#set($career = 'wm')
#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)

<dl class="detail">
<dt>名前</dt>
<dd>$!{result.Detail.User.AliasName}</dd>

<dt>日時</dt>
<dd>
#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
</dd>
<dt>予定</dt>
<dd>$!{result.Detail.Name}</dd>

<dt>場所</dt>
<dd>$!{result.Detail.Place}</dd>

<dt>内容</dt>
<dd>$!{result.Detail.Note}</dd>

<dt>公開区分</dt>
<dd>
#if($!result.Detail.isPublic())
公開
#elseif(!$!result.Detail.isHidden())
非公開
#else
完全に隠す
#end
</dd>

<dt>参加者</dt>
<dd>
#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
</dd>

<dt>共有施設</dt>
<dd>
#foreach($record in $!result.FacilityList)
${record.FacilityName}<br />
#end
</dd>
<dt>登録者名</dt>
<dd>
$!{result.Detail.CreateUser.AliasName}<br />($!{result.Detail.CreateDate})
</dd>

<dt>更新者名</dt>
<dd>
$!{result.Detail.UpdateUser.AliasName}<br />($!{result.Detail.UpdateDate})
</dd>
</dl>

#ALcell_contents_footer($career)
#ALcell_linklist_iphone($career $linklist)
