Files
smarty/docs/fr/designers/language-custom-functions/language-function-html-select-date.xml

325 lines
13 KiB
XML
Raw Normal View History

2004-04-13 15:43:47 +00:00
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="language.function.html.select.date">
<title>html_select_date</title>
<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>Defaut</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry>prefix</entry>
<entry>cha<EFBFBD>ne de caract<63>res</entry>
<entry>Non</entry>
<entry>Date_</entry>
<entry>Avec quoi pr<70>fixer le nom de variable</entry>
</row>
<row>
<entry>time</entry>
<entry>timestamp/YYYY-MM-DD</entry>
<entry>Non</entry>
<entry>la date courante au format unix YYYY-MM-DD
format</entry>
<entry>la date / heure <20> utiliser</entry>
</row>
<row>
<entry>start_year</entry>
<entry>cha<EFBFBD>ne de caract<63>res</entry>
<entry>Non</entry>
<entry>current year</entry>
<entry>La premi<6D>re ann<6E>e dans la liste d<>roulante, soit
le num<75>ro de l'ann<6E>e, soit un nombre relatif <20> l'ann<6E>e
courante (+/- N).</entry>
</row>
<row>
<entry>end_year</entry>
<entry>cha<EFBFBD>ne de caract<63>res</entry>
<entry>Non</entry>
<entry>m<EFBFBD>me chose que start_year</entry>
<entry>La derni<6E>re ann<6E>e dans la liste d<>roulante, soit
le num<75>ro de l'ann<6E>e, soit un nombre relatif <20> l'ann<6E>e
courante (+/- N).</entry>
</row>
<row>
<entry>display_days</entry>
<entry>boolean</entry>
<entry>Non</entry>
<entry>true</entry>
<entry>Si l'on souhaite afficher les jours ou pas.</entry>
</row>
<row>
<entry>display_months</entry>
<entry>boolean</entry>
<entry>Non</entry>
<entry>true</entry>
<entry>Si l'on souhaite afficher les mois ou pas.</entry>
</row>
<row>
<entry>display_years</entry>
<entry>boolean</entry>
<entry>Non</entry>
<entry>true</entry>
<entry>Si l'on souhaite afficher les ann<6E>es ou pas.</entry>
</row>
<row>
<entry>month_format</entry>
<entry>cha<EFBFBD>ne de caract<63>res</entry>
<entry>Non</entry>
<entry>%B</entry>
<entry>le format du mois (strftime)</entry>
</row>
<row>
<entry>day_format</entry>
<entry>cha<EFBFBD>ne de caract<63>res</entry>
<entry>Non</entry>
<entry>%02d</entry>
<entry>Le format du jour (sprintf)</entry>
</row>
<row>
<entry>day_value_format</entry>
<entry>cha<EFBFBD>ne de caract<63>res</entry>
<entry>Non</entry>
<entry>%d</entry>
<entry>le format de la valeur du jour (sprintf)</entry>
</row>
<row>
<entry>year_as_text</entry>
<entry>boolean</entry>
<entry>Non</entry>
<entry>false</entry>
<entry>S'il faut afficher l'ann<6E>e au format texte</entry>
</row>
<row>
<entry>reverse_years</entry>
<entry>boolean</entry>
<entry>Non</entry>
<entry>false</entry>
<entry>Affiche les ann<6E>es dans l'ordre inverse</entry>
</row>
<row>
<entry>field_array</entry>
<entry>cha<EFBFBD>ne de caract<63>res</entry>
<entry>Non</entry>
<entry>null</entry>
<entry>
Si un nom est donn<6E>, la liste d<>roulante sera affich<63>e
de telle fa<66>on que les r<>sultats seront retourn<72>s <20> PHP
sous la forme nom[Day] (jour), nom[Year] (ann<6E>e),
nom[Month] (Mois).
</entry>
</row>
<row>
<entry>day_size</entry>
<entry>cha<EFBFBD>ne de caract<63>res</entry>
<entry>Non</entry>
<entry>null</entry>
<entry>Ajoute un attribut size <20> la liste
d<>roulante des jours.</entry>
</row>
<row>
<entry>month_size</entry>
<entry>cha<EFBFBD>ne de caract<63>res</entry>
<entry>Non</entry>
<entry>null</entry>
<entry>Ajoute un attribut size <20> la liste
d<>roulante des mois.</entry>
</row>
<row>
<entry>year_size</entry>
<entry>cha<EFBFBD>ne de caract<63>res</entry>
<entry>Non</entry>
<entry>null</entry>
<entry>Ajoute un attribut size <20> la liste
d<>roulante des ann<6E>es.</entry>
</row>
<row>
<entry>all_extra</entry>
<entry>cha<EFBFBD>ne de caract<63>res</entry>
<entry>Non</entry>
<entry>null</entry>
<entry>Ajoute des attributs suppl<70>mentaires <20>
toutes les balises select/input.</entry>
</row>
<row>
<entry>day_extra</entry>
<entry>cha<EFBFBD>ne de caract<63>res</entry>
<entry>Non</entry>
<entry>null</entry>
<entry>Ajoute des attributs suppl<70>mentaires aux balises
select/input du jour.</entry>
</row>
<row>
<entry>month_extra</entry>
<entry>cha<EFBFBD>ne de caract<63>res</entry>
<entry>Non</entry>
<entry>null</entry>
<entry>Ajoute des attributs suppl<70>mentaires aux balises
select/input du mois.</entry>
</row>
<row>
<entry>year_extra</entry>
<entry>cha<EFBFBD>ne de caract<63>res</entry>
<entry>Non</entry>
<entry>null</entry>
<entry>Ajoute des attributs suppl<70>mentaires aux balises
select/input de l'ann<6E>e.</entry>
</row>
<row>
<entry>field_order</entry>
<entry>cha<EFBFBD>ne de caract<63>res</entry>
<entry>Non</entry>
<entry>MDY</entry>
<entry>L'ordre dans lequel afficher les
listes d<>roulantes.</entry>
</row>
<row>
<entry>field_separator</entry>
<entry>cha<EFBFBD>ne de caract<63>res</entry>
<entry>Non</entry>
<entry>\n</entry>
<entry>la cha<68>ne de caract<63>res affich<63>e entre les
diff<66>rents champs.</entry>
</row>
<row>
<entry>month_value_format</entry>
<entry>cha<EFBFBD>ne de caract<63>res</entry>
<entry>Non</entry>
<entry>%m</entry>
<entry>Le format strftime de la valeur des mois, par d<>faut %m
pour les num<75>ros.</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
html_select_date est une fonction utilisateur qui cr<63>e des listes
d<>roulantes pour saisir la date. Elle peut afficher n'importe quel
jour, mois et ann<6E>e.
</para>
<example>
<title>html_select_date</title>
<programlisting>
{html_select_date}
SORTIE:
&lt;select name="Date_Month"&gt;
&lt;option value="1"&gt;January&lt;/option&gt;
&lt;option value="2"&gt;February&lt;/option&gt;
&lt;option value="3"&gt;March&lt;/option&gt;
&lt;option value="4"&gt;April&lt;/option&gt;
&lt;option value="5"&gt;May&lt;/option&gt;
&lt;option value="6"&gt;June&lt;/option&gt;
&lt;option value="7"&gt;July&lt;/option&gt;
&lt;option value="8"&gt;August&lt;/option&gt;
&lt;option value="9"&gt;September&lt;/option&gt;
&lt;option value="10"&gt;October&lt;/option&gt;
&lt;option value="11"&gt;November&lt;/option&gt;
&lt;option value="12" selected&gt;December&lt;/option&gt;
&lt;/select&gt;
&lt;select name="Date_Day"&gt;
&lt;option value="1"&gt;01&lt;/option&gt;
&lt;option value="2"&gt;02&lt;/option&gt;
&lt;option value="3"&gt;03&lt;/option&gt;
&lt;option value="4"&gt;04&lt;/option&gt;
&lt;option value="5"&gt;05&lt;/option&gt;
&lt;option value="6"&gt;06&lt;/option&gt;
&lt;option value="7"&gt;07&lt;/option&gt;
&lt;option value="8"&gt;08&lt;/option&gt;
&lt;option value="9"&gt;09&lt;/option&gt;
&lt;option value="10"&gt;10&lt;/option&gt;
&lt;option value="11"&gt;11&lt;/option&gt;
&lt;option value="12"&gt;12&lt;/option&gt;
&lt;option value="13" selected&gt;13&lt;/option&gt;
&lt;option value="14"&gt;14&lt;/option&gt;
&lt;option value="15"&gt;15&lt;/option&gt;
&lt;option value="16"&gt;16&lt;/option&gt;
&lt;option value="17"&gt;17&lt;/option&gt;
&lt;option value="18"&gt;18&lt;/option&gt;
&lt;option value="19"&gt;19&lt;/option&gt;
&lt;option value="20"&gt;20&lt;/option&gt;
&lt;option value="21"&gt;21&lt;/option&gt;
&lt;option value="22"&gt;22&lt;/option&gt;
&lt;option value="23"&gt;23&lt;/option&gt;
&lt;option value="24"&gt;24&lt;/option&gt;
&lt;option value="25"&gt;25&lt;/option&gt;
&lt;option value="26"&gt;26&lt;/option&gt;
&lt;option value="27"&gt;27&lt;/option&gt;
&lt;option value="28"&gt;28&lt;/option&gt;
&lt;option value="29"&gt;29&lt;/option&gt;
&lt;option value="30"&gt;30&lt;/option&gt;
&lt;option value="31"&gt;31&lt;/option&gt;
&lt;/select&gt;
&lt;select name="Date_Year"&gt;
&lt;option value="2001" selected&gt;2001&lt;/option&gt;
&lt;/select&gt;</programlisting>
</example>
<example>
<title>html_select_date</title>
<programlisting>
{* le d<>marage et la fin de l'ann<6E>e peuvent <20>tre relatif <20> l'ann<6E>e courante *}
{html_select_date prefix="StartDate" time=$time start_year="-5" end_year="+1" display_days=false}
SORTIE: (current year is 2000)
&lt;select name="StartDateMonth"&gt;
&lt;option value="1"&gt;January&lt;/option&gt;
&lt;option value="2"&gt;February&lt;/option&gt;
&lt;option value="3"&gt;March&lt;/option&gt;
&lt;option value="4"&gt;April&lt;/option&gt;
&lt;option value="5"&gt;May&lt;/option&gt;
&lt;option value="6"&gt;June&lt;/option&gt;
&lt;option value="7"&gt;July&lt;/option&gt;
&lt;option value="8"&gt;August&lt;/option&gt;
&lt;option value="9"&gt;September&lt;/option&gt;
&lt;option value="10"&gt;October&lt;/option&gt;
&lt;option value="11"&gt;November&lt;/option&gt;
&lt;option value="12" selected&gt;December&lt;/option&gt;
&lt;/select&gt;
&lt;select name="StartDateYear"&gt;
&lt;option value="1999"&gt;1995&lt;/option&gt;
&lt;option value="1999"&gt;1996&lt;/option&gt;
&lt;option value="1999"&gt;1997&lt;/option&gt;
&lt;option value="1999"&gt;1998&lt;/option&gt;
&lt;option value="1999"&gt;1999&lt;/option&gt;
&lt;option value="2000" selected&gt;2000&lt;/option&gt;
&lt;option value="2001"&gt;2001&lt;/option&gt;
&lt;/select&gt;</programlisting>
</example>
</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
-->