#*
 * 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($otherlist = [["別ユーザーのスケジュールを見る", "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_form_selectgroup','1')"]])
## add by motegi1019 end
#set($methodlist = [["登録(1日)へ", "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_form_oneday','1').addQueryData('entityid','new')"], ["登録(繰り返し)へ", "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_form_repeat','1').addQueryData('entityid','new')"], ["登録(期間)へ", "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_form_span','1').addQueryData('entityid','new')"]])
#set($menulist = [["前の週へ", "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_menu', '1').addQueryData('start_date', $prevweek)"], ["今週に戻る", "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_menu', '1').addQueryData('start_date', $!now)"],["週を指定", "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_form_selectday','1').addQueryData('view_date', $!daylist.get(0))"],["次の週へ", "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_menu','1').addQueryData('start_date', $nextweek)"]])
#ALcell_pagetitle_iphone($career "スケジュール")
#ALcell_linklist_iphone($career $otherlist)
#ALcell_contents_header($career)
#ALcell_navi_header($career)
<a href="$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_menu', '1').addQueryData('start_date', $prevweek)" class="btn_left">前の週へ</a>
<a href="$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_menu','1').addQueryData('start_date', $nextweek)" class="btn_right">次の週へ</a>
</br>
<a href="$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_menu', '1').addQueryData('start_date', $!now)" class="btn">今週に戻る</a>
<a href="$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_form_selectday','1').addQueryData('view_date', $!daylist.get(0))" class="btn">週を指定 </a>
#ALcell_navi_footer($career)
<div class="multi_list">
#set($daycount = 0)
#foreach($record in $!result.List)
#set($yearindex = $!daylist.get($daycount).indexOf("-") + 1)
<div>
<p class="parent">
<a href="$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_list','1').addQueryData('tab','oneday').addQueryData('view_date', $!daylist.get($daycount))">$!daylist.get($daycount).substring($yearindex).replace('-','/')$!weekdaylist.get($daycount)</a>
</p>
#foreach($schedule in $!record)
<p><a href="$!jslink.getAction('controls.Maximize',$!portlet.ID).addQueryData('mode','detail').addQueryData('entityid', $!{schedule.ScheduleId}).addQueryData('view_date', $!daylist.get($daycount))">
#if(! $!{schedule.isSpan()})
$!{schedule.StartDate} - $!{schedule.EndDate}#ALcell_br($career)
#else
期間：
#end
$schedule.Name
#if(!$schedule.Public)#ALcell_br($career) &nbsp;(非公開)#end
#if(!$schedule.Repeat && $schedule.Pattern != 'N')#ALcell_br($career) &nbsp;(繰り返し)#end
</a>
</p>
#end
</div>
#set($daycount = $daycount + 1)
#end
</div>
#ALcell_navi_header($career)
<a href="$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_menu', '1').addQueryData('start_date', $prevweek)" class="btn_left">前の週へ</a>
<a href="$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_menu','1').addQueryData('start_date', $nextweek)" class="btn_right">次の週へ</a>
<br/>
<a href="$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_menu', '1').addQueryData('start_date', $!now)" class="btn">今週に戻る</a>
<a href="$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_form_selectday','1').addQueryData('view_date', $!daylist.get(0))" class="btn">週を指定 </a>
#ALcell_navi_footer($career)
#ALcell_contents_footer($career)
#ALcell_linklist_iphone($career $otherlist)