source: branches/version-2_13-dev/data/Smarty/templates/admin/contents/recommend.tpl @ 23546

Revision 23546, 8.9 KB checked in by shutta, 10 years ago (diff)

#2580 Copyrightを更新
Copyrightを2014に更新

  • 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-2014 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
26<script type="text/javascript">
27<!--
28function lfnCheckSubmit( fm ){
29    var err = '';
30
31    if ( ! fm["product_id"].value ){
32        err += '商品を選択して下さい。';
33    }
34
35    if ( fm["comment"] && !fm["comment"].value ){
36        if ( err ) err += '';
37        err += 'コメントを入力して下さい。';
38    }
39
40    if ( err ){
41        alert(err);
42        return false;
43    } else {
44        if(window.confirm('内容を登録しても宜しいですか')){
45                fm.submit();
46                return true;
47        }
48    }
49}
50
51function lfnCheckSetItem( rank ){
52    var flag = true;
53    var checkRank = '<!--{$checkRank|h}-->';
54    if ( checkRank ){
55        if ( rank != checkRank ){
56            if( ! window.confirm('さきほど選択した<!--{$checkRank|h}-->位の情報は破棄されます。宜しいでしょうか')){
57                flag = false;
58            }
59        }
60    }
61
62    if ( flag ){
63        eccube.openWindow('./recommend_search.php?rank=' + rank,'search','615','600',{menubar:'no'});
64    }
65}
66
67function lfnSortItem(mode,data){
68    var flag = true;
69    var checkRank = '<!--{$checkRank|h}-->';
70    if ( checkRank ){
71        if( ! window.confirm('さきほど選択した<!--{$checkRank|h}-->位の情報は破棄されます。宜しいでしょうか')){
72            flag = false;
73        }
74    }
75
76    if ( flag ){
77        document.form1["mode"].value = mode;
78        document.form1["best_id"].value = data;
79        document.form1.submit();
80    }
81}
82
83//-->
84</script>
85
86<div id="admin-contents" class="contents-main">
87    <!--{section name=cnt loop=$tpl_disp_max}-->
88    <div class="recommend-product <!--{if $arrItems[$smarty.section.cnt.iteration].status == "2"}-->hidden<!--{/if}-->">
89        <table class="list center recommend-table">
90            <col width="13%" />
91            <col width="73%" />
92            <col width="7%" />
93            <col width="7%" />
94            <tr>
95                <th>順位</th>
96                <th>商品/コメント</th>
97                <th>編集</th>
98                <th>削除</th>
99                <th>並び替え</th>
100            </tr>
101
102            <tr>
103                <td>おすすめ商品(<!--{$smarty.section.cnt.iteration}-->)</td>
104                    <!--{if $arrItems[$smarty.section.cnt.iteration].product_id}-->
105                        <td>
106                            <div class="clearfix table-wrap">
107                                <div class="table-img">
108                                    <!--{if $arrItems[$smarty.section.cnt.iteration].product_id}-->
109                                        <img src="<!--{$smarty.const.IMAGE_SAVE_URLPATH}--><!--{$arrItems[$smarty.section.cnt.iteration].main_list_image|sfNoImageMainList|h}-->" alt="<!--{$arrItems[$smarty.section.cnt.iteration].name|h}-->" width="100" height="100" />
110                                    <!--{/if}-->
111                                </div>
112                                <div class="table-detail">
113                                    <div class="detail-name">
114                                        商品名: <!--{$arrItems[$smarty.section.cnt.iteration].name|h}-->
115                                    </div>
116                                    <div class="detail-form">
117                                        <form name="form<!--{$smarty.section.cnt.iteration}-->" id="form<!--{$smarty.section.cnt.iteration}-->" method="post" action="?">
118                                            <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
119                                            <input type="hidden" name="mode" value="regist" />
120                                            <input type="hidden" name="best_id" value="<!--{$arrItems[$smarty.section.cnt.iteration].best_id|h}-->" />
121                                            <input type="hidden" name="product_id" value="<!--{$arrItems[$smarty.section.cnt.iteration].product_id|h}-->" />
122                                            <input type="hidden" name="category_id" value="<!--{$category_id|h}-->" />
123                                            <input type="hidden" name="rank" value="<!--{$arrItems[$smarty.section.cnt.iteration].rank|h}-->" />
124                                            <span class="attention"><!--{$arrErr[$smarty.section.cnt.iteration].comment}--></span>
125                                            <textarea class="top" name="comment" cols="45" rows="4" style="width: 586px; height: 80px; <!--{$arrErr[$smarty.section.cnt.iteration].comment|sfGetErrorColor}-->" <!--{$arrItems[$smarty.section.cnt.iteration].product_id|sfGetEnabled}-->><!--{"\n"}--><!--{$arrItems[$smarty.section.cnt.iteration].comment|h}--></textarea>
126                                        </form>
127                                    </div>
128                                </div>
129                            </div>
130                        </td>
131                    <!--{else}-->
132                        <td class="AlignLeft">
133                            <a class="btn-action-m" href="javascript:;" onclick="lfnCheckSetItem('<!--{$smarty.section.cnt.iteration}-->'); return false;" target="_blank"><span class="btn-next">商品を選択する</span></a>
134                            <form name="form<!--{$smarty.section.cnt.iteration}-->" id="form<!--{$smarty.section.cnt.iteration}-->" method="post" action="?">
135                                <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
136                                <input type="hidden" name="mode" value="regist" />
137                                <input type="hidden" name="best_id" value="<!--{$arrItems[$smarty.section.cnt.iteration].best_id|h}-->" />
138                                <input type="hidden" name="product_id" value="<!--{$arrItems[$smarty.section.cnt.iteration].product_id|h}-->" />
139                                <input type="hidden" name="category_id" value="<!--{$category_id|h}-->" />
140                                <input type="hidden" name="rank" value="<!--{$arrItems[$smarty.section.cnt.iteration].rank|h}-->" />
141                            </form>
142                        </td>
143                    <!--{/if}-->
144                <td>
145                    <!--{if $arrItems[$smarty.section.cnt.iteration].product_id}-->
146                        <a href="javascript:;" onclick="lfnCheckSetItem('<!--{$smarty.section.cnt.iteration}-->'); return false;" target="_blank">
147                            編集
148                        </a>
149                    <!--{else}-->
150                        - -
151                    <!--{/if}-->
152                </td>
153                <td>
154                    <!--{if $arrItems[$smarty.section.cnt.iteration].product_id}-->
155                            <a href="javascript:;" onclick="return eccube.insertValueAndSubmit( document.form<!--{$smarty.section.cnt.iteration}-->, 'mode', 'delete', '削除します。宜しいですか' )">削除</a>
156                    <!--{else}-->
157                        - -
158                    <!--{/if}-->
159                </td>
160                <td>
161                    <!--{* 移動 *}-->
162                    <!--{if $smarty.section.cnt.iteration != 1 && $arrItems[$smarty.section.cnt.iteration].product_id}-->
163                        <a href="?" onclick="lfnSortItem('up',<!--{$arrItems[$smarty.section.cnt.iteration].best_id}-->); return false;">上へ</a><br />&nbsp;
164                    <!--{/if}-->
165                    <!--{if $smarty.section.cnt.iteration != $tpl_disp_max && $arrItems[$smarty.section.cnt.iteration].product_id}-->
166                        <a href="?" onclick="lfnSortItem('down',<!--{$arrItems[$smarty.section.cnt.iteration].best_id}-->); return false;">下へ</a>
167                    <!--{/if}-->
168                </td>
169            </tr>
170        </table>
171        <div class="btn-area">
172            <a class="btn-action" href="javascript:;" onclick="lfnCheckSubmit(document.form<!--{$smarty.section.cnt.iteration}-->); return false;"><span class="btn-next">この内容で登録する</span></a>
173        </div>
174    </div>
175    <!--▲おすすめ商品<!--{$smarty.section.cnt.iteration}-->-->
176    <!--{/section}-->
177</div>
Note: See TracBrowser for help on using the repository browser.