#*
 * 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 ($indicator_id = "indicator-dlg-")
## ---------------------------------------------------------------------------
#ALdialogheader("アプリ詳細")
#ALajaxIndicator("$indicator_id" "$!portlet.ID" "")
#ALajaxdetailformheader("アプリ")
#ALtableheaderWide()
#*
#ALtdcaption('アプリID')
#ALtditem($!result.Detail.AppId)
*#
#if($!isAdmin)
#ALtdcaption('ガジェットURL')
#ALtditem($!result.Detail.UrlCR)
#end
#ALtdcaption('タイトル')
#ALtditemheader()
#if($!result.Detail.Icon.toString() != "")
<img src="$!result.Detail.Icon" width="16" height="16" alt="$!result.Detail.Title" align="absmiddle" />
#end
$!result.Detail.Title
#ALtditemfooter()
#ALtdcaption('アプリの説明')
#ALtditem($!result.Detail.Description)

#if($!isAdmin)
#* TODO: Restful API サポート時に ConsumerKey ConsumerSecret を発行する必要があります。
#ALtdcaption('consumer key')
#ALtditem($!result.Detail.ConsumerKey)
#ALtdcaption('consumer secret')
#ALtditem($!result.Detail.ConsumerSecret)
*#
#foreach ($service in $!result.Detail.OAuthConsumers)
#ALtdcaption("OAuth@$!{service.Name}")
#ALtditemheader()
<h4>Request</h4>
$!service.RequestUrlCR<br/>
<br/>
<h4>Authorization</h4>
$!service.AuthorizationUrlCR<br/>
<br/>
<h4>Access</h4>
$!service.AccessUrlCR<br/>
<br/>
<h4>Type</h4>
#if($!service.Type.Value && $!service.Type.Value != "")
$!service.Type<br/>
<br/>
#else
（未設定）<br/>
<br/>
#end
<h4>consumer key</h4>
#if($!service.ConsumerKey.Value && $!service.ConsumerKey.Value != "")
$!service.ConsumerKey<br/>
<br/>
#else
（未設定）<br/>
<br/>
#end
<h4>consumer secret</h4>
#if($!service.ConsumerSecret.Value && $!service.ConsumerSecret.Value != "")
$!service.ConsumerSecret<br/>
<br/>
#else
（未設定）<br/>
<br/>
#end
#ALtditemfooter()
#end
#end
#ALtablefooter()
#if(!$!isAdmin)
<p class="center">「メニュータブのスパナボタンよりアプリを追加できます。」</p>
#end
#ALbuttonheader()
#if($!isAdmin)
<img src="images/common/dot.gif" width="1" height="1" onload="if(!aipo.gadgets_admin){dojo.require('aipo.gadgets_admin.form');}" />
#ALajaxbuttonEditCallback("$!jslink.getPortletById($!portlet.ID).addQueryData('template','GadgetsAdminFormScreen').addQueryData('entityid',$entityid)" "$!portlet.ID" "aipo.gadgets_admin.onLoadDialog")
<input name="ajaxbuttonDelete" class="button" type="button" value="アンインストールする" onclick="aipo.gadgets_admin.ajaxDeleteSubmit(this, '$!jslink.getPortletById($!portlet.ID).addQueryData('template','GadgetsAdminFormJSONScreen').addQueryData('entityid',$entityid).addQueryData('mode', 'delete')', '$indicator_id', '$!portlet.ID', aipo.gadgets_admin.onReceiveMessage);"/>
#end
#ALajaxbuttonClose()
#ALbuttonfooter()
#ALformfooter()
#ALdialogfooter()
