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

## ---------------------------------------------------------------------------
<div class="relativeBlock" style="margin-bottom:10px;">
<div class="absoluteRight">
<div class="auiSelectButton">
<ul>
#set($tab = ["ブロック", "calendar","$!jslink.getPortletById($!portlet.ID).addQueryData('template','ScheduleScreen').addQueryData('tab','calendar')"])
<li #if ($tab.get(1) == $!result.Viewtype) class="active"#end><a class="first" style="width:6em;" href="javascript:void(0);" onclick="aipo.viewPage('$!utils.escapeXML($tab.get(2))', '$!portlet.ID');"><span>$tab.get(0)</span></a></li>
#set($tab = ["日", "oneday-group","$!jslink.getPortletById($!portlet.ID).addQueryData('template','ScheduleScreen').addQueryData('tab','oneday-group')"])
<li #if ($tab.get(1) == $!result.Viewtype) class="active"#end><a style="width:3em;" href="javascript:void(0);" onclick="aipo.viewPage('$!utils.escapeXML($tab.get(2))', '$!portlet.ID');"><span>$tab.get(0)</span></a></li>
#set($tab = ["週", "weekly-group", "$!jslink.getPortletById($!portlet.ID).addQueryData('template','ScheduleScreen').addQueryData('tab','weekly-group')"])
<li #if ($tab.get(1) == $!result.Viewtype) class="active"#end><a style="width:3em;" href="javascript:void(0);" onclick="aipo.viewPage('$!utils.escapeXML($tab.get(2))', '$!portlet.ID');"><span>$tab.get(0)</span></a></li>
#set($tab = ["月", "monthly", "$!jslink.getPortletById($!portlet.ID).addQueryData('template','ScheduleScreen').addQueryData('tab','monthly')"])
<li #if ($tab.get(1) == $!result.Viewtype) class="active"#end><a class="last" style="width:3em;" href="javascript:void(0);" onclick="aipo.viewPage('$!utils.escapeXML($tab.get(2))', '$!portlet.ID');"><span>$tab.get(0)</span></a></li>
</ul>
</div>
</div>

<div class="clearfix">
<div class="auiSelectButton">
<ul>
<li style="width:4em;margin-right:10px;">
<a href="javascript:void(0);" class="btn" onclick="aipo.viewPage('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","$!{schedulescreen}").addQueryData("view_start",$!{result.Today.toString()}))', '$!portlet.ID');"\><span>今日</span></a>
</li>
<li style="margin-right:5px;">
<a href="javascript:void(0);" class="btn arrow" onclick="aipo.viewPage('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","$!{schedulescreen}").addQueryData("view_start",$!{result.PrevWeek.toString()}))', '$!portlet.ID');"><span><img src="themes/$!theme/images/icon/icon_arrow_l_w.gif" alt="前の週へ"></span></a>
</li>
<li>
<a href="javascript:void(0);" class="first arrow" onclick="aipo.viewPage('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","$!{schedulescreen}").addQueryData("view_start",$!{result.PrevDate.toString()}))', '$!portlet.ID');"><span><img src="themes/$!theme/images/icon/icon_arrow_l.gif" alt="前の日へ"></span></a>
</li>
<li style="margin-right:5px;">
<a href="javascript:void(0);" class="last arrow" onclick="aipo.viewPage('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","$!{schedulescreen}").addQueryData("view_start",$!{result.NextDate.toString()}))', '$!portlet.ID');"><span><img src="themes/$!theme/images/icon/icon_arrow_r.gif" alt="次の日へ"></span></a>
</li>
<li style="margin-right:10px;">
<a href="javascript:void(0);" class="btn arrow" onclick="aipo.viewPage('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","$!{schedulescreen}").addQueryData("view_start",$!{result.NextWeek.toString()}))', '$!portlet.ID');"><span><img src="themes/$!theme/images/icon/icon_arrow_r_w.gif" alt="次の週へ"></span></a>
</li>
</ul>
</div>
<div style="height:24px; line-height:24px; overflow:hidden;"><strong>$!{result.ViewStart.Year}年$!{result.ViewStart.Month}月$!{result.ViewStart.Day}日$!{result.ViewStart.DayOfWeek}</strong></div>
</div>

</div>
#if(($!{hasAcl}) && $!{hasAcl} == "T")
グループ：
<select onchange="aipo.viewPage(this.options[this.selectedIndex].value, '$!portlet.ID')" style="margin:0 0 5px; vertical-align:middle;">
<option value="$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","$!{schedulescreen}").addQueryData("filter","").addQueryData("filtertype","group"))">（選択してください）</option>
<option value="$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","$!{schedulescreen}").addQueryData("filter","").addQueryData("filtertype","group"))" #if ($!result.CurrentFilter && $!record.Name.toString() && $!result.CurrentFilter == $!record.Name.toString()) selected="selected" #end>----------</option>
<option value="$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","$!{schedulescreen}").addQueryData("filter","Facility").addQueryData("filtertype","group"))" #if ($!result.CurrentFilter && $!result.CurrentFilter && $!result.CurrentFilter == "Facility") selected="selected" #end>施設一覧</option>
#foreach( $record in $result.GroupList )
<option value="$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","$!{schedulescreen}").addQueryData("filter",$!record.Name).addQueryData("filtertype","group"))" #if ($!result.CurrentFilter && $!result.CurrentFilter == $!record.Name.toString()) selected="selected" #end>$!record.AliasName</option>
#end
#if(($result.GroupList.size() > 0) && ($result.PostMap.size() > 0))
<option value="$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","$!{schedulescreen}").addQueryData("filter","").addQueryData("filtertype","group"))" #if ($!result.CurrentFilter && $!record.Name.toString() && $!result.CurrentFilter == $!record.Name.toString()) selected="selected" #end>----------</option>
#end
#foreach( $record in $result.PostMap )
<option value="$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","$!{schedulescreen}").addQueryData("filter",$!record.GroupName).addQueryData("filtertype","group"))" #if ($!result.CurrentFilter && $!result.CurrentFilter == $!record.GroupName.toString()) selected="selected" #end>$!record.PostName</option>
#end
</select>
#if($result.GroupList.size() <= 0)
&nbsp;&nbsp;<a href="$!result.MyGroupURI">こちらからグループを追加できます。</a>
#end
#end

#if($result.MemberList.size() == 0 && $result.FacilityList.size() == 0)
<div class="message">選択したグループには、ユーザーおよび施設が登録されていません。</div>
#else
#ALtableheaderCalendar("100%")
#set($entityids = "")
#set($roop = 0)
#foreach($record3 in $result.MemberList)
### 日付（曜日）の表示（ここから）
#if( $roop % 5 == 0)
<tr>
#ALtdheadheaderAtt("class='groupWeekly' nowrap='nowrap'")
<img src="images/common/dot.gif" width="50" height="1" alt="" />
#ALtdheadfooter()
#if($result.MemberList.size() > 0)
#set($daylist = ${result.getContainer($result.MemberList.get(0).UserId.Value).DayList})
#else
#set($daylist = ${result.getFacilityContainer($result.FacilityList.get(0).FacilityId.Value).DayList})
#end
#foreach($record in $daylist)
#set($getScheduleDetailLink = $!jslink.getPortletById($!portlet.ID).addQueryData('template','ScheduleDetailJSONScreen').addQueryData('view_date', $!{record.Date.toString()}))
#if($!{record.isHoliday()})
#set ($stday = $velocityCount )
#ALtdheadheaderAtt("class='holiday groupWeekly' nowrap='nowrap'")
$!{record.Date.Day} $!{record.Date.DayOfWeek}<br />
<span class="holiday small">${record.Holiday.Name}</span>
#elseif($!{record.Date.Value.Day} == 0)
#set ($stday = $velocityCount )
#ALtdheadheaderAtt("class='sunday groupWeekly' nowrap='nowrap'")
$!{record.Date.Day} $!{record.Date.DayOfWeek}
#elseif($!{record.Date.Value.Day} == 6)
#set ($sunday = $velocityCount )
#ALtdheadheaderAtt("class='saturday groupWeekly' nowrap='nowrap'")
$!{record.Date.Day} $!{record.Date.DayOfWeek}
#elseif($!{result.Today.Value} == $!{record.Date.Value})
#ALtdheadheaderAtt("class='today groupWeekly' nowrap='nowrap'")
$!{record.Date.Day} $!{record.Date.DayOfWeek}
#else
#ALtdheadheaderAtt("class='groupWeekly' nowrap='nowrap'")
$!{record.Date.Day} $!{record.Date.DayOfWeek}
#end
<br/><img src="images/common/dot.gif" width="50" height="1" alt="" />
#ALtdheadfooter()
#end
</tr>
#end
#set($roop = $roop + 1)
### 日付（曜日）の表示（ここまで）
<tr>
#set($record3rowcount = $result.getTermContainer($record3.UserId.Value).size() + 1 + $result.getToDoContainer($record3.UserId.Value).size())
#set($rowspanstr = "rowspan=$record3rowcount")
#set($show_tr = 0)
#ALtdheadheaderAtt("$rowspanstr class='groupWeekly'")
$record3.AliasName
#if(!$result.isMatch($record3.UserId.Value))
#set($noteLink = $!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData('template','NoteFormScreen').addQueryData('dest_user_id', $!record3.userId)))
<br /><a class="btn_gray" style="margin-top:5px;" href="javascript:void(0);" onclick="aipo.common.showDialog('$noteLink', '$!portlet.ID', aipo.note.onLoadNoteDialog);">
<img src="images/schedule/plus_orange.gif" alt="+" />
伝言メモ追加
</a>
#end
#ALtdheadfooter()
### 期間スケジュール（ここから） ###
#foreach($termcontainer in ${result.getTermContainer($record3.UserId.Value)})
#if($show_tr > 0)
<tr>
#end
#set($nottermcount = 0)
#foreach($record4 in $termcontainer.DayList)
#if( ! $record4.isTermNull() )
##if($record4.TermResultData.isShowDetail())
#if($nottermcount > 0)
#ALtdcellAtt("" "colspan='$nottermcount'")
#end
#set($addScheduleLink = "")
#ALtdcellheaderAtt("colspan='$!{record4.TermResultData.Rowspan}'")
#set($entityids = "$!{entityids}$!{record4.TermResultData.ScheduleId},")
#if(${record4.TermResultData.isShowDetail()})
<div class="schedule-$!{portlet.ID}-$!{record4.TermResultData.ScheduleId} calerndarTermScheduleDiv small">
<a href="javascript:void(0);" onclick="aipo.common.showDialog('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","ScheduleDetailScreen").addQueryData("entityid",$!{record4.TermResultData.ScheduleId}).addQueryData('userid', $!{record3.UserId}).addQueryData('view_date', $!{record4.Date.toString()}))', '$!portlet.ID', aipo.schedule.onLoadScheduleDetail);" class="small">$!{record4.TermResultData.WbrName}
#if(!${record4.TermResultData.isPublic()})&nbsp;<img class="icon_schedule" src="images/schedule/schedule_secret.gif" alt="非公開" title="非公開" />#else<img class="dot_schedule" src="images/common/dot.gif" alt="" />#end
#if(${record4.TermResultData.isTmpreserve()})<img class="icon_schedule" src="images/schedule/schedule_tmpreserve.gif" alt="仮スケジュール" title="仮スケジュール" />#end
</a>
#else
<div class="calerndarTermScheduleDiv small">
$!{record4.TermResultData.WbrName}
#if(!${record4.TermResultData.isPublic()})
<img class="icon_schedule" src="images/schedule/schedule_secret.gif" alt="非公開" title="非公開" />
#end
#if(${record4.TermResultData.isTmpreserve()})
<img class="icon_schedule" src="images/schedule/schedule_tmpreserve.gif" alt="仮スケジュール" title="仮スケジュール" />
#end
#end
</div>
#ALtdcellfooter()
#set($nottermcount = 0)
##end
#elseif (! $record4.isHasTerm() )
#set($nottermcount = $nottermcount + 1)
#end
#end
#if($nottermcount > 0)
#ALtdcellAtt("" "colspan='$nottermcount'")
#end
</tr>
#set($show_tr = $show_tr + 1 )
#end
### 期間スケジュール（ここまで） ###
### １日もしくは繰り返しスケジュール（ここから） ###
#if($show_tr > 0)
<tr>
#end
#set($show_tr = 0 )
#foreach($record in ${result.getContainer($record3.UserId.Value).DayList})
#set ($color_style = "")
#set ($color_style_holiday = "")
#set ($color_style_othermonth = "")
#set ($holiday_name = "")
#if($!{result.Today.Value} == $!{record.Date.Value})
#set ($color_style = " today")
#elseif($!{record.Date.Value.Day} == 0)
#set ($color_style = " sunday")
#elseif($!{record.Date.Value.Day} == 6)
#set ($color_style = " saturday")
#end
#if($!{record.isHoliday()})
#set ($color_style_holiday = " holiday")
#end
<td class="topNone${color_style}${color_style_holiday}">
#if($record.ScheduleList.size() <= 0)
<div class="calendarBody">
<div class="calendarScheduleDiv">
#if($!{result.hasAuthoritySelfInsert()})
#if($record3.UserId.Value == $result.UserId)
#set($addScheduleLink = "$!jslink.getPortletById($!portlet.ID).addQueryData('template','ScheduleFormScreen').addQueryData('entityid','new').addQueryData('form_start', $!{record.Date.toString()}).addQueryData('form_end', $!{record.Date.toString()})")
#else
#set($addScheduleLink = "$!jslink.getPortletById($!portlet.ID).addQueryData('template','ScheduleFormScreen').addQueryData('entityid','new').addQueryData('form_start', $!{record.Date.toString()}).addQueryData('form_end', $!{record.Date.toString()}).addQueryData('member_to', $!{record3.getName().getValue()})")
#end
<a href="javascript:void(0);" onclick="aipo.common.showDialog('$!utils.escapeXML($addScheduleLink)', '$!portlet.ID', aipo.schedule.onLoadScheduleDialog)" title="予定追加"><img class="icon_schedule" src="images/icon/icon_edit.gif" alt="予定追加" /></a>
#end
</div>
</div>
#else
#foreach($record2 in $record.ScheduleList)
#if(! ${record2.isDummy()})
<div>
#if($record2.isShowDetail())
#set($entityids = "$!{entityids}$!{record2.ScheduleId},")
#set($addScheduleLink = "$!jslink.getPortletById($!portlet.ID).addQueryData('template','ScheduleDetailScreen').addQueryData('entityid', $!{record2.ScheduleId}).addQueryData('userid', $!{record3.UserId}).addQueryData('view_date', $!{record.Date.toString()})")
<div class="calendarScheduleDiv">
<div class="small">$!{record2.Date}</div>
<div class="schedule-$!{portlet.ID}-$!{record2.ScheduleId} small"><a href="javascript:void(0);" onclick="aipo.common.showDialog('$!utils.escapeXML($addScheduleLink)', '$!portlet.ID', aipo.schedule.onLoadScheduleDetail)" class="small">$!{record2.WbrName}</a></div>
</div>
#else
<div class="calendarScheduleDiv">
<div class="small">$!{record2.Date}</div>
<div class="schedule-$!{portlet.ID}-$!{record2.ScheduleId} small">$!{record2.WbrName}</div>
</div>
#end
#if(! ${record2.isPublic()})
<img class="icon_schedule" src="images/schedule/schedule_secret.gif" alt="非公開" title="非公開" />
#end
#if($record2.isDuplicate())
<img class="icon_schedule" src="images/schedule/schedule_duplicate.gif" alt="重複スケジュール" title="重複スケジュール" />
#end
#if(${record2.isRepeat()})
<img class="icon_schedule" src="images/schedule/schedule_repeat.gif" alt="繰り返し" title="繰り返し" />
#end
#if($record2.isTmpreserve())
<img class="icon_schedule" src="images/schedule/schedule_tmpreserve.gif" alt="仮スケジュール" title="仮スケジュール" />
#end
</div>
#end
#end
<div class="calendarScheduleDiv">
#if($!{result.hasAuthoritySelfInsert()})
#if($record3.UserId.Value == $result.UserId)
#set($addScheduleLink = "$!jslink.getPortletById($!portlet.ID).addQueryData('template','ScheduleFormScreen').addQueryData('entityid','new').addQueryData('form_start', $!{record.Date.toString()}).addQueryData('form_end', $!{record.Date.toString()})")
#else
#set($addScheduleLink = "$!jslink.getPortletById($!portlet.ID).addQueryData('template','ScheduleFormScreen').addQueryData('entityid','new').addQueryData('form_start', $!{record.Date.toString()}).addQueryData('form_end', $!{record.Date.toString()}).addQueryData('member_to', $!{record3.getName().getValue()})")
#end
<a href="javascript:void(0);" onclick="aipo.common.showDialog('$!utils.escapeXML($addScheduleLink)', '$!portlet.ID', aipo.schedule.onLoadScheduleDialog)" title="予定追加"><img class="icon_schedule" src="images/icon/icon_edit.gif" alt="予定追加" /></a>
#end

</div>
#end
<div class="calendarFooter"></div>
</td>
#set($show_tr = $show_tr + 1 )
#end
#if($show_tr > 0)
</tr>
#end
#set($show_tr = $show_tr + 1 )
### １日もしくは繰り返しスケジュール（ここまで） ###
### ToDoリスト（ここから） ###
#foreach($todocontainer in ${result.getToDoContainer($record3.UserId.Value)})
<tr>
#set($nottodocount = 0)
#foreach($record in $todocontainer.DayList)
#if( ! $record.isTodoNull() )
#if($nottodocount > 0)
#ALtdcellAtt("" "colspan='$nottodocount' style='vertical-align:top;background-color:#FFFFFF;line-height: 8pt;'")
#end
#ALtdcellheaderAtt("colspan='$!{record.ToDoResultData.Rowspan}' align='center' style='vertical-align:top;background-color:#FFE5E5;line-height: 8pt;'")
<div class="calerndarTodoDiv small">
#if($record3.UserId.Value == $result.UserId )
<a class="small" href="javascript:void(0);" onclick="aipo.common.showDialog('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","ToDoDetailScreen").addQueryData("entityid",$!{record.ToDoResultData.TodoId}))');">
#else
<a class="small" href="javascript:void(0);" onclick="aipo.common.showDialog('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","ToDoPublicDetailScreen").addQueryData("entityid",$!{record.ToDoResultData.TodoId}))');">
#end
$!{record.ToDoResultData.TodoName}
#if(! ${record.ToDoResultData.isPublic()})
<img class="icon_schedule" src="images/todo/todo_secret.gif" alt="非公開" title="非公開" />
#end
</a>
</div>
#ALtdcellfooter()
#set($nottodocount = 0)
#elseif (! $record.isHasTodo() )
#set($nottodocount = $nottodocount + 1)
#end
#end
#if($nottodocount > 0)
#ALtdcellAtt("" "colspan='$nottodocount' style='vertical-align:top;background-color:#FFFFFF;line-height:8pt;'")
#end
</tr>
#end
### ToDoリスト（ここまで） ###
#end
### 施設スケジュール（ここから） ###
#if ($roop > 0)
##<tr>
##foreach ( $num in [1..8] )
##<td class="calendarHeader"><img src="images/common/dot.gif" height="1" alt="" /></td>
##end
##</tr>
#end
#foreach($record3 in $result.FacilityList)
### 日付（曜日）の表示(施設用)（ここから）
#if( $roop % 5 == 0)
<tr>
#ALtdheadheaderAtt("class='groupWeekly' nowrap='nowrap'")
<img src="images/common/dot.gif" width="50" height="1" alt="" />
#ALtdheadfooter()
#if($result.MemberList.size() > 0)
#set($daylist = ${result.getContainer($result.MemberList.get(0).UserId.Value).DayList})
#else
#set($daylist = ${result.getFacilityContainer($result.FacilityList.get(0).FacilityId.Value).DayList})
#end
#foreach($record in $daylist)
#set($getScheduleDetailLink = $!jslink.getPortletById($!portlet.ID).addQueryData('template','ScheduleDetailJSONScreen').addQueryData('view_date', $!{record.Date.toString()}))
#if($!{record.isHoliday()})
#set ($stday = $velocityCount )
#ALtdheadheaderAtt("class='holiday groupWeekly' nowrap='nowrap'")
$!{record.Date.Day} $!{record.Date.DayOfWeek}<br />
<span class="holiday small">${record.Holiday.Name}</span>
#elseif($!{record.Date.Value.Day} == 0)
#set ($stday = $velocityCount )
#ALtdheadheaderAtt("class='sunday groupWeekly' nowrap='nowrap'")
$!{record.Date.Day} $!{record.Date.DayOfWeek}
#elseif($!{record.Date.Value.Day} == 6)
#set ($sunday = $velocityCount )
#ALtdheadheaderAtt("class='saturday groupWeekly' nowrap='nowrap'")
$!{record.Date.Day} $!{record.Date.DayOfWeek}
#elseif($!{result.Today.Value} == $!{record.Date.Value})
#ALtdheadheaderAtt("class='today groupWeekly' nowrap='nowrap'")
$!{record.Date.Day} $!{record.Date.DayOfWeek}
#else
#ALtdheadheaderAtt("class='groupWeekly' nowrap='nowrap'")
$!{record.Date.Day} $!{record.Date.DayOfWeek}
#end
<br/><img src="images/common/dot.gif" width="50" height="1" alt="" />
#ALtdheadfooter()
#end
</tr>
#end
#set($roop = $roop + 1)
### 日付（曜日）の表示(施設用)（ここまで）

#set($record3rowcount = 1)
#set($rowspanstr = "rowspan=$record3rowcount")
#ALtdheadAtt("$record3.FacilityName" "$rowspanstr")
#foreach($record in ${result.getFacilityContainer($record3.FacilityId.Value).DayList})
#if($!{record.Date.Value.equals($result.Today.Value)})
#if($!{record.isHoliday()})
#ALtdcellheaderAtt("class='holiday' style='vertical-align:top;' height='100%'")
#else
#ALtdcellheaderAtt("class='today' style='vertical-align:top;' height='100%'")
#end
##<table class="outer" cellspacing="1" cellpadding="2" width="100%" height="100%"><tbody><tr ><td class="item" style="vertical-align:top;background-color:#FFFFE5" height="100%">
#elseif($!{record.isHoliday()})
#ALtdcellheaderAtt("class='holiday' style='vertical-align:top;'")
#elseif($!{record.Date.Value.Day} == 0)
#ALtdcellheaderAtt("class='sunday' style='vertical-align:top;'")
#elseif($!{record.Date.Value.Day} == 6)
#ALtdcellheaderAtt("class='saturday' style='vertical-align:top;'")
#else
#ALtdcellheaderAtt("style='vertical-align:top;'")
#end

#if($record.ScheduleList.size() <= 0)
<div class="calendarBody">
<div class="calendarScheduleDiv">
#if($!{result.hasAuthorityFacilityInsert()})
#set($addScheduleLink = "$!jslink.getPortletById($!portlet.ID).addQueryData('template','ScheduleFormScreen').addQueryData('entityid','new').addQueryData('form_start', $!{record.Date.toString()}).addQueryData('form_end', $!{record.Date.toString()}).addQueryData('facility_to', $!{record3.FacilityId.Value})")
<a href="javascript:void(0);" onclick="aipo.common.showDialog('$!utils.escapeXML($addScheduleLink)', '$!portlet.ID', aipo.schedule.onLoadScheduleDialog)" title="予定追加"><img class="icon_schedule" src="images/icon/icon_edit.gif" alt="予定追加" /></a>
#end
</div>
</div>
#else
#foreach($record2 in $record.ScheduleList)
#if(! ${record2.isDummy()})
#if($record2.isShowDetail())
#set($entityids = "$!{entityids}$!{record2.ScheduleId},")
#set($addScheduleLink = "$!jslink.getPortletById($!portlet.ID).addQueryData('template','ScheduleDetailScreen').addQueryData('entityid', $!{record2.ScheduleId}).addQueryData('view_date', $!{record.Date.toString()}).addQueryData('facilityid', $record3.FacilityId.Value)")
<div class="calendarScheduleDiv">

<div class="small">${record2.Date}</div>
<div class="schedule-$!{portlet.ID}-$!{record2.ScheduleId} small"><a class="small" href="javascript:void(0);" onclick="aipo.common.showDialog('$!utils.escapeXML($addScheduleLink)', '$!portlet.ID', aipo.schedule.onLoadScheduleDetail)">$record2.WbrName</a></div>
</div>
#else
<div class="calendarScheduleDiv">
<div class="small">${record2.Date}</div>
<div class="schedule-$!{portlet.ID}-$!{record2.ScheduleId} small">$record2.Name</div>
</div>
#end
#if(! ${record2.isPublic()})
<img class="icon_schedule" src="images/schedule/schedule_secret.gif" alt="非公開" title="非公開" />
#end
#if($record2.isDuplicate())
<img class="icon_schedule" src="images/schedule/schedule_duplicate.gif" alt="重複スケジュール" title="重複スケジュール" />
#end
#if(${record2.isRepeat()})
<img class="icon_schedule" src="images/schedule/schedule_repeat.gif" alt="繰り返し" title="繰り返し" />
#end
#if($record2.isTmpreserve())
<img class="icon_schedule" src="images/schedule/schedule_tmpreserve.gif" alt="仮スケジュール" title="仮スケジュール" />
#end
#end
#end
<div class="calendarScheduleDiv">
#set($addScheduleLink = "$!jslink.getPortletById($!portlet.ID).addQueryData('template','ScheduleFormScreen').addQueryData('entityid','new').addQueryData('form_start', $!{record.Date.toString()}).addQueryData('form_end', $!{record.Date.toString()}).addQueryData('facility_to', $!{record3.FacilityId.Value})")
<a href="javascript:void(0);" onclick="aipo.common.showDialog('$!utils.escapeXML($addScheduleLink)', '$!portlet.ID', aipo.schedule.onLoadScheduleDialog)" title="予定追加"><img class="icon_schedule" src="images/icon/icon_edit.gif" alt="予定追加" /></a>
</div>
#end
#if($!{record.Date.Value.equals($result.Today.Value)})
##</td></tr></tbody></table>
#end
#ALtdcellfooter()
#end
</tr>
#end
### 施設スケジュール（ここまで） ###
#ALtablefooter()
#end

#if($!ajax_onloadimage)
  <img src="images/common/dot.gif" width="1" height="1" onload="aipo.schedule.setupTooltip('$!{getScheduleDetailLink}', '$!entityids', '$!portlet.ID');ptConfig['$!portlet.ID'].reloadFunction = aipo.reloadPage;" />
#else
  <script type="text/javascript" language="JavaScript">
    //<![CDATA[
    dojo.addOnLoad(function(){
      aipo.schedule.setupTooltip('$!{getScheduleDetailLink}', '$!entityids', '$!portlet.ID');
      ptConfig['$!portlet.ID'].reloadFunction = aipo.reloadPage;
    });
    //]]>
  </script>
#end
