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

## ---------------------------------------------------------------------------
## add by motegi1019 start
##set($otherlist = [["別のﾕｰｻﾞｰのｽｹｼﾞｭｰﾙへ", "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_form_selectgroup','1')"]])
#set($otherlist = [["ﾕｰｻﾞｰの選択へ戻る", "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_form_selectmember','1')"]])
## add by motegi1019 end
#set($linklist = [["ﾕｰｻﾞｰの選択へ戻る", "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_form_selectmember','1')"]])
#set($menulist = [["次の週へ", "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_menu_select_member','1').addQueryData('selectedmember', $result.TargerUser.UserId).addQueryData('start_date', $nextweek)"], ["前の週へ", "$!jslink.getPortletById($!portlet.ID).addQueryData('selectedmember', $result.TargerUser.UserId).addQueryData('eventSubmit_doSchedule_menu_select_member', '1').addQueryData('start_date', $prevweek)"], ["今週に戻る", "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_menu_select_member', '1').addQueryData('selectedmember', $result.TargerUser.UserId).addQueryData('start_date', $!now)"],["週を指定", "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_form_selectday_select_member','1').addQueryData('view_date', $!daylist.get(0)).addQueryData('selectedmember', $result.TargerUser.UserId)"]])
#ALcell_pagetitle($career "$result.TargerUser.AliasName さんのｽｹｼﾞｭｰﾙ($!daylist.get(0).replace('-','/') - $!daylist.get(6).replace('-','/'))")

## add by motegi1019 start
#ALcell_linklist($career $otherlist)
#ALcell_hr($career '1')
## add by motegi1019 end

#set($daycount = 0)
#foreach($record in $!result.List)
#set($yearindex = $!daylist.get($daycount).indexOf("-") + 1)
<a href="$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_list_select_member','1').addQueryData('tab','oneday').addQueryData('selectedmember', $result.TargerUser.UserId).addQueryData('view_date', $!daylist.get($daycount))">$!daylist.get($daycount).substring($yearindex).replace('-','/')$!weekdaylist.get($daycount)</a>
#foreach($schedule in $!record)
#ALcell_li_header($career)

#if($schedule.Repeat)
期間：
#else
$schedule.StartDate&nbsp;-&nbsp;$schedule.EndDate
#end

#if(!$schedule.Public && !$schedule.Member)
非公開
#else
<a href="$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_detail_select_member','1').addQueryData('entityid', $!{schedule.ScheduleId}).addQueryData('view_date', $!daylist.get($daycount)).addQueryData('selectedmember', $result.TargerUser.UserId).addQueryData('userid', $result.TargerUser.UserId)">$schedule.Name</a>
#if(!$schedule.Public)
#ALcell_br($career) &nbsp;(非公開)
#end
#end

#if(!$schedule.Repeat && $schedule.Pattern != 'N')
#ALcell_br($career) &nbsp;(繰り返し)
#end

#ALcell_li_footer($career)
#end

#ALcell_br($career)
#set($daycount = $daycount + 1)
#end

#ALcell_hr($career '1')
#ALcell_linklist($career $menulist)
#ALcell_hr($career '1')
#ALcell_linklist($career $linklist)
#ALtdcellFooterLink($career)
