Changeset 121585 in spip-zone
- Timestamp:
- Feb 4, 2020, 4:54:55 PM (13 months ago)
- Location:
- _galaxie_/trad.spip.net/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
_galaxie_/trad.spip.net/trunk
- Property subgit:lock:8bed23b54dbc69d48565e991d014c6ae6ad03cb2 deleted
-
Property
subgit:lock:8682d2bd5a6dcfc8ff513cca4d161030d80aa987
set to
2020-02-04T17:54:59.595
-
_galaxie_/trad.spip.net/trunk/squelettes/inclure/tradlang_bilan_module.html
r120921 r121585 67 67 <abbr title="<:tradlang:info_nb_items_module_new{module=#NOM_MOD,nb=#GET{total_new},lang=#CLE,langue_longue=#GET{langue_longue}}|attribut_html:>">][(#GET{total_new})]</abbr> 68 68 </td><//B_new_langue> 69 <td>[(#SET{percent_ok,[(#GET{total_ok}|div{#GET{total_mere}}|mult{100}| floor)]})][70 (#SET{percent_relire,[(#GET{total_relire}|div{#GET{total_mere}}|mult{100}| floor)]})][71 (#SET{percent_modif,[(#GET{total_modif}|div{#GET{total_mere}}|mult{100}| floor)]})][69 <td>[(#SET{percent_ok,[(#GET{total_ok}|div{#GET{total_mere}}|mult{100}|round{1})]})][ 70 (#SET{percent_relire,[(#GET{total_relire}|div{#GET{total_mere}}|mult{100}|round{1})]})][ 71 (#SET{percent_modif,[(#GET{total_modif}|div{#GET{total_mere}}|mult{100}|round{1})]})][ 72 72 (#SET{percent_new,[(#VAL{100}|moins{#GET{percent_ok}}|moins{#GET{percent_relire}}|moins{#GET{percent_modif}})]})][ 73 73 (#SET{total_ok_full,[(#GET{total_ok_full}|plus{#GET{percent_ok}})]})][ … … 75 75 (#SET{total_modif_full,[(#GET{total_modif_full}|plus{#GET{percent_modif}})]})][ 76 76 (#SET{total_new_full,[(#GET{total_new_full}|plus{#GET{percent_new}})]}) 77 ]<div class="progress" title="<:tradlang:info_module_traduit_pc_lang{pc=#GET{percent_ok},module=#NOM_MOD,lang=#CLE,langue_longue=#GET{langue_longue}}|attribut_html:>"> 78 <div class="progress-bar bg-[(#VAL{ok}|statut_to_variant)]" role="progressbar" style="width: #GET{percent_ok}%" aria-valuenow="#GET{percent_ok}" aria-valuemin="0" aria-valuemax="100">[(#GET{percent_ok})%]</div> 79 <div class="progress-bar bg-[(#VAL{relire}|statut_to_variant)]" role="progressbar" style="width: #GET{percent_relire}%" aria-valuenow="#GET{percent_relire}" aria-valuemin="0" aria-valuemax="100"></div> 80 <div class="progress-bar bg-[(#VAL{modif}|statut_to_variant)]" role="progressbar" style="width: #GET{percent_modif}%" aria-valuenow="#GET{percent_modif}" aria-valuemin="0" aria-valuemax="100"></div> 81 <div class="progress-bar bg-[(#VAL{new}|statut_to_variant)]" role="progressbar" style="width: #GET{percent_new}%" aria-valuenow="#GET{percent_new}" aria-valuemin="0" aria-valuemax="100"></div> 82 </div> 77 ][(#SET{title,<:tradlang:info_module_traduit_pc_lang{pc=#GET{percent_ok},module=#NOM_MOD,lang=#CLE,langue_longue=#GET{langue_longue}}:>}) 78 ][(#GET{total_ok}|tradlang_affiche_progressbar{#GET{total_relire},#GET{total_modif},#GET{total_new},first,#GET{title}})] 83 79 </td> 84 80 <td>[(#CLE|=={#LANG_MERE}|non) … … 98 94 <td>[(#SET{percent_new_full,[(#GET{total_new_full}|div{#TOTAL_BOUCLE}|floor)]})][(#GET{percent_new_full})%]</td> 99 95 <td> 100 <div class="progress"> 101 <div class="progress-bar bg-[(#VAL{ok}|statut_to_variant)]" role="progressbar" style="width: #GET{percent_ok_full}%" aria-valuenow="#GET{percent_ok_full}" aria-valuemin="0" aria-valuemax="100">#GET{percent_ok_full}%</div> 102 <div class="progress-bar bg-[(#VAL{relire}|statut_to_variant)]" role="progressbar" style="width: #GET{percent_relire_full}%" aria-valuenow="#GET{percent_relire_full}" aria-valuemin="0" aria-valuemax="100"></div> 103 <div class="progress-bar bg-[(#VAL{modif}|statut_to_variant)]" role="progressbar" style="width: #GET{percent_modif_full}%" aria-valuenow="#GET{percent_modif_full}" aria-valuemin="0" aria-valuemax="100"></div> 104 <div class="progress-bar bg-[(#VAL{new}|statut_to_variant)]" role="progressbar" style="width: #GET{percent_new_full}%" aria-valuenow="#GET{percent_new_full}" aria-valuemin="0" aria-valuemax="100"></div> 105 </div> 96 [(#GET{total_ok_full}|tradlang_affiche_progressbar{#GET{total_relire_full},#GET{total_modif_full},#GET{total_new_full},first,#GET{title}})] 106 97 </td> 107 98 <td></td> -
_galaxie_/trad.spip.net/trunk/squelettes/mes_fonctions.php
r120921 r121585 21 21 } 22 22 } 23 24 function tradlang_affiche_progressbar($total_ok, $total_relire, $total_modif, $total_new, $etiquettes = false, $title='') { 25 26 $total = $total_ok + $total_relire + $total_modif + $total_new; 27 $percent = array(); 28 $percent_round = array(); 29 $percent['modif'] = round(100 * $total_modif / $total,1); 30 $percent_round['modif'] = round($percent['modif']); 31 $percent['relire'] = round(100 * $total_relire / $total,1); 32 $percent_round['relire'] = round($percent['relire']); 33 if ($total_ok > $total_new) { 34 $percent['new'] = round(100 * $total_new / $total, 1); 35 $percent_round['new'] = round($percent['new']); 36 $percent['ok'] = 100 - array_sum($percent); 37 $percent_round['ok'] = 100 - array_sum($percent_round); 38 } 39 else { 40 $percent['ok'] = round(100 * $total_ok / $total,1); 41 $percent_round['ok'] = round($percent['ok']); 42 $percent['new'] = 100 - array_sum($percent); 43 $percent_round['new'] = 100 - array_sum($percent_round); 44 } 45 46 if (!$title) { 47 $title = _T('tradlang:info_module_traduit_pc', array('pc' => $percent['ok'])); 48 } 49 50 $progress = "<div class=\"progress\" title=\"" . attribut_html($title) . "\">"; 51 foreach(['ok', 'relire', 'modif', 'new'] as $s) { 52 $v = $percent[$s]; 53 $progress .= '<div class="progress-bar bg-' . statut_to_variant($s) . '" role="progressbar" style="width:'.$v.'%" aria-valuenow="'.$v.'" aria-valuemin="0" aria-valuemax="100">'; 54 if ($etiquettes==='all' or ($etiquettes and $s==='ok')) { 55 $progress .= $percent_round[$s] . "%"; 56 } 57 $progress .= '</div>'; 58 } 59 $progress .= '</div>'; 60 return $progress; 61 } -
_galaxie_/trad.spip.net/trunk/squelettes/noisettes/infos/tradlang_infos_module.html
r121560 r121585 34 34 <BOUCLE_total_item(TRADLANGS){id_tradlang_module}{lang=#LANG}>[(#SET{str_cible,#GET{str_cible}|push{#ID}})] </BOUCLE_total_item> 35 35 </B_total_item> 36 [(#SET{percent_ok,[(#CHAINES_OK|div{#GET{total_mere}}|mult{100}| floor)]})][(#SET{percent_relire,[(#CHAINES_RELIRE|div{#GET{total_mere}}|mult{100}|floor)]})][(#SET{percent_modif,[(#CHAINES_MODIF|div{#GET{total_mere}}|mult{100}|floor)]})][(#SET{percent_new,[(#VAL{100}|moins{#GET{percent_ok}}|moins{#GET{percent_relire}}|moins{#GET{percent_modif}})]})]36 [(#SET{percent_ok,[(#CHAINES_OK|div{#GET{total_mere}}|mult{100}|round)]})] 37 37 <span class="valeur_traduit">[(#GET{percent_ok})%]</span> 38 38 </div> 39 39 <div class="col-8"> 40 <div class="progress" title="<:tradlang:info_module_traduit_pc{pc=#GET{percent_ok}}|attribut_html:>"> 41 <div class="progress-bar bg-success" role="progressbar" style="width: #GET{percent_ok}%" aria-valuenow="#GET{percent_ok}" aria-valuemin="0" aria-valuemax="100"></div> 42 <div class="progress-bar bg-warning" role="progressbar" style="width: #GET{percent_relire}%" aria-valuenow="#GET{percent_relire}" aria-valuemin="0" aria-valuemax="100"></div> 43 <div class="progress-bar bg-info" role="progressbar" style="width: #GET{percent_modif}%" aria-valuenow="#GET{percent_modif}" aria-valuemin="0" aria-valuemax="100"></div> 44 <div class="progress-bar bg-danger" role="progressbar" style="width: #GET{percent_new}%" aria-valuenow="#GET{percent_new}" aria-valuemin="0" aria-valuemax="100"></div> 45 </div> 40 [(#CHAINES_OK|tradlang_affiche_progressbar{#CHAINES_RELIRE,#CHAINES_MODIF,#GET{total_mere}|moins{#CHAINES_OK}|moins{#CHAINES_RELIRE}|moins{#CHAINES_MODIF}})] 46 41 </div> 47 42 </div> -
_galaxie_/trad.spip.net/trunk/squelettes/noisettes/listes/tradlang_liste_tous.html
r121560 r121585 44 44 [(#SET{total_modif,0})] 45 45 <//B_total_item_lang> 46 [(#SET{percent_ok,#GET{total_ok}|div{#GET{total_mere}}|mult{100}| floor})]47 [(#SET{percent_relire,#GET{total_relire}|div{#GET{total_mere}}|mult{100}| floor})]48 [(#SET{percent_modif,#GET{total_modif}|div{#GET{total_mere}}|mult{100}| floor})]46 [(#SET{percent_ok,#GET{total_ok}|div{#GET{total_mere}}|mult{100}|round{1}})] 47 [(#SET{percent_relire,#GET{total_relire}|div{#GET{total_mere}}|mult{100}|round{1}})] 48 [(#SET{percent_modif,#GET{total_modif}|div{#GET{total_mere}}|mult{100}|round{1}})] 49 49 [(#SET{percent_new,#VAL{100}|moins{#GET{percent_ok}}|moins{#GET{percent_relire}}|moins{#GET{percent_modif}}})] 50 50 [(#SET{statuts_texte,#VAL{tradlang}|objet_info{statut_textes_instituer}})] … … 69 69 ] 70 70 </p> 71 <div class="progress" title="<:tradlang:info_module_traduit_pc{pc=#GET{percent_ok}}|attribut_html:>"> 72 <div class="progress-bar bg-[(#VAL{ok}|statut_to_variant)]" role="progressbar" style="width: #GET{percent_ok}%" aria-valuenow="#GET{percent_ok}" aria-valuemin="0" aria-valuemax="100">#GET{percent_ok}%</div> 73 <div class="progress-bar bg-[(#VAL{relire}|statut_to_variant)]" role="progressbar" style="width: #GET{percent_relire}%" aria-valuenow="#GET{percent_relire}" aria-valuemin="0" aria-valuemax="100">#GET{percent_relire}%</div> 74 <div class="progress-bar bg-[(#VAL{modif}|statut_to_variant)]" role="progressbar" style="width: #GET{percent_modif}%" aria-valuenow="#GET{percent_modif}" aria-valuemin="0" aria-valuemax="100">#GET{percent_modif}%</div> 75 <div class="progress-bar bg-[(#VAL{new}|statut_to_variant)]" role="progressbar" style="width: #GET{percent_new}%" aria-valuenow="#GET{percent_new}" aria-valuemin="0" aria-valuemax="100">#GET{percent_new}%</div> 76 </div> 71 [(#GET{total_ok}|tradlang_affiche_progressbar{#GET{total_relire},#GET{total_modif},#GET{total_new},all})] 77 72 </div> 78 73 ] … … 102 97 [(#ENV{edit}|=={1}|oui) 103 98 <a href="[(#SELF|parametre_url{edit,2})]" class="ajax btn btn-info">#ICON{backwards} <:tradlang:lien_retour_module{module=#NOM_MOD}:></a>] 104 [(#ENV{edit}|=={1}|non|et{#GET{module_existant,non}|=={oui}|oui}|et{#GET{ percent_ok}|!={100}|oui}|oui)99 [(#ENV{edit}|=={1}|non|et{#GET{module_existant,non}|=={oui}|oui}|et{#GET{total_ok}|!={#GET{total_mere}}|oui}|oui) 105 100 <a href="[(#SELF|parametre_url{edit,1})]" class="ajax btn btn-primary">#ICON{edit} <:tradlang:lien_editer_tous:></a>] 106 101 [(#BOUTON_ACTION{[#ICON{upload} (#GET{texte_bouton_upload})],[(#SELF|parametre_url{vue,upload})],btn btn-secondary})]
Note: See TracChangeset
for help on using the changeset viewer.