@ -0,0 +1,150 @@
|
||||
<?php |
||||
|
||||
if (!defined('_ECRIRE_INC_VERSION')) { |
||||
return; |
||||
} |
||||
|
||||
/** |
||||
* Déclarer les interfaces des tables pour le compilateur |
||||
* |
||||
* @pipeline declarer_tables_interfaces |
||||
* |
||||
* @param array $interfaces |
||||
* Déclarations d'interface pour le compilateur |
||||
* |
||||
* @return array |
||||
* Déclarations d'interface pour le compilateur |
||||
**/ |
||||
function opquast_declarer_tables_interfaces($interfaces) { |
||||
$interfaces['table_des_tables']['opquast_criteres'] = 'opquast_criteres'; |
||||
$interfaces['table_des_tables']['opquast_criteres_liens'] = 'opquast_criteres_liens'; |
||||
$interfaces['table_des_tables']['opquast_tags'] = 'opquast_tags'; |
||||
|
||||
$interfaces['tables_jointures']['spip_opquast_criteres'][] = 'opquast_criteres_liens'; |
||||
$interfaces['tables_jointures']['spip_opquast_tags'][] = 'opquast_criteres_liens'; |
||||
|
||||
return $interfaces; |
||||
} |
||||
|
||||
/** |
||||
* Déclarer les tables des objets |
||||
* |
||||
* @pipeline declarer_tables_objets_sql |
||||
* |
||||
* @param array $tables |
||||
* Description des tables |
||||
* |
||||
* @return array |
||||
* Description complétée des tables |
||||
**/ |
||||
function opquast_declarer_tables_objets_sql($tables) { |
||||
|
||||
$tables['spip_opquast_criteres'] = array( |
||||
'type' => 'opquast_critere', |
||||
'principale' => 'oui', |
||||
'table_objet_surnoms' => array('opquast_critere'), |
||||
'field' => array( |
||||
'id_opquast_critere' => 'BIGINT(21) NOT NULL', |
||||
'titre' => "TEXT NOT NULL DEFAULT ''", |
||||
'lien' => "TEXT NOT NULL DEFAULT ''", |
||||
'texte' => "TEXT NOT NULL DEFAULT ''", |
||||
'statut' => 'VARCHAR(20) NOT NULL DEFAULT ""', |
||||
'maj' => 'TIMESTAMP', |
||||
), |
||||
'key' => array( |
||||
'PRIMARY KEY' => 'id_opquast_critere', |
||||
'KEY statut' => 'statut', |
||||
), |
||||
'titre' => 'titre AS titre, "" AS lang', |
||||
'champs_editables' => array(), |
||||
'champs_versionnes' => array(), |
||||
'rechercher_champs' => array( |
||||
'titre' => 10, |
||||
'texte' => 5, |
||||
), |
||||
'statut_textes_instituer' => array( |
||||
'non_verifie' => 'opquast_critere:texte_statut_non_verifie', |
||||
'non_conforme' => 'opquast_critere:texte_statut_non_conforme', |
||||
'conforme' => 'opquast_critere:texte_statut_conforme', |
||||
'non_applicable' => 'opquast_critere:texte_statut_non_applicable', |
||||
), |
||||
'statut' => array( |
||||
array( |
||||
'champ' => 'statut', |
||||
'publie' => '', |
||||
'previsu' => '', |
||||
'post_date' => '', |
||||
'exception' => array( |
||||
'statut', |
||||
'tout', |
||||
), |
||||
), |
||||
), |
||||
'statut_images' => array( |
||||
'non_verifie' => 'puce-non_verifie-8.png', |
||||
'non_conforme' => 'puce-non_conforme-8.png', |
||||
'conforme' => 'puce-conforme-8.png', |
||||
'non_applicable' => 'puce-non_applicable-8.png', |
||||
), |
||||
'texte_changer_statut' => 'opquast_critere:texte_changer_statut_opquast_critere', |
||||
'tables_jointures' => array(), |
||||
'page' => false, |
||||
); |
||||
|
||||
return $tables; |
||||
} |
||||
|
||||
/** |
||||
* Déclarer les tables principales |
||||
* |
||||
* @pipeline declarer_tables_principales |
||||
* |
||||
* @param array $tables |
||||
* Description des tables |
||||
* |
||||
* @return array |
||||
* Description complétée des tables |
||||
**/ |
||||
function opquast_declarer_tables_principales($tables) { |
||||
|
||||
$tables['spip_opquast_tags'] = array( |
||||
'field' => array( |
||||
'id_opquast_tag' => 'BIGINT(21) NOT NULL', |
||||
'titre' => "TEXT NOT NULL DEFAULT ''", |
||||
'maj' => 'TIMESTAMP', |
||||
), |
||||
'key' => array( |
||||
'PRIMARY KEY' => 'id_opquast_tag', |
||||
), |
||||
); |
||||
|
||||
return $tables; |
||||
} |
||||
|
||||
/** |
||||
* Déclarer les tables auxiliaires |
||||
* |
||||
* @pipeline declarer_tables_auxiliaires |
||||
* |
||||
* @param array $tables |
||||
* Description des tables |
||||
* |
||||
* @return array |
||||
* Description complétée des tables |
||||
**/ |
||||
function opquast_declarer_tables_auxiliaires($tables) { |
||||
|
||||
$tables['spip_opquast_criteres_liens'] = array( |
||||
'field' => array( |
||||
'id_opquast_critere' => "bigint(21) DEFAULT '0' NOT NULL", |
||||
'id_objet' => "bigint(21) DEFAULT '0' NOT NULL", |
||||
'objet' => "VARCHAR (25) DEFAULT '' NOT NULL", |
||||
), |
||||
'key' => array( |
||||
'PRIMARY KEY' => 'id_opquast_critere,id_objet,objet', |
||||
'KEY id_opquast_critere' => 'id_opquast_critere', |
||||
), |
||||
); |
||||
|
||||
return $tables; |
||||
} |
@ -0,0 +1,20 @@
|
||||
<div class="formulaire_spip formulaire_configurer formulaire_#FORM"> |
||||
|
||||
<h3 class="titrem"> |
||||
<:opquast:cfg_titre_parametrages:/> |
||||
</h3> |
||||
|
||||
[<p class="reponse_formulaire reponse_formulaire_ok">(#ENV*{message_ok})</p>] |
||||
[<p class="reponse_formulaire reponse_formulaire_erreur">(#ENV*{message_erreur})</p>] |
||||
|
||||
<form method="post" action="#ENV{action}"> |
||||
<div> |
||||
#ACTION_FORMULAIRE{#ENV{action}} |
||||
|
||||
<input type="hidden" name="_meta_casier" value="opquast"/> |
||||
<p class="boutons"><span class="image_loading"> </span> |
||||
<input type="submit" class="submit" value="<:bouton_enregistrer:/>"/> |
||||
</p> |
||||
</div> |
||||
</form> |
||||
</div> |
@ -0,0 +1,28 @@
|
||||
<div id="formulaire_#FORM" class='formulaire_spip formulaire_editer formulaire_#FORM'> |
||||
[<p class="reponse_formulaire reponse_formulaire_ok js-hidden">(#ENV**{message_ok})</p>] |
||||
[<p class="reponse_formulaire reponse_formulaire_erreur">(#ENV*{message_erreur})</p>] |
||||
|
||||
<BOUCLE_editable(CONDITION){si #ENV{editable}}> |
||||
<form method="post" action="#ENV{action}#formulaire_#FORM"> |
||||
<div> |
||||
#ACTION_FORMULAIRE{#ENV{action}} |
||||
|
||||
<div class="editer-groupe"> |
||||
#SET{statuts, #ARRAY} |
||||
#SET{liste_statuts, #VAL{opquast_criteres}|table_objet_sql|lister_tables_objets_sql|table_valeur{statut_textes_instituer}} |
||||
<BOUCLE_statuts(POUR){tableau #GET{liste_statuts}}> |
||||
#SET{titre, #VALEUR|_T} |
||||
#SET{statuts,#GET{statuts}|array_merge{#ARRAY{#GET{titre},#CLE}}} |
||||
</BOUCLE_statuts> [(#SET{statuts, #GET{statuts}|array_flip})] |
||||
[(#SAISIE{radio, critere_statut, label=<:opquast:statut:>, datas=#GET{statuts}, valeur=#CRITERE_STATUT})] |
||||
</div> |
||||
|
||||
<p class="boutons"> |
||||
<button class="submit" type="submit"><:bouton_enregistrer:></button> |
||||
</p> |
||||
|
||||
</div> |
||||
</form> |
||||
</BOUCLE_editable> |
||||
</div> |
||||
|
@ -0,0 +1,40 @@
|
||||
<?php |
||||
|
||||
if (!defined('_ECRIRE_INC_VERSION')) { |
||||
return; |
||||
} |
||||
|
||||
function formulaires_opquast_critere_statut_charger($id_opquast_critere = null) { |
||||
$statut = sql_getfetsel('statut', 'spip_opquast_criteres', 'id_opquast_critere = ' . intval($id_opquast_critere)); |
||||
$valeurs = array( |
||||
'id_opquast_critere' => $id_opquast_critere, |
||||
'critere_statut' => $statut, |
||||
); |
||||
|
||||
return $valeurs; |
||||
} |
||||
|
||||
function formulaires_opquast_critere_statut_traiter($id_opquast_critere = null) { |
||||
include_spip('action/editer_objet'); |
||||
$retour = array(); |
||||
$err = objet_instituer('opquast_critere', $id_opquast_critere, array('statut' => _request('critere_statut'))); |
||||
if (!$err) { |
||||
if (defined('_AJAX') and _AJAX) { |
||||
//if (!isset($retour['message_ok'])) { |
||||
$retour['message_ok'] = _T('info_modification_enregistree') . ' |
||||
<script> |
||||
$(function(){ |
||||
ajaxReload("liste-objets",{args:{id_opquast_critere:' . $id_opquast_critere . '}}); |
||||
ajaxReload("navigation"); |
||||
}); |
||||
</script> |
||||
'; |
||||
//} |
||||
//$retour['message_ok'] .= 'AJAX'; |
||||
} |
||||
} else { |
||||
$retour['message_erreur'] = $err; |
||||
} |
||||
|
||||
return $retour; |
||||
} |
@ -0,0 +1,22 @@
|
||||
<?php |
||||
// This is a SPIP language file -- Ceci est un fichier langue de SPIP |
||||
|
||||
if (!defined('_ECRIRE_INC_VERSION')) { |
||||
return; |
||||
} |
||||
|
||||
$GLOBALS[ $GLOBALS['idx_lang'] ] = array( |
||||
|
||||
// O |
||||
'opquast_titre' => 'Check-list Opquast', |
||||
|
||||
// C |
||||
'cfg_titre_parametrages' => 'Paramétrages', |
||||
|
||||
// S |
||||
'statut' => 'Statut', |
||||
|
||||
// T |
||||
'opquast_tag' => 'Thématique', |
||||
'titre_page_configurer_opquast' => 'Configuration', |
||||
); |
@ -0,0 +1,14 @@
|
||||
<?php |
||||
// This is a SPIP language file -- Ceci est un fichier langue de SPIP |
||||
|
||||
if (!defined('_ECRIRE_INC_VERSION')) { |
||||
return; |
||||
} |
||||
|
||||
$GLOBALS[$GLOBALS['idx_lang']] = array( |
||||
|
||||
// O |
||||
'opquast_description' => 'La check-list [Opquast->https://www.opquast.com/], 240 bonnes pratiques pour améliorer vos sites et mieux prendre en compte vos utilisateurs', |
||||
'opquast_nom' => 'Check-list Opquast', |
||||
'opquast_slogan' => 'Qualité Web : la check-list de référence', |
||||
); |
@ -0,0 +1,97 @@
|
||||
<?php |
||||
/** |
||||
* Fichier gérant l'installation et désinstallation du plugin Check-list Opquast |
||||
* |
||||
* @plugin Check-list Opquast |
||||
* @copyright 2020 |
||||
* @author nicod_ |
||||
* @licence GNU/GPL |
||||
* @package SPIP\Opquast\Installation |
||||
*/ |
||||
|
||||
if (!defined('_ECRIRE_INC_VERSION')) { |
||||
return; |
||||
} |
||||
|
||||
/** |
||||
* Fonction d'installation et de mise à jour du plugin Check-list Opquast. |
||||
* |
||||
* @param string $nom_meta_base_version |
||||
* Nom de la meta informant de la version du schéma de données du plugin installé dans SPIP |
||||
* @param string $version_cible |
||||
* Version du schéma de données dans ce plugin (déclaré dans paquet.xml) |
||||
* |
||||
* @return void |
||||
**/ |
||||
function opquast_upgrade($nom_meta_base_version, $version_cible) { |
||||
$maj = array(); |
||||
|
||||
$maj['create'] = array( |
||||
array( |
||||
'maj_tables', |
||||
array( |
||||
'spip_opquast_criteres', |
||||
'spip_opquast_criteres_liens', |
||||
'spip_opquast_tags', |
||||
), |
||||
), |
||||
array('populate_opquast_criteres'), |
||||
); |
||||
|
||||
include_spip('base/upgrade'); |
||||
maj_plugin($nom_meta_base_version, $version_cible, $maj); |
||||
} |
||||
|
||||
/** |
||||
* Fonction de désinstallation du plugin Check-list Opquast. |
||||
* |
||||
* @param string $nom_meta_base_version |
||||
* Nom de la meta informant de la version du schéma de données du plugin installé dans SPIP |
||||
* |
||||
* @return void |
||||
**/ |
||||
function opquast_vider_tables($nom_meta_base_version) { |
||||
|
||||
sql_drop_table('spip_opquast_criteres'); |
||||
sql_drop_table('spip_opquast_criteres_liens'); |
||||
sql_drop_table('spip_opquast_tags'); |
||||
|
||||
effacer_meta($nom_meta_base_version); |
||||
} |
||||
|
||||
/** |
||||
* Fonction d'installation des critères du plugin Check-list Opquast. |
||||
* |
||||
* @return void |
||||
**/ |
||||
function populate_opquast_criteres() { |
||||
// sql_query('truncate table spip_opquast_criteres'); |
||||
// sql_query('truncate table spip_opquast_criteres_liens'); |
||||
// sql_query('truncate table spip_opquast_tags'); |
||||
|
||||
if ($data = file_get_contents(__DIR__ . '/data/data-fr.json')) { |
||||
$data = json_decode($data, true); |
||||
} |
||||
if ($content = file_get_contents(__DIR__ . '/data/data-fr-content.json')) { |
||||
$content = json_decode($content, true); |
||||
} |
||||
foreach ($data as $row) { |
||||
$texte = (isset($content[ $row['id'] ]) ? $content[ $row['id'] ] : ''); |
||||
$texte = str_replace('<ul>', '<ul class="spip">', $texte); |
||||
$critere = array( |
||||
'titre' => $row['title'], |
||||
'lien' => $row['link'], |
||||
'texte' => $texte, |
||||
'statut' => 'non_verifie' |
||||
); |
||||
$id_opquast_critere = sql_insertq('spip_opquast_criteres',$critere); |
||||
|
||||
$tags = explode(',',$row['tags']); |
||||
foreach ($tags as $tag) { |
||||
if(!$id_opquast_tag = sql_getfetsel('id_opquast_tag','spip_opquast_tags','titre = '.sql_quote($tag))) { |
||||
$id_opquast_tag = sql_insertq('spip_opquast_tags', array('titre'=> $tag)); |
||||
} |
||||
sql_insertq('spip_opquast_criteres_liens', array('id_opquast_critere' => $id_opquast_critere,'objet' => 'opquast_tag', 'id_objet'=> $id_opquast_tag)); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,85 @@
|
||||
<?php |
||||
/** |
||||
* Définit les autorisations du plugin Check-list Opquast |
||||
* |
||||
* @plugin Check-list Opquast |
||||
* @copyright 2020 |
||||
* @author nicod_ |
||||
* @licence GNU/GPL |
||||
* @package SPIP\Opquast\Autorisations |
||||
*/ |
||||
|
||||
if (!defined('_ECRIRE_INC_VERSION')) { |
||||
return; |
||||
} |
||||
|
||||
/** |
||||
* Fonction d'appel pour le pipeline |
||||
* |
||||
* @pipeline autoriser |
||||
*/ |
||||
function opquast_autoriser() { |
||||
} |
||||
|
||||
// ----------------- |
||||
// Objet opquast_criteres |
||||
|
||||
/** |
||||
* Autorisation de voir un élément de menu (opquastcriteres) |
||||
* |
||||
* @param string $faire Action demandée |
||||
* @param string $type Type d'objet sur lequel appliquer l'action |
||||
* @param int $id Identifiant de l'objet |
||||
* @param array $qui Description de l'auteur demandant l'autorisation |
||||
* @param array $opt Options de cette autorisation |
||||
* |
||||
* @return bool true s'il a le droit, false sinon |
||||
**/ |
||||
function autoriser_opquastcriteres_menu_dist($faire, $type, $id, $qui, $opt) { |
||||
return $qui['statut'] == '0minirezo' and !$qui['restreint']; |
||||
} |
||||
|
||||
/** |
||||
* Autorisation de voir (opquastcritere) |
||||
* |
||||
* @param string $faire Action demandée |
||||
* @param string $type Type d'objet sur lequel appliquer l'action |
||||
* @param int $id Identifiant de l'objet |
||||
* @param array $qui Description de l'auteur demandant l'autorisation |
||||
* @param array $opt Options de cette autorisation |
||||
* |
||||
* @return bool true s'il a le droit, false sinon |
||||
**/ |
||||
function autoriser_opquastcritere_voir_dist($faire, $type, $id, $qui, $opt) { |
||||
return $qui['statut'] == '0minirezo' and !$qui['restreint']; |
||||
} |
||||
|
||||
/** |
||||
* Autorisation de modifier (opquastcritere) |
||||
* |
||||
* @param string $faire Action demandée |
||||
* @param string $type Type d'objet sur lequel appliquer l'action |
||||
* @param int $id Identifiant de l'objet |
||||
* @param array $qui Description de l'auteur demandant l'autorisation |
||||
* @param array $opt Options de cette autorisation |
||||
* |
||||
* @return bool true s'il a le droit, false sinon |
||||
**/ |
||||
function autoriser_opquastcritere_modifier_dist($faire, $type, $id, $qui, $opt) { |
||||
return $qui['statut'] == '0minirezo' and !$qui['restreint']; |
||||
} |
||||
|
||||
/** |
||||
* Autorisation de créer un logo (opquastcritere) |
||||
* |
||||
* @param string $faire Action demandée |
||||
* @param string $type Type d'objet sur lequel appliquer l'action |
||||
* @param int $id Identifiant de l'objet |
||||
* @param array $qui Description de l'auteur demandant l'autorisation |
||||
* @param array $opt Options de cette autorisation |
||||
* |
||||
* @return bool true s'il a le droit, false sinon |
||||
**/ |
||||
function autoriser_opquastcritere_iconifier_dist($faire, $type, $id, $qui, $opt) { |
||||
return false; |
||||
} |
@ -0,0 +1,18 @@
|
||||
<?php |
||||
/** |
||||
* Fonctions utiles au plugin Check-list Opquast |
||||
* |
||||
* @plugin Check-list Opquast |
||||
* @copyright 2020 |
||||
* @author nicod_ |
||||
* @licence GNU/GPL |
||||
* @package SPIP\opquast\Fonctions |
||||
*/ |
||||
|
||||
if (!defined('_ECRIRE_INC_VERSION')) { |
||||
return; |
||||
} |
||||
|
||||
function lien_opquast_critere($lien) { |
||||
return 'https://checklists.opquast.com'.$lien; |
||||
} |
@ -0,0 +1,30 @@
|
||||
<paquet |
||||
prefix="opquast" |
||||
categorie="outil" |
||||
version="1.0.0" |
||||
etat="test" |
||||
compatibilite="[3.2.0;3.3.*]" |
||||
logo="prive/themes/spip/images/opquast-64.png" |
||||
documentation="" |
||||
schema="1.0.0" |
||||
> |
||||
|
||||
<nom>Check-list Opquast</nom> |
||||
<!-- Qualité Web : la check-list de référence --> |
||||
|
||||
<auteur lien="https://contrib.spip.net/nicod_">nicod_</auteur> |
||||
<credit lien="https://www.opquast.com/">Opquast</credit> |
||||
|
||||
<licence>GNU/GPL</licence> |
||||
|
||||
<necessite nom="saisies" compatibilite="[3.36.2;]"/> |
||||
<necessite nom="ajaxfiltre" compatibilite=""/> |
||||
|
||||
<pipeline nom="autoriser" inclure="opquast_autorisations.php"/> |
||||
<pipeline nom="declarer_tables_interfaces" inclure="base/opquast.php"/> |
||||
<pipeline nom="declarer_tables_objets_sql" inclure="base/opquast.php"/> |
||||
<pipeline nom="declarer_tables_principales" inclure="base/opquast.php"/> |
||||
<pipeline nom="declarer_tables_auxiliaires" inclure="base/opquast.php"/> |
||||
|
||||
<menu nom="opquast_criteres" titre="opquast:opquast_titre" parent="menu_edition" icone="images/opquast-16.png" action="opquast_criteres" /> |
||||
</paquet> |
@ -0,0 +1,7 @@
|
||||
<BOUCLE_opquast_critere(OPQUAST_CRITERES){id_opquast_critere=#ENV{id}}{statut?}> |
||||
<div class="infos"> |
||||
[(#SET{texte_objet,<:opquast_critere:titre_opquast_critere:>})] |
||||
<div class="numero"><:titre_cadre_numero_objet{objet=#GET{texte_objet}}:><p>#ID_OPQUAST_CRITERE</p></div> |
||||
[(#FORMULAIRE_INSTITUER_OBJET{opquast_criteres,#ID_OPQUAST_CRITERE})] |
||||
</div> |
||||
</BOUCLE_opquast_critere> |
@ -0,0 +1,79 @@
|
||||
[(#SET{defaut_tri,#ARRAY{ |
||||
titre,1, |
||||
checked,1, |
||||
id_opquast_critere,1, |
||||
points,-1 |
||||
}})]<B_liste_opquast_criteres_liste> |
||||
|
||||
<div class="opquast_criteres_liste"> |
||||
|
||||
[<h1 class="grostitre"><strong class="caption">(#ENV*{titre,#GRAND_TOTAL|singulier_ou_pluriel{opquast_critere:info_1_opquast_critere,opquast_critere:info_nb_opquast_criteres}})</strong></h1>] |
||||
<div> |
||||
<BOUCLE_liste_opquast_criteres_liste(OPQUAST_CRITERES) {id_opquast_tag?}{recherche?}{statut?} {tri #ENV{par, id_opquast_critere},#GET{defaut_tri}}{par id_opquast_critere}> |
||||
#SET{details,#ENV{id_opquast_critere,''}|=={#ID_OPQUAST_CRITERE}|oui} |
||||
<div class="opquast_critere_item [(#GET{details}|oui)opquast_critere_item--actif]" id="opquast_critere_item--#ID_OPQUAST_CRITERE"> |
||||
<h2 class="opquast_critere_item__entete"> |
||||
<span class="opquast_critere_item__titre"> |
||||
<a class="opquast_critere_item__lien" data-id_opquast_critere="#ID_OPQUAST_CRITERE" href="[(#SELF|parametre_url{id_opquast_critere,#GET{details}|?{'',#ID_OPQUAST_CRITERE}})]#opquast_critere_item--#ID_OPQUAST_CRITERE">#TITRE</a> |
||||
</span> |
||||
<span class="opquast_critere_item__statut opquast_statut--#STATUT"> |
||||
[(#VAL{opquast_critere:texte_statut_}|concat{#STATUT}|_T)] |
||||
</span> |
||||
</h2> |
||||
<div class="opquast_critere_item__contenu [(#GET{details}|oui)opquast_critere_item__contenu--actif]"> |
||||
[(#GET{details}|oui) |
||||
[(#INCLURE{fond=prive/squelettes/inclure/opquast_critere, id_opquast_critere})] |
||||
] |
||||
</div> |
||||
</div> |
||||
</BOUCLE_liste_opquast_criteres_liste> |
||||
</div> |
||||
|
||||
</div> |
||||
</B_liste_opquast_criteres_liste>[ |
||||
<div class="liste-objets opquast_criteres_liste caption-wrap"> |
||||
<strong class="caption">(#ENV*{sinon,''})</strong> |
||||
</div> |
||||
]<//B_liste_opquast_criteres_liste> |
||||
|
||||
<script type="text/javascript"> |
||||
$(function() { |
||||
function opquast_clicks(){ |
||||
$('.opquast_critere_item__lien').off('click').on('click', function(e) { |
||||
var id_opquast_critere = $(this).data('id_opquast_critere'); |
||||
var $opquast_critere = $('#opquast_critere_item--'+id_opquast_critere); |
||||
var $opquast_critere_contenu = $opquast_critere.find('.opquast_critere_item__contenu'); |
||||
if(!$opquast_critere_contenu.html().trim()) { |
||||
opquast_contenu(id_opquast_critere); |
||||
} else { |
||||
$opquast_critere.toggleClass('opquast_critere_item--actif'); |
||||
$opquast_critere_contenu.toggleClass('opquast_critere_item__contenu--actif'); |
||||
} |
||||
e.preventDefault(); |
||||
}); |
||||
} |
||||
function opquast_contenu(id_opquast_critere) { |
||||
var $opquast_critere = $('#opquast_critere_item--'+id_opquast_critere); |
||||
var $opquast_critere_contenu = $opquast_critere.find('.opquast_critere_item__contenu'); |
||||
$opquast_critere_contenu.ajaxReload( |
||||
{ |
||||
args: {'id_opquast_critere': id_opquast_critere}, |
||||
callback: function() { |
||||
$(function(){ |
||||
var $opquast_critere = $('#opquast_critere_item--'+id_opquast_critere); |
||||
var opquast_critere_position =$opquast_critere.position(); |
||||
$opquast_critere.addClass('opquast_critere_item--actif'); |
||||
$(window).scrollTop(opquast_critere_position.top); |
||||
}); |
||||
} |
||||
} |
||||
); |
||||
} |
||||
opquast_clicks(); |
||||
onAjaxLoad(opquast_clicks); |
||||
}); |
||||
</script> |
||||
|
||||
<style type="text/css"> |
||||
|
||||
</style> |
@ -0,0 +1,9 @@
|
||||
[(#AUTORISER{configurer,_opquast}|sinon_interdire_acces)] |
||||
|
||||
<h1 class="grostitre"> |
||||
<:opquast:titre_page_configurer_opquast:/> |
||||
</h1> |
||||
|
||||
<div class="ajax"> |
||||
#FORMULAIRE_CONFIGURER_opquast |
||||
</div> |
@ -0,0 +1,30 @@
|
||||
[(#AUTORISER{voir,opquast_critere,#ID_OPQUAST_CRITERE}|sinon_interdire_acces)] |
||||
<BOUCLE_opquast_critere(OPQUAST_CRITERES){id_opquast_critere}{statut?}> |
||||
[(#BOITE_OUVRIR{[ |
||||
<h1>[(#RANG). ](#TITRE|sinon{<:info_sans_titre:>})[(#CHEMIN_IMAGE{opquast_critere-24.png}|balise_img{opquast_critere,cadre-icone})]</h1> |
||||
],simple fiche_objet})] |
||||
|
||||
|
||||
<!--affiche_milieu--> |
||||
|
||||
<div id="wysiwyg"> |
||||
<INCLURE{fond=prive/objets/contenu/opquast_critere,id=#ID_OPQUAST_CRITERE,id_opquast_critere=#ID_OPQUAST_CRITERE,virtuel=oui,ajax=wysiwyg,wysiwyg=1}> |
||||
</div> |
||||
|
||||
<div class="nettoyeur"></div> |
||||
|
||||
|
||||
#PIPELINE{afficher_complement_objet,#ARRAY{args,#ARRAY{type,opquast_critere,id,#ID_OPQUAST_CRITERE},data,'<div class="nettoyeur"></div>'}} |
||||
|
||||
#BOITE_FERMER |
||||
|
||||
#SET{enfants,''} |
||||
[(#VAL{prive/objets/contenu/opquast_critere-enfants}|trouver_fond|oui) |
||||
[(#SET{enfants,[(#INCLURE{fond=prive/objets/contenu/opquast_critere-enfants,id_opquast_critere,env})]})] |
||||
] |
||||
[(#PIPELINE{affiche_enfants,[(#ARRAY{args,#ARRAY{exec,opquast_critere,id_opquast_critere,#ID_OPQUAST_CRITERE,objet,opquast_critere,id_objet,#ID_OPQUAST_CRITERE},data,#GET{enfants}})]})] |
||||
|
||||
[(#EVAL{_AJAX}|oui) |
||||
<script type="text/javascript">/*<!\\[CDATA\\[*/reloadExecPage('#ENV{exec}','#navigation,#chemin,#extra');/*\\]\\]>*/</script> |
||||
] |
||||
</BOUCLE_opquast_critere> |
@ -0,0 +1,2 @@
|
||||
|
||||
<INCLURE{fond=prive/objets/liste/opquast_criteres, env, ajax=liste-objets, nb=20, sinon=<:opquast_critere:info_aucun_opquast_critere:>}> |
@ -0,0 +1,25 @@
|
||||
<div class="opquast-critere__contenu"> |
||||
<BOUCLE_opquast_critere(OPQUAST_CRITERES){id_opquast_critere}{statut?}> |
||||
|
||||
<div class="ajax"> |
||||
#FORMULAIRE_OPQUAST_CRITERE_STATUT{#ID_OPQUAST_CRITERE} |
||||
</div> |
||||
|
||||
<B_tags> |
||||
<p class="champ contenu_tags"> |
||||
<img src="#CHEMIN_IMAGE{mot-16.png}" /> |
||||
<BOUCLE_tags(OPQUAST_TAGS){id_opquast_critere}{', '}><a href="[(#VAL{opquast_criteres}|generer_url_ecrire|parametre_url{id_opquast_tag[], #ID_OPQUAST_TAG})]">#TITRE</a></BOUCLE_tags> |
||||
</p> |
||||
</B_tags> |
||||
|
||||
[<div class="champ contenu_texte"> |
||||
(#TEXTE) |
||||
</div>] |
||||
|
||||
[<p class="champ contenu_lien"> |
||||
<strong>[(#VAL{'opquast_critere:voir_en_ligne_critere_numero'}|_T{#ARRAY{n,#ID_OPQUAST_CRITERE}})]</strong> |
||||
<br><a href="(#LIEN|lien_opquast_critere)" class="spip_out">[(#LIEN|lien_opquast_critere|couper{60})]</a> |
||||
</p>] |
||||
|
||||
</BOUCLE_opquast_critere> |
||||
</div> |
@ -0,0 +1,58 @@
|
||||
<div class="formulaire formulaire_spip formulaire_navigation_filtre"> |
||||
<form method='post'> |
||||
#ACTION_FORMULAIRE{#ENV{action}} |
||||
<h3 class="titrem"><:opquast_critere:titre_opquast_criteres:/></h3> |
||||
<div class="editer-groupe"> |
||||
|
||||
#SAISIE{hidden, id_opquast_critere, valeur=0} |
||||
|
||||
<B_criteres_total> |
||||
#SET{total_criteres,#TOTAL_BOUCLE} |
||||
<BOUCLE_criteres_total(OPQUAST_CRITERES){statut?}> |
||||
</BOUCLE_criteres_total> |
||||
</B_criteres_total> |
||||
|
||||
#SET{statuts, #ARRAY} |
||||
#SET{liste_statuts, #VAL{opquast_criteres}|table_objet_sql|lister_tables_objets_sql|table_valeur{statut_textes_instituer}} |
||||
<BOUCLE_statuts(POUR){tableau #GET{liste_statuts}}> |
||||
#SET{total, 0} |
||||
<B_criteres_statuts> |
||||
#SET{total, #TOTAL_BOUCLE} |
||||
<BOUCLE_criteres_statuts(OPQUAST_CRITERES){statut=#CLE}> |
||||
</BOUCLE_criteres_statuts> |
||||
</B_criteres_statuts> |
||||
[(#SET{titre, <span class="opquast_choix" style="[(#GET{style})]"><span class="opquast_choix__titre">[(#VALEUR|_T)]</span><span class="opquast_choix__total">[(#GET{total})]</span>})] |
||||
[(#SET{statuts,#GET{statuts}|array_merge{#ARRAY{#GET{titre},#CLE}}})] |
||||
</BOUCLE_statuts> |
||||
[(#SET{statuts, #GET{statuts}|array_flip})] |
||||
[(#SAISIE{radio, statut, label=<:opquast:statut:>, datas=#GET{statuts}})] |
||||
|
||||
#SET{tags, #ARRAY} |
||||
<BOUCLE_tags(OPQUAST_TAGS){par titre}> |
||||
#SET{titre, #TITRE} |
||||
#SET{total,0} |
||||
<B_criteres> |
||||
#SET{total,#TOTAL_BOUCLE} |
||||
<BOUCLE_criteres(OPQUAST_CRITERES){id_opquast_tag}{statut?}> |
||||
</BOUCLE_criteres> |
||||
</B_criteres> |
||||
#SET{conforme,0} |
||||
<B_criteres_conforme> |
||||
#SET{conforme,#TOTAL_BOUCLE} |
||||
<BOUCLE_criteres_conforme(OPQUAST_CRITERES){id_opquast_tag}{statut IN conforme, non_applicable}> |
||||
</BOUCLE_criteres_conforme> |
||||
</B_criteres_conforme> |
||||
#SET{pourcent, #GET{conforme}|div{#GET{total}}|mult{100}|intval} |
||||
[(#SET{style, background: linear-gradient(to right, #E7FBDC 0%, #E7FBDC [(#GET{pourcent})]%, transparent [(#GET{pourcent})]%, transparent 100%);})] |
||||
[(#SET{titre, <span class="opquast_choix" style="[(#GET{style})]"><span class="opquast_choix__titre">[(#TITRE)]</span><span class="opquast_choix__total">[(#GET{conforme})]/[(#GET{total})]</span></span>})] |
||||
[(#SET{tags,#GET{tags}|array_merge{#ARRAY{#GET{titre},#ID_OPQUAST_TAG}}})] |
||||
</BOUCLE_tags> |
||||
[(#SET{tags, #GET{tags}|array_flip})] |
||||
[(#SAISIE{checkbox, id_opquast_tag, label=<:opquast:opquast_tag:>, datas=#GET{tags}})] |
||||
|
||||
[(#SAISIE{input, recherche, label=<:info_rechercher:>})] |
||||
|
||||
</div> |
||||
<p class="boutons"><input type="submit" class="submit" name="valide" value="<:info_rechercher:>"/></p> |
||||
</form> |
||||
</div> |
@ -0,0 +1,212 @@
|
||||
[(#REM)<style>/* |
||||
Ce squelette definit les styles de l'espace prive |
||||
|
||||
Note: l'entete "Vary:" sert a repousser l'entete par |
||||
defaut "Vary: Cookie,Accept-Encoding", qui est (un peu) |
||||
genant en cas de "rotation du cookie de session" apres |
||||
un changement d'IP (effet de clignotement). |
||||
|
||||
ATTENTION: il faut absolument le charset sinon Firefox croit que |
||||
c'est du text/html ! |
||||
*/]#CACHE{3600*100,cache-client} |
||||
#HTTP_HEADER{Content-Type: text/css; charset=iso-8859-15} |
||||
#HTTP_HEADER{Vary: Accept-Encoding} |
||||
|
||||
#SET{claire,##ENV{couleur_claire,edf3fe}} |
||||
#SET{foncee,##ENV{couleur_foncee,3874b0}} |
||||
|
||||
/*-------------------------------------------------- |
||||
Filtre de navigation (colonne gauche) |
||||
---------------------------------------------------*/ |
||||
|
||||
.lat .formulaire_spip .editer_statut .choix, |
||||
.lat .formulaire_spip .editer_id_opquast_tag .choix { |
||||
display: flex; |
||||
justify-content: flex-start; |
||||
align-items: flex-start; |
||||
padding-left: 0; |
||||
padding-right: 3px; |
||||
} |
||||
.lat .formulaire_spip .editer_statut .choix input, |
||||
.lat .formulaire_spip .editer_id_opquast_tag .choix input { |
||||
margin-right: 0.5em; |
||||
} |
||||
.lat .formulaire_spip .editer_statut .choix label, |
||||
.lat .formulaire_spip .editer_id_opquast_tag .choix label { |
||||
display: block; |
||||
width: 100%; |
||||
} |
||||
.lat .formulaire_spip .opquast_choix { |
||||
display: flex; |
||||
justify-content: space-between; |
||||
align-items: flex-start; |
||||
width: 100%; |
||||
padding: 2px; |
||||
} |
||||
.lat .formulaire_spip .opquast_choix__total { |
||||
font-size: 80%; |
||||
white-space: nowrap; |
||||
} |
||||
|
||||
/*-------------------------------------------------- |
||||
Liste des critères |
||||
---------------------------------------------------*/ |
||||
|
||||
.opquast_critere_item { |
||||
border: 1px solid #C8C8C8; |
||||
border-bottom-width: 0; |
||||
|
||||
} |
||||
.opquast_critere_item:first-child { |
||||
border-radius: 6px 6px 0 0; |
||||
} |
||||
.opquast_critere_item:last-child { |
||||
border-radius: 0 0 6px 6px; |
||||
border-bottom-width: 1px; |
||||
} |
||||
.opquast_critere_item--actif { |
||||
background-color: #F7F6FF; |
||||
} |
||||
.opquast_critere_item__entete { |
||||
margin: 0; |
||||
display: flex; |
||||
justify-content: space-between; |
||||
align-items: flex-start; |
||||
font-size: 1em; |
||||
padding: 0.75em; |
||||
} |
||||
.opquast_critere_item--actif .opquast_critere_item__entete { |
||||
background: #GET{foncee}; |
||||
color: white; |
||||
} |
||||
.opquast_critere_item--actif .opquast_critere_item__entete a { |
||||
color: white; |
||||
} |
||||
.opquast_critere_item__titre { |
||||
line-height: 1.25; |
||||
padding-right: 0.5em; |
||||
} |
||||
.opquast_critere_item__statut { |
||||
text-align: center; |
||||
white-space: nowrap; |
||||
font-size: 80%; |
||||
font-weight: normal; |
||||
border-width: 1px; |
||||
border-style: solid; |
||||
border-radius: 4px; |
||||
padding: 0.25em 0; |
||||
min-width: 100px; |
||||
} |
||||
.opquast_critere_item__contenu { |
||||
display: none; |
||||
padding: 0.75em; |
||||
} |
||||
.opquast_critere_item__contenu--actif { |
||||
display: block; |
||||
} |
||||
.opquast_critere_item__contenu .contenu_tags { |
||||
display: flex; |
||||
flex-wrap: wrap; |
||||
justify-content: flex-start; |
||||
align-items: center; |
||||
} |
||||
.opquast_critere_item__contenu .contenu_tags img { |
||||
margin-right: 0.25em; |
||||
} |
||||
.opquast_critere_item__contenu .contenu_tags a { |
||||
margin-left: 0.25em; |
||||
} |
||||
#conteneur .opquast_critere_item__contenu ul.spip li { |
||||
margin-left: 2em; |
||||
list-style: disc; |
||||
} |
||||
|
||||
/*-------------------------------------------------- |
||||
Formulaire de changement de statut |
||||
---------------------------------------------------*/ |
||||
|
||||
.formulaire_opquast_critere_statut { |
||||
border-color: #C8C8C8; |
||||
/*background: #fafafa;*/ |
||||
margin: 0 0 1.5em 0; |
||||
padding: 0.5em; |
||||
} |
||||
.formulaire_opquast_critere_statut form { |
||||
margin: 0; |
||||
padding: 0; |
||||
} |
||||
.formulaire_opquast_critere_statut form > div { |
||||
display: flex; |
||||
justify-content: space-between; |
||||
align-items: center; |
||||
} |
||||
.formulaire_opquast_critere_statut .editer-groupe, |
||||
.formulaire_opquast_critere_statut .editer, |
||||
.formulaire_opquast_critere_statut .boutons { |
||||
padding: 0; |
||||
margin: 0; |
||||
border: none; |
||||
background: none; |
||||
} |
||||
.formulaire_opquast_critere_statut .editer-groupe { |
||||
width: 100%; |
||||
} |
||||
.formulaire_opquast_critere_statut .editer_critere_statut { |
||||
display: flex; |
||||
justify-content: space-between; |
||||
align-items: center; |
||||
width: 100%; |
||||
} |
||||
.formulaire_opquast_critere_statut .editer_critere_statut > label { |
||||
float: none; |
||||
width: auto; |
||||
margin: 0; |
||||
} |
||||
.formulaire_opquast_critere_statut .editer_critere_statut .choix { |
||||
background: none; |
||||
margin: 0 0.25em; |
||||
border-width: 1px; |
||||
border-style: solid; |
||||
border-radius: 4px; |
||||
padding: 0 0.25em; |
||||
font-size: 90%; |
||||
} |
||||
.formulaire_opquast_critere_statut .editer_critere_statut .choix > label { |
||||
margin: 0; |
||||
} |
||||
.formulaire_opquast_critere_statut .editer_critere_statut .choix > label { |
||||
margin: 0; |
||||
} |
||||
.formulaire_opquast_critere_statut .boutons { |
||||
margin-left: 1.5em; |
||||
} |
||||
.formulaire_opquast_critere_statut .submit { |
||||
margin: 0; |
||||
} |
||||
|
||||
#SET{couleurs, #ARRAY{ |
||||
non_verifie, #656362, |
||||
conforme, #179206, |
||||
non_conforme, #9B1B01, |
||||
non_applicable, #4923EE |
||||
}} |
||||
<BOUCLE_couleurs(DATA){source tableau, #GET{couleurs}}> |
||||
.opquast_statut--#CLE, |
||||
.choix_#CLE * { |
||||
color: #VALEUR !important; |
||||
border-color: #VALEUR; |
||||
background: white; |
||||
} |
||||
.formulaire_opquast_critere_statut .choix_#CLE { |
||||
border-color: #VALEUR !important; |
||||
background: white !important; |
||||
} |
||||
</BOUCLE_couleurs> |
||||
|
||||
.js .js-visuallyhidden { |
||||
@extend .visuallyhidden; |
||||
} |
||||
.js .js-hidden { |
||||
display: none; |
||||
} |
||||
|
After Width: | Height: | Size: 7.4 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 5.1 KiB |
After Width: | Height: | Size: 953 B |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 951 B |
After Width: | Height: | Size: 2.0 KiB |