source: branches/version-2_11-dev/data/Smarty/templates/admin/products/index.tpl @ 21343

Revision 21343, 15.6 KB checked in by Seasoft, 12 years ago (diff)

#1526 (typo修正・ソース整形・ソースコメントの改善)

  • 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">
25// URLの表示非表示切り替え
26function lfnDispChange(){
27    inner_id = 'switch';
28
29    cnt = document.form1.item_cnt.value;
30
31    if($('#disp_url1').css("display") == 'none'){
32        for (i = 1; i <= cnt; i++) {
33            disp_id = 'disp_url'+i;
34            $('#' + disp_id).css("display", "");
35
36            disp_id = 'disp_cat'+i;
37            $('#' + disp_id).css("display", "none");
38
39            $('#' + inner_id).html('    URL <a href="#" onClick="lfnDispChange();"> &gt;&gt; カテゴリ表示<\/a>');
40        }
41    }else{
42        for (i = 1; i <= cnt; i++) {
43            disp_id = 'disp_url'+i;
44            $('#' + disp_id).css("display", "none");
45
46            disp_id = 'disp_cat'+i;
47            $('#' + disp_id).css("display", "");
48
49            $('#' + inner_id).html('    カテゴリ <a href="#" onClick="lfnDispChange();"> &gt;&gt; URL表示<\/a>');
50        }
51    }
52
53}
54
55</script>
56
57
58<div id="products" class="contents-main">
59<form name="search_form" id="search_form" method="post" action="?">
60    <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
61    <input type="hidden" name="mode" value="search" />
62    <h2>検索条件設定</h2>
63
64    <!--検索条件設定テーブルここから-->
65    <table>
66        <tr>
67            <th>商品ID</th>
68            <td colspan="3">
69                <!--{assign var=key value="search_product_id"}-->
70                <!--{if $arrErr[$key]}-->
71                    <span class="attention"><!--{$arrErr[$key]}--></span>
72                <!--{/if}-->
73                <input type="text" name="<!--{$key}-->" value="<!--{$arrForm[$key].value|h}-->" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" size="30" class="box30"/>
74            </td>
75        </tr>
76        <tr>
77            <th>商品コード</th>
78            <td>
79                <!--{assign var=key value="search_product_code"}-->
80                <!--{if $arrErr[$key]}-->
81                    <span class="attention"><!--{$arrErr[$key]}--></span>
82                <!--{/if}-->
83                <input type="text" name="<!--{$key}-->" value="<!--{$arrForm[$key].value|h}-->" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" size="30" class="box30" />
84            </td>
85            <th>商品名</th>
86            <td>
87                <!--{assign var=key value="search_name"}-->
88                <!--{if $arrErr[$key]}-->
89                    <span class="attention"><!--{$arrErr[$key]}--></span>
90                <!--{/if}-->
91                <input type="text" name="<!--{$key}-->" value="<!--{$arrForm[$key].value|h}-->" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" size="30" class="box30" />
92            </td>
93        </tr>
94        <tr>
95            <th>カテゴリ</th>
96            <td>
97                <!--{assign var=key value="search_category_id"}-->
98                <span class="attention"><!--{$arrErr[$key]}--></span>
99                <select name="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->">
100                <option value="">選択してください</option>
101                <!--{html_options options=$arrCatList selected=$arrForm[$key].value}-->
102                </select>
103            </td>
104            <th>種別</th>
105            <td>
106                <!--{assign var=key value="search_status"}-->
107                <span class="attention"><!--{$arrErr[$key]|h}--></span>
108                <!--{html_checkboxes name="$key" options=$arrDISP selected=$arrForm[$key].value}-->
109            </td>
110        </tr>
111        <tr>
112            <th>登録・更新日</th>
113            <td colspan="3">
114                <!--{if $arrErr.search_startyear || $arrErr.search_endyear}-->
115                    <span class="attention"><!--{$arrErr.search_startyear}--></span>
116                    <span class="attention"><!--{$arrErr.search_endyear}--></span>
117                <!--{/if}-->
118                <select name="search_startyear" style="<!--{$arrErr.search_startyear|sfGetErrorColor}-->">
119                <option value="">----</option>
120                <!--{html_options options=$arrStartYear selected=$arrForm.search_startyear.value}-->
121                </select>年
122                <select name="search_startmonth" style="<!--{$arrErr.search_startyear|sfGetErrorColor}-->">
123                <option value="">--</option>
124                <!--{html_options options=$arrStartMonth selected=$arrForm.search_startmonth.value}-->
125                </select>月
126                <select name="search_startday" style="<!--{$arrErr.search_startyear|sfGetErrorColor}-->">
127                <option value="">--</option>
128                <!--{html_options options=$arrStartDay selected=$arrForm.search_startday.value}-->
129                </select>日~
130                <select name="search_endyear" style="<!--{$arrErr.search_endyear|sfGetErrorColor}-->">
131                <option value="">----</option>
132                <!--{html_options options=$arrEndYear selected=$arrForm.search_endyear.value}-->
133                </select>年
134                <select name="search_endmonth" style="<!--{$arrErr.search_endyear|sfGetErrorColor}-->">
135                <option value="">--</option>
136                <!--{html_options options=$arrEndMonth selected=$arrForm.search_endmonth.value}-->
137                </select>月
138                <select name="search_endday" style="<!--{$arrErr.search_endyear|sfGetErrorColor}-->">
139                <option value="">--</option>
140                <!--{html_options options=$arrEndDay selected=$arrForm.search_endday.value}-->
141                </select>日
142            </td>
143        </tr>
144        <tr>
145            <th>商品ステータス</th>
146            <td colspan="3">
147            <!--{assign var=key value="search_product_statuses"}-->
148            <span class="attention"><!--{$arrErr[$key]|h}--></span>
149            <!--{html_checkboxes name="$key" options=$arrSTATUS selected=$arrForm[$key].value}-->
150            </td>
151        </tr>
152    </table>
153    <div class="btn">
154        <p class="page_rows">検索結果表示件数
155        <!--{assign var=key value="search_page_max"}-->
156        <!--{if $arrErr[$key]}-->
157            <span class="attention"><!--{$arrErr[$key]}--></span>
158        <!--{/if}-->
159        <select name="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->">
160            <!--{html_options options=$arrPageMax selected=$arrForm.search_page_max.value}-->
161        </select> 件</p>
162
163        <div class="btn-area">
164            <ul>
165                <li><a class="btn-action" href="javascript:;" onclick="fnFormModeSubmit('search_form', 'search', '', ''); return false;"><span class="btn-next">この条件で検索する</span></a></li>
166            </ul>
167        </div>
168
169    </div>
170    <!--検索条件設定テーブルここまで-->
171</form> 
172
173
174<!--{if count($arrErr) == 0 and ($smarty.post.mode == 'search' or $smarty.post.mode == 'delete')}-->
175
176<!--★★検索結果一覧★★-->
177<form name="form1" id="form1" method="post" action="?">
178    <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
179    <input type="hidden" name="mode" value="search" />
180    <input type="hidden" name="product_id" value="" />
181    <input type="hidden" name="category_id" value="" />
182    <!--{foreach key=key item=item from=$arrHidden}-->
183        <!--{if is_array($item)}-->
184            <!--{foreach item=c_item from=$item}-->
185            <input type="hidden" name="<!--{$key|h}-->[]" value="<!--{$c_item|h}-->" />
186            <!--{/foreach}-->
187        <!--{else}-->
188            <input type="hidden" name="<!--{$key|h}-->" value="<!--{$item|h}-->" />
189        <!--{/if}-->
190    <!--{/foreach}-->
191    <h2>検索結果一覧</h2>
192    <div class="btn">
193        <span class="attention"><!--検索結果数--><!--{$tpl_linemax}-->件</span>&nbsp;が該当しました。
194        <!--検索結果-->
195        <!--{if $smarty.const.ADMIN_MODE == '1'}-->
196            <a class="btn-normal" href="javascript:;" onclick="fnModeSubmit('delete_all','',''); return false;">検索結果をすべて削除</a>
197        <!--{/if}-->
198        <a class="btn-tool" href="javascript:;" onclick="fnModeSubmit('csv','',''); return false;">CSV ダウンロード</a>
199        <a class="btn-tool" href="../contents/csv.php?tpl_subno_csv=product">CSV 出力項目設定</a>
200    </div>
201    <!--{if count($arrProducts) > 0}-->
202
203        <!--{include file=$tpl_pager}-->
204
205        <!--検索結果表示テーブル-->
206        <table class="list" id="products-search-result">
207            <col width="5%" />
208            <col width="8%" />
209            <col width="8%" />
210            <col width="8%" />
211            <col width="25%" />
212            <col width="8%" />
213            <col width="8%" />
214            <col width="5%" />
215            <col width="5%" />
216            <col width="5%" />
217            <col width="5%" />
218            <col width="5%" />
219            <tr>
220                <th rowspan="2">商品ID</th>
221                <th rowspan="2">商品画像</th>
222                <th rowspan="2">商品コード</th>
223                <th rowspan="2">価格(円)</th>
224                <th>商品名</th>
225                <th rowspan="2">在庫</th>
226                <th rowspan="2">種別</th>
227                <th rowspan="2">編集</th>
228                <th rowspan="2">確認</th>
229                <!--{if $smarty.const.OPTION_CLASS_REGIST == 1}-->
230                <th rowspan="2">規格</th>
231                <!--{/if}-->
232                <th rowspan="2">削除</th>
233                <th rowspan="2">複製</th>
234            </tr>
235            <tr>
236                <th nowrap><a href="#" onClick="lfnDispChange(); return false;">カテゴリ ⇔ URL</a></th>
237            </tr>
238
239            <!--{section name=cnt loop=$arrProducts}-->
240                <!--▼商品<!--{$smarty.section.cnt.iteration}-->-->
241                <!--{assign var=status value="`$arrProducts[cnt].status`"}-->
242                <tr style="background:<!--{$arrPRODUCTSTATUS_COLOR[$status]}-->;">
243                    <td class="id" rowspan="2"><!--{$arrProducts[cnt].product_id}--></td>
244                    <td class="thumbnail" rowspan="2">
245                    <img src="<!--{$smarty.const.ROOT_URLPATH}-->resize_image.php?image=<!--{$arrProducts[cnt].main_list_image|sfNoImageMainList|h}-->&amp;width=65&amp;height=65">            </td>
246                    <td rowspan="2"><!--{$arrProducts[cnt].product_code_min|h}-->
247                        <!--{if $arrProducts[cnt].product_code_min != $arrProducts[cnt].product_code_max}-->
248                            <br />~ <!--{$arrProducts[cnt].product_code_max|h}-->
249                        <!--{/if}-->
250                    </td>
251                    <!--{* 価格 *}-->
252                    <td rowspan="2" class="right">
253                        <!--{$arrProducts[cnt].price02_min|number_format}-->
254                        <!--{if $arrProducts[cnt].price02_min != $arrProducts[cnt].price02_max}-->
255                            <br />~ <!--{$arrProducts[cnt].price02_max|number_format}-->
256                        <!--{/if}-->            </td>
257                    <td><!--{$arrProducts[cnt].name|h}--></td>
258                    <!--{* 在庫 *}-->
259                    <!--{* XXX 複数規格でかつ、全ての在庫数量が等しい場合は先頭に「各」と入れたれたら良いと思う。 *}-->
260                    <td class="menu" rowspan="2">
261                        <!--{if $arrProducts[cnt].stock_unlimited_min}-->無制限<!--{else}--><!--{$arrProducts[cnt].stock_min|number_format}--><!--{/if}-->
262                        <!--{if $arrProducts[cnt].stock_unlimited_min != $arrProducts[cnt].stock_unlimited_max || $arrProducts[cnt].stock_min != $arrProducts[cnt].stock_max}-->
263                            <br />~ <!--{if $arrProducts[cnt].stock_unlimited_max}-->無制限<!--{else}--><!--{$arrProducts[cnt].stock_max|number_format}--><!--{/if}-->
264                        <!--{/if}-->            </td>
265                    <!--{* 表示 *}-->
266                    <!--{assign var=key value=$arrProducts[cnt].status}-->
267                    <td class="menu" rowspan="2"><!--{$arrDISP[$key]}--></td>
268                    <td class="menu" rowspan="2"><span class="icon_edit"><a href="<!--{$smarty.const.ROOT_URLPATH}-->" onclick="fnChangeAction('./product.php'); fnModeSubmit('pre_edit', 'product_id', <!--{$arrProducts[cnt].product_id}-->); return false;" >編集</a></span></td>
269                    <td class="menu" rowspan="2"><span class="icon_confirm"><a href="<!--{$smarty.const.HTTP_URL|sfTrimURL}-->/products/detail.php?product_id=<!--{$arrProducts[cnt].product_id}-->&amp;admin=on" target="_blank">確認</a></span></td>
270                    <!--{if $smarty.const.OPTION_CLASS_REGIST == 1}-->
271                    <td class="menu" rowspan="2"><span class="icon_class"><a href="<!--{$smarty.const.ROOT_URLPATH}-->" onclick="fnChangeAction('./product_class.php'); fnModeSubmit('pre_edit', 'product_id', <!--{$arrProducts[cnt].product_id}-->); return false;" >規格</a></span></td>
272                    <!--{/if}-->
273                    <td class="menu" rowspan="2"><span class="icon_delete"><a href="<!--{$smarty.const.ROOT_URLPATH}-->" onclick="fnSetFormValue('category_id', '<!--{$arrProducts[cnt].category_id}-->'); fnModeSubmit('delete', 'product_id', <!--{$arrProducts[cnt].product_id}-->); return false;">削除</a></span></td>
274                    <td class="menu" rowspan="2"><span class="icon_copy"><a href="<!--{$smarty.const.ROOT_URLPATH}-->" onclick="fnChangeAction('./product.php'); fnModeSubmit('copy', 'product_id', <!--{$arrProducts[cnt].product_id}-->); return false;" >複製</a></span></td>
275                </tr>
276                <tr style="background:<!--{$arrPRODUCTSTATUS_COLOR[$status]}-->;">
277                    <td>
278                        <!--{* カテゴリ名 *}-->
279                        <div id="disp_cat<!--{$smarty.section.cnt.iteration}-->" style="display:<!--{$cat_flg}-->">
280                            <!--{foreach from=$arrProducts[cnt].categories item=category_id name=categories}-->
281                                <!--{$arrCatList[$category_id]|sfTrim}-->
282                                <!--{if !$smarty.foreach.categories.last}--><br /><!--{/if}-->
283                            <!--{/foreach}-->
284                        </div>
285
286                        <!--{* URL *}-->
287                        <div id="disp_url<!--{$smarty.section.cnt.iteration}-->" style="display:none">
288                            <!--{$smarty.const.HTTP_URL|sfTrimURL}-->/products/detail.php?product_id=<!--{$arrProducts[cnt].product_id}-->
289                        </div>
290                    </td>
291                </tr>
292                <!--▲商品<!--{$smarty.section.cnt.iteration}-->-->
293            <!--{/section}-->
294        </table>
295        <input type="hidden" name="item_cnt" value="<!--{$arrProducts|@count}-->" />
296        <!--検索結果表示テーブル-->
297    <!--{/if}-->
298
299</form>
300
301<!--★★検索結果一覧★★-->       
302<!--{/if}-->
303</div>
Note: See TracBrowser for help on using the repository browser.