source: trunk/data/Smarty/templates/default/admin/order/product_select.tpl @ 18758

Revision 18758, 10.7 KB checked in by kajiwara, 14 years ago (diff)

EC-CUBE Ver2.4.4 分コミット。詳細はこちら( http://www.ec-cube.net/release/detail.php?release_id=223

Line 
1<!--{*
2/*
3 * This file is part of EC-CUBE
4 *
5 * Copyright(c) 2000-2010 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<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
26<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
27
28<head>
29<meta http-equiv="content-type" content="application/xhtml+xml; charset=<!--{$smarty.const.CHAR_CODE}-->" />
30<meta http-equiv="content-script-type" content="text/javascript" />
31<meta http-equiv="content-style-type" content="text/css" />
32<link rel="stylesheet" href="<!--{$smarty.const.URL_ADMIN_CSS}-->common.css" type="text/css" media="all" />
33<script type="text/javascript" src="<!--{$TPL_DIR}-->js/css.js"></script>
34<script type="text/javascript" src="<!--{$TPL_DIR}-->js/navi.js"></script>
35<script type="text/javascript" src="<!--{$TPL_DIR}-->js/win_op.js"></script>
36<script type="text/javascript" src="<!--{$TPL_DIR}-->js/site.js"></script>
37<script type="text/javascript" src="<!--{$TPL_DIR}-->js/admin.js"></script>
38<script type="text/javascript">
39<!--
40self.moveTo(20,20);self.focus();
41
42function func_submit( product_id, class_name1, class_name2 ){
43    var err_text = '';
44    var fm = window.opener.document.form1;
45    var fm1 = window.opener.document;
46    var class1 = "classcategory_id" + product_id + "_1";
47    var class2 = "classcategory_id" + product_id + "_2";
48
49    var class1_id = document.getElementById(class1).value;
50    var class2_id = document.getElementById(class2).value;
51
52    <!--{if $tpl_no != ''}-->
53        var opner_product_id = 'edit_product_id';
54        var opner_classcategory_id1 = 'edit_classcategory_id1';
55        var opner_classcategory_id2 = 'edit_classcategory_id2';
56        fm1.getElementById("no").value = <!--{$tpl_no}-->;
57    <!--{else}-->
58        var opner_product_id = 'add_product_id';
59        var opner_classcategory_id1 = 'add_classcategory_id1';
60        var opner_classcategory_id2 = 'add_classcategory_id2';
61    <!--{/if}-->
62
63    if (document.getElementById(class1).type == 'select-one' && class1_id == '') {
64        err_text = class_name1 + "を選択してください。\n";
65    }
66    if (document.getElementById(class2).type == 'select-one' && class2_id == '') {
67        err_text = err_text + class_name2 + "を選択してください。\n";
68    }
69    if (err_text != '') {
70        alert(err_text);
71        return false;
72    }
73
74    fm1.getElementById(opner_product_id).value = product_id;
75    if (class1_id != '') {
76        fm1.getElementById(opner_classcategory_id1).value = class1_id;
77    }
78    if (class2_id != '') {
79        fm1.getElementById(opner_classcategory_id2).value = class2_id;
80    }
81
82    fm.mode.value = 'select_product_detail';
83    fm.anchor_key.value = 'order_products';
84    fm.submit();
85    window.close();
86
87    return true;
88}
89//-->
90</script>
91
92<script type="text/javascript">//<![CDATA[
93// セレクトボックスに項目を割り当てる。
94function lnSetSelect(name1, name2, id, val) {
95    sele1 = document.form1[name1];
96    sele2 = document.form1[name2];
97    lists = eval('lists' + id);
98    vals = eval('vals' + id);
99
100    if(sele1 && sele2) {
101        index = sele1.selectedIndex;
102
103        // セレクトボックスのクリア
104        count = sele2.options.length;
105        for(i = count; i >= 0; i--) {
106            sele2.options[i] = null;
107        }
108
109        // セレクトボックスに値を割り当てる
110        len = lists[index].length;
111        for(i = 0; i < len; i++) {
112            sele2.options[i] = new Option(lists[index][i], vals[index][i]);
113            if(val != "" && vals[index][i] == val) {
114                sele2.options[i].selected = true;
115            }
116        }
117    }
118}
119//]]>
120</script>
121
122
123<script type="text/javascript">//<![CDATA[
124    <!--{$tpl_javascript}-->
125//]]>
126</script>
127
128<title>ECサイト管理者ページ</title>
129</head>
130
131
132<body bgcolor="#ffffff" text="#666666" link="#007bb7" vlink="#007bb7" alink="#cc0000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
133<noscript>
134<link rel="stylesheet" href="<!--{$smarty.const.URL_ADMIN_CSS}-->common.css" type="text/css" />
135</noscript>
136
137<!--▼CONTENTS-->
138<div align="center">
139 
140<!--▼検索フォーム-->
141<form name="form1" id="form1" method="post" action="<!--{$smarty.server.REQUEST_URI|escape}-->">
142<input name="mode" type="hidden" value="search">
143<input name="anchor_key" type="hidden" value="">
144<input name="search_pageno" type="hidden" value="">
145<table bgcolor="#cccccc" width="420" border="0" cellspacing="1" cellpadding="5" summary=" ">
146    <tr class="fs12n">
147        <td bgcolor="#f0f0f0" width="100">カテゴリ</td>
148        <td bgcolor="#ffffff" width="287"><select name="search_category_id">
149        <option value="" selected="selected">選択してください</option>
150        <!--{html_options options=$arrCatList selected=$arrForm.search_category_id}-->
151        </select>
152        </td>
153    </tr>
154    <tr class="fs12n">
155        <td bgcolor="#f0f0f0">商品名</td>
156        <td bgcolor="#ffffff"><input type="text" name="search_name" value="<!--{$arrForm.search_name}-->" size="35" class="box35" /></td>
157    </tr>
158    <tr class="fs12n">
159        <td bgcolor="#f0f0f0">商品番号</td>
160        <td bgcolor="#ffffff"><input type="text" name="search_product_code" value="<!--{$arrForm.search_product_code}-->" size="35" class="box35" /></td>
161    </tr>
162</table>
163<br />
164<input type="submit" name="subm" value="検索を開始" />
165<br />
166<br />
167
168    <!--▼検索結果表示-->
169    <!--{if $tpl_linemax}-->
170    <table width="420" border="0" cellspacing="0" cellpadding="0" summary=" " bgcolor="#FFFFFF">
171        <tr class="fs12">
172            <td align="left"><!--{$tpl_linemax}-->件が該当しました。 </td>
173        </tr>
174        <tr class="fs12">
175            <td align="center">
176            <!--▼ページナビ-->
177            <!--{$tpl_strnavi}-->
178            <!--▲ページナビ-->
179            </td>
180        </tr>
181        <tr><td height="10"></td></tr>
182    </table>
183
184    <!--▼検索後表示部分-->
185    <table width="420" border="0" cellspacing="1" cellpadding="5" bgcolor="#cccccc">
186        <tr bgcolor="#f0f0f0" align="center" class="fs12">
187            <td>商品画像</td>
188            <td>商品番号</td>
189            <td>商品名</td>
190            <td>決定</td>
191        </tr>
192        <!--{section name=cnt loop=$arrProducts}-->
193        <!--{assign var=id value=$arrProducts[cnt].product_id}-->
194        <!--▼商品<!--{$smarty.section.cnt.iteration}-->-->
195        <tr bgcolor="#FFFFFF" class="fs12n">
196            <td width="90" align="center">
197            <!--{if $arrProducts[cnt].main_list_image != ""}-->
198                <!--{assign var=image_path value="`$arrProducts[cnt].main_list_image`"}-->
199            <!--{else}-->
200                <!--{assign var=image_path value="`$smarty.const.NO_IMAGE_DIR`"}-->
201            <!--{/if}-->
202            <img src="<!--{$smarty.const.SITE_URL}-->resize_image.php?image=<!--{$image_path}-->&width=65&height=65" alt="<!--{$arrRecommend[$recommend_no].name|escape}-->">
203            </td>
204            <td>
205            <!--{$arrProducts[cnt].name|escape}-->
206
207            <!--{assign var=codemin value=`$arrProducts[cnt].product_code_min`}-->
208            <!--{assign var=codemax value=`$arrProducts[cnt].product_code_max`}-->
209            <!--{* 商品コード *}-->
210                <!--{if $codemin != $codemax}-->
211                    <!--{$codemin|escape}-->〜<!--{$codemax|escape}-->
212                <!--{else}-->
213                    <!--{$codemin|escape}-->
214                <!--{/if}-->
215            </td>
216            <td>
217                <!--{$arrProducts[cnt].name|escape}-->
218
219                <!--{assign var=class1 value=classcategory_id`$id`_1}-->
220                <!--{assign var=class2 value=classcategory_id`$id`_2}-->
221                <!--{if $tpl_classcat_find1[$id]}-->
222                <dt><!--{$tpl_class_name1[$id]|escape}-->:</dt>
223                <dd>
224                    <select name="<!--{$class1}-->" id="<!--{$class1}-->" style="<!--{$arrErr[$class1]|sfGetErrorColor}-->" <!--{if $tpl_classcat_find2[$id]}--> onchange="lnSetSelect('<!--{$class1}-->', '<!--{$class2}-->', '<!--{$id}-->','');"<!--{/if}-->>
225                    <option value="">選択してください</option>
226                    <!--{html_options options=$arrClassCat1[$id] selected=$arrForm[$class1]}-->
227                    </select>
228                    <!--{if $arrErr[$class1] != ""}-->
229                    <br /><span class="attention">※ <!--{$tpl_class_name1[$id]}-->を入力して下さい。</span>
230                    <!--{/if}-->
231                </dd>
232                <!--{else}-->
233                <input type="hidden" name="<!--{$class1}-->" id="<!--{$class1}-->" value="">
234                <!--{/if}-->
235                <!--{if $tpl_classcat_find2[$id]}-->
236                    <dt><!--{$tpl_class_name2[$id]|escape}-->:</dt>
237                    <dd>
238                        <select name="<!--{$class2}-->" id="<!--{$class2}-->" style="<!--{$arrErr[$class2]|sfGetErrorColor}-->">
239                        <option value="">選択してください</option>
240                        </select>
241                        <!--{if $arrErr[$class2] != ""}-->
242                        <br /><span class="attention">※ <!--{$tpl_class_name2[$id]}-->を入力して下さい。</span>
243                        <!--{/if}-->
244                    </dd>
245                <!--{else}-->
246                    <input type="hidden" name="<!--{$class2}-->" id="<!--{$class2}-->" value="">
247                <!--{/if}-->
248            </td>
249
250            <td align="center"><a href="" onclick="return func_submit('<!--{$arrProducts[cnt].product_id}-->', '<!--{$tpl_class_name1[$id]}-->', '<!--{$tpl_class_name2[$id]}-->')">決定</a></td>
251        </tr>
252        <!--▲商品<!--{$smarty.section.cnt.iteration}-->-->
253        <!--{sectionelse}-->
254        <tr bgcolor="#FFFFFF" class="fs10n">
255            <td colspan="4">商品が登録されていません</td>
256        </tr>
257        <!--{/section}-->
258    </table>
259    <br />
260    <br />
261    <!--{/if}-->
262    <!--▲検索結果表示-->
263
264</form>
265
266</div>
267<!--▲CONTENTS-->
268</body>
269</html>
Note: See TracBrowser for help on using the repository browser.