source: branches/version-2_5-dev/data/Smarty/templates/admin/contents/recomend.tpl @ 19785

Revision 19785, 4.4 KB checked in by Seasoft, 13 years ago (diff)

#862(テンプレート上のエスケープを簡単に)
#628(未使用処理・定義などの削除)

  • Smarty 変数 tpl_start

#879(jQuery の ready イベントと競合する body の onload イベントを使用している)

  • 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<!--
26function lfnCheckSubmit( fm ){
27 
28  var err = '';
29  /*
30  if ( ! fm["title"].value ){
31    err += '見出しコメントを入力して下さい。';
32  }
33  */
34  if ( ! fm["comment"].value ){
35    if ( err ) err += '';
36    err += 'コメントを入力して下さい。';
37  }
38  if ( err ){
39    alert(err);
40    return false;
41  } else {
42    if(window.confirm('内容を登録しても宜しいですか')){
43      return true;
44    }
45  }
46}
47
48function lfnCheckSetItem( rank ){
49  var flag = true;
50  var checkRank = '<!--{$checkRank}-->';
51  if ( checkRank ){
52    if ( rank != checkRank ){
53      if( ! window.confirm('さきほど選択した<!--{$checkRank}-->位の情報は破棄されます。宜しいでしょうか')){
54        flag = false;
55      }
56    }
57  }
58 
59  if ( flag ){
60    win03('./recommend_search.php?rank=' + rank,'search','500','500');
61  }
62}
63
64//-->
65</script>
66
67<div id="admin-contents" class="contents-main">
68  <table class="list center" id="recommend-table">
69    <tr>
70      <th>#</th>
71      <th>画像</th>
72      <th>商品名</th>
73      <th>削除</th>
74      <th>変更</th>
75      <th>コメント</th>
76    </tr>
77    <!--{section name=cnt loop=$tpl_disp_max}-->
78    <!--▼おすすめ商品<!--{$smarty.section.cnt.iteration}-->-->
79    <tr>
80      <th><!--{$smarty.section.cnt.iteration}--></th>
81      <td>
82        <!--{if $arrItems[$smarty.section.cnt.iteration].product_id}-->
83          <img src="<!--{$smarty.const.IMAGE_SAVE_URL}--><!--{$arrItems[$smarty.section.cnt.iteration].main_list_image|sfNoImageMainList|h}-->" alt="<!--{$arrItems[$smarty.section.cnt.iteration].name|h}-->" />
84        <!--{/if}-->
85      </td>
86      <td><!--{$arrItems[$smarty.section.cnt.iteration].name|h}--></td>
87      <td>
88        <!--{if $arrItems[$smarty.section.cnt.iteration].product_id}-->
89        <a href="#" onClick="return fnInsertValAndSubmit( document.form<!--{$smarty.section.cnt.iteration}-->, 'mode', 'delete', '削除します。宜しいですか' )">削除</a>
90        <!--{/if}-->
91      </td>
92      <td>
93        <a href="#" onclick="lfnCheckSetItem('<!--{$smarty.section.cnt.iteration}-->'); return false;" target="_blank">
94          <!--{if $arrItems[$smarty.section.cnt.iteration].product_id}-->商品変更<!--{else}-->商品選択<!--{/if}--></a>
95      </td>
96      <td>
97        <form name="form<!--{$smarty.section.cnt.iteration}-->" id="form<!--{$smarty.section.cnt.iteration}-->" method="post" action="?">
98        <input type="hidden" name="mode" value="regist" />
99        <input type="hidden" name="product_id" value="<!--{$arrItems[$smarty.section.cnt.iteration].product_id|h}-->" />
100        <input type="hidden" name="category_id" value="<!--{$category_id|h}-->" />
101        <input type="hidden" name="rank" value="<!--{$arrItems[$smarty.section.cnt.iteration].rank|h}-->" />
102        <span class="attention"><!--{$arrErr[$smarty.section.cnt.iteration].comment}--></span>
103        <textarea name="comment" cols="45" rows="4" style="width: 337px; height: 82px; <!--{$arrErr[$smarty.section.cnt.iteration].comment|sfGetErrorColor}-->" <!--{$arrItems[$smarty.section.cnt.iteration].product_id|sfGetEnabled}-->><!--{$arrItems[$smarty.section.cnt.iteration].comment}--></textarea>
104        <!--{if $arrItems[$smarty.section.cnt.iteration].product_id}-->
105        <br /><a class="btn-normal" href="javascript:;" onclick="return lfnCheckSubmit(document.form<!--{$smarty.section.cnt.iteration}-->);"><span>登録する</span></a>
106        <!--{/if}-->
107        </form>
108      </td>
109    </tr>
110  <!--▲おすすめ商品<!--{$smarty.section.cnt.iteration}-->-->
111  <!--{/section}-->
112  </table>
113</div>
Note: See TracBrowser for help on using the repository browser.