source: trunk/spip/esqueleto-redcta/plugins/crayons/controleurs/logo.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.4 KB
Line 
1[(#REM)
2
3        Controleur pour le crayon 'logo'
4
5]
6#CACHE{0}
7
8
9[(#REM) En fonction de du contexte, choisir un logo ]
10
11[(#SET{image,[(#ID_ARTICLE|?{#LOGO_ARTICLE_NORMAL}
12        |sinon{[(#ID_AUTEUR|?{#LOGO_AUTEUR_NORMAL})]}
13        |sinon{[(#ID_BREVE|?{#LOGO_BREVE_NORMAL})]}
14        |sinon{[(#ID_RUBRIQUE|?{#LOGO_RUBRIQUE_NORMAL})]}
15        |sinon{[(#ID_SYNDIC|?{#LOGO_SITE_NORMAL})]}
16        |sinon{[(#ID_MOT|?{#LOGO_MOT_NORMAL})]})]})]
17
18
19<fieldset[ style="(#ENV{style});"]>
20<legend>[(#GET{image}|?{
21
22        [(#SET{logo,[(#GET{image}|reduire_image{0,40})]})]
23
24        [(#REM) hacke l'url pour eviter le cache du navigateur ]
25        [(#SET{url,[(#GET{logo}|extraire_attribut{src}
26                |parametre_url{s,#EVAL{time()}})]})]
27
28        <small>[(#GET{logo}|inserer_attribut{src,#GET{url}}
29                |inserer_attribut{style,vertical-align:middle;})]
30        &nbsp; remplacer ce logo
31        [((#GET{image}
32                |extraire_attribut{width})&times;[(#GET{image}
33                |extraire_attribut{height})]px)]&nbsp;:</small>
34
35        [(#SET{supprimer,
36                [<label><br />
37                        <input type="checkbox" name="(#ENV{name_logo})_supprimer" id="#ENV{name_logo}_supprimer" />
38                        supprimer ce logo
39                        </label>]
40        })]
41}|sinon{
42        Choisir un logo&nbsp;:
43})]
44</legend>
45
46<input class="crayon-active" name="#ENV{name_logo}" type="file"
47onchange="if (this.value && !this.value.match(/\.(png|jpeg|jpg|gif)$/i)) { alert('Il faut choisir une image :-)'); this.value=''; }; var q=cQuery('##ENV{name_logo}_supprimer').parent(); this.value ? q.hide() : q.show();" />
48
49#GET{supprimer}
50
51</fieldset>
Note: See TracBrowser for help on using the repository browser.