ajout : dissociation d'un modele
This commit is contained in:
parent
77832c8edf
commit
c4d366bf86
6 changed files with 89 additions and 17 deletions
|
@ -17,32 +17,21 @@
|
||||||
fill: currentColor;
|
fill: currentColor;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.icone_svg.checked {
|
|
||||||
transform: rotate(180deg);
|
|
||||||
fill: green;
|
|
||||||
}
|
|
||||||
|
|
||||||
button[type='button'].toggle_save_modele {
|
button[type='submit'].poubelle {
|
||||||
float: right;
|
/*float: right;*/
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
min-width: 20px;
|
min-width: 20px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
color: #000;
|
color: #ff0000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pas_modele.enregistrer_modele input {
|
.pas_modele.enregistrer_modele input {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modifie input {
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
.modifie a {
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
|
|
||||||
.formulaire_editer_modeles_autorisation .chosen-container {
|
.formulaire_editer_modeles_autorisation .chosen-container {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,10 +41,23 @@
|
||||||
)]"
|
)]"
|
||||||
title="<:auted:charger_modele:>"
|
title="<:auted:charger_modele:>"
|
||||||
>
|
>
|
||||||
<i class="fa fa-upload"></i>
|
<svg class="icone_svg" alt="modele">
|
||||||
|
<use xlink:href="[(#CHEMIN{img/modele.svg})#modele]" />
|
||||||
|
</svg>
|
||||||
</a>
|
</a>
|
||||||
#NOM
|
#NOM
|
||||||
<div class="nom_modele">#AUT_NOM</div>
|
[ <div class="nom_modele">
|
||||||
|
(#AUT_NOM)
|
||||||
|
<button class="poubelle" type="submit" value="#ID_AUTEUR" name="dissocier_modele"
|
||||||
|
title="<:auted:dissocier_modele:>"
|
||||||
|
onClick="return confirm('<:auted:confirmer_dissocier_modele:>');"
|
||||||
|
>
|
||||||
|
<svg class="icone_svg" alt="unlock">
|
||||||
|
<use xlink:href="[(#CHEMIN{img/unlock.svg})#unlock]" />
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
</button>
|
||||||
|
</div> ]
|
||||||
]
|
]
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,11 @@ function formulaires_editer_autorisations_traiter_dist($id_auteur=0, $redirect='
|
||||||
$Tdisabled = _request('Tdisabled');
|
$Tdisabled = _request('Tdisabled');
|
||||||
$Tid_auteur = _request('Tid_auteur');
|
$Tid_auteur = _request('Tid_auteur');
|
||||||
|
|
||||||
|
$id_auteur_dissocier = _request('dissocier_modele');
|
||||||
|
if (intval($id_auteur_dissocier)) {
|
||||||
|
sql_updateq('spip_auteurs',['aut_nom' => ''], 'id_auteur='.intval($id_auteur_dissocier));
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($Tid_auteur as $id) {
|
foreach ($Tid_auteur as $id) {
|
||||||
$Tautorisations = [];
|
$Tautorisations = [];
|
||||||
|
|
||||||
|
@ -37,7 +42,7 @@ function formulaires_editer_autorisations_traiter_dist($id_auteur=0, $redirect='
|
||||||
$Tautorisations[key($valeur)][]= $valeur[key($valeur)];
|
$Tautorisations[key($valeur)][]= $valeur[key($valeur)];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$set = [ 'autorisations' => json_encode($Tautorisations) ];
|
$set = ['autorisations' => json_encode($Tautorisations)];
|
||||||
sql_updateq('spip_auteurs', $set, 'id_auteur='.intval($id));
|
sql_updateq('spip_auteurs', $set, 'id_auteur='.intval($id));
|
||||||
|
|
||||||
// on recalcul la session
|
// on recalcul la session
|
||||||
|
|
20
img/modele.svg
Normal file
20
img/modele.svg
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<?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"
|
||||||
|
id="modele"
|
||||||
|
xml:space="preserve"
|
||||||
|
enable-background="new 0 0 100 100"
|
||||||
|
viewBox="0 0 90 74"
|
||||||
|
y="0px"
|
||||||
|
x="0px"
|
||||||
|
version="1.1"><metadata
|
||||||
|
id="metadata917"><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="defs915" /><path
|
||||||
|
id="path905"
|
||||||
|
d="m 71.5,44 v -8.5 h -24 V 30.999 H 62 c 3.3,0 6,-2.7 6,-6 V 0 H 22 v 24.999 c 0,3.3 2.699,6 6,6 H 42.5 V 35.5 h -24 V 44 H 0 v 24 c 0,3.3 2.699,6 6,6 h 30 c 3.3,0 6,-2.7 6,-6 V 44 H 23.5 v -3.5 h 43 V 44 H 48 v 24 c 0,3.3 2.699,6 6,6 h 30 c 3.3,0 6,-2.7 6,-6 V 44 Z M 29,10 H 61 V 23.999 H 29 Z m 6,57 H 7 V 54 h 28 z m 48,0 H 55 V 54 h 28 z" /></svg>
|
After Width: | Height: | Size: 1.1 KiB |
23
img/trash.svg
Normal file
23
img/trash.svg
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<?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"
|
||||||
|
id="trash"
|
||||||
|
y="0px"
|
||||||
|
x="0px"
|
||||||
|
xml:space="preserve"
|
||||||
|
viewBox="0 0 90.833803 104.65872"
|
||||||
|
version="1.1"><metadata
|
||||||
|
id="metadata16"><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="defs14" /><path
|
||||||
|
id="path2"
|
||||||
|
stroke="none"
|
||||||
|
d="M 0,8.2802661 H 31.823467 V 0 h 27.186857 v 8.2802661 c 11.01016,0 20.813316,0 31.823476,0 V 20.810692 H 0 Z" /><path
|
||||||
|
id="path4"
|
||||||
|
fill-opacity="1"
|
||||||
|
d="m 8.308722,26.122633 h 75.75356 L 75.057706,104.65871 H 17.313298 M 30.504624,38.259644 19.655415,49.108853 34.289899,63.743347 19.512566,78.520671 30.361785,89.369891 45.139119,74.592557 59.746341,89.199779 70.609813,78.364822 56.761318,64.304397 71.197342,49.868383 60.348123,39.019163 45.912108,53.455178" /></svg>
|
After Width: | Height: | Size: 1.2 KiB |
22
img/unlock.svg
Normal file
22
img/unlock.svg
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
<?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"
|
||||||
|
id="unlock"
|
||||||
|
xml:space="preserve"
|
||||||
|
enable-background="new 0 0 100 100"
|
||||||
|
viewBox="0 0 90 83.930435"
|
||||||
|
y="0px"
|
||||||
|
x="0px"
|
||||||
|
version="1.1"><metadata
|
||||||
|
id="metadata14"><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="defs12" /><path
|
||||||
|
id="path2"
|
||||||
|
d="m 83.174698,6.8448817 -0.01023,-0.0096 -0.0096,-0.01001 C 78.928108,2.6054127 73.112442,0 66.704613,0 60.296784,0 54.48156,2.6054127 50.25433,6.8252997 l -0.0091,0.01001 -0.01046,0.0096 C 46.015972,11.071668 43.409447,16.887336 43.409447,23.295165 V 41.578458 H 4.2345743 C 1.9062147,41.578458 0,43.484228 0,45.812585 V 79.69608 c 0,2.330361 1.9062147,4.234352 4.2345743,4.234352 H 57.175988 c 2.328133,0 4.233902,-1.903991 4.233902,-4.234352 V 45.812585 c 0,-2.328358 -1.905769,-4.234127 -4.233902,-4.234127 H 53.998887 V 23.295165 c 0,-3.526476 1.415978,-6.703575 3.698715,-8.986315 l 0.02092,-0.01958 c 2.282959,-2.284298 5.459839,-3.700051 8.986092,-3.700051 3.526474,0 6.703575,1.415753 8.986313,3.700051 l 0.0207,0.01958 c 2.28318,2.28274 3.698937,5.459839 3.698937,8.986315 h 0.02292 l -0.0033,7.080317 c 0,6.960376 10.54493,6.962601 10.54493,0 l 0.0022,-7.080317 H 90 C 90,16.887336 87.393478,11.071668 83.174698,6.8448817 Z M 34.149418,67.676419 c 0,4.739724 -6.889389,4.739724 -6.889389,0 v -9.843063 c 0,-4.739723 6.889389,-4.739723 6.889389,0 z"
|
||||||
|
clip-rule="evenodd"
|
||||||
|
fill-rule="evenodd" /></svg>
|
After Width: | Height: | Size: 1.8 KiB |
Loading…
Add table
Reference in a new issue