source: branches/version-2_12-dev/data/Smarty/templates/admin/ownersstore/plugin.tpl @ 21884

Revision 21884, 11.8 KB checked in by Yammy, 12 years ago (diff)

バージョン毎のプラグイン利用に必要なモジュールのチェック機構

refs #1845

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-smarty-template; charset=UTF-8
Line 
1<!--{*
2/*
3 * This file is part of EC-CUBE
4 *
5 * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved.
6 *
7 * http://www.lockon.co.jp/
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22 */
23*}-->
24
25<script type="text/javascript">//<![CDATA[
26    $(function() {
27
28        /**
29         * 「有効/有効にする」チェックボタン押下時
30         */
31        $('input[id^=plugin_enable]').change(function(event) {
32            // モード(有効 or 無効)
33            var mode = event.target.name;
34
35            if(mode === 'disable') {
36                result = window.confirm('プラグインを無効しても宜しいですか?');
37            } else if(mode === 'enable') {
38                result = window.confirm('プラグインを有効にしても宜しいですか?');
39            }
40            if(result === true){
41                // プラグインID
42                var plugin_id = event.target.value;
43                fnModeSubmit(mode, 'plugin_id', plugin_id);
44            }
45        });
46
47    /**
48     * 通信エラー表示.
49     */
50    function remoteException(XMLHttpRequest, textStatus, errorThrown) {
51        alert('通信中にエラーが発生しました。');
52    }
53
54    /**
55     * アップデートリンク押下時の処理.
56     */
57    $('.update_link').click(function(event) {
58        var plugin_id = event.target.name;
59        $('div[id="plugin_update_' + plugin_id + '"]').toggle("slow");
60        });
61    });
62
63    /**
64     * アプデートボタン押下時の処理.
65     * アップデート対象ファイル以外はPOSTされない様にdisabled属性を付与
66     */
67    function removeUpdateFile(select_id) {
68        $('input[name="update_plugin_file"]').attr("disabled", "disabled");
69        $('input[id="' + select_id + '"]').removeAttr("disabled");
70    }
71
72    /**
73     * インストール
74     */
75    function install() {
76        if (window.confirm('プラグインをインストールしても宜しいでしょうか?')){
77            fnModeSubmit('install','','');
78        }
79    }
80
81    /**
82     * アンインストール(削除)
83     */
84    function uninstall(plugin_id, plugin_code) {
85        if (window.confirm('一度削除したデータは元に戻せません。\nプラグインを削除しても宜しいですか?')){
86            fnSetFormValue('plugin_id', plugin_id);
87            fnModeSubmit('uninstall', 'plugin_code', plugin_code);
88        }
89    }
90
91    /**
92     * アップデート処理
93     */
94    function update(plugin_id, plugin_code) {
95        if (window.confirm('プラグインをアップデートしても宜しいですか?')){
96            removeUpdateFile('update_file_' + plugin_id);
97            fnSetFormValue('plugin_id', plugin_id);
98            fnModeSubmit('update','plugin_code', plugin_code);
99        }
100    }
101
102
103    /**
104     * 優先度変更.
105     */
106    function update_priority(plugin_id, plugin_code) {
107        var priority = $("*[name=priority_" + plugin_code +"]").val();
108        fnSetFormValue('priority', priority);
109        fnModeSubmit('priority','plugin_id',plugin_id);
110    }
111
112//]]></script>
113
114<!--<form name="form1" id="form1" method="post" action="?">-->
115<form name="form1" method="post" action="?" enctype="multipart/form-data">
116<input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
117<input type="hidden" name="mode" value="" />
118<input type="hidden" name="plugin_id" value="" />
119<input type="hidden" name="plugin_code" value="" />
120<input type="hidden" name="priority" value="" />
121<div id="system" class="contents-main">
122    <h2>プラグイン登録</h2>
123    <table class="form">
124        <tr>
125            <th>プラグイン<span class="attention"> *</span></th>
126            <td>
127                <!--{assign var=key value="plugin_file"}-->
128                <span class="attention"><!--{$arrErr[$key]}--></span>
129                <!--{foreach item=val from=$arrErr}-->
130                <!--{if $val != '' && $val != $key}--><span class="attention"><!--{$val}--></span><!--{/if}-->
131                <!--{/foreach}-->
132
133                <input type="file" name="<!--{ $key }-->" class="box45" size="43"  style="<!--{$arrErr[$key]|sfGetErrorColor}--> <!--{if $arrErr[$key]}--> background-color:<!--{$smarty.const.ERR_COLOR|h}--><!--{/if}-->">
134                <a class="btn-action" href="javascript:;" onclick="install(); return false;"><span class="btn-next">インストール</span></a>
135            </td>
136        </tr>
137    </table>
138
139    <!--▼プラグイン一覧ここから-->
140    <h2>プラグイン一覧</h2>
141    <!--{if count($plugins) > 0}-->
142        <span class="attention"><!--{$arrErr.plugin_error}--></span>
143        <table class="system-plugin" width="900">
144            <col width="10%" />
145            <col width="77" />
146            <col width="13%" />
147            <tr>
148                <th colspan="2">機能説明</th>
149                <th>優先度</th>
150            </tr>
151            <!--{section name=data loop=$plugins}-->
152            <!--{assign var=plugin value=$plugins[data]}-->
153            <tr <!--{if $plugin.enable == $smarty.const.PLUGIN_ENABLE_FALSE}--> style="background:#C9C9C9;" <!--{/if}-->>
154                <!--ロゴ-->
155                <td class="center plugin_img">
156                    <!--{if $plugin.plugin_site_url != '' }-->
157                        <a href="?" onclick="win03('<!--{$plugin.plugin_site_url|h}-->','plugin_site_url','620','760'); return false;"><img src="<!--{$plugin.logo}-->" width="65" height="65"/></a>&nbsp;
158                    <!--{else}-->
159                        <img src="<!--{$plugin.logo}-->" width="65" height="65"/>
160                    <!--{/if}-->
161
162                </td>
163                <!--機能説明-->
164                <td class="plugin_info">
165                        <!-- プラグイン名 -->
166                            <!-- ▼plugin_site_urlが設定されている場合はリンクとして表示 -->
167                            <span class="plugin_name">
168                            <!--{if $plugin.plugin_site_url != '' }-->
169                                <a href="?" onclick="win03('<!--{$plugin.plugin_site_url|h}-->','plugin_site_url','620','760'); return false;"><!--{$plugin.plugin_name|default:$plugin.plugin_code|h}--></a>&nbsp;
170                            <!--{else}-->
171                                <sapn><!--{$plugin.plugin_name|default:$plugin.plugin_code|h}-->&nbsp;</sapn>
172                            <!--{/if}-->
173                            </span>
174                        <!-- プラグインバージョン -->
175                            <!--{if $plugin.plugin_version != ''}--><!--{$plugin.plugin_version|h}--><!--{/if}-->&nbsp;
176                        <!-- 作者 -->
177                            <!--{if $plugin.author != ''}-->
178                                <!-- ▼author_site_urlが設定されている場合はリンクとして表示 -->
179                                <!--{if $plugin.author_site_url != '' }-->
180                                    <span>(by <a href="?" onclick="win03('<!--{$plugin.author_site_url|h}-->','author_site_url','620','760'); return false;"><!--{$plugin.author|default:'-'|h}--></a>)</span>
181                                <!--{else}-->
182                                    <span>(by <!--{$plugin.author|default:'-'|h}-->)</span>
183                                <!--{/if}-->
184                            <!--{/if}-->
185                        <br />
186                        <!-- 説明 -->
187                            <p class="description"><!--{$plugin.plugin_description|default:'-'|h}--></p>
188                        <div>
189                            <span class="ec_cube_version">対応EC-CUBEバージョン :<!--{$plugin.compliant_version|default:'-'|h}--></span><br/>
190                            <span class="attention"><!--{$arrErr[$plugin.plugin_code]}--></span>
191                            <!-- 設定 -->
192                                <!--{if $plugin.config_flg == true && $plugin.status != $smarty.const.PLUGIN_STATUS_UPLOADED}-->
193                                    <a href="?" onclick="win02('../load_plugin_config.php?plugin_id=<!--{$plugin.plugin_id}-->', 'load', 615, 400);return false;">プラグイン設定</a>&nbsp;|&nbsp;
194                                <!--{else}-->
195                                    <span>プラグイン設定&nbsp;|&nbsp;</span>
196                                <!--{/if}-->
197                            <!-- アップデート -->
198                                <a class="update_link" href="javascript:;" name="<!--{$plugin.plugin_id}-->">アップデート</a>&nbsp;|&nbsp;
199                            <!-- 削除 -->
200                                <a  href="javascript:;" name="uninstall" onclick="uninstall(<!--{$plugin.plugin_id}-->, '<!--{$plugin.plugin_code}-->'); return false;">削除</a>&nbsp;|&nbsp;
201                            <!-- 有効/無効 -->
202                                <!--{if $plugin.enable == $smarty.const.PLUGIN_ENABLE_TRUE}-->
203                                    <label><input id="plugin_enable" type="checkbox" name="disable" value="<!--{$plugin.plugin_id}-->" id="login_memory" checked="checked">有効</input></label><br/>
204                                <!--{else}-->
205                                    <label><input id="plugin_enable" type="checkbox" name="enable" value="<!--{$plugin.plugin_id}-->" id="login_memory">有効にする</input></label><br/>
206                                <!--{/if}-->
207
208                                <!-- アップデートリンク押下時に表示する. -->
209                                <div id="plugin_update_<!--{$plugin.plugin_id}-->" style="display: none">
210                                    <input id="update_file_<!--{$plugin.plugin_id}-->" name="<!--{$plugin.plugin_code}-->" type="file" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" class="box30" size="30" <!--{if $arrErr[$key]}-->style="background-color:<!--{$smarty.const.ERR_COLOR|h}-->"<!--{/if}--> />
211                                    <a class="btn-action" href="javascript:;" onclick="update(<!--{$plugin.plugin_id}-->, '<!--{$plugin.plugin_code}-->'); return false;"><span class="btn-next">アップデート</span></a>
212                                </div>
213                        </div>
214                </td>
215                <!--優先順位-->
216                <td class="center">
217                    <span class="attention"><!--{$arrErr.priority[$plugin.plugin_id]}--></span>
218                    <input type="text" class="center" name="priority_<!--{$plugin.plugin_code}-->" value="<!--{$plugin.priority|h}-->" size="1" class="priority" />
219                    <a class="btn-action" href="javascript:;" onclick="update_priority(<!--{$plugin.plugin_id}-->, '<!--{$plugin.plugin_code}-->'); return false;"><span class="btn-next">変更</span></a><br/>
220                    <span><!--{$plugin.priority_message}--></span>
221                </td>
222            </tr>
223            <!--競合アラート-->
224            <!--{if $plugin.conflict_message != ""}-->
225            <tr>
226                <td class="attention_fookpoint" colspan="3">
227                    <p class="attention"><!--{$plugin.conflict_message}--></p>
228                </td>
229            </tr>
230            <!--{/if}-->
231            <!--{/section}-->
232        </table>
233    <!--{else}-->
234        <span>登録されているプラグインはありません。</span>
235    <!--{/if}-->
236</div>
237</form>
Note: See TracBrowser for help on using the repository browser.