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

## ---------------------------------------------------------------------------
#set ($indicator_id = "indicator-list-")
## ---------------------------------------------------------------------------
#ALajaxIndicator("${indicator_id}" "$!{portlet.ID}" "")
<div id="exttimecardmessageDiv"></div>
#ALajaxscreenformheader("exttimecardForm" $jslink $portlet "ExtTimecardFormJSONScreen" "aimluck.io.submit(this, '${indicator_id}','$!portlet.ID',aipo.exttimecard.onListReceiveMessage)")
#ALtableheaderWide()
<tr>
#ALtdheadThin("出勤")
#ALtdheadThin("退勤")
#ALtdheadThin("外出")
#ALtdheadThin("復帰")
</tr>
<tr>
#ALtdcellheaderAtt("nowrap=nowrap")

#if (!$!{result.Detail})
#ALsubmitJS('punchin' '出勤' "aipo.exttimecard.addHiddenValue(this.form, 'mode', 'punchin')")
#else

#if (!($!{result.Detail.IsNullClockInTime}))
$!{result.Detail.ClockInTime.Hour}時$!{result.Detail.ClockInTime.Minute}分
#else
#if (!$!{result.Detail.IsNullClockOutTime})
<input type="submit" class="submit" name="eventSubmit_doExtTimecard_punchin_" value="出勤" disabled="">
#else
#ALsubmitJS('punchin' '出勤' "aipo.exttimecard.addHiddenValue(this.form, 'mode', 'punchin')")
#end
#end

#end

#ALtdcellfooter()

#ALtdcellheaderAtt("nowrap=nowrap")
#if ($!{result.Detail} && !($!{result.Detail.IsNullClockOutTime}))
$!{result.Detail.ClockOutTime.Hour}時$!{result.Detail.ClockOutTime.Minute}分
#else
#ALsubmitJS('punchout' '退勤' "aipo.exttimecard.addHiddenValue(this.form, 'mode', 'punchout')")
#end
#ALtdcellfooter()

#ALtdcellheaderAtt("nowrap=nowrap")
#if ($!{result.Detail} && !($!{result.Detail.IsNullClockOutTime}))
<input type="submit" class="submit" name="eventSubmit_doExtTimecard_outgoing_" value="外出" disabled="">
#elseif ($!{result.Detail.IsOutgoing})
$!{result.Detail.OutgoingTime.Hour}時$!{result.Detail.OutgoingTime.Minute}分
#else
#ALsubmitJS('outgoing' '外出' "aipo.exttimecard.addHiddenValue(this.form, 'mode', 'outgoing')")
#end
#ALtdcellfooter()

#ALtdcellheaderAtt("nowrap=nowrap")
#if ($!{result.Detail} && !($!{result.Detail.IsNullClockOutTime}))
<input type="submit" class="submit" name="eventSubmit_doExtTimecard_comeback_" value="復帰" disabled="">
#else
#ALsubmitJS('comeback' '復帰' "aipo.exttimecard.addHiddenValue(this.form, 'mode', 'comeback')")
#end
#ALtdcellfooter()

</tr>
#ALtablefooter()
#ALformfooter()
