#*
 * 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($link = "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_list','1')")
#set($linklist = [["スケジュール(1日)一覧へ", "$!jslink.addQueryData('js_peid',$!portlet.ID).addQueryData('eventSubmit_doSchedule_list','1')"], ["スケジュールへ", "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_menu','1')"]])

#set($counter = 0)
#foreach($record in $!result.MemberList)
#if(!($!{record.Name.toString()} == $!{result.Detail.User.Name.toString()}))
#if($result.getStatus($record.UserId.Value) == "R") #set($counter = $counter + 1) #end
#end
#end
#if($counter < ($!result.MemberList.size() - 1))
#set ($hasMember = true)
#else
#set ($hasMember = false)
#end
#ALcell_pagetitle_iphone($career "スケジュール削除")
#ALcell_linklist_iphone($career $linklist)
#ALcell_contents_header($career)

#ALcell_formheader($career $jslink $portlet)
<h3>削除条件</h3>
<script type="text/javascript">

function swapRadio(id) {
  var radio = document.getElementById(id);
  radio.checked = true;
}

</script>
#ALcell_radius_header($career)
#if($!{result.Detail.isOwner()})
#if($hasMember && $!{result.Detail.isRepeat()})
<li><a href="javascript:void(0);" onclick="swapRadio('radio_3');return false;">
<input id="radio_3" name="del_flag" type="radio" value="3" checked="checked">
自分の $!{result.ViewDate.Year}年$!{result.ViewDate.Month}月$!{result.ViewDate.Day}日 の予定のみ
</a></li>
<li><a href="javascript:void(0);" onclick="swapRadio('radio_2');return false;">
<input id="radio_2" name="del_flag" type="radio" value="2">
自分のこの予定を完全に
</a></li>
<li><a href="javascript:void(0);" onclick="swapRadio('radio_1');return false;">
<input id="radio_1" name="del_flag" type="radio" value="1">
参加ユーザー全員の $!{result.ViewDate.Year}年$!{result.ViewDate.Month}月$!{result.ViewDate.Day}日 の予定のみ
</a></li>
<li><a href="javascript:void(0);" onclick="swapRadio('radio_0');return false;">
<input id="radio_0" name="del_flag" type="radio" value="0">
参加ユーザー全員のこの予定を完全に
</a></li>
#elseif($hasMember && ! $!{result.Detail.isRepeat()})
<li><a href="javascript:void(0);" onclick="swapRadio('radio_2');return false;">
<input id="radio_2" name="del_flag" type="radio" value="2" checked="checked">
自分のこの予定を完全に
</a></li>
<li><a href="javascript:void(0);" onclick="swapRadio('radio_0');return false;">
<input id="radio_0" name="del_flag" type="radio" value="0">
参加ユーザー全員のこの予定を完全に
</a></li>
#elseif(! $hasMember && $!{result.Detail.isRepeat()})
<li><a href="javascript:void(0);" onclick="swapRadio('radio_3');return false;">
<input id="radio_3" name="del_flag" type="radio" value="3" checked="checked">
自分の $!{result.ViewDate.Year}年$!{result.ViewDate.Month}月$!{result.ViewDate.Day}日 の予定のみ
</a></li>
<li><a href="javascript:void(0);" onclick="swapRadio('radio_2');return false;">
<input id="radio_2" name="del_flag" type="radio" value="2">
自分のこの予定を完全に
</a></li>
#else
<li><a href="javascript:void(0);" onclick="swapRadio('radio_2');return false;">
<input id="radio_2" name="del_flag" type="radio" value="2" checked="checked">
自分のこの予定を完全に
</a></li>
#end
#else
#if($!{result.Detail.isEditable()})
#if($hasMember && $!{result.Detail.isRepeat()})
<li><a href="javascript:void(0);" onclick="swapRadio('radio_3');return false;">
<input id="radio_3" name="del_flag" type="radio" value="3" checked="checked">
自分の $!{result.ViewDate.Year}年$!{result.ViewDate.Month}月$!{result.ViewDate.Day}日 の予定のみ
</a></li>
<li><a href="javascript:void(0);" onclick="swapRadio('radio_2');return false;">
<input id="radio_2" name="del_flag" type="radio" value="2">
自分のこの予定を完全に
</a></li>
<li><a href="javascript:void(0);" onclick="swapRadio('radio_1');return false;">
<input id="radio_1" name="del_flag" type="radio" value="1">
参加ユーザー全員の $!{result.ViewDate.Year}年$!{result.ViewDate.Month}月$!{result.ViewDate.Day}日 の予定のみ
</a></li>
<li><a href="javascript:void(0);" onclick="swapRadio('radio_0');return false;">
<input id="radio_0" name="del_flag" type="radio" value="0">
参加ユーザー全員のこの予定を完全に
</a></li>
#elseif($hasMember && ! $!{result.Detail.isRepeat()})
<li><a href="javascript:void(0);" onclick="swapRadio('radio_2');return false;">
<input id="radio_2" name="del_flag" type="radio" value="2" checked="checked">
自分のこの予定を完全に
</a></li>
<li><a href="javascript:void(0);" onclick="swapRadio('radio_0');return false;">
<input id="radio_0" name="del_flag" type="radio" value="0">
参加ユーザー全員のこの予定を完全に
</a></li>
#elseif(! $hasMember && $!{result.Detail.isRepeat()})
<li><a href="javascript:void(0);" onclick="swapRadio('radio_3');return false;">
<input id="radio_3" name="del_flag" type="radio" value="3" checked="checked">
自分の $!{result.ViewDate.Year}年$!{result.ViewDate.Month}月$!{result.ViewDate.Day}日 の予定のみ
</a></li>
<li><a href="javascript:void(0);" onclick="swapRadio('radio_2');return false;">
<input id="radio_2" name="del_flag" type="radio" value="2">
自分のこの予定を完全に
</a></li>
#else
<li><a href="javascript:void(0);" onclick="swapRadio('radio_2');return false;">
<input id="radio_2" name="del_flag" type="radio" value="2" checked="checked">
自分のこの予定を完全に
</a></li>
#end
#else
#if($!{result.Detail.isRepeat()})
<li><a href="javascript:void(0);" onclick="swapRadio('radio_3');return false;">
<input id="radio_3" name="del_flag" type="radio" value="3" checked="checked">
自分の $!{result.ViewDate.Year}年$!{result.ViewDate.Month}月$!{result.ViewDate.Day}日 の予定のみ
</a></li>
<li><a href="javascript:void(0);" onclick="swapRadio('radio_2');return false;">
<input id="radio_2" name="del_flag" type="radio" value="2">
自分のこの予定を完全に
</a></li>
#else
<li><a href="javascript:void(0);" onclick="swapRadio('radio_2');return false;">
<input id="radio_2" name="del_flag" type="radio" value="2" checked="checked">
自分のこの予定を完全に
</a></li>
#end
#end
#end
#ALcell_radius_footer($career)
<input type="hidden" name="entityid" value="$!{result.EntityId}">
<input type="hidden" name="view_date" value="$!{result.ViewDate.toString()}">
<p class="center">
#ALcell_submit($career 'eventSubmit_doSchedule_delete' '削除する')
</p>
#ALcell_formfooter()
#ALcell_contents_footer($career)
#ALcell_linklist_iphone($career $linklist)
