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

Revision 23495, 12.3 KB checked in by pineray, 10 years ago (diff)

#2424 【2.13.0】 プラグインの優先度が設定できない。

  • 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-2013 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        $('input[id^=plugin_enable]').change(function(event) {
31            // モード(有効 or 無効)
32            var mode = event.target.name;
33
34            if(mode === 'disable') {
35                result = window.confirm('プラグインを無効にしても宜しいですか?');
36                if(result === false) {
37                    $(event.target).attr("checked", "checked");
38                }
39            } else if(mode === 'enable') {
40                result = window.confirm('プラグインを有効にしても宜しいですか?');
41                if(result === false) {
42                    $(event.target).attr("checked", "");
43                }
44            }
45            if(result === true){
46                // プラグインID
47                var plugin_id = event.target.value;
48                eccube.setModeAndSubmit(mode, 'plugin_id', plugin_id);
49            }
50        });
51
52    /**
53     * 通信エラー表示.
54     */
55    function remoteException(XMLHttpRequest, textStatus, errorThrown) {
56        alert('通信中にエラーが発生しました。');
57    }
58
59    /**
60     * アップデートリンク押下時の処理.
61     */
62    $('.update_link').click(function(event) {
63        var plugin_id = event.target.name;
64        $('div[id="plugin_update_' + plugin_id + '"]').toggle("slow");
65        });
66    });
67
68    /**
69     * アプデートボタン押下時の処理.
70     * アップデート対象ファイル以外はPOSTされない様にdisabled属性を付与
71     */
72    function removeUpdateFile(select_id) {
73        $('input[name="update_plugin_file"]').attr("disabled", "disabled");
74        $('input[id="' + select_id + '"]').removeAttr("disabled");
75    }
76
77    /**
78     * インストール
79     */
80    function install() {
81        if (window.confirm('プラグインをインストールしても宜しいでしょうか?')){
82            eccube.setModeAndSubmit('install','','');
83        }
84    }
85
86    /**
87     * アンインストール(削除)
88     */
89    function uninstall(plugin_id, plugin_code) {
90        if (window.confirm('一度削除したデータは元に戻せません。\nプラグインを削除しても宜しいですか?')){
91            eccube.setValue('plugin_id', plugin_id);
92            eccube.setModeAndSubmit('uninstall', 'plugin_code', plugin_code);
93        }
94    }
95
96    /**
97     * アップデート処理
98     */
99    function update(plugin_id, plugin_code) {
100        if (window.confirm('プラグインをアップデートしても宜しいですか?')){
101            removeUpdateFile('update_file_' + plugin_id);
102            eccube.setValue('plugin_id', plugin_id);
103            eccube.setModeAndSubmit('update','plugin_code', plugin_code);
104        }
105    }
106
107    /**
108     * 優先度変更.
109     */
110    function update_priority(plugin_id, plugin_code) {
111        var priority = $("*[name=priority_" + plugin_code +"]").val();
112        eccube.setValue('priority', priority);
113        eccube.setModeAndSubmit('priority','plugin_id',plugin_id);
114    }
115
116//]]></script>
117
118<form name="form1" id="form1" method="post" action="?" enctype="multipart/form-data">
119    <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
120    <input type="hidden" name="mode" value="" />
121    <input type="hidden" name="plugin_id" value="" />
122    <input type="hidden" name="plugin_code" value="" />
123    <input type="hidden" name="priority" value="" />
124    <div id="system" class="contents-main">
125        <h2>プラグイン登録</h2>
126        <table class="form">
127            <tr>
128                <th>プラグイン<span class="attention"> *</span></th>
129                <td>
130                    <!--{assign var=key value="plugin_file"}-->
131                    <span class="attention"><!--{$arrErr[$key]}--></span>
132                    <input type="file" name="<!--{ $key }-->" class="box45" size="43"  style="<!--{$arrErr[$key]|sfGetErrorColor}--> <!--{if $arrErr[$key]}--> background-color:<!--{$smarty.const.ERR_COLOR|h}--><!--{/if}-->" />
133                    <a class="btn-action" href="javascript:;" onclick="install(); return false;"><span class="btn-next">インストール</span></a>
134                </td>
135            </tr>
136        </table>
137
138        <!--▼プラグイン一覧ここから-->
139        <h2>プラグイン一覧</h2>
140        <!--{if count($plugins) > 0}-->
141            <span class="attention"><!--{$arrErr.plugin_error}--></span>
142            <table class="system-plugin" width="900">
143                <col width="10%" />
144                <col width="77" />
145                <col width="13%" />
146                <tr>
147                    <th colspan="2">機能説明</th>
148                    <th>優先度</th>
149                </tr>
150                <!--{section name=data loop=$plugins}-->
151                <!--{assign var=plugin value=$plugins[data]}-->
152                <tr <!--{if $plugin.enable == $smarty.const.PLUGIN_ENABLE_FALSE}--> style="background:#C9C9C9;" <!--{/if}-->>
153                    <!--ロゴ-->
154                    <td class="center plugin_img">
155                        <!--{if $plugin.plugin_site_url != '' }-->
156                            <a href="?" onclick="eccube.openWindow('<!--{$plugin.plugin_site_url|h}-->','plugin_site_url','620','760',{menubar:'no'}); return false;"><img src="<!--{$plugin.logo}-->" width="65" height="65" /></a>&nbsp;
157                        <!--{else}-->
158                            <img src="<!--{$plugin.logo}-->" width="65" height="65"/>
159                        <!--{/if}-->
160
161                    </td>
162                    <!--機能説明-->
163                    <td class="plugin_info">
164                            <!-- プラグイン名 -->
165                                <!-- ▼plugin_site_urlが設定されている場合はリンクとして表示 -->
166                                <span class="plugin_name">
167                                <!--{if $plugin.plugin_site_url != '' }-->
168                                    <a href="?" onclick="eccube.openWindow('<!--{$plugin.plugin_site_url|h}-->','plugin_site_url','620','760',{menubar:'no'}); return false;"><!--{$plugin.plugin_name|default:$plugin.plugin_code|h}--></a>&nbsp;
169                                <!--{else}-->
170                                    <span><!--{$plugin.plugin_name|default:$plugin.plugin_code|h}-->&nbsp;</span>
171                                <!--{/if}-->
172                                </span>
173                            <!-- プラグインバージョン -->
174                                <!--{if $plugin.plugin_version != ''}--><!--{$plugin.plugin_version|h}--><!--{/if}-->&nbsp;
175                            <!-- 作者 -->
176                                <!--{if $plugin.author != ''}-->
177                                    <!-- ▼author_site_urlが設定されている場合はリンクとして表示 -->
178                                    <!--{if $plugin.author_site_url != '' }-->
179                                        <span>(by <a href="?" onclick="eccube.openWindow('<!--{$plugin.author_site_url|h}-->','author_site_url','620','760',{menubar:'no'}); return false;"><!--{$plugin.author|default:'-'|h}--></a>)</span>
180                                    <!--{else}-->
181                                        <span>(by <!--{$plugin.author|default:'-'|h}-->)</span>
182                                    <!--{/if}-->
183                                <!--{/if}-->
184                            <br />
185                            <!-- 説明 -->
186                                <p class="description"><!--{$plugin.plugin_description|default:'-'|h}--></p>
187                            <div>
188                                <span class="ec_cube_version">対応EC-CUBEバージョン :<!--{$plugin.compliant_version|default:'-'|h}--></span><br/>
189                                <span class="attention"><!--{$arrErr[$plugin.plugin_code]}--></span>
190                                <!-- 設定 -->
191                                    <!--{if $plugin.config_flg == true && $plugin.status != $smarty.const.PLUGIN_STATUS_UPLOADED}-->
192                                        <a href="?" onclick="eccube.openWindow('../load_plugin_config.php?plugin_id=<!--{$plugin.plugin_id}-->', 'load', 615, 400);return false;">プラグイン設定</a>&nbsp;|&nbsp;
193                                    <!--{else}-->
194                                        <span>プラグイン設定&nbsp;|&nbsp;</span>
195                                    <!--{/if}-->
196                                <!-- アップデート -->
197                                    <a class="update_link" href="javascript:;" name="<!--{$plugin.plugin_id}-->">アップデート</a>&nbsp;|&nbsp;
198                                <!-- 削除 -->
199                                    <a  href="javascript:;" name="uninstall" onclick="uninstall(<!--{$plugin.plugin_id}-->, '<!--{$plugin.plugin_code}-->'); return false;">削除</a>&nbsp;|&nbsp;
200                                <!-- 有効/無効 -->
201                                    <!--{if $plugin.enable == $smarty.const.PLUGIN_ENABLE_TRUE}-->
202                                        <label><input id="plugin_enable" type="checkbox" name="disable" value="<!--{$plugin.plugin_id}-->" checked="checked" />有効</label><br/>
203                                    <!--{else}-->
204                                        <label><input id="plugin_enable" type="checkbox" name="enable" value="<!--{$plugin.plugin_id}-->" />有効にする</label><br/>
205                                    <!--{/if}-->
206
207                                    <!-- アップデートリンク押下時に表示する. -->
208                                    <div id="plugin_update_<!--{$plugin.plugin_id}-->" style="display: none">
209                                        <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}--> />
210                                        <a class="btn-action" href="javascript:;" onclick="update(<!--{$plugin.plugin_id}-->, '<!--{$plugin.plugin_code}-->'); return false;"><span class="btn-next">アップデート</span></a>
211                                    </div>
212                            </div>
213                    </td>
214                    <!--優先順位-->
215                    <td class="center">
216                        <span class="attention"><!--{$arrErr.priority[$plugin.plugin_id]}--></span>
217                        <input type="text" class="center" name="priority_<!--{$plugin.plugin_code}-->" value="<!--{$plugin.priority|h}-->" size="1" />
218                        <a class="btn-action" href="javascript:;" onclick="update_priority(<!--{$plugin.plugin_id}-->, '<!--{$plugin.plugin_code}-->'); return false;"><span class="btn-next">変更</span></a><br/>
219                        <span><!--{$plugin.priority_message}--></span>
220                    </td>
221                </tr>
222                <!--競合アラート-->
223                <!--{if $plugin.conflict_message != ""}-->
224                <tr>
225                    <td class="attention_fookpoint" colspan="3">
226                        <p class="attention"><!--{$plugin.conflict_message}--></p>
227                    </td>
228                </tr>
229                <!--{/if}-->
230                <!--{/section}-->
231            </table>
232        <!--{else}-->
233            <span>登録されているプラグインはありません。</span>
234        <!--{/if}-->
235    </div>
236</form>
Note: See TracBrowser for help on using the repository browser.