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" src="<!--{$TPL_URLPATH}-->js/breadcrumbs.js"></script> |
---|
26 | <script type="text/javascript">//<![CDATA[ |
---|
27 | $(function() { |
---|
28 | $('h2').breadcrumbs({ |
---|
29 | 'bread_crumbs': <!--{$tpl_bread_crumbs}--> |
---|
30 | }); |
---|
31 | }); |
---|
32 | //]]></script> |
---|
33 | <form name="form1" id="form1" method="post" action="?" enctype="multipart/form-data"> |
---|
34 | <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" /> |
---|
35 | <input type="hidden" name="mode" value="edit" /> |
---|
36 | <input type="hidden" name="parent_category_id" value="<!--{$arrForm.parent_category_id|h}-->"> |
---|
37 | <input type="hidden" name="category_id" value="<!--{$arrForm.category_id|h}-->"> |
---|
38 | <input type="hidden" name="keySet" value=""> |
---|
39 | <div id="products" class="contents-main"> |
---|
40 | <div class="btn"> |
---|
41 | <a class="btn-normal" href="javascript:;" onclick="fnModeSubmit('csv','',''); return false;">CSV ダウンロード</a> |
---|
42 | <a class="btn-normal" href='../contents/csv.php?tpl_subno_csv=category'>CSV 出力項目設定</a> |
---|
43 | </div> |
---|
44 | |
---|
45 | <!--{* ▼画面左 *}--> |
---|
46 | <div id="products-category-left"> |
---|
47 | <a href="?"><img src="<!--{$TPL_URLPATH}-->img/contents/folder_close.gif" alt="フォルダ"> ホーム</a><br /> |
---|
48 | <!--{section name=cnt loop=$arrTree}--> |
---|
49 | <!--{assign var=level value="`$arrTree[cnt].level`}--> |
---|
50 | |
---|
51 | <!--{* 上の階層表示の時にdivを閉じる *}--> |
---|
52 | <!--{assign var=close_cnt value="`$before_level-$level+1`"}--> |
---|
53 | <!--{if $close_cnt > 0}--> |
---|
54 | <!--{section name=n loop=$close_cnt}--></div><!--{/section}--> |
---|
55 | <!--{/if}--> |
---|
56 | |
---|
57 | <!--{* スペース繰り返し *}--> |
---|
58 | <!--{section name=n loop=$level}--> <!--{/section}--> |
---|
59 | |
---|
60 | <!--{* カテゴリ名表示 *}--> |
---|
61 | <!--{assign var=disp_name value="`$arrTree[cnt].category_id`.`$arrTree[cnt].category_name`"}--> |
---|
62 | <!--{if $arrTree[cnt].level != $smarty.const.LEVEL_MAX}--> |
---|
63 | <a href="?" onclick="fnModeSubmit('tree', 'parent_category_id', <!--{$arrTree[cnt].category_id}-->); return false;"> |
---|
64 | <!--{if $arrForm.parent_category_id == $arrTree[cnt].category_id}--> |
---|
65 | <img src="<!--{$TPL_URLPATH}-->img/contents/folder_open.gif" alt="フォルダ"> |
---|
66 | <!--{else}--> |
---|
67 | <img src="<!--{$TPL_URLPATH}-->img/contents/folder_close.gif" alt="フォルダ"> |
---|
68 | <!--{/if}--> |
---|
69 | <!--{$disp_name|sfCutString:10:false|h}--></a><br /> |
---|
70 | <!--{else}--> |
---|
71 | <img src="<!--{$TPL_URLPATH}-->img/contents/folder_close.gif" alt="フォルダ"> |
---|
72 | <!--{$disp_name|sfCutString:10:false|h}--></a><br /> |
---|
73 | <!--{/if}--> |
---|
74 | |
---|
75 | <!--{if $arrTree[cnt].display == true}--> |
---|
76 | <div id="f<!--{$arrTree[cnt].category_id}-->"> |
---|
77 | <!--{else}--> |
---|
78 | <div id="f<!--{$arrTree[cnt].category_id}-->" style="display:none"> |
---|
79 | <!--{/if}--> |
---|
80 | |
---|
81 | <!--{if $smarty.section.cnt.last}--> |
---|
82 | <!--{section name=n loop=$level}--></div><!--{/section}--> |
---|
83 | <!--{/if}--> |
---|
84 | |
---|
85 | <!--{assign var=before_level value="`$arrTree[cnt].level`}--> |
---|
86 | <!--{/section}--> |
---|
87 | </div> |
---|
88 | <!--{* ▲画面左 *}--> |
---|
89 | |
---|
90 | <!--{* ▼画面右 *}--> |
---|
91 | <div id="products-category-right"> |
---|
92 | |
---|
93 | |
---|
94 | <div class="now_dir"> |
---|
95 | <!--{if $arrErr.category_name}--> |
---|
96 | <span class="attention"><!--{$arrErr.category_name}--></span> |
---|
97 | <!--{/if}--> |
---|
98 | <input type="text" name="category_name" value="<!--{$arrForm.category_name|h}-->" size="30" class="box30" maxlength="<!--{$smarty.const.STEXT_LEN}-->" /> |
---|
99 | <a class="btn-normal" href="javascript:;" onclick="fnModeSubmit('edit','',''); return false;"><span class="btn-next">登録</span></a><span class="attention"> (上限<!--{$smarty.const.STEXT_LEN}-->文字)</span> |
---|
100 | </div> |
---|
101 | |
---|
102 | <h2><!--{* jQuery で挿入される *}--></h2> |
---|
103 | <!--{if count($arrList) > 0}--> |
---|
104 | |
---|
105 | <table class="list" id="categoryTable"> |
---|
106 | <col width="5%" /> |
---|
107 | <col width="60%" /> |
---|
108 | <col width="10%" /> |
---|
109 | <col width="10%" /> |
---|
110 | <col width="25%" /> |
---|
111 | <tr class="nodrop nodrag"> |
---|
112 | <th>ID</th> |
---|
113 | <th>カテゴリ名</th> |
---|
114 | <th class="edit">編集</th> |
---|
115 | <th class="delete">削除</th> |
---|
116 | <th>移動</th> |
---|
117 | </tr> |
---|
118 | |
---|
119 | <!--{section name=cnt loop=$arrList}--> |
---|
120 | <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"> |
---|
121 | <td class="center"><!--{$arrList[cnt].category_id}--></td> |
---|
122 | <td> |
---|
123 | <!--{if $arrList[cnt].level != $smarty.const.LEVEL_MAX}--> |
---|
124 | <a href="?" onclick="fnModeSubmit('tree', 'parent_category_id', <!--{$arrList[cnt].category_id}-->); return false"><!--{$arrList[cnt].category_name|h}--></a> |
---|
125 | <!--{else}--> |
---|
126 | <!--{$arrList[cnt].category_name|h}--> |
---|
127 | <!--{/if}--> |
---|
128 | </td> |
---|
129 | <td class="center"> |
---|
130 | <!--{if $arrForm.category_id != $arrList[cnt].category_id}--> |
---|
131 | <a href="?" onclick="fnModeSubmit('pre_edit', 'category_id', <!--{$arrList[cnt].category_id}-->); return false;">編集</a> |
---|
132 | <!--{else}--> |
---|
133 | 編集中 |
---|
134 | <!--{/if}--> |
---|
135 | </td> |
---|
136 | <td class="center"> |
---|
137 | <a href="?" onclick="fnModeSubmit('delete', 'category_id', <!--{$arrList[cnt].category_id}-->); return false;">削除</a> |
---|
138 | </td> |
---|
139 | <td class="center"> |
---|
140 | <!--{* 移動 *}--> |
---|
141 | <!--{if $smarty.section.cnt.iteration != 1}--> |
---|
142 | <a href="?" onclick="fnModeSubmit('up','category_id', <!--{$arrList[cnt].category_id}-->); return false;">上へ</a> |
---|
143 | <!--{/if}--> |
---|
144 | <!--{if $smarty.section.cnt.iteration != $smarty.section.cnt.last}--> |
---|
145 | <a href="?" onclick="fnModeSubmit('down','category_id', <!--{$arrList[cnt].category_id}-->); return false;">下へ</a> |
---|
146 | <!--{/if}--> |
---|
147 | </td> |
---|
148 | |
---|
149 | </tr> |
---|
150 | <!--{/section}--> |
---|
151 | </table> |
---|
152 | <!--{else}--> |
---|
153 | <p>この階層には、カテゴリが登録されていません。</p> |
---|
154 | <!--{/if}--> |
---|
155 | </div> |
---|
156 | <!--{* ▲画面右 *}--> |
---|
157 | |
---|
158 | </div> |
---|
159 | </form> |
---|