1 | <script type="text/javascript"> |
---|
2 | |
---|
3 | function doPreview(){ |
---|
4 | document.form1.mode.value="preview" |
---|
5 | document.form1.target = "_blank"; |
---|
6 | document.form1.submit(); |
---|
7 | } |
---|
8 | function fnTargetSelf(){ |
---|
9 | document.form1.target = "_self"; |
---|
10 | } |
---|
11 | |
---|
12 | </script> |
---|
13 | |
---|
14 | <script type="text/javascript" src="<!--{$TPL_DIR}-->js/ui.core.js"></script> |
---|
15 | <script type="text/javascript" src="<!--{$TPL_DIR}-->js/ui.sortable.js"></script> |
---|
16 | <script type="text/javascript" src="<!--{$TPL_DIR}-->js/layout_design.js"></script> |
---|
17 | |
---|
18 | |
---|
19 | <form name="form1" id="form1" method="post" action="?"> |
---|
20 | <input type="hidden" name="mode" value="" /> |
---|
21 | <input type="hidden" name="page_id" value="<!--{$page_id}-->" /> |
---|
22 | <input type="hidden" name="bloc_cnt" value="<!--{$bloc_cnt}-->" /> |
---|
23 | <div id="design" class="contents-main"> |
---|
24 | <!--{* ▼レイアウト編集ここから *}--> |
---|
25 | <table id="design-layout-wrap"> |
---|
26 | <thead> |
---|
27 | <tr> |
---|
28 | <th id="design-layout-wrap-edit">レイアウト編集</th> |
---|
29 | <th id="design-layout-wrap-unused">未使用ブロック</th> |
---|
30 | </tr> |
---|
31 | </thead> |
---|
32 | <tbody> |
---|
33 | <tr> |
---|
34 | <!--{* ▼レイアウトここから *}--> |
---|
35 | <td> |
---|
36 | <table id="design-layout-body"> |
---|
37 | <tr> |
---|
38 | <td colspan="3" id="layout-header">ヘッダー部</td> |
---|
39 | </tr> |
---|
40 | <tr> |
---|
41 | <!-- ★☆★ 上部ナビテーブル ☆★☆ --> |
---|
42 | <td colspan="3" id="layout-top"> |
---|
43 | <div id="TopNavi" class="ui-sortable" style="position: relative; width: 468px; "> |
---|
44 | <!--{assign var="firstflg" value=false}--> |
---|
45 | <!--{foreach key=key item=item from=$tpl_arrBloc name="bloc_loop"}--> |
---|
46 | <!--{if $item.target_id == "TopNavi"}--> |
---|
47 | <div class="sort<!--{if !$firstflg}--> first<!--{/if}-->"> |
---|
48 | <!--{$item.name}--> |
---|
49 | <input type="hidden" class="name" name="name_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.name}-->" /> |
---|
50 | <input type="hidden" class="id" name="id_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.bloc_id}-->" /> |
---|
51 | <input type="hidden" class="target-id" name="target_id_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.target_id}-->" /> |
---|
52 | <input type="hidden" class="top" name="top_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.bloc_row}-->" /> |
---|
53 | </div> |
---|
54 | <!--{assign var="firstflg" value=true}--> |
---|
55 | <!--{/if}--> |
---|
56 | <!--{/foreach}--> |
---|
57 | </div> |
---|
58 | </td> |
---|
59 | <!-- ★☆★ 上部ナビテーブル ☆★☆ --> |
---|
60 | </tr> |
---|
61 | <tr> |
---|
62 | <!--{* 左ナビテーブルここから *}--> |
---|
63 | <td rowspan="3" id="layout-left"> |
---|
64 | <div id="LeftNavi" class="ui-sortable" style="position: relative; width: 145px; height: 100px;"> |
---|
65 | <!--{assign var="firstflg" value=false}--> |
---|
66 | <!--{foreach key=key item=item from=$tpl_arrBloc name="bloc_loop"}--> |
---|
67 | <!--{if $item.target_id == "LeftNavi"}--> |
---|
68 | <div class="sort<!--{if !$firstflg}--> first<!--{/if}-->"> |
---|
69 | <!--{$item.name}--> |
---|
70 | <input type="hidden" class="name" name="name_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.name}-->" /> |
---|
71 | <input type="hidden" class="id" name="id_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.bloc_id}-->" /> |
---|
72 | <input type="hidden" class="target-id" name="target_id_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.target_id}-->" /> |
---|
73 | <input type="hidden" class="top" name="top_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.bloc_row}-->" /> |
---|
74 | </div> |
---|
75 | <!--{assign var="firstflg" value=true}--> |
---|
76 | <!--{/if}--> |
---|
77 | <!--{/foreach}--> |
---|
78 | </div> |
---|
79 | </td> |
---|
80 | <!--{* 左ナビテーブルここまで *}--> |
---|
81 | <!--{* メイン上部テーブルここから *}--> |
---|
82 | <td id="layout-main-head"> |
---|
83 | <div id="MainHead" class="ui-sortable" style="position: relative; width: 145px; height: 100px;"> |
---|
84 | <!--{assign var="firstflg" value=false}--> |
---|
85 | <!--{foreach key=key item=item from=$tpl_arrBloc name="bloc_loop"}--> |
---|
86 | <!--{if $item.target_id == "MainHead"}--> |
---|
87 | <div class="sort<!--{if !$firstflg}--> first<!--{/if}-->"> |
---|
88 | <!--{$item.name}--> |
---|
89 | <input type="hidden" class="name" name="name_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.name}-->" /> |
---|
90 | <input type="hidden" class="id" name="id_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.bloc_id}-->" /> |
---|
91 | <input type="hidden" class="target-id" name="target_id_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.target_id}-->" /> |
---|
92 | <input type="hidden" class="top" name="top_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.bloc_row}-->" /> |
---|
93 | </div> |
---|
94 | <!--{assign var="firstflg" value=true}--> |
---|
95 | <!--{/if}--> |
---|
96 | <!--{/foreach}--> |
---|
97 | </div> |
---|
98 | </td> |
---|
99 | <!--{* メイン上部テーブルここまで *}--> |
---|
100 | <!--{* 右ナビここから *}--> |
---|
101 | <td rowspan="3" id="layout-right"> |
---|
102 | <div id="RightNavi" class="ui-sortable" style="position: relative; width: 145px; height: 100px;"> |
---|
103 | <!--{assign var="firstflg" value=false}--> |
---|
104 | <!--{foreach key=key item=item from=$tpl_arrBloc name="bloc_loop"}--> |
---|
105 | <!--{if $item.target_id == "RightNavi"}--> |
---|
106 | <div class="sort<!--{if !$firstflg}--> first<!--{/if}-->"> |
---|
107 | <!--{$item.name}--> |
---|
108 | <input type="hidden" class="name" name="name_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.name}-->" /> |
---|
109 | <input type="hidden" class="id" name="id_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.bloc_id}-->" /> |
---|
110 | <input type="hidden" class="target-id" name="target_id_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.target_id}-->" /> |
---|
111 | <input type="hidden" class="top" name="top_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.bloc_row}-->" /> |
---|
112 | </div> |
---|
113 | <!--{assign var="firstflg" value=true}--> |
---|
114 | <!--{/if}--> |
---|
115 | <!--{/foreach}--> |
---|
116 | </div> |
---|
117 | </td> |
---|
118 | <!--{* 右ナビここまで *}--> |
---|
119 | </tr> |
---|
120 | <!--{* メインここから *}--> |
---|
121 | <tr> |
---|
122 | <td id="layout-main">メイン</td> |
---|
123 | </tr> |
---|
124 | <!--{* メインここまで *}--> |
---|
125 | <!--{* メイン下部ここから *}--> |
---|
126 | <tr> |
---|
127 | <td id="layout-main-foot"> |
---|
128 | <div id="MainFoot" class="ui-sortable" style="position: relative; width: 145px; height: 100px;"> |
---|
129 | <!--{assign var="firstflg" value=false}--> |
---|
130 | <!--{foreach key=key item=item from=$tpl_arrBloc name="bloc_loop"}--> |
---|
131 | <!--{if $item.target_id == "MainFoot"}--> |
---|
132 | <div class="sort<!--{if !$firstflg}--> first<!--{/if}-->"> |
---|
133 | <!--{$item.name}--> |
---|
134 | <input type="hidden" class="name" name="name_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.name}-->" /> |
---|
135 | <input type="hidden" class="id" name="id_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.bloc_id}-->" /> |
---|
136 | <input type="hidden" class="target-id" name="target_id_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.target_id}-->" /> |
---|
137 | <input type="hidden" class="top" name="top_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.bloc_row}-->" /> |
---|
138 | </div> |
---|
139 | <!--{assign var="firstflg" value=true}--> |
---|
140 | <!--{/if}--> |
---|
141 | <!--{/foreach}--> |
---|
142 | </div> |
---|
143 | </td> |
---|
144 | </tr> |
---|
145 | <tr> |
---|
146 | <!--{* メイン下部ここまで *}--> |
---|
147 | <!-- ★☆★ 下部ナビテーブル ☆★☆ --> |
---|
148 | <td colspan="3" id="layout-top"> |
---|
149 | <div id="BottomNavi" class="ui-sortable" style="position: relative; width: 468px; "> |
---|
150 | <!--{assign var="firstflg" value=false}--> |
---|
151 | <!--{foreach key=key item=item from=$tpl_arrBloc name="bloc_loop"}--> |
---|
152 | <!--{if $item.target_id == "BottomNavi"}--> |
---|
153 | <div class="sort<!--{if !$firstflg}--> first<!--{/if}-->"> |
---|
154 | <!--{$item.name}--> |
---|
155 | <input type="hidden" class="name" name="name_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.name}-->" /> |
---|
156 | <input type="hidden" class="id" name="id_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.bloc_id}-->" /> |
---|
157 | <input type="hidden" class="target-id" name="target_id_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.target_id}-->" /> |
---|
158 | <input type="hidden" class="top" name="top_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.bloc_row}-->" /> |
---|
159 | </div> |
---|
160 | <!--{assign var="firstflg" value=true}--> |
---|
161 | <!--{/if}--> |
---|
162 | <!--{/foreach}--> |
---|
163 | </div> |
---|
164 | </td> |
---|
165 | <!-- ★☆★ 下部ナビテーブル ☆★☆ --> |
---|
166 | </tr> |
---|
167 | <tr> |
---|
168 | <td colspan="3" id="layout-footer">フッター部</td> |
---|
169 | </tr> |
---|
170 | </table> |
---|
171 | </td> |
---|
172 | <!--{* ▲レイアウトここまで *}--> |
---|
173 | |
---|
174 | <!--{* ▼未使用ブロックここから *}--> |
---|
175 | <td> |
---|
176 | <div id="Unused" class="ui-sortable" style="position: relative; width: 145px; height: 500px;"> |
---|
177 | <!--{assign var="firstflg" value=false}--> |
---|
178 | <!--{foreach key=key item=item from=$tpl_arrBloc name="bloc_loop"}--> |
---|
179 | <!--{if $item.target_id == "Unused"}--> |
---|
180 | <div class="sort<!--{if !$firstflg}--> first<!--{/if}-->"> |
---|
181 | <!--{$item.name}--> |
---|
182 | <input type="hidden" class="name" name="name_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.name}-->" /> |
---|
183 | <input type="hidden" class="id" name="id_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.bloc_id}-->" /> |
---|
184 | <input type="hidden" class="target-id" name="target_id_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.target_id}-->" /> |
---|
185 | <input type="hidden" class="top" name="top_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.bloc_row}-->" /> |
---|
186 | </div> |
---|
187 | <!--{assign var="firstflg" value=true}--> |
---|
188 | <!--{/if}--> |
---|
189 | <!--{/foreach}--> |
---|
190 | </div> |
---|
191 | <div class="btn"><button type='button' onclick="fnTargetSelf(); fnFormModeSubmit('form1','new_bloc','','');"><span>ブロックを新規入力</span></button></div> |
---|
192 | </td> |
---|
193 | <!--{* ▲未使用ブロックここまで *}--> |
---|
194 | </tr> |
---|
195 | </tbody> |
---|
196 | </table> |
---|
197 | <div class="btn"> |
---|
198 | <button type='button' name='subm' onclick="fnTargetSelf(); fnFormModeSubmit('form1','confirm','','');"><span>登録する</span></button> |
---|
199 | <button type='button' name='preview' onclick="doPreview();"<!--{if $page_id == "0" or $exists_page == "0" }--> DISABLED<!--{/if}-->><span>プレビュー</span></button> |
---|
200 | </div> |
---|
201 | <!--▲レイアウト編集 ここまで--> |
---|
202 | |
---|
203 | |
---|
204 | <!--▼ページ一覧 ここから--> |
---|
205 | <h2>編集可能ページ一覧</h2> |
---|
206 | <table class="list center"> |
---|
207 | <tr> |
---|
208 | <th>名称</th> |
---|
209 | <th><strong>レイアウト</strong></th> |
---|
210 | <th>ページ詳細</th> |
---|
211 | <th>削除</th> |
---|
212 | </tr> |
---|
213 | <!--{foreach key=key item=item from=$arrEditPage}--> |
---|
214 | <tr style="background-color:<!--{if $item.page_id == $page_id}--><!--{$smarty.const.SELECT_RGB}--><!--{else}-->#ffffff<!--{/if}-->;"> |
---|
215 | <td> |
---|
216 | <!--{$item.page_name}--> |
---|
217 | </td> |
---|
218 | <td> |
---|
219 | <a href="?page_id=<!--{$item.page_id}-->" ><strong>編集</strong></a> |
---|
220 | </td> |
---|
221 | <td> |
---|
222 | <!--{if $item.filename|strlen >= 1}--> |
---|
223 | <a href="main_edit.php?page_id=<!--{$item.page_id}-->">編集</a> |
---|
224 | <!--{/if}--> |
---|
225 | </td> |
---|
226 | <td> |
---|
227 | <!--{if $item.edit_flg == 1}--> |
---|
228 | <a href="?" onclick="fnTargetSelf(); fnFormModeSubmit('form1','delete','','');">削除</a> |
---|
229 | <!--{/if}--> |
---|
230 | </td> |
---|
231 | </tr> |
---|
232 | <!--{/foreach}--> |
---|
233 | </table> |
---|
234 | <div class="btn addnew"> |
---|
235 | <button type='button' onclick="fnTargetSelf(); fnFormModeSubmit('form1','new_page','','');"><span>ページを新規入力</span></button> |
---|
236 | </div> |
---|
237 | <!--▲ページ一覧 ここまで--> |
---|
238 | </div> |
---|
239 | </form> |
---|