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

Revision 19771, 6.9 KB checked in by nanasess, 13 years ago (diff)

r19770 の typo btn_normal -> btn-normal

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