2007-04-21 12:13:34 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
|
<!-- $Revision$ -->
|
2008-05-26 08:47:23 +00:00
|
|
|
<!-- EN-Revision: 2602 Maintainer: takagi Status: ready -->
|
2007-04-21 12:13:34 +00:00
|
|
|
<!-- CREDITS: mat-sh,daichi,joe -->
|
|
|
|
|
<sect1 id="language.function.html.select.time">
|
|
|
|
|
<title>{html_select_time}</title>
|
|
|
|
|
<para>
|
|
|
|
|
<varname>{html_select_time}</varname> は、時間のドロップダウンリストを作成する
|
|
|
|
|
<link linkend="language.custom.functions">カスタム関数</link> です。
|
|
|
|
|
時・分・秒・am/pm のいずれか又は全てを表示する事が出来ます。
|
|
|
|
|
</para>
|
|
|
|
|
<para>
|
|
|
|
|
<parameter>time</parameter> 属性にはUNIXタイムスタンプや
|
|
|
|
|
<literal>YYYYMMDDHHMMSS</literal> 形式の文字列、PHP の
|
|
|
|
|
<ulink url="&url.php-manual;strtotime"><varname>strtotime()</varname></ulink>
|
|
|
|
|
によって解析可能な文字列のような異なるフォーマットを持たせる事が出来ます。
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
<informaltable frame="all">
|
|
|
|
|
<tgroup cols="5">
|
|
|
|
|
<colspec colname="param" align="center" />
|
|
|
|
|
<colspec colname="type" align="center" />
|
|
|
|
|
<colspec colname="required" align="center" />
|
|
|
|
|
<colspec colname="default" align="center" />
|
|
|
|
|
<colspec colname="desc" />
|
|
|
|
|
<thead>
|
|
|
|
|
<row>
|
|
|
|
|
<entry>属性名</entry>
|
|
|
|
|
<entry>型</entry>
|
|
|
|
|
<entry>必須</entry>
|
|
|
|
|
<entry>デフォルト</entry>
|
|
|
|
|
<entry>概要</entry>
|
|
|
|
|
</row>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
<row>
|
|
|
|
|
<entry>prefix</entry>
|
|
|
|
|
<entry>string</entry>
|
|
|
|
|
<entry>No</entry>
|
|
|
|
|
<entry>Time_</entry>
|
|
|
|
|
<entry>name属性に付加する接頭辞</entry>
|
|
|
|
|
</row>
|
|
|
|
|
<row>
|
|
|
|
|
<entry>time</entry>
|
|
|
|
|
<entry>timestamp</entry>
|
|
|
|
|
<entry>No</entry>
|
|
|
|
|
<entry>現在の時間</entry>
|
|
|
|
|
<entry>使用する日付/時間</entry>
|
|
|
|
|
</row>
|
|
|
|
|
<row>
|
|
|
|
|
<entry>display_hours</entry>
|
|
|
|
|
<entry>boolean</entry>
|
|
|
|
|
<entry>No</entry>
|
|
|
|
|
<entry>&true;</entry>
|
|
|
|
|
<entry>時を表示するかどうか</entry>
|
|
|
|
|
</row>
|
|
|
|
|
<row>
|
|
|
|
|
<entry>display_minutes</entry>
|
|
|
|
|
<entry>boolean</entry>
|
|
|
|
|
<entry>No</entry>
|
|
|
|
|
<entry>&true;</entry>
|
|
|
|
|
<entry>分を表示するかどうか</entry>
|
|
|
|
|
</row>
|
|
|
|
|
<row>
|
|
|
|
|
<entry>display_seconds</entry>
|
|
|
|
|
<entry>boolean</entry>
|
|
|
|
|
<entry>No</entry>
|
|
|
|
|
<entry>&true;</entry>
|
|
|
|
|
<entry>秒を表示するかどうか</entry>
|
|
|
|
|
</row>
|
|
|
|
|
<row>
|
|
|
|
|
<entry>display_meridian</entry>
|
|
|
|
|
<entry>boolean</entry>
|
|
|
|
|
<entry>No</entry>
|
|
|
|
|
<entry>&true;</entry>
|
|
|
|
|
<entry>am/pm を表示するかどうか</entry>
|
|
|
|
|
</row>
|
|
|
|
|
<row>
|
|
|
|
|
<entry>use_24_hours</entry>
|
|
|
|
|
<entry>boolean</entry>
|
|
|
|
|
<entry>No</entry>
|
|
|
|
|
<entry>&true;</entry>
|
|
|
|
|
<entry>24 時間クロックを用いるかどうか</entry>
|
|
|
|
|
</row>
|
|
|
|
|
<row>
|
|
|
|
|
<entry>minute_interval</entry>
|
|
|
|
|
<entry>integer</entry>
|
|
|
|
|
<entry>No</entry>
|
|
|
|
|
<entry>1</entry>
|
|
|
|
|
<entry>ドロップダウンリストの分間隔</entry>
|
|
|
|
|
</row>
|
|
|
|
|
<row>
|
|
|
|
|
<entry>second_interval</entry>
|
|
|
|
|
<entry>integer</entry>
|
|
|
|
|
<entry>No</entry>
|
|
|
|
|
<entry>1</entry>
|
|
|
|
|
<entry>ドロップダウンリストの秒間隔</entry>
|
|
|
|
|
</row>
|
|
|
|
|
<row>
|
|
|
|
|
<entry>field_array</entry>
|
|
|
|
|
<entry>string</entry>
|
|
|
|
|
<entry>No</entry>
|
|
|
|
|
<entry>n/a</entry>
|
|
|
|
|
<entry>結果の値をこの名前の配列に渡して出力</entry>
|
|
|
|
|
</row>
|
|
|
|
|
<row>
|
|
|
|
|
<entry>all_extra</entry>
|
|
|
|
|
<entry>string</entry>
|
|
|
|
|
<entry>No</entry>
|
|
|
|
|
<entry>null</entry>
|
|
|
|
|
<entry>全てのselect/inputタグに拡張属性を追加</entry>
|
|
|
|
|
</row>
|
|
|
|
|
<row>
|
|
|
|
|
<entry>hour_extra</entry>
|
|
|
|
|
<entry>string</entry>
|
|
|
|
|
<entry>No</entry>
|
|
|
|
|
<entry>null</entry>
|
|
|
|
|
<entry>時間のselect/inputタグに拡張属性を追加</entry>
|
|
|
|
|
</row>
|
|
|
|
|
<row>
|
|
|
|
|
<entry>minute_extra</entry>
|
|
|
|
|
<entry>string</entry>
|
|
|
|
|
<entry>No</entry>
|
|
|
|
|
<entry>null</entry>
|
|
|
|
|
<entry>分のselect/inputタグに拡張属性を追加</entry>
|
|
|
|
|
</row>
|
|
|
|
|
<row>
|
|
|
|
|
<entry>second_extra</entry>
|
|
|
|
|
<entry>string</entry>
|
|
|
|
|
<entry>No</entry>
|
|
|
|
|
<entry>null</entry>
|
|
|
|
|
<entry>秒のselect/inputタグに拡張属性を追加</entry>
|
|
|
|
|
</row>
|
|
|
|
|
<row>
|
|
|
|
|
<entry>meridian_extra</entry>
|
|
|
|
|
<entry>string</entry>
|
|
|
|
|
<entry>No</entry>
|
|
|
|
|
<entry>null</entry>
|
|
|
|
|
<entry>am/pmのselect/inputタグに拡張属性を追加</entry>
|
|
|
|
|
</row>
|
|
|
|
|
</tbody>
|
|
|
|
|
</tgroup>
|
|
|
|
|
</informaltable>
|
|
|
|
|
|
|
|
|
|
<example>
|
|
|
|
|
<title>{html_select_time}</title>
|
|
|
|
|
<programlisting>
|
|
|
|
|
<![CDATA[
|
|
|
|
|
{html_select_time use_24_hours=true}
|
|
|
|
|
]]>
|
|
|
|
|
</programlisting>
|
|
|
|
|
<para>
|
|
|
|
|
現在時刻が午前 9 時 20 分 23 秒だとすると、このテンプレートの出力は次のようになります。
|
|
|
|
|
</para>
|
|
|
|
|
<screen>
|
|
|
|
|
<![CDATA[
|
|
|
|
|
<select name="Time_Hour">
|
|
|
|
|
<option value="00">00</option>
|
|
|
|
|
<option value="01">01</option>
|
|
|
|
|
... 省略 ....
|
|
|
|
|
<option value="08">08</option>
|
|
|
|
|
<option value="09" selected>09</option>
|
|
|
|
|
<option value="10">10</option>
|
|
|
|
|
... 省略 ....
|
|
|
|
|
<option value="22">22</option>
|
|
|
|
|
<option value="23">23</option>
|
|
|
|
|
</select>
|
|
|
|
|
<select name="Time_Minute">
|
|
|
|
|
<option value="00">00</option>
|
|
|
|
|
<option value="01">01</option>
|
|
|
|
|
... 省略 ....
|
|
|
|
|
<option value="19">19</option>
|
|
|
|
|
<option value="20" selected>20</option>
|
|
|
|
|
<option value="21">21</option>
|
|
|
|
|
... 省略 ....
|
|
|
|
|
<option value="58">58</option>
|
|
|
|
|
<option value="59">59</option>
|
|
|
|
|
</select>
|
|
|
|
|
<select name="Time_Second">
|
|
|
|
|
<option value="00">00</option>
|
|
|
|
|
<option value="01">01</option>
|
|
|
|
|
... 省略 ....
|
|
|
|
|
<option value="22">22</option>
|
|
|
|
|
<option value="23" selected>23</option>
|
|
|
|
|
<option value="24">24</option>
|
|
|
|
|
... 省略 ....
|
|
|
|
|
<option value="58">58</option>
|
|
|
|
|
<option value="59">59</option>
|
|
|
|
|
</select>
|
|
|
|
|
<select name="Time_Meridian">
|
|
|
|
|
<option value="am" selected>AM</option>
|
|
|
|
|
<option value="pm">PM</option>
|
|
|
|
|
</select>
|
|
|
|
|
]]>
|
|
|
|
|
</screen>
|
|
|
|
|
</example>
|
|
|
|
|
<para>
|
|
|
|
|
<link linkend="language.variables.smarty.now"><parameter>$smarty.now</parameter></link>、
|
|
|
|
|
<link linkend="language.function.html.select.date"><varname>{html_select_date}</varname></link>
|
|
|
|
|
および <link linkend="tips.dates">日付に関するヒントのページ</link>
|
|
|
|
|
も参照してください。
|
|
|
|
|
</para>
|
|
|
|
|
</sect1>
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
|
Local variables:
|
|
|
|
|
mode: sgml
|
|
|
|
|
sgml-omittag:t
|
|
|
|
|
sgml-shorttag:t
|
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
|
sgml-indent-step:1
|
|
|
|
|
sgml-indent-data:t
|
|
|
|
|
indent-tabs-mode:nil
|
|
|
|
|
sgml-parent-document:nil
|
|
|
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
|
|
|
sgml-exposed-tags:nil
|
|
|
|
|
sgml-local-catalogs:nil
|
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
|
End:
|
|
|
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
|
|
|
vim: et tw=78 syn=sgml
|
|
|
|
|
vi: ts=1 sw=1
|
|
|
|
|
-->
|