source: branches/version-2_12-dev/data/Smarty/templates/admin/contents/index.tpl @ 21866

Revision 21866, 10.6 KB checked in by h_yoshimoto, 12 years ago (diff)

#1831 Copyrightを更新を誤っているので戻します

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id
  • 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-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">
26<!--
27
28function func_regist(url) {
29    res = confirm('この内容で<!--{if $edit_mode eq "on"}-->編集<!--{else}-->登録<!--{/if}-->しても宜しいですか?');
30    if(res == true) {
31        document.form1.mode.value = 'regist';
32        document.form1.submit();
33        return false;
34    }
35    return false;
36}
37
38function func_edit(news_id) {
39    document.form1.mode.value = "search";
40    document.form1.news_id.value = news_id;
41    document.form1.submit();
42}
43
44function func_del(news_id) {
45    res = confirm('この新着情報を削除しても宜しいですか?');
46    if(res == true) {
47        document.form1.mode.value = "delete";
48        document.form1.news_id.value = news_id;
49        document.form1.submit();
50    }
51    return false;
52}
53
54function func_rankMove(term,news_id) {
55    document.form1.mode.value = "move";
56    document.form1.news_id.value = news_id;
57    document.form1.term.value = term;
58    document.form1.submit();
59}
60
61function moving(news_id,rank, max_rank) {
62
63    var val;
64    var ml;
65    var len;
66
67    ml = document.move;
68    len = document.move.elements.length;
69    j = 0;
70    for( var i = 0 ; i < len ; i++) {
71            if ( ml.elements[i].name == 'position' && ml.elements[i].value != "" ) {
72            val = ml.elements[i].value;
73            j ++;
74            }
75    }
76
77    if ( j > 1) {
78        alert( '移動順位は1つだけ入力してください。' );
79        return false;
80    } else if( ! val ) {
81        alert( '移動順位を入力してください。' );
82        return false;
83    } else if( val.length > 4){
84        alert( '移動順位は4桁以内で入力してください。' );
85        return false;
86    } else if( val.match(/[0-9]+/g) != val){
87        alert( '移動順位は数字で入力してください。' );
88        return false;
89    } else if( val == rank ){
90        alert( '移動させる番号が重複しています。' );
91        return false;
92    } else if( val == 0 ){
93        alert( '移動順位は0以上で入力してください。' );
94        return false;
95    } else if( val > max_rank ){
96        alert( '入力された順位は、登録数の最大値を超えています。' );
97        return false;
98    } else {
99        ml.moveposition.value = val;
100        ml.rank.value = rank;
101        ml.news_id.value = news_id;
102        ml.submit();
103        return false;
104    }
105}
106
107//-->
108</script>
109
110
111<div id="admin-contents" class="contents-main">
112<form name="form1" id="form1" method="post" action="?">
113<input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
114<input type="hidden" name="mode" value="" />
115<input type="hidden" name="news_id" value="<!--{$arrForm.news_id|h}-->" />
116<input type="hidden" name="term" value="" />
117    <!--{* ▼登録テーブルここから *}-->
118    <table>
119        <tr>
120            <th>日付<span class="attention"> *</span></th>
121            <td>
122                <!--{if $arrErr.year || $arrErr.month || $arrErr.day}--><span class="attention"><!--{$arrErr.year}--><!--{$arrErr.month}--><!--{$arrErr.day}--></span><!--{/if}-->
123                <select name="year" <!--{if $arrErr.year || $arrErr.month || $arrErr.day }-->style="background-color:<!--{$smarty.const.ERR_COLOR|h}-->"<!--{/if}-->>
124                    <option value="" selected="selected">----</option>
125                    <!--{html_options options=$arrYear selected=$arrForm.year}-->
126                </select>年
127                <select name="month" <!--{if $arrErr.year || $arrErr.month || $arrErr.day}-->style="background-color:<!--{$smarty.const.ERR_COLOR|h}-->"<!--{/if}-->>
128                    <option value="" selected="selected">--</option>
129                    <!--{html_options options=$arrMonth selected=$arrForm.month}-->
130                </select>月
131                <select name="day" <!--{if $arrErr.year || $arrErr.month || $arrErr.day}-->style="background-color:<!--{$smarty.const.ERR_COLOR|h}-->"<!--{/if}-->>
132                    <option value="" selected="selected">--</option>
133                    <!--{html_options options=$arrDay selected=$arrForm.day}-->
134                </select>日
135            </td>
136        </tr>
137        <tr>
138            <th>タイトル<span class="attention"> *</span></th>
139            <td>
140                <!--{if $arrErr.news_title}--><span class="attention"><!--{$arrErr.news_title}--></span><!--{/if}-->
141                <textarea name="news_title" cols="60" rows="8" class="area60" maxlength="<!--{$smarty.const.MTEXT_LEN}-->" <!--{if $arrErr.news_title}-->style="background-color:<!--{$smarty.const.ERR_COLOR|h}-->"<!--{/if}-->><!--{$arrForm.news_title|h}--></textarea><br />
142                <span class="attention"> (上限<!--{$smarty.const.MTEXT_LEN}-->文字)</span>
143            </td>
144        </tr>
145        <tr>
146            <th>URL</th>
147            <td>
148                <span class="attention"><!--{$arrErr.news_url}--></span>
149                <input type="text" name="news_url" size="60" class="box60"    value="<!--{$arrForm.news_url|h}-->" <!--{if $arrErr.news_url}-->style="background-color:<!--{$smarty.const.ERR_COLOR|h}-->"<!--{/if}--> maxlength="<!--{$smarty.const.URL_LEN}-->" />
150                <span class="attention"> (上限<!--{$smarty.const.URL_LEN}-->文字)</span>
151            </td>
152        </tr>
153        <tr>
154            <th>リンク</th>
155            <td><label><input type="checkbox" name="link_method" value="2" <!--{if $arrForm.link_method eq 2}--> checked <!--{/if}--> /> 別ウィンドウで開く</label></td>
156        </tr>
157        <tr>
158            <th>本文作成</th>
159            <td>
160                <!--{if $arrErr.news_comment}--><span class="attention"><!--{$arrErr.news_comment}--></span><!--{/if}-->
161                <textarea name="news_comment" cols="60" rows="8" wrap="soft" class="area60" maxlength="<!--{$smarty.const.LTEXT_LEN}-->" style="background-color:<!--{if $arrErr.news_comment}--><!--{$smarty.const.ERR_COLOR|h}--><!--{/if}-->"><!--{$arrForm.news_comment|h}--></textarea><br />
162                <span class="attention"> (上限3000文字)</span>
163            </td>
164        </tr>
165    </table>
166    <!--{* ▲登録テーブルここまで *}-->
167
168    <div class="btn-area">
169        <ul>
170            <li><a class="btn-action" href="javascript:;" onclick="return func_regist();"><span class="btn-next">この内容で登録する</span></a></li>
171        </ul>
172    </div>
173</form>
174
175    <h2>新着情報一覧</h2>
176    <!--{if $arrErr.moveposition}-->
177    <p><span class="attention"><!--{$arrErr.moveposition}--></span></p>
178    <!--{/if}-->
179    <!--{* ▼一覧表示エリアここから *}-->
180    <form name="move" id="move" method="post" action="?">
181    <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
182    <input type="hidden" name="mode" value="moveRankSet" />
183    <input type="hidden" name="term" value="setposition" />
184    <input type="hidden" name="news_id" value="" />
185    <input type="hidden" name="moveposition" value="" />
186    <input type="hidden" name="rank" value="" />
187    <table class="list">
188        <col width="5%" />
189        <col width="15%" />
190        <col width="45%" />
191        <col width="5%" />
192        <col width="5%" />
193        <col width="25%" />
194        <tr>
195            <th>順位</th>
196            <th>日付</th>
197            <th>タイトル</th>
198            <th class="edit">編集</th>
199            <th class="delete">削除</th>
200            <th>移動</th>
201        </tr>
202        <!--{section name=data loop=$arrNews}-->
203        <tr style="background:<!--{if $arrNews[data].news_id != $tpl_news_id}-->#ffffff<!--{else}--><!--{$smarty.const.SELECT_RGB}--><!--{/if}-->;" class="center">
204            <!--{assign var=db_rank value="`$arrNews[data].rank`"}-->
205            <td><!--{math equation="$line_max - $db_rank + 1"}--></td>
206            <td><!--{$arrNews[data].cast_news_date|date_format:"%Y/%m/%d"}--></td>
207            <td class="left">
208                <!--{if $arrNews[data].link_method eq 1 && $arrNews[data].news_url != ""}--><a href="<!--{$arrNews[data].news_url|h}-->" ><!--{$arrNews[data].news_title|h|nl2br}--></a>
209                <!--{elseif $arrNews[data].link_method eq 1 && $arrNews[data].news_url == ""}--><!--{$arrNews[data].news_title|h|nl2br}-->
210                <!--{elseif $arrNews[data].link_method eq 2 && $arrNews[data].news_url != ""}--><a href="<!--{$arrNews[data].news_url|h}-->" target="_blank" ><!--{$arrNews[data].news_title|h|nl2br}--></a>
211                <!--{else}--><!--{$arrNews[data].news_title|h|nl2br}-->
212                <!--{/if}-->
213            </td>
214            <td>
215                <!--{if $arrNews[data].news_id != $tpl_news_id}-->
216                <a href="#" onclick="return func_edit('<!--{$arrNews[data].news_id|h}-->');">編集</a>
217                <!--{else}-->
218                編集中
219                <!--{/if}-->
220            </td>
221            <td><a href="#" onclick="return func_del('<!--{$arrNews[data].news_id|h}-->');">削除</a></td>
222            <td>
223            <!--{if count($arrNews) != 1}-->
224            <input type="text" name="pos-<!--{$arrNews[data].news_id|h}-->" size="3" class="box3" />番目へ<a href="?" onclick="fnFormModeSubmit('move', 'moveRankSet','news_id', '<!--{$arrNews[data].news_id|h}-->'); return false;">移動</a><br />
225            <!--{/if}-->
226            <!--{if $arrNews[data].rank ne $max_rank}--><a href="#" onclick="return func_rankMove('up', '<!--{$arrNews[data].news_id|h}-->', '<!--{$max_rank|h}-->');">上へ</a><!--{/if}--> <!--{if $arrNews[data].rank ne 1}--><a href="#" onclick="return func_rankMove('down', '<!--{$arrNews[data].news_id|h}-->', '<!--{$max_rank|h}-->');">下へ</a><!--{/if}-->
227            </td>
228        </tr>
229        <!--{sectionelse}-->
230        <tr class="center">
231            <td colspan="6">現在データはありません。</td>
232        </tr>
233        <!--{/section}-->
234    </table>
235    </form>
236    <!--{* ▲一覧表示エリアここまで *}-->
237
238</div>
Note: See TracBrowser for help on using the repository browser.