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

Revision 21539, 11.6 KB checked in by Seasoft, 12 years ago (diff)

#1613 (ソース整形・ソースコメントの改善)

  • 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-2011 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 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                <input type="file" name="<!--{ $key }-->" class="box45" size="43"  style="<!--{$arrErr[$key]|sfGetErrorColor}--> <!--{if $arrErr[$key]}--> background-color:<!--{$smarty.const.ERR_COLOR|h}--><!--{/if}-->">
130                <a class="btn-action" href="javascript:;" onclick="install(); return false;"><span class="btn-next">インストール</span></a>
131            </td>
132        </tr>
133    </table>
134
135    <!--▼プラグイン一覧ここから-->
136    <h2>プラグイン一覧</h2>
137    <!--{if count($plugins) > 0}-->
138        <span class="attention"><!--{$arrErr.plugin_error}--></span>
139        <table class="system-plugin" width="900">
140            <col width="10%" />
141            <col width="77" />
142            <col width="13%" />
143            <tr>
144                <th colspan="2">機能説明</th>
145                <th>優先度</th>
146            </tr>
147            <!--{section name=data loop=$plugins}-->
148            <!--{assign var=plugin value=$plugins[data]}-->
149            <tr <!--{if $plugin.enable == $smarty.const.PLUGIN_ENABLE_FALSE}--> style="background:#C9C9C9;" <!--{/if}-->>
150                <!--ロゴ-->
151                <td class="center plugin_img">
152                    <!--{if $plugin.plugin_site_url != '' }-->
153                        <a href="?" onclick="win03('<!--{$plugin.plugin_site_url|h}-->','plugin_site_url','620','760'); return false;"><img src="<!--{$smarty.const.ROOT_URLPATH}-->plugin/<!--{$plugin.plugin_code}-->/logo.png"width="65" height="65"/></a>&nbsp;
154                    <!--{else}-->
155                        <img src="<!--{$smarty.const.ROOT_URLPATH}-->plugin/<!--{$plugin.plugin_code}-->/logo.png"/>
156                    <!--{/if}-->
157
158                </td>
159                <!--機能説明-->
160                <td class="plugin_info">
161                        <!-- プラグイン名 -->
162                            <!-- ▼plugin_site_urlが設定されている場合はリンクとして表示 -->
163                            <span class="plugin_name">
164                            <!--{if $plugin.plugin_site_url != '' }-->
165                                <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;
166                            <!--{else}-->
167                                <sapn><!--{$plugin.plugin_name|default:$plugin.plugin_code|h}-->&nbsp;</sapn>
168                            <!--{/if}-->
169                            </span>
170                        <!-- プラグインバージョン -->
171                            <!--{if $plugin.plugin_version != ''}--><!--{$plugin.plugin_version|h}--><!--{/if}-->&nbsp;
172                        <!-- 作者 -->
173                            <!--{if $plugin.author != ''}-->
174                                <!-- ▼author_site_urlが設定されている場合はリンクとして表示 -->
175                                <!--{if $plugin.author_site_url != '' }-->
176                                    <span>(by <a href="?" onclick="win03('<!--{$plugin.author_site_url|h}-->','author_site_url','620','760'); return false;"><!--{$plugin.author|default:'-'|h}--></a>)</span>
177                                <!--{else}-->
178                                    <span>(by <!--{$plugin.author|default:'-'|h}-->)</span>
179                                <!--{/if}-->
180                            <!--{/if}-->
181                        <br />
182                        <!-- 説明 -->
183                            <p class="description"><!--{$plugin.plugin_description|default:'-'|h}--></p>
184                        <div>
185                            <span class="ec_cube_version">対応EC-CUBEバージョン :<!--{$plugin.compliant_version|default:'-'|h}--></span><br/>
186                            <span class="attention"><!--{$arrErr[$plugin.plugin_code]}--></span>
187                            <!-- 設定 -->
188                                <!--{if $plugin.config_flg == true && $plugin.status != $smarty.const.PLUGIN_STATUS_UPLOADED}-->
189                                    <a href="?" onclick="win03('<!--{$smarty.const.ROOT_URLPATH}-->plugin/<!--{$plugin.plugin_code}-->/config.php','plugin_setting','620','760'); return false;">プラグイン設定</a>&nbsp;|&nbsp;
190                                <!--{else}-->
191                                    <span>プラグイン設定&nbsp;|&nbsp;</span>
192                                <!--{/if}-->
193                            <!-- アップデート -->
194                                <a class="update_link" href="#" name="<!--{$plugin.plugin_id}-->">アップデート</a>&nbsp;|&nbsp;
195                            <!-- 削除 -->
196                                <a  href="javascript:;" name="uninstall" onclick="uninstall(<!--{$plugin.plugin_id}-->, '<!--{$plugin.plugin_code}-->'); return false;">削除</a>&nbsp;|&nbsp;
197                            <!-- 有効/無効 -->
198                                <!--{if $plugin.enable == $smarty.const.PLUGIN_ENABLE_TRUE}-->
199                                    <input id="plugin_enable" type="checkbox" name="disable" value="<!--{$plugin.plugin_id}-->" id="login_memory" checked="checked">有効</input><br/>
200                                <!--{else}-->
201                                    <input id="plugin_enable" type="checkbox" name="enable" value="<!--{$plugin.plugin_id}-->" id="login_memory">有効にする</input><br/>
202                                <!--{/if}-->
203
204                                <!-- アップデートリンク押下時に表示する. -->
205                                <div id="plugin_update_<!--{$plugin.plugin_id}-->" style="display: none">
206                                    <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}--> />
207                                    <a class="btn-action" href="javascript:;" onclick="update(<!--{$plugin.plugin_id}-->, '<!--{$plugin.plugin_code}-->'); return false;"><span class="btn-next">アップデート</span></a>
208                                </div>
209                        </div>
210                </td>
211                <!--優先順位-->
212                <td class="center">
213                    <span class="attention"><!--{$arrErr.priority[$plugin.plugin_id]}--></span>
214                    <input type="text" class="center" name="priority_<!--{$plugin.plugin_code}-->" value="<!--{$plugin.priority|h}-->" size="1" class="priority" />
215                    <a class="btn-action" href="javascript:;" onclick="priority(<!--{$plugin.plugin_id}-->, '<!--{$plugin.plugin_code}-->');return false;"><span class="btn-next">変更</span></a><br/>
216                </td>
217            </tr>
218            <!--競合アラート-->
219            <!--{if $plugin.conflict_message != ""}-->
220            <tr>
221                <td class="attention_fookpoint" colspan="3">
222                    <p class="attention"><!--{$plugin.conflict_message}--></p>
223                </td>
224            </tr>
225            <!--{/if}-->
226            <!--{/section}-->
227        </table>
228    <!--{else}-->
229        <span>登録されているプラグインはありません。</span>
230    <!--{/if}-->
231</div>
232</form>
Note: See TracBrowser for help on using the repository browser.