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

Revision 19715, 12.5 KB checked in by nanasess, 13 years ago (diff)

#382(管理画面XHTMLに変更)

  • UI を改善
  • Property svn:eol-style set to LF
  • 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-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<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="mode" value="search" />
61  <!--{foreach key=key item=item from=$arrHidden}-->
62  <!--{if $key == 'campaign_id' || $key == 'search_mode'}-->
63  <input type="hidden" name="<!--{$key}-->" value="<!--{$item|escape}-->" />
64  <!--{/if}-->
65  <!--{/foreach}-->
66  <h2>検索条件設定</h2>
67
68  <!--検索条件設定テーブルここから-->
69  <table>
70    <tr>
71      <th>商品ID</th>
72      <td>
73        <!--{if $arrErr.search_product_id}-->
74        <span class="attention"><!--{$arrErr.search_product_id}--></span>
75        <!--{/if}-->
76        <input type="text" name="search_product_id" value="<!--{$arrForm.search_product_id|escape}-->" size="30" class="box30" style="<!--{$arrErr.search_product_id|sfGetErrorColor}-->"/>
77      </td>
78            <th>規格名称</th>
79            <td>
80        <!--{if $arrErr.search_product_class_name}-->
81        <span class="attention"><!--{$arrErr.search_product_class_name}--></span>
82        <!--{/if}-->
83        <input type="text" name="search_product_class_name" value="<!--{$arrForm.search_product_class_name|escape}-->" size="30" class="box30"style="<!--{$arrErr.search_product_class_name|sfGetErrorColor}-->" />
84      </td>
85    </tr>
86    <tr>
87      <th>商品コード</th>
88      <td><input type="text" name="search_product_code" value="<!--{$arrForm.search_product_code|escape}-->" size="30" class="box30" /></td>
89      <th>商品名</th>
90      <td><input type="text" name="search_name" value="<!--{$arrForm.search_name|escape}-->" size="30" class="box30" /></td>
91    </tr>
92    <tr>
93      <th>カテゴリ</th>
94      <td>
95        <select name="search_category_id" style="<!--{if $arrErr.search_category_id != ""}-->background-color: <!--{$smarty.const.ERR_COLOR}-->;<!--{/if}-->">
96        <option value="">選択してください</option>
97        <!--{html_options options=$arrCatList selected=$arrForm.search_category_id}-->
98        </select>
99      </td>
100      <th>種別</th>
101      <td><!--{html_checkboxes name="search_status" options=$arrDISP selected=$arrForm.search_status}--></td>
102    </tr>
103    <tr>
104      <th>登録・更新日</th>
105      <td colspan="3">
106        <!--{if $arrErr.search_startyear || $arrErr.search_endyear}-->
107        <span class="attention"><!--{$arrErr.search_startyear}--></span>
108        <span class="attention"><!--{$arrErr.search_endyear}--></span>
109        <!--{/if}-->
110        <select name="search_startyear" style="<!--{$arrErr.search_startyear|sfGetErrorColor}-->">
111        <option value="">----</option>
112        <!--{html_options options=$arrStartYear selected=$arrForm.search_startyear}-->
113        </select>年
114        <select name="search_startmonth" style="<!--{$arrErr.search_startyear|sfGetErrorColor}-->">
115        <option value="">--</option>
116        <!--{html_options options=$arrStartMonth selected=$arrForm.search_startmonth}-->
117        </select>月
118        <select name="search_startday" style="<!--{$arrErr.search_startyear|sfGetErrorColor}-->">
119        <option value="">--</option>
120        <!--{html_options options=$arrStartDay selected=$arrForm.search_startday}-->
121        </select>日~
122        <select name="search_endyear" style="<!--{$arrErr.search_endyear|sfGetErrorColor}-->">
123        <option value="">----</option>
124        <!--{html_options options=$arrEndYear selected=$arrForm.search_endyear}-->
125        </select>年
126        <select name="search_endmonth" style="<!--{$arrErr.search_endyear|sfGetErrorColor}-->">
127        <option value="">--</option>
128        <!--{html_options options=$arrEndMonth selected=$arrForm.search_endmonth}-->
129        </select>月
130        <select name="search_endday" style="<!--{$arrErr.search_endyear|sfGetErrorColor}-->">
131        <option value="">--</option>
132        <!--{html_options options=$arrEndDay selected=$arrForm.search_endday}-->
133        </select>日
134      </td>
135    </tr>
136    <tr>
137      <th>ステータス</th>
138      <td colspan="3">
139      <!--{html_checkboxes name="search_product_flag" options=$arrSTATUS selected=$arrForm.search_product_flag}-->
140      </td>
141    </tr>
142  </table>
143  <div class="btn">
144    検索結果表示件数
145    <!--{assign var=key value="search_page_max"}-->
146    <!--{if $arrErr[$key]}-->
147    <span class="attention"><!--{$arrErr[$key]}--></span>
148    <!--{/if}-->
149    <select name="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->">
150    <!--{html_options options=$arrPageMax selected=$arrForm.search_page_max}-->
151    </select> 件
152    <button type="submit"><span>この条件で検索する</span></button>
153  </div>
154  <!--検索条件設定テーブルここまで-->
155</form> 
156
157
158<!--{if count($arrErr) == 0 and ($smarty.post.mode == 'search' or $smarty.post.mode == 'delete')}-->
159
160<!--★★検索結果一覧★★-->
161<form name="form1" id="form1" method="post" action="?">
162  <input type="hidden" name="mode" value="search" />
163  <input type="hidden" name="product_id" value="" />
164  <input type="hidden" name="category_id" value="" />
165  <!--{foreach key=key item=item from=$arrHidden}-->
166  <input type="hidden" name="<!--{$key}-->" value="<!--{$item|escape}-->" />
167  <!--{/foreach}--> 
168  <h2>検索結果一覧</h2>
169  <div class="btn">
170    <span class="attention"><!--検索結果数--><!--{$tpl_linemax}-->件</span>&nbsp;が該当しました。
171    <!--検索結果-->
172    <!--{if $smarty.const.ADMIN_MODE == '1'}-->
173    <button type="button" onclick="fnModeSubmit('delete_all','','');">検索結果をすべて削除</button>
174    <!--{/if}-->
175    <button type="button" onclick="fnModeSubmit('csv','','');">CSV ダウンロード</button>
176    <button type="button" onclick="location.href='../contents/csv.php?tpl_subno_csv=product'">CSV 出力項目設定</button>
177  </div>
178  <!--{include file=$tpl_pager}-->
179
180  <!--{if count($arrProducts) > 0}-->
181  <!--検索結果表示テーブル-->
182  <table class="list" id="products-search-result">
183    <tr>
184      <th rowspan="2">商品ID</th>
185      <th rowspan="2">商品画像</th>
186      <th rowspan="2">商品コード</th>
187      <th rowspan="2">価格(円)</th>
188      <th>商品名</th>
189      <th rowspan="2">在庫</th>
190      <th rowspan="2">種別</th>
191      <th rowspan="2">編集</th>
192      <th rowspan="2">確認</th>
193      <!--{if $smarty.const.OPTION_CLASS_REGIST == 1}-->
194      <th rowspan="2">規格</th>
195      <!--{/if}-->
196      <th rowspan="2">削除</th>
197      <th rowspan="2">複製</th>
198    </tr>
199    <tr>
200      <th><a href="#" onClick="lfnDispChange(); return false;">カテゴリ ⇔ URL</a></th>
201    </tr>
202
203    <!--{section name=cnt loop=$arrProducts}-->
204    <!--▼商品<!--{$smarty.section.cnt.iteration}-->-->
205    <!--{assign var=status value="`$arrProducts[cnt].status`"}-->
206    <tr style="background:<!--{$arrPRODUCTSTATUS_COLOR[$status]}-->;">
207      <td class="id" rowspan="2"><!--{$arrProducts[cnt].product_id}--></td>
208      <td class="thumbnail" rowspan="2">
209      <img src="<!--{$smarty.const.URL_DIR}-->resize_image.php?image=<!--{$arrProducts[cnt].main_list_image|sfNoImageMainList|escape}-->&amp;width=65&amp;height=65">
210      </td>
211      <td rowspan="2"><!--{$arrProducts[cnt].product_code_min|escape}-->
212        <!--{if $arrProducts[cnt].product_code_min != $arrProducts[cnt].product_code_max}-->
213          <br />~ <!--{$arrProducts[cnt].product_code_max|escape}-->
214        <!--{/if}-->
215      </td>
216      <!--{* 価格 *}-->
217      <td rowspan="2" class="right">
218        <!--{$arrProducts[cnt].price02_min|number_format}-->
219        <!--{if $arrProducts[cnt].price02_min != $arrProducts[cnt].price02_max}-->
220          <br />~ <!--{$arrProducts[cnt].price02_max|number_format}-->
221        <!--{/if}-->
222      </td>
223      <td><!--{$arrProducts[cnt].name|escape}--></td>
224      <!--{* 在庫 *}-->
225      <!--{* XXX 複数規格でかつ、全ての在庫数量が等しい場合は先頭に「各」と入れたれたら良いと思う。 *}-->
226      <td class="menu" rowspan="2">
227        <!--{if $arrProducts[cnt].stock_unlimited_min}-->無制限<!--{else}--><!--{$arrProducts[cnt].stock_min|number_format}--><!--{/if}-->
228        <!--{if $arrProducts[cnt].stock_unlimited_min != $arrProducts[cnt].stock_unlimited_max || $arrProducts[cnt].stock_min != $arrProducts[cnt].stock_max}-->
229          <br />~ <!--{if $arrProducts[cnt].stock_unlimited_max}-->無制限<!--{else}--><!--{$arrProducts[cnt].stock_max|number_format}--><!--{/if}-->
230        <!--{/if}-->
231      </td>
232      <!--{* 表示 *}-->
233      <!--{assign var=key value=$arrProducts[cnt].status}-->
234      <td class="menu" rowspan="2"><!--{$arrDISP[$key]}--></td>
235      <td class="menu" rowspan="2"><span class="icon_edit"><a href="<!--{$smarty.const.URL_DIR}-->" onclick="fnChangeAction('./product.php'); fnModeSubmit('pre_edit', 'product_id', <!--{$arrProducts[cnt].product_id}-->); return false;" >編集</a></span></td>
236      <td class="menu" rowspan="2"><span class="icon_confirm"><a href="<!--{$smarty.const.SITE_URL|sfTrimURL}-->/products/detail.php?product_id=<!--{$arrProducts[cnt].product_id}-->&amp;admin=on" target="_blank">確認</a></span></td>
237      <!--{if $smarty.const.OPTION_CLASS_REGIST == 1}-->
238      <td class="menu" rowspan="2"><span class="icon_class"><a href="<!--{$smarty.const.URL_DIR}-->" onclick="fnChangeAction('./product_class.php'); fnModeSubmit('pre_edit', 'product_id', <!--{$arrProducts[cnt].product_id}-->); return false;" >規格</a></span></td>
239      <!--{/if}-->
240      <td class="menu" rowspan="2"><span class="icon_delete"><a href="<!--{$smarty.const.URL_DIR}-->" onclick="fnSetFormValue('category_id', '<!--{$arrProducts[cnt].category_id}-->'); fnModeSubmit('delete', 'product_id', <!--{$arrProducts[cnt].product_id}-->); return false;">削除</a></span></td>
241      <td class="menu" rowspan="2"><span class="icon_copy"><a href="<!--{$smarty.const.URL_DIR}-->" onclick="fnChangeAction('./product.php'); fnModeSubmit('copy', 'product_id', <!--{$arrProducts[cnt].product_id}-->); return false;" >複製</a></span></td>
242    </tr>
243    <tr style="background:<!--{$arrPRODUCTSTATUS_COLOR[$status]}-->;">
244      <td>
245        <!--{* カテゴリ名 *}-->
246        <div id="disp_cat<!--{$smarty.section.cnt.iteration}-->" style="display:<!--{$cat_flg}-->">
247          <!--{foreach from=$arrProducts[cnt].categories item=category_id name=categories}-->
248            <!--{$arrCatList[$category_id]|sfTrim}-->
249            <!--{if !$smarty.foreach.categories.last}--><br /><!--{/if}-->
250          <!--{/foreach}-->
251        </div>
252
253        <!--{* URL *}-->
254        <div id="disp_url<!--{$smarty.section.cnt.iteration}-->" style="display:none">
255        <!--{$smarty.const.SITE_URL|sfTrimURL}-->/products/detail.php?product_id=<!--{$arrProducts[cnt].product_id}-->
256        </div>
257      </td>
258    </tr>
259    <!--▲商品<!--{$smarty.section.cnt.iteration}-->-->
260    <!--{/section}-->
261  </table>
262  <input type="hidden" name="item_cnt" value="<!--{$arrProducts|@count}-->" />
263  <!--検索結果表示テーブル-->
264  <!--{/if}-->
265
266</form>
267
268<!--★★検索結果一覧★★-->   
269<!--{/if}-->
270</div>
Note: See TracBrowser for help on using the repository browser.