#*
 * Aipo is a groupware program developed by Aimluck,Inc.
 * Copyright (C) 2004-2008 Aimluck,Inc.
 * http://aipostyle.com/
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU 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 General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http:// www.gnu.org/licenses/>.
 *#
## ---------------------------------------------------------------------------
#set($linklist = [["TOPへ", "$!jslink.getAction('controls.Restore',$!portlet.ID)"], ["ﾛｸﾞｱｳﾄ", "$jslink.setAction($config.getString('action.logout'))"]])
#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($menulist = [["次の週へ", "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_menu','1').addQueryData('start_date', $nextweek)"], ["前の週へ", "$!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))"]])
###set ($menulist_schedule = [["ｽｹｼﾞｭｰﾙ(1日)", ""], ["表示(今日)", "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_list','1').addQueryData('tab','oneday').addQueryData('view_date', $today)"], ["表示(日付指定)", "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_form_selectday','1')"], ["登録(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 = [$menulist_schedule]) 
###ALcell_menulist($career 'ｽｹｼﾞｭｰﾙ' $menulist)
#ALcell_pagetitle($career "ｽｹｼﾞｭｰﾙ($!daylist.get(0).replace('-','/') - $!daylist.get(6).replace('-','/'))")

#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','1').addQueryData('tab','oneday').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
<a href="$!jslink.getAction('controls.Maximize',$!portlet.ID).addQueryData('mode','detail').addQueryData('entityid', $!{schedule.ScheduleId}).addQueryData('view_date', $!daylist.get($daycount))">$schedule.Name</a>
#if(!$schedule.Public)#ALcell_br($career) &nbsp;(非公開)#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 $methodlist)
#ALcell_hr($career '1')
#ALcell_linklist($career $linklist)
