source: branches/version-2_12-multilang/data/Smarty/templates/admin/products/index.tpl @ 22212

Revision 22212, 19.0 KB checked in by yomoro, 11 years ago (diff)

#1987 (国際化テンプレート:年月日のセレクトボックス廃止)

  • 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-2012 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">
26// URLの表示非表示切り替え
27function lfnDispChange(){
28    inner_id = 'switch';
29
30    cnt = document.form1.item_cnt.value;
31
32    if($('#disp_url1').css("display") == 'none'){
33        for (i = 1; i <= cnt; i++) {
34            disp_id = 'disp_url'+i;
35            $('#' + disp_id).css("display", "");
36
37            disp_id = 'disp_cat'+i;
38            $('#' + disp_id).css("display", "none");
39
40            $('#' + inner_id).html('    URL <a href="#" onClick="lfnDispChange();"> &gt;&gt; <!--{t string="tpl_578"}--><\/a>');
41        }
42    }else{
43        for (i = 1; i <= cnt; i++) {
44            disp_id = 'disp_url'+i;
45            $('#' + disp_id).css("display", "none");
46
47            disp_id = 'disp_cat'+i;
48            $('#' + disp_id).css("display", "");
49
50            $('#' + inner_id).html('    <!--{t string="tpl_191"}--> <a href="#" onClick="lfnDispChange();"> &gt;&gt; <!--{t string="tpl_579"}--><\/a>');
51        }
52    }
53
54}
55
56$(function(){
57    $.datepicker.setDefaults( $.datepicker.regional[ "<!--{$smarty.const.LANG_CODE}-->" ] );
58   
59    $( "#datepickersearch_start" ).datepicker({
60    beforeShowDay: function(date) {
61        if(date.getDay() == 0) {
62            return [true,"date-sunday"];
63        } else if(date.getDay() == 6){
64            return [true,"date-saturday"];
65        } else {
66            return [true];
67        }
68    },changeMonth: 'true'
69    ,changeYear: 'true'
70    ,onSelect: function(dateText, inst){
71        setDatesearch_start(dateText);
72    },
73    showButtonPanel: true,
74    beforeShow: showAdditionalButtonsearch_start,       
75    onChangeMonthYear: showAdditionalButtonsearch_start
76    });
77   
78    $("#datepickersearch_start").blur( function() {
79        var dateText = $(this).val();
80        setDatesearch_start(dateText);
81    });
82   
83    $( "#datepickersearch_end" ).datepicker({
84    beforeShowDay: function(date) {
85        if(date.getDay() == 0) {
86            return [true,"date-sunday"];
87        } else if(date.getDay() == 6){
88            return [true,"date-saturday"];
89        } else {
90            return [true];
91        }
92    },changeMonth: 'true'
93    ,changeYear: 'true'
94    ,onSelect: function(dateText, inst){
95        setDatesearch_end(dateText);
96    },
97    showButtonPanel: true,
98    beforeShow: showAdditionalButtonsearch_end,       
99    onChangeMonthYear: showAdditionalButtonsearch_end
100    });
101   
102    $("#datepickersearch_end").blur( function() {
103        var dateText = $(this).val();
104        setDatesearch_end(dateText);
105    });
106
107});
108
109var btn = $('<button class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" type="button">Clear</button>');
110
111var showAdditionalButtonsearch_start = function (input) {
112    setTimeout(function () {
113        var buttonPane = $(input)
114                 .datepicker("widget")
115                 .find(".ui-datepicker-buttonpane");
116        btn
117                .unbind("click")
118                .bind("click", function () {
119                    $.datepicker._clearDate(input);
120                    $("*[name=search_startyear]").val("");
121                    $("*[name=search_startmonth]").val("");
122                    $("*[name=search_startday]").val("");
123                });
124        btn.appendTo(buttonPane);
125    }, 1);
126};
127
128var showAdditionalButtonsearch_end = function (input) {
129    setTimeout(function () {
130        var buttonPane = $(input)
131                 .datepicker("widget")
132                 .find(".ui-datepicker-buttonpane");
133        btn
134                .unbind("click")
135                .bind("click", function () {
136                    $.datepicker._clearDate(input);
137                    $("*[name=search_endyear]").val("");
138                    $("*[name=search_endmonth]").val("");
139                    $("*[name=search_endday]").val("");
140                });
141        btn.appendTo(buttonPane);
142    }, 1);
143};
144
145function setDatesearch_start(dateText){
146var dates = dateText.split('/');
147$("*[name=search_startyear]").val(dates[0]);
148$("*[name=search_startmonth]").val(dates[1]);
149$("*[name=search_startday]").val(dates[2]);
150}
151
152function setDatesearch_end(dateText){
153var dates = dateText.split('/');
154$("*[name=search_endyear]").val(dates[0]);
155$("*[name=search_endmonth]").val(dates[1]);
156$("*[name=search_endday]").val(dates[2]);
157}
158</script>
159
160
161<div id="products" class="contents-main">
162<form name="search_form" id="search_form" method="post" action="?">
163    <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
164    <input type="hidden" name="mode" value="search" />
165    <h2><!--{t string="tpl_250"}--></h2>
166
167    <!--検索条件設定テーブルここから-->
168    <table>
169        <tr>
170            <th><!--{t string="tpl_577"}--></th>
171            <td colspan="3">
172                <!--{assign var=key value="search_product_id"}-->
173                <!--{if $arrErr[$key]}-->
174                    <span class="attention"><!--{$arrErr[$key]}--></span>
175                <!--{/if}-->
176                <input type="text" name="<!--{$key}-->" value="<!--{$arrForm[$key].value|h}-->" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" size="30" class="box30"/>
177            </td>
178        </tr>
179        <tr>
180            <th><!--{t string="tpl_192"}--></th>
181            <td>
182                <!--{assign var=key value="search_product_code"}-->
183                <!--{if $arrErr[$key]}-->
184                    <span class="attention"><!--{$arrErr[$key]}--></span>
185                <!--{/if}-->
186                <input type="text" name="<!--{$key}-->" value="<!--{$arrForm[$key].value|h}-->" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" size="30" class="box30" />
187            </td>
188            <th><!--{t string="tpl_189"}--></th>
189            <td>
190                <!--{assign var=key value="search_name"}-->
191                <!--{if $arrErr[$key]}-->
192                    <span class="attention"><!--{$arrErr[$key]}--></span>
193                <!--{/if}-->
194                <input type="text" name="<!--{$key}-->" value="<!--{$arrForm[$key].value|h}-->" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" size="30" class="box30" />
195            </td>
196        </tr>
197        <tr>
198            <th><!--{t string="tpl_191"}--></th>
199            <td>
200                <!--{assign var=key value="search_category_id"}-->
201                <span class="attention"><!--{$arrErr[$key]}--></span>
202                <select name="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->">
203                <option value=""><!--{t string="tpl_068"}--></option>
204                <!--{html_options options=$arrCatList selected=$arrForm[$key].value}-->
205                </select>
206            </td>
207            <th><!--{t string="tpl_256"}--></th>
208            <td>
209                <!--{assign var=key value="search_status"}-->
210                <span class="attention"><!--{$arrErr[$key]|h}--></span>
211                <!--{html_checkboxes name="$key" options=$arrDISP selected=$arrForm[$key].value}-->
212            </td>
213        </tr>
214        <tr>
215            <th><!--{t string="tpl_330"}--></th>
216            <td colspan="3">
217                <!--{if $arrErr.search_startyear || $arrErr.search_endyear}-->
218                    <span class="attention"><!--{$arrErr.search_startyear}--></span>
219                    <span class="attention"><!--{$arrErr.search_endyear}--></span>
220                <!--{/if}-->
221                <input id="datepickersearch_start" type="text" value="<!--{if $arrForm.search_startyear.value != "" && $arrForm.search_startmonth.value != "" && $arrForm.search_startday.value != ""}--><!--{$arrForm.search_startyear.value|h}-->/<!--{$arrForm.search_startmonth.value|h|string_format:'%02d'}-->/<!--{$arrForm.search_startday.value|h|string_format:'%02d'}--><!--{/if}-->" <!--{if $arrErr.search_startyear != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> />
222                <input type="hidden" name="search_startyear" value="<!--{$arrForm.search_startyear.value}-->" />
223                <input type="hidden" name="search_startmonth" value="<!--{$arrForm.search_startmonth.value}-->" />
224                <input type="hidden" name="search_startday" value="<!--{$arrForm.search_startday.value}-->" />
225                <!--{t string="-"}-->
226                <input id="datepickersearch_end" type="text" value="<!--{if $arrForm.search_endyear.value != "" && $arrForm.search_endmonth.value != "" && $arrForm.search_endday.value != ""}--><!--{$arrForm.search_endyear.value|h}-->/<!--{$arrForm.search_endmonth.value|h|string_format:'%02d'}-->/<!--{$arrForm.search_endday.value|h|string_format:'%02d'}--><!--{/if}-->" <!--{if $arrErr.search_endyear != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> />
227                <input type="hidden" name="search_endyear" value="<!--{$arrForm.search_endyear.value}-->" />
228                <input type="hidden" name="search_endmonth" value="<!--{$arrForm.search_endmonth.value}-->" />
229                <input type="hidden" name="search_endday" value="<!--{$arrForm.search_endday.value}-->" />
230            </td>
231        </tr>
232        <tr>
233            <th><!--{t string="tpl_554"}--></th>
234            <td colspan="3">
235            <!--{assign var=key value="search_product_statuses"}-->
236            <span class="attention"><!--{$arrErr[$key]|h}--></span>
237            <!--{html_checkboxes name="$key" options=$arrSTATUS selected=$arrForm[$key].value}-->
238            </td>
239        </tr>
240    </table>
241    <div class="btn">
242        <p class="page_rows"><!--{t string="tpl_251"}-->
243            <!--{assign var=key value="search_page_max"}-->
244            <!--{if $arrErr[$key]}-->
245                <span class="attention"><!--{$arrErr[$key]}--></span>
246            <!--{/if}-->
247            <!--{t string="record_prefix"}-->
248            <select name="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->">
249                <!--{html_options options=$arrPageMax selected=$arrForm.search_page_max.value}-->
250            </select>
251            <!--{t string="record_suffix"}-->
252        </p>
253
254        <div class="btn-area">
255            <ul>
256                <li><a class="btn-action" href="javascript:;" onclick="fnFormModeSubmit('search_form', 'search', '', ''); return false;"><span class="btn-next"><!--{t string="tpl_252"}--></span></a></li>
257            </ul>
258        </div>
259
260    </div>
261    <!--検索条件設定テーブルここまで-->
262</form>
263
264
265<!--{if count($arrErr) == 0 and ($smarty.post.mode == 'search' or $smarty.post.mode == 'delete')}-->
266
267<!--★★検索結果一覧★★-->
268<form name="form1" id="form1" method="post" action="?">
269    <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
270    <input type="hidden" name="mode" value="search" />
271    <input type="hidden" name="product_id" value="" />
272    <input type="hidden" name="category_id" value="" />
273    <!--{foreach key=key item=item from=$arrHidden}-->
274        <!--{if is_array($item)}-->
275            <!--{foreach item=c_item from=$item}-->
276            <input type="hidden" name="<!--{$key|h}-->[]" value="<!--{$c_item|h}-->" />
277            <!--{/foreach}-->
278        <!--{else}-->
279            <input type="hidden" name="<!--{$key|h}-->" value="<!--{$item|h}-->" />
280        <!--{/if}-->
281    <!--{/foreach}-->
282    <h2><!--{t string="tpl_253"}--></h2>
283    <div class="btn">
284        <!--検索結果数--><!--{t string="tpl_230" T_FIELD=$tpl_linemax}-->
285        <!--検索結果-->
286        <!--{if $smarty.const.ADMIN_MODE == '1'}-->
287            <a class="btn-normal" href="javascript:;" onclick="fnModeSubmit('delete_all','',''); return false;"><!--{t string="tpl_327"}--></a>
288        <!--{/if}-->
289        <a class="btn-tool" href="javascript:;" onclick="fnModeSubmit('csv','',''); return false;"><!--{t string="tpl_254"}--></a>
290        <a class="btn-tool" href="../contents/csv.php?tpl_subno_csv=product"><!--{t string="tpl_255"}--></a>
291    </div>
292    <!--{if count($arrProducts) > 0}-->
293
294        <!--{include file=$tpl_pager}-->
295
296        <!--検索結果表示テーブル-->
297        <table class="list" id="products-search-result">
298            <col width="8%" />
299            <col width="9%" />
300            <col width="9%" />
301            <col width="8%" />
302            <col width="25%" />
303            <col width="8%" />
304            <col width="8%" />
305            <col width="5%" />
306            <col width="5%" />
307            <col width="5%" />
308            <col width="5%" />
309            <col width="5%" />
310            <tr>
311                <th rowspan="2"><!--{t string="tpl_577"}--></th>
312                <th rowspan="2"><!--{t string="tpl_195"}--></th>
313                <th rowspan="2"><!--{t string="tpl_192"}--></th>
314                <th rowspan="2"><!--{t string="tpl_580"}--></th>
315                <th><!--{t string="tpl_189"}--></th>
316                <th rowspan="2"><!--{t string="tpl_581"}--></th>
317                <th rowspan="2"><!--{t string="tpl_256"}--></th>
318                <th rowspan="2"><!--{t string="tpl_003"}--></th>
319                <th rowspan="2"><!--{t string="tpl_318"}--></th>
320                <!--{if $smarty.const.OPTION_CLASS_REGIST == 1}-->
321                <th rowspan="2"><!--{t string="tpl_582"}--></th>
322                <!--{/if}-->
323                <th rowspan="2"><!--{t string="tpl_004"}--></th>
324                <th rowspan="2"><!--{t string="tpl_583"}--></th>
325            </tr>
326            <tr>
327                <th nowrap><a href="#" onClick="lfnDispChange(); return false;"><!--{t string="tpl_584"}--></a></th>
328            </tr>
329
330            <!--{section name=cnt loop=$arrProducts}-->
331                <!--▼商品<!--{$smarty.section.cnt.iteration}-->-->
332                <!--{assign var=status value="`$arrProducts[cnt].status`"}-->
333                <tr style="background:<!--{$arrPRODUCTSTATUS_COLOR[$status]}-->;">
334                    <td class="id" rowspan="2"><!--{$arrProducts[cnt].product_id}--></td>
335                    <td class="thumbnail" rowspan="2">
336                    <img src="<!--{$smarty.const.ROOT_URLPATH}-->resize_image.php?image=<!--{$arrProducts[cnt].main_list_image|sfNoImageMainList|h}-->&amp;width=65&amp;height=65">            </td>
337                    <td rowspan="2"><!--{$arrProducts[cnt].product_code_min|h}-->
338                        <!--{if $arrProducts[cnt].product_code_min != $arrProducts[cnt].product_code_max}-->
339                            <br /><!--{t string="-"}--> <!--{$arrProducts[cnt].product_code_max|h}-->
340                        <!--{/if}-->
341                    </td>
342                    <!--{* 価格 *}-->
343                    <td rowspan="2" class="right">
344                        <!--{$arrProducts[cnt].price02_min|number_format}-->
345                        <!--{if $arrProducts[cnt].price02_min != $arrProducts[cnt].price02_max}-->
346                            <br /><!--{t string="-"}--> <!--{$arrProducts[cnt].price02_max|number_format}-->
347                        <!--{/if}-->            </td>
348                    <td><!--{$arrProducts[cnt].name|h}--></td>
349                    <!--{* 在庫 *}-->
350                    <!--{* XXX 複数規格でかつ、全ての在庫数量が等しい場合は先頭に「各」と入れたれたら良いと思う。 *}-->
351                    <td class="menu" rowspan="2">
352                        <!--{if $arrProducts[cnt].stock_unlimited_min}--><!--{t string="tpl_053"}--><!--{else}--><!--{$arrProducts[cnt].stock_min|number_format}--><!--{/if}-->
353                        <!--{if $arrProducts[cnt].stock_unlimited_min != $arrProducts[cnt].stock_unlimited_max || $arrProducts[cnt].stock_min != $arrProducts[cnt].stock_max}-->
354                            <br /><!--{t string="-"}--> <!--{if $arrProducts[cnt].stock_unlimited_max}--><!--{t string="tpl_053"}--><!--{else}--><!--{$arrProducts[cnt].stock_max|number_format}--><!--{/if}-->
355                        <!--{/if}-->            </td>
356                    <!--{* 表示 *}-->
357                    <!--{assign var=key value=$arrProducts[cnt].status}-->
358                    <td class="menu" rowspan="2"><!--{$arrDISP[$key]}--></td>
359                    <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;" ><!--{t string="tpl_003"}--></a></span></td>
360                    <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"><!--{t string="tpl_318"}--></a></span></td>
361                    <!--{if $smarty.const.OPTION_CLASS_REGIST == 1}-->
362                    <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;" ><!--{t string="tpl_582"}--></a></span></td>
363                    <!--{/if}-->
364                    <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;"><!--{t string="tpl_004"}--></a></span></td>
365                    <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;" ><!--{t string="tpl_583"}--></a></span></td>
366                </tr>
367                <tr style="background:<!--{$arrPRODUCTSTATUS_COLOR[$status]}-->;">
368                    <td>
369                        <!--{* カテゴリ名 *}-->
370                        <div id="disp_cat<!--{$smarty.section.cnt.iteration}-->" style="display:<!--{$cat_flg}-->">
371                            <!--{foreach from=$arrProducts[cnt].categories item=category_id name=categories}-->
372                                <!--{$arrCatList[$category_id]|sfTrim}-->
373                                <!--{if !$smarty.foreach.categories.last}--><br /><!--{/if}-->
374                            <!--{/foreach}-->
375                        </div>
376
377                        <!--{* URL *}-->
378                        <div id="disp_url<!--{$smarty.section.cnt.iteration}-->" style="display:none">
379                            <!--{$smarty.const.HTTP_URL|sfTrimURL}-->/products/detail.php?product_id=<!--{$arrProducts[cnt].product_id}-->
380                        </div>
381                    </td>
382                </tr>
383                <!--▲商品<!--{$smarty.section.cnt.iteration}-->-->
384            <!--{/section}-->
385        </table>
386        <input type="hidden" name="item_cnt" value="<!--{$arrProducts|@count}-->" />
387        <!--検索結果表示テーブル-->
388    <!--{/if}-->
389
390</form>
391
392<!--★★検索結果一覧★★-->
393<!--{/if}-->
394</div>
Note: See TracBrowser for help on using the repository browser.