#*
 * 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($tabs = [["アクセス権限", "",""]])
#set ($indicator_id = "indicator-list-")
## ---------------------------------------------------------------------------
#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","AccessControlScreen").addQueryData("filter","").addQueryData("filtertype","feature"))">（全体）</option>
#foreach( $record in $result.PortletFeatureList )
<option value="$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","AccessControlScreen").addQueryData("filter",$!record.FeatureId).addQueryData("filtertype","feature"))" #if ($!result.CurrentFilter && $!result.CurrentFilter == $!record.FeatureId.toString()) selected="selected" #end>$!record.FeatureAliasName</option>
#end
</select>
#ALtditemfooter()
#ALtablefooter()
#if($result.List.size() == 0)
<div class="message">指定された条件に該当するアクセス権限のロールはありません。</div>
#else
#ALajaxpageview('AccessControlScreen' $result)
#ALtableheaderWide()
<tr>
#ALtdheadThin("#ALswitchCheckbox()")
#ALtdheadW33("#ALajaxsort('acl_role_name' 'ロール名' $result 'AccessControlScreen')")
#ALtdheadW25("#ALajaxsort('feature_alias_name' '機能名' $result 'AccessControlScreen')")
#ALtdheadW25("権限")
#ALtdheadThin(' ')
</tr>
#foreach ($record in $result.List)
<tr>
#ALtdcellAtt("<input name='check$!record.AclRoleId' type='checkbox' value='$!record.AclRoleId'/>" 'align="center"')
#ALtdcellheader()
<a href="javascript:void(0);" onclick="aipo.common.showDialog('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","AccessControlDetailScreen").addQueryData("entityid",$record.AclRoleId))');">$!record.AclRoleName</a>
#ALtdcellfooter()
#ALtdcell("$record.FeatureName")
#ALtdcellheader()
#if($record.hasAclList()) <span class="spaceRight">一覧表示</span> #end
#if($record.hasAclDetail()) <span class="spaceRight">詳細表示</span> #end
#if($record.hasAclInsert()) <span class="spaceRight">追加</span> #end
#if($record.hasAclUpdate()) <span class="spaceRight">編集</span> #end
#if($record.hasAclDelete()) <span class="spaceRight">削除</span> #end
#if($record.hasAclExport()) <span class="spaceRight">外部出力</span> #end
#ALtdcellfooter()
#ALtdcellAtt("#ALajaxbuttonLinkCallback('編集' $!jslink.getPortletById($!portlet.ID).addQueryData('template','AccessControlFormScreen').addQueryData('entityid', $!record.AclRoleId) 'images/icon/icon_edit.gif' $!portlet.ID 'aipo.accessctl.onLoadAccessctlDialog')" 'nowrap="nowrap"')
</tr>
#end
#ALtablefooter()
#ALbuttonheaderRight()
選択したロールを #ALajaxbuttonCheckboxDelete('削除する' "$!jslink.getPortletById($!portlet.ID).addQueryData('template','AccessControlFormJSONScreen').addQueryData('mode','multi_delete')" "${indicator_id}" "$!portlet.ID" "aipo.accessctl.onReceiveMessage")
#ALbuttonfooterRight()
#ALajaxpageviewFooter('AccessControlScreen' $result)
#end
#ALformfooter()
#ALspacebothfooter()
#ALajaxtabfooter()
