source: branches/comu-ver2/data/Smarty/templates/default/admin/basis/holiday.tpl @ 17605

Revision 17605, 4.4 KB checked in by Seasoft, 16 years ago (diff)

/index.php にリンクやリダイレクトしている箇所の「index.php」を定数化。

  • 定数「DIR_INDEX_FILE」… DirectoryIndex? の実ファイル名。現状の EC-CUBE は、「index.php」。/html/define.php で定義するが、定義が無い場合 SC_Initial::defineDirectoryIndex() で「index.php」と定義。本来は、プログラム中で実ファイルとしての index.php を指すときとは、この定数を使うのが良い気がするが、今回はそこまでは書き換えていない。
  • 定数「USE_FILENAME_DIR_INDEX」… DIR_INDEX_FILE にアクセスするときにファイル名を使用するか。/html/define.php で定義。
  • 定数「DIR_INDEX_URL」… /index.php にリンクやリダイレクトしている箇所の「index.php」部分を示す。この定数は SC_Initial::defineDirectoryIndex() で自動生成する。

・$_SERVERPHP_SELF? や自身をあらわすファイル名を利用している箇所を文字列「?」に書き換え。これにより、/ が自己URLにリンクするときに /index.php となることを防ぐ。RFC3986 を参考にする。モバイル端末がこのRFCに準拠しているのか確信が無いので、モバイルではこの変更は見送った。
・従来 / にリンクしていた箇所に、定数「DIR_INDEX_URL」を付加。漏れがあると予測される。

  • Property svn:eol-style set to LF
  • Property svn:mime-type set to text/html; charset=UTF-8
Line 
1<!--{*
2/*
3 * This file is part of EC-CUBE
4 *
5 * Copyright(c) 2000-2008 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<form name="form1" id="form1" method="post" action="?">
25<input type="hidden" name="mode" value="edit" />
26<input type="hidden" name="holiday_id" value="<!--{$tpl_holiday_id}-->" />
27<div id="basis" class="contents-main">
28  <h2>定休日登録</h2>
29
30  <table class="form">
31    <tr>
32      <th>タイトル<span class="attention"> *</span></th>
33      <td>
34        <!--{if $arrErr.title}--><span class="attention"><!--{$arrErr.title}--></span><!--{/if}-->
35        <input type="text" name="title" value="<!--{$arrForm.title|escape}-->" maxlength="<!--{$smarty.const.SMTEXT_LEN}-->" style="" size="60" class="box60"/>
36        <span class="attention"> (上限<!--{$smarty.const.SMTEXT_LEN}-->文字)</span>
37      </td>
38    </tr>
39    <tr>
40      <th>日付<span class="attention"> *</span></th>
41      <td>
42        <!--{if $arrErr.date || $arrErr.month || $arrErr.day}-->
43        <span class="attention"><!--{$arrErr.date}--></span>
44        <span class="attention"><!--{$arrErr.month}--></span>
45        <span class="attention"><!--{$arrErr.day}--></span>
46        <!--{/if}-->
47        <select name="month" style="<!--{$arrErr.month|sfGetErrorColor}-->">
48          <option value="">--</option>
49          <!--{html_options options=$arrMonth selected=$arrForm.month}-->
50        </select>月
51        <select name="day" style="<!--{$arrErr.day|sfGetErrorColor}-->">
52          <option value="">--</option>
53          <!--{html_options options=$arrDay selected=$arrForm.day}-->
54        </select>日
55        <br />
56        <span class="attention">振替え休日は自動設定されないので、振替え先の日付を設定してください。</span>
57      </td>
58    </tr>
59  </table>
60
61  <div class="btn">
62    <button type="submit"><span>この内容で登録する</span></button>
63  </div>
64
65  <table class="list">
66    <tr>
67      <th>タイトル</th>
68      <th>日付</th>
69      <th>編集</th>
70      <th>削除</th>
71      <th>移動</th>
72    </tr>
73    <!--{section name=cnt loop=$arrHoliday}-->
74    <tr style="background:<!--{if $tpl_class_id != $arrHoliday[cnt].holiday_id}-->#ffffff<!--{else}--><!--{$smarty.const.SELECT_RGB}--><!--{/if}-->;">
75      <!--{assign var=holiday_id value=$arrHoliday[cnt].holiday_id}-->
76      <td><!--{$arrHoliday[cnt].title|escape}--></td>
77      <td><!--{$arrHoliday[cnt].month|escape}-->月<!--{$arrHoliday[cnt].day|escape}-->日</td>
78      <td class="center">
79        <!--{if $tpl_holiday_id != $arrHoliday[cnt].holiday_id}-->
80        <a href="<!--{$smarty.server.PHP_SELF|escape}-->" onclick="fnModeSubmit('pre_edit', 'holiday_id', <!--{$arrHoliday[cnt].holiday_id}-->); return false;">編集</a>
81        <!--{else}-->
82        編集中
83        <!--{/if}-->
84      </td>
85      <td class="center">
86        <!--{if $arrClassCatCount[$class_id] > 0}-->
87        -
88        <!--{else}-->
89        <a href="<!--{$smarty.server.PHP_SELF|escape}-->" onclick="fnModeSubmit('delete', 'holiday_id', <!--{$arrHoliday[cnt].holiday_id}-->); return false;">削除</a>
90        <!--{/if}-->
91      </td>
92      <td class="center">
93        <!--{if $smarty.section.cnt.iteration != 1}-->
94        <a href="<!--{$smarty.server.PHP_SELF|escape}-->" onclick="fnModeSubmit('up', 'holiday_id', <!--{$arrHoliday[cnt].holiday_id}-->); return false;" />上へ</a>
95        <!--{/if}-->
96        <!--{if $smarty.section.cnt.iteration != $smarty.section.cnt.last}-->
97        <a href="<!--{$smarty.server.PHP_SELF|escape}-->" onclick="fnModeSubmit('down', 'holiday_id', <!--{$arrHoliday[cnt].holiday_id}-->); return false;" />下へ</a>
98        <!--{/if}-->
99      </td>
100    </tr>
101    <!--{/section}-->
102  </table>
103
104</div>
105</form>
Note: See TracBrowser for help on using the repository browser.