#*
 * 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 ($indicator_id = "indicator-list-")

#macro(ALajaxbuttonCheckboxEnable $name $url $indicator_id $portlet_id $rt)
<input name="ajaxbuttonCheckboxEnable" class="button" type="button" value="$name" onclick="aimluck.io.ajaxCheckboxEnableSubmit(this, '$!utils.escapeXML($url)', '$indicator_id', '$portlet_id', $rt);" />
#end
#macro(ALajaxbuttonCheckboxDisable $name $url $indicator_id $portlet_id $rt)
<input name="ajaxbuttonCheckboxDisable" class="button" type="button" value="$name" onclick="aimluck.io.ajaxCheckboxDisableSubmit(this, '$!utils.escapeXML($url)', '$indicator_id', '$portlet_id', $rt);" />
#end
## ---------------------------------------------------------------------------
#ALtabheader($tabs "")
#ALspacebothheader()
#ALajaxIndicator("${indicator_id}" "$!{portlet.ID}" "")
#ALajaxlistformheader('ユーザー')
#ALtableheaderSimpleWide()
#ALtdcaption('部署')
#ALtditemheader()
<select onchange="aipo.viewPage(this.options[this.selectedIndex].value, '$!portlet.ID')">
<option value="$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","ExtTimecardSystemMapListScreen").addQueryData("filter","").addQueryData("filtertype","post"))">（全体）</option>
#foreach( $record in $result.PostMap )
<option value="$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","ExtTimecardSystemMapListScreen").addQueryData("filter",$!record.PostId).addQueryData("filtertype","post"))" #if ($!result.CurrentFilter && $!result.CurrentFilter == $!record.PostId.toString()) selected="selected" #end>$!record.PostName</option>
#end
</select>
#ALtditemfooter()
#ALtablefooter()
#if($result.List.size() == 0)
<div class="message">指定された条件に該当するユーザーはありません。</div>
#else
#ALajaxpageview('ExtTimecardSystemMapListScreen' $result)
#ALtableheaderWide()
<tr>
#ALtdheadThin("#ALswitchCheckbox()")
#ALtdheadW33("#ALajaxsort('name_kana' '名前' $result 'ExtTimecardSystemMapListScreen')")
#ALtdheadW33("部署名")
#ALtdheadW33("勤務形態")
</tr>
#foreach ($record in $result.List)
#set($disabled_flg = $!record.Disabled)
<tr>
#ALtdcellAtt("<input name='check$!record.UserId' type='checkbox' value='$!record.UserId'/>" 'align="center"')
#ALtdcellheader()
<a href="javascript:void(0);" onclick="aipo.common.showDialog('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","AccountUserDetailScreen").addQueryData("entityid",$record.LoginName).addQueryData("noedit",1))');">$!record.Name</a>
#ALtdcellfooter()
#ALtdcellheader()
#set($pcount = 0)
#foreach($postname in $!record.PostNameList)
#if($pcount != 0)、&nbsp;#end
$!postname.Name
#set($pcount = $pcount + 1)
#end
#ALtdcellfooter()
#ALtdcellheader()
<a href="javascript:void(0);" onclick="aipo.common.showDialog('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","ExtTimecardSystemDetailScreen").addQueryData("entityid",$record.SystemId))');">$!record.SystemName</a>
#ALtdcellfooter()
</tr>
#end
#ALtablefooter()
#ALbuttonheaderRight()
選択したユーザーの勤務形態を
<select name="system_id">
#foreach( $record in $result.SystemList )
<option value="$!{record.SystemId}">$!record.SystemName</option>
#end
</select>
に
#ALajaxbuttonCheckboxAction('変更する' "$!jslink.getPortletById($!portlet.ID).addQueryData('template','ExtTimecardSystemMapFormJSONScreen').addQueryData('mode','multi_change')" "${indicator_id}" "$!portlet.ID" "aipo.exttimecardsystem.onReceiveMessage")
#ALbuttonfooterRight()
#ALajaxpageviewFooter('ExtTimecardSystemMapListScreen' $result)
#end
#ALformfooter()
#ALspacebothfooter()
#ALajaxtabfooter()
