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

Revision 21539, 7.2 KB checked in by Seasoft, 12 years ago (diff)

#1613 (ソース整形・ソースコメントの改善)

  • 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
25<script type="text/javascript">
26<!--
27function lfnCheckSubmit( fm ){
28
29    var err = '';
30    /*
31    if ( ! fm["title"].value ){
32        err += '見出しコメントを入力して下さい。';
33    }
34    */
35    if ( ! fm["comment"].value ){
36        if ( err ) err += '';
37        err += 'コメントを入力して下さい。';
38    }
39    if ( err ){
40        alert(err);
41        return false;
42    } else {
43        if(window.confirm('内容を登録しても宜しいですか')){
44                fm.submit();
45                return true;
46        }
47    }
48}
49
50function lfnCheckSetItem( rank ){
51    var flag = true;
52    var checkRank = '<!--{$checkRank|h}-->';
53    if ( checkRank ){
54        if ( rank != checkRank ){
55            if( ! window.confirm('さきほど選択した<!--{$checkRank|h}-->位の情報は破棄されます。宜しいでしょうか')){
56                flag = false;
57            }
58        }
59    }
60
61    if ( flag ){
62        win03('./recommend_search.php?rank=' + rank,'search','615','600');
63    }
64}
65
66//-->
67</script>
68
69
70        <!--{section name=cnt loop=$tpl_disp_max}-->
71
72<div id="admin-contents" class="contents-main">
73    <table class="list center" id="recommend-table">
74        <col width="13%" />
75        <col width="73%" />
76        <col width="7%" />
77        <col width="7%" />
78        <tr>
79            <th>順位</th>
80            <th>商品/コメント</th>
81            <th>編集</th>
82            <th>削除</th>
83        </tr>
84
85        <tr>
86            <td>おすすめ商品(<!--{$smarty.section.cnt.iteration}-->)</td>
87                <!--{if $arrItems[$smarty.section.cnt.iteration].product_id}-->
88                    <td>
89                        <div id="table-wrap" class="clearfix">
90                            <div class="table-img">
91                                <!--{if $arrItems[$smarty.section.cnt.iteration].product_id}-->
92                                    <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" />
93                                <!--{/if}-->
94                            </div>
95                            <div class="table-detail">
96                                <div class="detail-name">商品名: <!--{$arrItems[$smarty.section.cnt.iteration].name|h}--></div>
97                                    <div class="detail-form">
98                                        <form name="form<!--{$smarty.section.cnt.iteration}-->" id="form<!--{$smarty.section.cnt.iteration}-->" method="post" action="?">
99                                            <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
100                                            <input type="hidden" name="mode" value="regist" />
101                                            <input type="hidden" name="product_id" value="<!--{$arrItems[$smarty.section.cnt.iteration].product_id|h}-->" />
102                                            <input type="hidden" name="category_id" value="<!--{$category_id|h}-->" />
103                                            <input type="hidden" name="rank" value="<!--{$arrItems[$smarty.section.cnt.iteration].rank|h}-->" />
104                                            <span class="attention"><!--{$arrErr[$smarty.section.cnt.iteration].comment}--></span>
105                                            <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}-->><!--{$arrItems[$smarty.section.cnt.iteration].comment|h}--></textarea>
106                                        </form>
107                                    </div>
108                                </div>
109                            </div>
110                        </div>
111                    </td>
112                <!--{else}-->
113                    <td class="AlignLeft">
114                        <a class="btn-action-m" href="javascript:;" onclick="lfnCheckSetItem('<!--{$smarty.section.cnt.iteration}-->'); return false;" target="_blank"><span class="btn-next">商品を選択する</span></a>
115                        <form name="form<!--{$smarty.section.cnt.iteration}-->" id="form<!--{$smarty.section.cnt.iteration}-->" method="post" action="?">
116                            <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
117                            <input type="hidden" name="mode" value="regist" />
118                            <input type="hidden" name="product_id" value="<!--{$arrItems[$smarty.section.cnt.iteration].product_id|h}-->" />
119                            <input type="hidden" name="category_id" value="<!--{$category_id|h}-->" />
120                            <input type="hidden" name="rank" value="<!--{$arrItems[$smarty.section.cnt.iteration].rank|h}-->" />
121                        </form>
122                    </td>
123                <!--{/if}-->
124            <td>
125                <!--{if $arrItems[$smarty.section.cnt.iteration].product_id}-->
126                    <a href="javascript:;" onclick="lfnCheckSetItem('<!--{$smarty.section.cnt.iteration}-->'); return false;" target="_blank">
127                        編集</a>
128                <!--{else}-->
129                    - -
130                <!--{/if}-->
131            </td>
132            <td>
133                <!--{if $arrItems[$smarty.section.cnt.iteration].product_id}-->
134                        <a href="javascript:;" onClick="return fnInsertValAndSubmit( document.form<!--{$smarty.section.cnt.iteration}-->, 'mode', 'delete', '削除します。宜しいですか' )">削除</a>
135                <!--{else}-->
136                    - -
137                <!--{/if}-->
138            </td>
139        </tr>
140
141        <tr><td colspan="4" class="no-border-w" height="20"></td></tr>
142        <!--{if $arrItems[$smarty.section.cnt.iteration].product_id}-->
143        <tr><td colspan="4" class="no-border">
144        <a class="btn-action" href="javascript:;" onclick="lfnCheckSubmit(document.form<!--{$smarty.section.cnt.iteration}-->); return false;"><span class="btn-next">この内容で登録する</span></a>
145        </td>
146        </tr>
147        <!--{/if}-->
148    <!--▲おすすめ商品<!--{$smarty.section.cnt.iteration}-->-->
149    <!--{/section}-->
150    </table>
151</div>
Note: See TracBrowser for help on using the repository browser.