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

Revision 21455, 10.2 KB checked in by h_yoshimoto, 12 years ago (diff)

#1603 #1632 プラグインの管理画面を作成しました。それに伴うエンジン部分の修正。

  • 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<script type="text/javascript">//<![CDATA[
25    $(function() {
26
27        $('input[id^=plugin_enable]').click(function(event) {
28            var data = {};
29           
30            // モード(有効 or 無効)
31            data.mode = event.target.name;
32            // プラグインID
33            data.plugin_id = event.target.value;
34            data['<!--{$smarty.const.TRANSACTION_ID_NAME}-->'] = '<!--{$transactionid}-->';
35            $.ajax({
36                type : 'POST',
37                url : location.pathname,
38                dataType : "json",
39                data: data,
40                cache : false,
41                error : remoteException,
42                success : function(data, dataType) {
43                        alert(data.message);
44                        location.href = location.pathname;
45                }
46            });
47        });
48
49        /**
50         * 通信エラー表示.
51         */
52        function remoteException(XMLHttpRequest, textStatus, errorThrown) {
53            alert('通信中にエラーが発生しました。');
54        }
55
56    $('.update_link').click(function(event) {
57        var plugin_id = event.target.name;
58        $('div[id="plugin_update_' + plugin_id + '"]').toggle("slow");
59        });
60    });
61
62
63    function removeUpdateFile(select_id) {
64        $('input[name="update_plugin_file"]').attr("disabled", "disabled");
65        $('input[id="' + select_id + '"]').removeAttr("disabled");
66    }
67//]]>
68</script>
69
70<!--<form name="form1" id="form1" method="post" action="?">-->
71<form name="form1" method="post" action="?" enctype="multipart/form-data">
72<input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
73<input type="hidden" name="mode" value="" />
74<input type="hidden" name="plugin_id" value="" />
75<input type="hidden" name="plugin_code" value="" />
76
77<div id="system" class="contents-main">
78
79    <h2>プラグイン登録</h2>
80    <table class="form">
81        <tr>
82            <th>プラグイン<span class="attention"> *</span></th>
83            <td>
84                <!--{assign var=key value="plugin_file"}-->
85                <span class="attention"><!--{$arrErr[$key]}--></span>
86                <input type="file" name="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" class="box45" size="43" <!--{if $arrErr[$key]}-->style="background-color:<!--{$smarty.const.ERR_COLOR|h}-->"<!--{/if}--> >
87                <a class="btn-action" href="javascript:;" onclick="fnModeSubmit('install', '', '');return false;"><span class="btn-next">インストール</span></a>
88            </td>
89        </tr>
90    </table>
91
92    <!--▼プラグイン一覧ここから-->
93    <h2>プラグイン一覧</h2>
94    <!--{if count($plugins) > 0}-->
95        <span class="attention"><!--{$arrErr.plugin_error}--><!--{$arrErr.update_plugin_file}--></span>
96        <table class="system-plugin" width="900">
97            <col width="10%" />
98            <col width="80%" />
99            <col width="10%" />
100            <tr>
101                <th colspan="2">機能説明</th>
102                <th>優先度<a class="btn-action" href="javascript:;" onclick="fnModeSubmit('priority','','');return false;"><span class="btn-next">反映</span></a></th>
103            </tr>
104            <!--{section name=data loop=$plugins}-->
105            <tr <!--{if $plugins[data].enable == $smarty.const.PLUGIN_ENABLE_FALSE}--> style="background:#C9C9C9;" <!--{/if}-->>
106                <!--ロゴ-->
107                <td class="center plugin_img">
108                    <!--{if $plugins[data].plugin_site_url != '' }-->
109                        <a href="?" onclick="win03('<!--{$plugins[data].plugin_site_url|h}-->','plugin_site_url','620','760'); return false;"><img src="<!--{$smarty.const.HTTP_URL}-->plugin/<!--{$plugins[data].plugin_code}-->/logo.png"/></a>&nbsp;
110                    <!--{else}-->
111                        <img src="<!--{$smarty.const.HTTP_URL}-->plugin/<!--{$plugins[data].plugin_code}-->/logo.png"/>
112                    <!--{/if}-->
113
114                </td>
115                <!--機能説明-->
116                <td class="plugin_info">
117                   
118                        <!-- プラグイン名 -->
119                            <!-- ▼plugin_site_urlが設定されている場合はリンクとして表示 -->
120                            <span class="plugin_name">
121                            <!--{if $plugins[data].plugin_site_url != '' }-->
122                                <a href="?" onclick="win03('<!--{$plugins[data].plugin_site_url|h}-->','plugin_site_url','620','760'); return false;"><!--{$plugins[data].plugin_name|default:$plugins[data].plugin_code|h}--></a>&nbsp;
123                            <!--{else}-->
124                                <!--{$plugins[data].plugin_name|default:$plugins[data].plugin_code|h}-->&nbsp;
125                            <!--{/if}-->
126                            </span>
127                        <!-- プラグインバージョン -->
128                            <!--{if $plugins[data].plugin_version != ''}--><!--{$plugins[data].plugin_version|h}--><!--{/if}-->&nbsp;
129                        <!-- 作者 -->
130                            <!--{if $plugins[data].author != ''}-->
131                                <!-- ▼author_site_urlが設定されている場合はリンクとして表示 -->
132                                <!--{if $plugins[data].author_site_url != '' }-->
133                                    (by <a href="?" onclick="win03('<!--{$plugins[data].author_site_url|h}-->','author_site_url','620','760'); return false;"><!--{$plugins[data].author|default:'-'|h}--></a>)
134                                <!--{else}-->
135                                    (by <!--{$plugins[data].author|default:'-'|h}-->)
136                                <!--{/if}-->
137                            <!--{/if}-->
138                        <br />
139                   
140                    <p class="description"><!--{$plugins[data].plugin_description|default:'-'|h}--></p>
141                    <div>
142                        <span class="ec_cube_version">対応EC-CUBEバージョン :<!--{$plugins[data].compliant_version|default:'-'|h}--></span><br/>
143                        <!--{if $plugins[data].config_flg == true && $plugins[data].status != $smarty.const.PLUGIN_STATUS_UPLOADED}-->
144                            <a href="?" onclick="win03('<!--{$smarty.const.HTTP_URL}-->plugin/<!--{$plugins[data].plugin_code}-->/config.php','plugin_setting','620','760'); return false;">プラグイン設定</a>&nbsp;|&nbsp;
145                        <!--{else}-->
146                            プラグイン設定&nbsp;|&nbsp;
147                        <!--{/if}-->
148                        <!-- アップデート -->
149                            <a class="update_link" href="#" name="<!--{$plugins[data].plugin_id}-->">アップデート</a>&nbsp;|&nbsp;
150                        <!-- 削除 -->
151                            <a  href="javascript:;" name="uninstall" onclick="fnSetFormValue('plugin_id', '<!--{$plugins[data].plugin_id}-->'); fnModeSubmit('uninstall','plugin_code','<!--{$plugins[data].plugin_code}-->'); return false;">削除</a>&nbsp;|&nbsp;
152                        <!-- 有効/無効 -->
153                            <!--{if $plugins[data].enable == $smarty.const.PLUGIN_ENABLE_TRUE}-->
154                            <input id="plugin_enable" type="checkbox" name="disable" value="<!--{$plugins[data].plugin_id}-->" id="login_memory" checked="checked">有効</input><br/>
155                            <!--{else}-->
156                            <input id="plugin_enable" type="checkbox" name="enable" value="<!--{$plugins[data].plugin_id}-->" id="login_memory" onclick="fnSetFormValue('plugin_id', '<!--{$plugins[data].plugin_id}-->'); return false;">有効にする</input><br/>
157                            <!--{/if}-->
158                           
159                            <!-- アップデートリンク押下時に表示する. -->
160                            <div id="plugin_update_<!--{$plugins[data].plugin_id}-->" style="display: none">                               
161                                <input id="update_file_<!--{$plugins[data].plugin_id}-->" name="update_plugin_file" type="file" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" class="box30" size="30" <!--{if $arrErr[$key]}-->style="background-color:<!--{$smarty.const.ERR_COLOR|h}-->"<!--{/if}--> />
162                                <a class="btn-action" href="javascript:;" onclick="removeUpdateFile('update_file_<!--{$plugins[data].plugin_id}-->'); fnSetFormValue('plugin_id', '<!--{$plugins[data].plugin_id}-->'); fnModeSubmit('update','plugin_code','<!--{$plugins[data].plugin_code}-->');return false;"><span class="btn-next">アップデート</span></a>
163                            </div>
164                    </div>
165                </td>
166                <!--優先順位-->
167                <!--{assign var=key value="rank"}-->
168                <td class="center">
169                    <input type="text" name="priority[<!--{$plugins[data].plugin_id}-->]" value="<!--{$plugins[data].rank|h}-->" size="1" class="rank" /><br/>
170                </td>
171            </tr>
172            <!--{if $plugins[data].conflict_message != ""}-->
173            <tr>
174                <td class="attention_fookpoint" colspan="3">
175                    <span class="attention"><!--{$plugins[data].conflict_message}--></span>
176                </td>
177            </tr>
178            <!--{/if}-->
179           
180            <!--{/section}-->
181        </table>
182    <!--{else}-->
183        登録されているプラグインはありません。
184    <!--{/if}-->
185
186</div>
187</form>
Note: See TracBrowser for help on using the repository browser.