#*
 * 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-")

#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","GadgetsAdminListScreen").addQueryData("filter","all").addQueryData("filtertype","status"))">すべて</option>
<option value="$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","GadgetsAdminListScreen").addQueryData("filter","1").addQueryData("filtertype","status"))" #if ($!result.CurrentFilter && $!result.CurrentFilter == "1") selected="selected" #end>有効</option>
<option value="$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","GadgetsAdminListScreen").addQueryData("filter","0").addQueryData("filtertype","status"))" #if ($!result.CurrentFilter && $!result.CurrentFilter == "0") selected="selected" #end>無効</option>
</select>
#ALtditemfooter()
#ALtablefooter()
#if($result.List.size() == 0)
<div class="message">指定された条件に該当するアプリはありません。</div>
#else
#ALajaxpageview('GadgetsAdminListScreen' $result)
#ALtableheaderWide()
<tr>
#ALtdheadThin("#ALswitchCheckbox()")
#ALtdheadThin("状態")
#ALtdheadW75("タイトル")
#ALtdheadThin(' ')
</tr>
#foreach ($record in $result.List)
<tr>
#ALtdcellAtt("<input name='check$!record.AppId' type='checkbox' value='$!record.AppId'/>" 'align="center"')
#if($!record.Status == 1)
#ALtdcellAtt("有効" 'nowrap="nowrap"')
#else
#ALtdcellAtt("無効" 'nowrap="nowrap"')
#end
#ALtdcellheader()
<a href="javascript:void(0);" onclick="aipo.common.showDialog('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","GadgetsAdminDetailScreen").addQueryData("entityid",$record.AppId))');">$!record.Title</a>
#ALtdcellfooter()
#ALtdcellAtt("#ALajaxbuttonLinkCallback('編集' $!jslink.getPortletById($!portlet.ID).addQueryData('template','GadgetsAdminFormScreen').addQueryData('entityid', $!record.AppId) 'images/icon/icon_edit.gif' '$!portlet.ID' 'aipo.gadgets_admin.onLoadDialog')" 'nowrap="nowrap"')
</tr>
#end
#ALtablefooter()
#ALbuttonheaderRight()
選択したアプリを
<input name="ajaxbuttonCheckboxDelete" class="button" type="button" value="アンインストールする" onclick="aipo.gadgets_admin.ajaxCheckboxDeleteSubmit(this, '$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData('template','GadgetsAdminFormJSONScreen').addQueryData('mode','multi_delete'))', '${indicator_id}', '$!portlet.ID', aipo.gadgets_admin.onReceiveMessage);" />
#ALajaxbuttonCheckboxEnable('有効にする' "$!jslink.getPortletById($!portlet.ID).addQueryData('template','GadgetsAdminFormJSONScreen').addQueryData('mode','multi_enable')" "${indicator_id}" "$!portlet.ID" "aipo.gadgets_admin.onReceiveMessage")
#ALajaxbuttonCheckboxDisable('無効にする' "$!jslink.getPortletById($!portlet.ID).addQueryData('template','GadgetsAdminFormJSONScreen').addQueryData('mode','multi_disable')" "${indicator_id}" "$!portlet.ID" "aipo.gadgets_admin.onReceiveMessage")
#ALbuttonfooterRight()
#ALajaxpageviewFooter('GadgetsAdminListScreen' $result)
#end
#ALformfooter()
#ALspacebothfooter()
#ALajaxtabfooter()
