amelioration visuelle + recup id_aut_modele dans le formualire
d'association de modele
This commit is contained in:
parent
71f9e5c949
commit
710d1f94b3
6 changed files with 119 additions and 31 deletions
|
@ -3,6 +3,6 @@
|
||||||
<div id="charger_aut_modele">
|
<div id="charger_aut_modele">
|
||||||
<h1>Charger un modèle pour : [ (#ENV{nom})]</h1>
|
<h1>Charger un modèle pour : [ (#ENV{nom})]</h1>
|
||||||
<div class="">
|
<div class="">
|
||||||
[(#FORMULAIRE_ASSOCIER_AUT_MODELE{#ENV{id_auteur},#ENV{redirect}})]
|
[(#FORMULAIRE_ASSOCIER_AUT_MODELE{#ENV{id_auteur}, #ENV{aut_nom}, #ENV{redirect}})]
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -10,6 +10,20 @@
|
||||||
background-color: rgb(231, 233, 237);
|
background-color: rgb(231, 233, 237);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a.associer_modele {
|
||||||
|
color: rgb(51, 164, 51);
|
||||||
|
}
|
||||||
|
|
||||||
|
.nom_modele span {
|
||||||
|
background-color: #cecece;
|
||||||
|
padding: 2px 5px;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
.nom_modele a.associer_modele {
|
||||||
|
color: #000;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.icone_svg {
|
.icone_svg {
|
||||||
width: 1em;
|
width: 1em;
|
||||||
height: 1em;
|
height: 1em;
|
||||||
|
@ -18,8 +32,7 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
button[type='submit'].poubelle {
|
button[type='submit'].dissocier {
|
||||||
/*float: right;*/
|
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<BOUCLE_autmod(AUT_MODELES)>
|
<BOUCLE_autmod(AUT_MODELES)>
|
||||||
<div class="choix">
|
<div class="choix">
|
||||||
<label>
|
<label>
|
||||||
<input type="radio" class="radio" name="#GET{name}" value="#ID_AUT_MODELE" id="#GET{name}_#ID_AUT_MODELE}" >
|
<input type="radio" class="radio" name="#GET{name}" value="#ID_AUT_MODELE" id="#GET{name}_#ID_AUT_MODELE}" [(#ENV{id_aut_modele}|=={#ID_AUT_MODELE}|oui) checked] >
|
||||||
#NOM</label>
|
#NOM</label>
|
||||||
</div>
|
</div>
|
||||||
</BOUCLE_autmod>
|
</BOUCLE_autmod>
|
||||||
|
|
|
@ -1,21 +1,26 @@
|
||||||
<?php
|
<?php
|
||||||
if (!defined('_ECRIRE_INC_VERSION')) return;
|
if (!defined('_ECRIRE_INC_VERSION')) return;
|
||||||
|
|
||||||
function formulaires_associer_aut_modele_charger_dist($id_auteur, $redirect = ''){
|
function formulaires_associer_aut_modele_charger_dist($id_auteur, $aut_nom = 0, $redirect = ''){
|
||||||
|
$id_aut_modele = 0;
|
||||||
|
if ($aut_nom) {
|
||||||
|
$id_aut_modele = sql_getfetsel('id_aut_modele', 'spip_aut_modeles', 'nom='.sql_quote($aut_nom));
|
||||||
|
}
|
||||||
|
|
||||||
$valeurs = array(
|
$valeurs = array(
|
||||||
"id_auteur" => $id_auteur,
|
"id_auteur" => $id_auteur,
|
||||||
"id_aut_modele" => ""
|
"id_aut_modele" => intval($id_aut_modele)
|
||||||
);
|
);
|
||||||
|
|
||||||
return $valeurs;
|
return $valeurs;
|
||||||
}
|
}
|
||||||
|
|
||||||
function formulaires_associer_aut_modele_verifier_dist($id_auteur, $redirect = ''){
|
function formulaires_associer_aut_modele_verifier_dist($id_auteur, $aut_nom = 0, $redirect = ''){
|
||||||
$erreurs = array();
|
$erreurs = array();
|
||||||
return $erreurs;
|
return $erreurs;
|
||||||
}
|
}
|
||||||
|
|
||||||
function formulaires_associer_aut_modele_traiter_dist($id_auteur, $redirect = ''){
|
function formulaires_associer_aut_modele_traiter_dist($id_auteur, $aut_nom = 0, $redirect = ''){
|
||||||
|
|
||||||
$retour = array();
|
$retour = array();
|
||||||
|
|
||||||
|
|
|
@ -31,33 +31,55 @@
|
||||||
<td>
|
<td>
|
||||||
<div>
|
<div>
|
||||||
[(#BOSS|oui)
|
[(#BOSS|oui)
|
||||||
<img class="boss" src="[(#CHEMIN{img/boss.png})]" alt="boss"/>
|
<svg class="icone_svg" alt="boss">
|
||||||
|
<title>boss</title>
|
||||||
|
<use xlink:href="[(#CHEMIN{img/boss.svg})#boss]" />
|
||||||
|
</svg>
|
||||||
#NOM
|
#NOM
|
||||||
]
|
]
|
||||||
[(#BOSS|non)
|
[(#BOSS|non)
|
||||||
<a class="mediabox" href="[(#URL_PAGE{associer_aut_modele}
|
[(#GET{disabled}|non)
|
||||||
|
<a class="mediabox associer_modele"
|
||||||
|
title="<:auted:associer_modele:>"
|
||||||
|
href="[(#URL_PAGE{associer_aut_modele}
|
||||||
|parametre_url{id_auteur,#ID_AUTEUR}
|
|parametre_url{id_auteur,#ID_AUTEUR}
|
||||||
|parametre_url{nom,#NOM}
|
|parametre_url{nom,#NOM}
|
||||||
|parametre_url{redirect,#SELF}
|
|parametre_url{redirect,#SELF}
|
||||||
)]"
|
)]"
|
||||||
title="<:auted:charger_modele:>"
|
|
||||||
>
|
>
|
||||||
<svg class="icone_svg" alt="modele">
|
<svg class="icone_svg" alt="modele">
|
||||||
<use xlink:href="[(#CHEMIN{img/modele.svg})#modele]" />
|
<use xlink:href="[(#CHEMIN{img/modele.svg})#modele]" />
|
||||||
</svg>
|
</svg>
|
||||||
</a>
|
</a>
|
||||||
|
]
|
||||||
#NOM
|
#NOM
|
||||||
[ <div class="nom_modele">
|
[ <div class="nom_modele">
|
||||||
|
<span>
|
||||||
|
[(#GET{disabled}|oui)
|
||||||
|
<a class="mediabox associer_modele"
|
||||||
|
title="<:auted:associer_modele:>"
|
||||||
|
href="[(#URL_PAGE{associer_aut_modele}
|
||||||
|
|parametre_url{id_auteur,#ID_AUTEUR}
|
||||||
|
|parametre_url{aut_nom,#AUT_NOM}
|
||||||
|
|parametre_url{nom,#NOM}
|
||||||
|
|parametre_url{redirect,#SELF}
|
||||||
|
)]"
|
||||||
|
>
|
||||||
|
<svg class="icone_svg" alt="modele">
|
||||||
|
<use xlink:href="[(#CHEMIN{img/modele.svg})#modele]" />
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
]
|
||||||
(#AUT_NOM)
|
(#AUT_NOM)
|
||||||
<button class="poubelle" type="submit" value="#ID_AUTEUR" name="dissocier_modele"
|
<button class="dissocier" type="submit" value="#ID_AUTEUR" name="dissocier_modele"
|
||||||
title="<:auted:dissocier_modele:>"
|
title="<:auted:dissocier_modele:>"
|
||||||
onClick="return confirm('<:auted:confirmer_dissocier_modele:>');"
|
onClick="return confirm('<:auted:confirmer_dissocier_modele:>');"
|
||||||
>
|
>
|
||||||
<svg class="icone_svg" alt="unlock">
|
<svg class="icone_svg" alt="unlock">
|
||||||
<use xlink:href="[(#CHEMIN{img/unlock.svg})#unlock]" />
|
<use xlink:href="[(#CHEMIN{img/unlock.svg})#unlock]" />
|
||||||
</svg>
|
</svg>
|
||||||
|
|
||||||
</button>
|
</button>
|
||||||
|
</span>
|
||||||
</div> ]
|
</div> ]
|
||||||
]
|
]
|
||||||
</div>
|
</div>
|
||||||
|
|
48
img/boss.svg
Normal file
48
img/boss.svg
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
version="1.1"
|
||||||
|
viewBox="0 0 223.55353 226.505"
|
||||||
|
overflow="visible"
|
||||||
|
enable-background="new 0 0 248.625 243.527"
|
||||||
|
xml:space="preserve"
|
||||||
|
x="0px"
|
||||||
|
y="0px"
|
||||||
|
id="boss"
|
||||||
|
>
|
||||||
|
|
||||||
|
<metadata
|
||||||
|
id="metadata28"><rdf:RDF><cc:Work
|
||||||
|
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||||
|
id="defs26" /><g
|
||||||
|
id="g847"><g
|
||||||
|
id="g861"><g
|
||||||
|
id="g4"
|
||||||
|
style="fill:#c91869;fill-opacity:1"
|
||||||
|
transform="translate(-11.571245,-5.608)"><path
|
||||||
|
d="M 77.193,22.826 C 73.463,16.431 62.715,5.608 46.088,5.608 25.341,5.608 11.576,28.225 11.576,43.185 l -0.003,0.816 c -0.288,50.836 34.925,76.727 64.515,89.495 v 0 c 5.071,2.188 10.956,-0.148 13.144,-5.22 2.188,-5.072 -0.149,-10.956 -5.22,-13.144 v 0 C 49.034,100.039 31.391,76.145 31.573,44.113 l 0.003,-0.93 c 0,-5.097 6.281,-17.577 14.512,-17.577 9.314,0 13.785,7.22 13.828,7.293 v 0 c 2.782,4.771 8.905,6.383 13.676,3.601 4.771,-2.782 6.383,-8.903 3.601,-13.674 z"
|
||||||
|
id="path2"
|
||||||
|
style="fill:#c91869;fill-opacity:1" /></g><g
|
||||||
|
id="g8"
|
||||||
|
style="fill:#c91869;fill-opacity:1"
|
||||||
|
transform="translate(-11.571245,-5.608)"><path
|
||||||
|
d="m 186.777,34.901 c -0.049,0.083 -0.073,0.124 -0.074,0.124 0.189,-0.303 4.742,-7.417 13.902,-7.417 8.232,0 14.514,12.48 14.514,17.577 l 0.004,0.93 c 0.182,32.032 -17.463,55.926 -52.442,71.019 v 0 c -5.07,2.188 -7.408,8.072 -5.22,13.144 2.188,5.07 8.072,7.408 13.144,5.22 v 0 c 29.592,-12.769 64.807,-38.659 64.518,-89.495 l -0.003,-0.816 c 0,-14.96 -13.766,-37.577 -34.514,-37.577 -16.629,0 -27.376,10.823 -31.105,17.219 v 0 c -2.782,4.771 -1.17,10.894 3.602,13.676 4.769,2.78 10.892,1.167 13.674,-3.604 z"
|
||||||
|
id="path6"
|
||||||
|
style="fill:#c91869;fill-opacity:1" /></g><path
|
||||||
|
d="m 169.38076,124.951 c 0,0 -42.522,31.19431 -42.522,65.79038 H 97.050755 c 0,-29.26087 -38.417,-65.46336 -38.417,-65.46336"
|
||||||
|
id="path10"
|
||||||
|
style="fill:#c91869;fill-opacity:1;stroke-width:1.14143" /><path
|
||||||
|
d="M 48.028755,4.892 V 79.45 c 0,0 -4.083,69.963 69.962005,69.963 0,0 59.75,-4.991 59.75,-69.963 V 4.892 Z"
|
||||||
|
id="path12"
|
||||||
|
style="fill:#c91869;fill-opacity:1" /><g
|
||||||
|
id="g16"
|
||||||
|
style="fill:#c91869;fill-opacity:1"
|
||||||
|
transform="translate(-11.571245,-5.608)"><path
|
||||||
|
d="m 82.042,203.364 c 3.003,-4.407 9.825,-8.014 15.158,-8.014 h 53.674 c 5.334,0 12.153,3.604 15.159,8.014 l 3.693,5.414 c 3.004,4.41 5.461,11.462 5.461,15.675 0,4.216 -4.365,7.66 -9.699,7.66 H 82.585 c -5.333,0 -9.697,-3.446 -9.697,-7.66 0,-4.212 2.457,-11.265 5.461,-15.675 z"
|
||||||
|
id="path14"
|
||||||
|
style="fill:#c91869;fill-opacity:1" /></g></g></g></svg>
|
After Width: | Height: | Size: 3 KiB |
Loading…
Add table
Reference in a new issue