source: trunk/spip/esqueleto-redcta/plugins/crayons/controleurs/document_fichier.html @ 358

Last change on this file since 358 was 69, checked in by guille, 16 years ago

Se agrego Plugin Crayon y se actualizaron los esqueletos para que funcione

File size: 1.2 KB
Line 
1[(#REM)
2
3        Controleur pour le crayon 'document'
4
5]
6#CACHE{0}
7
8
9[(#REM) En fonction de du contexte, choisir un logo ]
10
11<BOUCLE_d(DOCUMENTS){id_document}>
12
13[(#SET{image,[<img src="(#LOGO_DOCUMENT||extraire_attribut{src})" />]})]
14
15<fieldset[ style="(#ENV{style});"]>
16<legend>
17        [(#SET{logo,[(#GET{image}|reduire_image{0,40})]})]
18
19        [(#REM) hacke l'url pour eviter le cache du navigateur ]
20        [(#SET{url,[(#GET{logo}|extraire_attribut{src}
21                |parametre_url{s,#EVAL{time()}})]})]
22
23        <small>[(#GET{logo}|inserer_attribut{src,#GET{url}}
24                |inserer_attribut{style,vertical-align:middle;})]
25        &nbsp; remplacer ce document #EXTENSION
26        [((#GET{image}
27                |extraire_attribut{width})&times;[(#GET{image}
28                |extraire_attribut{height})]px)]&nbsp;:</small>
29
30</legend>
31
32<input class="crayon-active" name="#ENV{name_document}" type="file"[
33onchange="(#MODE|=={vignette}|?{' '})if (this.value && !this.value.match(/\.(png|jpeg|jpg|gif)$/i)) { alert('Il faut choisir une image :-)'); this.value=''; };"] />
34
35[(#REM)
36
37TODO: document distant (cf. document_fichier_revision dans inc/crayons)
38
39<br />
40<input class="crayon-active" name="#ENV{name_fichier}" type="text" value="#FICHIER" />
41
42]
43
44</fieldset>
45
46</BOUCLE_d>
Note: See TracBrowser for help on using the repository browser.