mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-03 13:51:36 +01:00
232 lines
6.3 KiB
XML
232 lines
6.3 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 1.9 Maintainer: yannick Status: ready -->
|
|
|
|
<sect1 id="language.function.html.select.time">
|
|
<title>{html_select_time}</title>
|
|
<para>
|
|
<varname>{html_select_time}</varname> est une
|
|
<link linkend="language.custom.functions">fonction personnalisée</link>
|
|
qui crée des listes déroulantes pour saisir une heure. Elle prends en charge l'heure,
|
|
les minutes, les secondes et le méridian.
|
|
</para>
|
|
<para>
|
|
L'attribut <parameter>time</parameter> accepte comme paramètre différents
|
|
formats. Ils peuvent être un timestamp unique, une chaîne respectant le format
|
|
<literal>YYYYMMDDHHMMSS</literal> ou une chaîne
|
|
valide pour la fonction 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>Nom attribut</entry>
|
|
<entry>Type</entry>
|
|
<entry>Requis</entry>
|
|
<entry>Défaut</entry>
|
|
<entry>Description</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>prefix</entry>
|
|
<entry>chaîne de caractères</entry>
|
|
<entry>Non</entry>
|
|
<entry>Time_</entry>
|
|
<entry>Par quoi préfixer la variable.</entry>
|
|
</row>
|
|
<row>
|
|
<entry>time</entry>
|
|
<entry>timestamp</entry>
|
|
<entry>Non</entry>
|
|
<entry>current time</entry>
|
|
<entry>Quel jour / heure utiliser.</entry>
|
|
</row>
|
|
<row>
|
|
<entry>display_hours</entry>
|
|
<entry>boolean</entry>
|
|
<entry>Non</entry>
|
|
<entry>&true;</entry>
|
|
<entry>S'il faut afficher l'heure.</entry>
|
|
</row>
|
|
<row>
|
|
<entry>display_minutes</entry>
|
|
<entry>boolean</entry>
|
|
<entry>Non</entry>
|
|
<entry>&true;</entry>
|
|
<entry>S'il faut afficher les minutes.</entry>
|
|
</row>
|
|
<row>
|
|
<entry>display_seconds</entry>
|
|
<entry>boolean</entry>
|
|
<entry>Non</entry>
|
|
<entry>&true;</entry>
|
|
<entry>S'il faut afficher les secondes.</entry>
|
|
</row>
|
|
<row>
|
|
<entry>display_meridian</entry>
|
|
<entry>boolean</entry>
|
|
<entry>Non</entry>
|
|
<entry>&true;</entry>
|
|
<entry>S'il faut afficher le méridian (am/pm)</entry>
|
|
</row>
|
|
<row>
|
|
<entry>use_24_hours</entry>
|
|
<entry>boolean</entry>
|
|
<entry>Non</entry>
|
|
<entry>&true;</entry>
|
|
<entry>S'il faut utiliser l'horloge 24 heure.</entry>
|
|
</row>
|
|
<row>
|
|
<entry>minute_interval</entry>
|
|
<entry>integer</entry>
|
|
<entry>Non</entry>
|
|
<entry>1</entry>
|
|
<entry>Intervalle des minutes dans la liste
|
|
déroulante</entry>
|
|
</row>
|
|
<row>
|
|
<entry>second_interval</entry>
|
|
<entry>integer</entry>
|
|
<entry>Non</entry>
|
|
<entry>1</entry>
|
|
<entry>Intervalle des secondes dans la liste
|
|
déroulante</entry>
|
|
</row>
|
|
<row>
|
|
<entry>field_array</entry>
|
|
<entry>chaîne de caractères</entry>
|
|
<entry>Non</entry>
|
|
<entry>n/a</entry>
|
|
<entry>Nom du tableau dans lequel les valeures
|
|
seront stockées.</entry>
|
|
</row>
|
|
<row>
|
|
<entry>all_extra</entry>
|
|
<entry>chaîne de caractères</entry>
|
|
<entry>Non</entry>
|
|
<entry>null</entry>
|
|
<entry>Ajoute des attributs supplémentaires aux balises
|
|
select / input.</entry>
|
|
</row>
|
|
<row>
|
|
<entry>hour_extra</entry>
|
|
<entry>chaîne de caractères</entry>
|
|
<entry>Non</entry>
|
|
<entry>null</entry>
|
|
<entry>Ajoute des attributs supplémentaires aux balises
|
|
select / input de l'heure.</entry>
|
|
</row>
|
|
<row>
|
|
<entry>minute_extra</entry>
|
|
<entry>chaîne de caractères</entry>
|
|
<entry>Non</entry>
|
|
<entry>null</entry>
|
|
<entry>Ajoute des attributs supplémentaires aux balises
|
|
select / input des minutes.</entry>
|
|
</row>
|
|
<row>
|
|
<entry>second_extra</entry>
|
|
<entry>chaîne de caractères</entry>
|
|
<entry>Non</entry>
|
|
<entry>null</entry>
|
|
<entry>Ajoute des attributs supplémentaires aux balises
|
|
select / input des secondes.</entry>
|
|
</row>
|
|
<row>
|
|
<entry>meridian_extra</entry>
|
|
<entry>chaîne de caractères</entry>
|
|
<entry>Non</entry>
|
|
<entry>null</entry>
|
|
<entry>Ajoute des attributs supplémentaires aux balises
|
|
select / input du méridian.</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
<example>
|
|
<title>html_select_time</title>
|
|
<programlisting>
|
|
<![CDATA[
|
|
{html_select_time use_24_hours=true}
|
|
]]>
|
|
</programlisting>
|
|
<para>
|
|
À 9:20 et 23 secondes du matin, le template ci-dessus affichera :
|
|
</para>
|
|
<screen>
|
|
<![CDATA[
|
|
<select name="Time_Hour">
|
|
<option value="00">00</option>
|
|
<option value="01">01</option>
|
|
...coupé...
|
|
<option value="08">08</option>
|
|
<option value="09" selected>09</option>
|
|
<option value="10">10</option>
|
|
...coupé...
|
|
<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>
|
|
...coupé...
|
|
<option value="19">19</option>
|
|
<option value="20" selected>20</option>
|
|
<option value="21">21</option>
|
|
...coupé...
|
|
<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>
|
|
...coupé...
|
|
<option value="22">22</option>
|
|
<option value="23" selected>23</option>
|
|
<option value="24">24</option>
|
|
...coupé...
|
|
<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>
|
|
Voir aussi
|
|
<link linkend="language.variables.smarty.now"><parameter>$smarty.now</parameter></link>,
|
|
<link linkend="language.function.html.select.date"><varname>{html_select_date}</varname></link> et
|
|
les <link linkend="tips.dates">astuces sur les 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
|
|
--> |