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

Revision 19712, 6.9 KB checked in by nanasess, 13 years ago (diff)
  • #628(未使用処理・定義などの削除)
    • html/misc 以下のファイル
    • キャンペーン関連の tpl ファイル
    • アンケート関連の tpl ファイル
    • shopping 以下の不要と思われるファイルを削除
  • #642(共通ロジックの機能向上)
    • フロント, 管理画面共通で使用する JavaScript? ファイルを html/js 以下へ移動
  • 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" src="<!--{$smarty.const.URL_DIR}-->js/jquery.tablednd.js"></script>
25<form name="form1" id="form1" method="post" action="?" enctype="multipart/form-data">
26<input type="hidden" name="mode" value="edit" />
27<input type="hidden" name="parent_category_id" value="<!--{$arrForm.parent_category_id}-->">
28<input type="hidden" name="category_id" value="<!--{$arrForm.category_id}-->">
29<input type="hidden" name="keySet" value="">
30<div id="products" class="contents-main">
31  <h2>カテゴリー設定(最大<!--{$smarty.const.LEVEL_MAX}-->階層まで)</h2>
32
33  <div class="btn">
34    <button type="button" onclick="fnModeSubmit('csv','','');">CSV DOWNLOAD</button>
35    <a href="../contents/csv.php?tpl_subno_csv=category">&gt;&gt; CSV出力項目設定</a>
36  </div>
37
38  <!--{* ▼画面左 *}-->
39  <div id="products-category-left">
40    <a href="?">▼ホーム</a><br />
41    <!--{section name=cnt loop=$arrTree}-->
42      <!--{assign var=level value="`$arrTree[cnt].level`}-->
43
44      <!--{* 上の階層表示の時にdivを閉じる *}-->
45      <!--{assign var=close_cnt value="`$before_level-$level+1`"}-->
46      <!--{if $close_cnt > 0}-->
47        <!--{section name=n loop=$close_cnt}--></div><!--{/section}-->
48      <!--{/if}-->
49
50      <!--{* スペース繰り返し *}-->
51      <!--{section name=n loop=$level}-->  <!--{/section}-->
52     
53      <!--{* カテゴリ名表示 *}-->
54      <!--{assign var=disp_name value="`$arrTree[cnt].category_id`.`$arrTree[cnt].category_name`"}-->
55      <!--{if $arrTree[cnt].level != $smarty.const.LEVEL_MAX}-->
56        <a href="?" onclick="fnModeSubmit('tree', 'parent_category_id', <!--{$arrTree[cnt].category_id}-->); return false;">
57        <!--{if $arrForm.parent_category_id == $arrTree[cnt].category_id}-->
58          <img src="<!--{$smarty.const.URL_DIR}-->misc/openf.gif">
59        <!--{else}-->
60          <img src="<!--{$smarty.const.URL_DIR}-->misc/closef.gif">
61        <!--{/if}-->
62        <!--{$disp_name|sfCutString:20|escape}--></a><br />
63      <!--{else}-->
64        <img src="<!--{$smarty.const.URL_DIR}-->misc/closef.gif">
65        <!--{$disp_name|sfCutString:20|escape}--></a><br />
66      <!--{/if}-->
67
68      <!--{if $arrTree[cnt].display == true}-->
69        <div id="f<!--{$arrTree[cnt].category_id}-->">
70      <!--{else}-->
71        <div id="f<!--{$arrTree[cnt].category_id}-->" style="display:none">
72      <!--{/if}-->
73
74      <!--{if $smarty.section.cnt.last}-->
75        <!--{section name=n loop=$level}--></div><!--{/section}-->
76      <!--{/if}-->
77
78      <!--{assign var=before_level value="`$arrTree[cnt].level`}-->
79    <!--{/section}-->
80  </div>
81  <!--{* ▲画面左 *}-->
82
83  <!--{* ▼画面右 *}-->
84  <div id="products-category-right">
85   
86    <!--{if $arrErr.category_name}-->
87    <span class="attention"><!--{$arrErr.category_name}--></span>
88    <!--{/if}-->
89    <input type="text" name="category_name" value="<!--{$arrForm.category_name|escape}-->" size="30" class="box30" maxlength="<!--{$smarty.const.STEXT_LEN}-->" />
90    <button type="submit" onclick="fnModeSubmit('edit','','');"><span>登録</span></button><span class="attention">(上限<!--{$smarty.const.STEXT_LEN}-->文字)</span>
91   
92    <!--{if count($arrList) > 0}-->
93<script type="text/javascript">
94// カテゴリーテーブルのイニシャライズ
95$(document).ready(function() {
96    $("#categoryTable").tableDnD({
97        onDragClass: "movingHandle",
98        onDrop: function(table, row) {
99            var rows = table.tBodies[0].rows;
100            var keys = row.id;
101
102            for (var i = 0; i < rows.length; i++) {
103                if (row.id == rows[i].id) {
104                    keys += "-" + i;
105                    break;
106                }
107            }
108
109            fnModeSubmit('moveByDnD','keySet', keys);
110        },
111        dragHandle: "dragHandle"
112    });
113
114    $("#categoryTable tr").hover(function() {
115        $(this.cells[0]).addClass('activeHandle');
116    }, function() {
117        $(this.cells[0]).removeClass('activeHandle');
118    });
119});
120</script>
121    <table class="list" id="categoryTable">
122      <tr class="nodrop nodrag">
123        <th width="40">移動</th>
124        <th>ID</th>
125        <th>カテゴリ名</th>
126        <th>編集</th>
127        <th>削除</th>
128        <th>移動</th>
129      </tr>
130      <!--{section name=cnt loop=$arrList}-->
131      <tr id="<!--{$arrList[cnt].category_id}-->" style="background:<!--{if $arrForm.category_id != $arrList[cnt].category_id}-->#ffffff<!--{else}--><!--{$smarty.const.SELECT_RGB}--><!--{/if}-->;" align="left">
132        <td class="dragHandle">&sect;</td>
133        <td class="center"><!--{$arrList[cnt].category_id}--></td>
134        <td>
135        <!--{if $arrList[cnt].level != $smarty.const.LEVEL_MAX}-->
136          <a href="?" onclick="fnModeSubmit('tree', 'parent_category_id', <!--{$arrList[cnt].category_id}-->); return false"><!--{$arrList[cnt].category_name|escape}--></a>
137        <!--{else}-->
138          <!--{$arrList[cnt].category_name|escape}-->
139        <!--{/if}-->
140        </td>
141        <td align="center">
142          <!--{if $arrForm.category_id != $arrList[cnt].category_id}-->
143          <a href="?" onclick="fnModeSubmit('pre_edit', 'category_id', <!--{$arrList[cnt].category_id}-->); return false;">編集</a>
144          <!--{else}-->
145          編集中
146          <!--{/if}-->
147        </td>
148        <td align="center">
149          <a href="?" onclick="fnModeSubmit('delete', 'category_id', <!--{$arrList[cnt].category_id}-->); return false;">削除</a>
150        </td>
151        <td align="center">
152        <!--{* 移動 *}-->
153        <!--{if $smarty.section.cnt.iteration != 1}-->
154        <a href="?" onclick="fnModeSubmit('up','category_id', <!--{$arrList[cnt].category_id}-->); return false;">上へ</a>
155        <!--{/if}-->
156        <!--{if $smarty.section.cnt.iteration != $smarty.section.cnt.last}-->
157        <a href="?" onclick="fnModeSubmit('down','category_id', <!--{$arrList[cnt].category_id}-->); return false;">下へ</a>
158        <!--{/if}-->
159        </td>
160      </tr>
161      <!--{/section}-->
162    </table>
163    <!--{else}-->
164    <p>この階層には、カテゴリが登録されていません。</p>
165    <!--{/if}-->
166  </div>
167  <!--{* ▲画面右 *}-->
168
169</div>
170</form>
Note: See TracBrowser for help on using the repository browser.