#*
 * 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($tabs = [["タイムカード月集計", "",""]])
#set($meisaiflag = 1)
## ---------------------------------------------------------------------------
#ALajaxtabheader($tabs "")
#ALspacebothheader()
#ALtableheaderSimpleWide()
#ALtdcaption('グループ')
#ALtditemheader()
<div>
<select name="target_group_name" onchange="aipo.viewPage(this.options[this.selectedIndex].value, '$!portlet.ID')">
<option value="$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","ExtTimecardSummaryListScreen").addQueryData("target_group_name","only").addQueryData("target_user_id","none"))">（選択してください）</option>
#foreach( $record in $!result.MyGroupList )
<option value="$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","ExtTimecardSummaryListScreen").addQueryData("target_group_name",$!{record.Name.toString()}).addQueryData("target_user_id","none"))" #if($!result.TargetGroupName == $!record.Name.toString()) selected="selected" #end>$!record.AliasName</option>
#end
#if(($result.MyGroupList.size() > 0) && ($result.PostMap.size() > 0))
<option value="$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","ExtTimecardSummaryListScreen").addQueryData("target_group_name","only").addQueryData("target_user_id", "none"))" #if ($!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","ExtTimecardSummaryListScreen").addQueryData("target_group_name",$!{record.GroupName.toString()}).addQueryData("target_user_id", "none"))" #if($!result.TargetGroupName == $!record.GroupName.toString()) selected="selected" #end>$!record.PostName</option>
#end
</select>
</div>
#ALtditemfooter()
#ALtablefooter()

##if($result.DateListKeys.size() == 0)
##<div class="message">指定されたグループにはユーザーが所属していません。</div>
##else
#if($!result.hasAclXlsExport())
<div>
<form name="ExtTimecard" action="$jslink.getTemplate('ExtTimecardSummaryXlsExportScreen')" method="post">
#ALtableheaderSimpleWide()
#ALtdcaption('エクスポート')
#ALtditemheader() 現在表示している一覧を
#ALsubmit('eventSubmit_doExtTimecardSummary_download' 'ダウンロードする')
#ALtditemfooter()
#ALtablefooter()
<input type="hidden" name="target_user_id" value="$!result.TargetUserId"/>
<input type="hidden" name="target_group_name" value="$!result.TargetGroupName"/>
<input type="hidden" name="view_month" value="$!result.ViewMonth"/>
</form>
</div>
#end

<table border="0" cellspacing="0" cellpadding="2">
<tr valign="middle"><td>
<a href="javascript:void(0);" onclick="aipo.viewPage('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","ExtTimecardSummaryListScreen").addQueryData("view_month",$!{result.PrevMonth.toString()}))', '$!portlet.ID');" title="前月へ">
<img src="images/schedule/arrow_left.gif" border="0" alt="前月へ" /></a>&nbsp;
</td><td nowrap="nowrap"><span style="font-weight:bold">
$!{result.ViewMonth.Year} 年 $!{result.ViewMonth.Month} 月
</span></td><td>
<a href="javascript:void(0);" onclick="aipo.viewPage('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","ExtTimecardSummaryListScreen").addQueryData("view_month",$!{result.NextMonth.toString()}))', '$!portlet.ID');" title="翌月へ">
<img src="images/schedule/arrow_right.gif" border="0" alt="翌月へ" /></a>&nbsp;
</td><td>
<a href="javascript:void(0);" onclick="aipo.viewPage('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","ExtTimecardSummaryListScreen").addQueryData("view_month",$!{result.CurrentMonth.toString()}))', '$!portlet.ID');" title="今月へ">
<img src="images/schedule/schedule_currentmonth.gif" border="0" alt="今月へ" /></a>&nbsp;
</td></tr></table>

#set($user_results = $result.GroupExtTimecards)
#if($user_results.size() == 0)
<div class="message">指定されたグループにはユーザーが所属していません。</div>
#else
#ALtableheaderWide()
<tr>
#ALtdheadW25("ユーザー")
#ALtdheadW25("勤務形態")
#ALtdheadThin("就業")
#ALtdheadThin("残業")
#ALtdheadThin("休出")
#ALtdheadThin("遅刻")
#ALtdheadThin("早退")
#ALtdheadThin("欠勤")
#ALtdheadThin("有休")
#ALtdheadThin("代休")
#ALtdheadThin("その他")
#ALtdheadThin("未入力")
</tr>

#foreach ($key in $user_results)
<tr>
#ALtdcellAtt("$!{key.UserName}" "nowrap='nowrap'")
#ALtdcellAtt("$!{key.SystemName}" "nowrap='nowrap'")
#ALtdcellAtt("$!{key.WorkDay}日<br>（$!{key.WorkHour}時間）" "nowrap='nowrap' align='center'")
#ALtdcellAtt("$!{key.OvertimeDay}日<br>（$!{key.OvertimeHour}時間）" "nowrap='nowrap' align='center'")
#ALtdcellAtt("$!{key.OffDay}日<br>（$!{key.OffHour}時間）" "nowrap='nowrap' align='center'")
#ALtdcellAtt("$!{key.LateComingDay}日" "nowrap='nowrap' align='center'")
#ALtdcellAtt("$!{key.EarlyLeavingDay}日" "nowrap='nowrap' align='center'")
#ALtdcellAtt("$!{key.AbsentDay}日" "nowrap='nowrap' align='center'")
#ALtdcellAtt("$!{key.PaidHoliday}日" "nowrap='nowrap' align='center'")
#ALtdcellAtt("$!{key.CompensatoryHoliday}日" "nowrap='nowrap' align='center'")
#ALtdcellAtt("$!{key.OtherDay}日" "nowrap='nowrap' align='center'")
#ALtdcellAtt("$!{key.NoInput}" "nowrap='nowrap' align='center'")
</tr>
#end

#ALtablefooter()
#end


#ALspacebothfooter()
#ALajaxtabfooter()
