Changeset 99231 in spip-zone for _plugins_/isocode
- Timestamp:
- Aug 21, 2016, 10:07:22 PM (5 years ago)
- Location:
- _plugins_/isocode/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/isocode/trunk/inc/isocode_read_page_text.php
r99228 r99231 16 16 * @return array 17 17 */ 18 function i socode_read_page_text($service, $table) {18 function inc_isocode_read_page_text($service, $table) { 19 19 20 20 // Initialisations -
_plugins_/isocode/trunk/isocode_fonctions.php
r99228 r99231 139 139 // On boucle sur la liste des tables et on vide chaque table référencée. 140 140 if ($tables) { 141 include_spip('inc/config'); 141 142 foreach ($tables as $_table) { 142 143 $sql_ok = sql_delete("spip_${_table}"); 143 144 if ($sql_ok !== false) { 144 // Supprimer la meta propre au règne.145 effacer_ meta("isocode/tables/${_table}");145 // Supprimer la meta propre à la table. 146 effacer_config("isocode/tables/${_table}"); 146 147 } else { 147 148 $retour[0] = false; … … 234 235 235 236 /** 236 * Retourne la liste de toutes les tables ou celle associée à un ou plusieurs services donnés. 237 * Retourne la liste de toutes les tables gérées par le plugin ou de celles associées à un ou plusieurs 238 * services donnés. 237 239 * 238 240 * @param array $services … … 266 268 include_spip("services/${_service}/${_service}_api"); 267 269 $tables = array_merge($tables, array_keys($GLOBALS['isocode'][$_service]['tables'])); 270 } 271 } 272 273 return $tables; 274 } 275 276 277 /** 278 * Informe sur la liste des tables déjà chagées en base de données. 279 * Les informations de la meta de chaque table sont complétées et renvoyées. 280 * 281 * @return array 282 * Liste des tables de codes ISO sans le préfixe `spip_` et leurs informations de chargement. 283 */ 284 function isocode_informer_tables_chargees() { 285 286 // On initialise la liste des tables en lisant la meta idoine. 287 include_spip('inc/config'); 288 $tables = lire_config("isocode/tables", array()); 289 290 // On complète chaque bloc d'informations par le nom de la table et son libéllé. 291 if ($tables) { 292 foreach ($tables as $_table => $_informations) { 293 $tables[$_table]['nom'] = $_table; 294 $tables[$_table]['libelle'] = _T("isocode:label_table_${_table}"); 268 295 } 269 296 } -
_plugins_/isocode/trunk/lang/isocode_fr.php
r99228 r99231 21 21 'label_action_table' => 'Action à exécuter', 22 22 'label_action_vider_table' => 'Vider une table', 23 'label_colonne_actualisation' => 'Actualisé le', 24 'label_colonne_libelle' => 'Description', 25 'label_colonne_service' => 'Service', 26 'label_colonne_statistiques' => 'Enregistrements', 27 'label_colonne_table' => 'Table', 23 28 'label_table_iana5646subtags' => 'table reproduisant le registre IANA des sous-étiquettes de langues (RFC 5646)', 24 29 'label_table_iso15924scripts' => 'table des indicatifs d\'écritures (ISO 15924)', … … 32 37 33 38 // N 34 'notice_liste_aucune_table' => ' <LANGONET_DEFINITION_MANQUANTE>',39 'notice_liste_aucune_table' => 'Aucune table de codes ISO n\'a encore été chargée en base de données. Utiliser le formulaire ci-dessous pour y remédier.', 35 40 36 41 // S … … 40 45 // T 41 46 'titre_form_gerer_table' => 'Vider ou charger des tables', 42 'titre_liste_tables' => 'Liste des tables chargées en base de données',47 'titre_liste_tables' => 'Liste des tables de codes ISO chargées en base de données', 43 48 'titre_page' => 'Gestion des tables de codes ISO', 44 49 ); -
_plugins_/isocode/trunk/paquet.xml
r99230 r99231 2 2 prefix="isocode" 3 3 categorie="outil" 4 version="0.1. 1"4 version="0.1.2" 5 5 etat="dev" 6 6 compatibilite="[3.1.0;3.2.*]" -
_plugins_/isocode/trunk/prive/squelettes/liste/tables.html
r99228 r99231 8 8 9 9 [(#SET{defaut_tri,#ARRAY{ 10 nom _scientifique, 1,11 nom_commun, 1,10 nom, 1, 11 service, 1, 12 12 maj, -1, 13 13 }})] … … 15 15 <div class="liste-objets regnes"> 16 16 <table class="spip liste"> 17 [<caption><strong class="caption">(#ENV*{titre , #GRAND_TOTAL|singulier_ou_pluriel{taxonomie:label_1_regne, taxonomie:label_n_regnes}})</strong></caption>]17 [<caption><strong class="caption">(#ENV*{titre})</strong></caption>] 18 18 <thead> 19 19 <tr class="first_row"> 20 <th class=" logo" scope="col"> </th>21 <th class=" titre principale" scope="col">[(#TRI{nom_scientifique, <:taxon:champ_nom_scientifique_label:>, ajax})]</th>22 <th class="titre" scope="col">[(#TRI{ nom_commun, <:taxon:champ_nom_commun_label:>, ajax})]</th>23 <th class=" descriptif" scope="col"><:taxonomie:label_colonne_statistiques:></th>24 <th class="date" scope="col">[(#TRI{maj, <: taxonomie:label_colonne_actualisation:>, ajax})]</th>20 <th class="titre principale" scope="col">[(#TRI{nom, <:isocode:label_colonne_table:>, ajax})]</th> 21 <th class="descriptif" scope="col"><:isocode:label_colonne_libelle:></th> 22 <th class="titre" scope="col">[(#TRI{service, <:isocode:label_colonne_service:>, ajax})]</th> 23 <th class="numero" scope="col"><:isocode:label_colonne_statistiques:></th> 24 <th class="date" scope="col">[(#TRI{maj, <:isocode:label_colonne_actualisation:>, ajax})]</th> 25 25 </tr> 26 26 </thead> 27 27 <tbody> 28 <BOUCLE_liste_tables_iso(TAXONS) {rang=kingdom}{where?}{tri #ENV{par, nom_scientifique}, #GET{defaut_tri}}>28 <BOUCLE_liste_tables_iso(DATA) {source table, #VAL|isocode_informer_tables_chargees}{where?}{tri #ENV{par, nom}, #GET{defaut_tri}}> 29 29 <tr class="[(#COMPTEUR_BOUCLE|alterner{row_odd, row_even})]"> 30 <td class="logo"> 31 [(#CHEMIN_IMAGE{[regne_(#NOM_SCIENTIFIQUE)-32.png]} 32 |image_reduire{20,26} 33 |inserer_attribut{alt, logo})] 34 </td> 35 <td class="titre principale nom_scientifique"> 36 <a[ href="(#ID_TAXON|generer_url_entite{taxon})""]> 37 [(#NOM_SCIENTIFIQUE)] 38 </a> 39 </td> 40 <td class="titre" scope="col">[(#NOM_COMMUN|extraire_multi{#LANG, #ARRAY{lang_defaut, aucune}})]</td> 41 <td class="descriptif"> 42 #SET{meta_regne, #CONFIG{taxonomie_#NOM_SCIENTIFIQUE}} 43 [(#SET{rang_mini, [(#VAL{taxonomie:rang_}|concat{#GET{meta_regne/rang}}|_T)]})] 44 <ul> 45 <li>[(#VAL{taxonomie:info_regne_compteur_taxons}|_T{#ARRAY{nb, #GET{meta_regne/compteur}, rang, #GET{rang_mini}}})]</li> 46 <BOUCLE_traductions(DATA) {source table, #GET{meta_regne/traductions/itis}}> 47 #SET{nb, #VALEUR|table_valeur{compteur}} 48 <li><:taxonomie:info_regne_compteur_traductions{nb=#GET{nb}, langue=#CLE}:></li> 49 </BOUCLE_traductions> 50 </ul> 51 </td> 52 <td class="date">[(#MAJ|affdate)]</td> 30 <td class="titre principale">[(#VALEUR{nom})]</td> 31 <td class="descriptif">[(#VALEUR{libelle})]</td> 32 <td class="titre">[(#VALEUR{service})]</td> 33 <td class="numero">[(#VALEUR{nbr})]</td> 34 <td class="date">[(#VALEUR{maj})]</td> 53 35 </tr> 54 36 </BOUCLE_liste_tables_iso> 55 37 </tbody> 56 38 </table>
Note: See TracChangeset
for help on using the changeset viewer.