77 lines
No EOL
2.3 KiB
HTML
77 lines
No EOL
2.3 KiB
HTML
<h1>Liste des fichiers disponibles</h1>
|
|
<div class="la_une">
|
|
<ul>
|
|
<BOUCLE_corpus(DATA){source ls, #CHEMIN{tmp}/corpus/*}{par basename}>
|
|
<li>
|
|
#SET{liste_lignes,#LISTE{1}} #SET{trop_gros,#CONFIG{corpus_web/taille_max}} [(#REM) trop gros = 100Mo ]
|
|
#SET{nb_lignes, #FILE|nombre_ligne} [(#GET{nb_lignes}|!={1}|oui) #SET{liste_lignes,#LISTE{1,#GET{nb_lignes}}}]
|
|
<h3 class="spip[ (#SIZE|>{#GET{trop_gros}}|oui)non_traite]">
|
|
[(#FILE|basename)] : [(#GET{nb_lignes}) [(#GET{nb_lignes}|singulier_ou_pluriel{page,pages})]] <small>([(#SIZE|human_filesize)o])</small>
|
|
[ (#SIZE|>{#GET{trop_gros}}|oui)<div>fichier trop gros pour traitement basique</div>]
|
|
</h3>
|
|
<BOUCLE_2lignes(DATA){liste #GET{liste_lignes}}{si #SIZE|<{#GET{trop_gros}}}>
|
|
<div>
|
|
<h4 class="aff_masq">Ligne #VALEUR:</h4>
|
|
<div class="details">
|
|
[(#SET{content,[(#FILE|affiche_ligne{1}|json_decode{true})]})]
|
|
<ul>
|
|
<li>
|
|
<div class="aff_masq">Contenu brut :</div>
|
|
<textarea class="details">[(#FILE|affiche_ligne{1})]</textarea>
|
|
</li>
|
|
<BOUCLE_content(DATA){source table, #GET{content}}>
|
|
<li>
|
|
[(#CLE|=={htmlBytes}|oui)
|
|
<div class="aff_masq">[(#CLE)] = HTML de la page : </div>
|
|
<div class="details js-hidden">
|
|
<textarea>[(#VALEUR|base64_decode|replace{<,<}|replace{>,>})]</textarea>
|
|
</div>
|
|
]
|
|
[(#CLE|=={htmlBytes}|non)
|
|
<div class="aff_masq">[(#CLE)] : </div>
|
|
<div class="details">
|
|
[(#VALEUR|print|replace{<br />,§§}|replace{<,<}|replace{>,>}|replace{§§,<br>})]
|
|
</div>
|
|
]
|
|
</li>
|
|
</BOUCLE_content>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</BOUCLE_2lignes>
|
|
</li>
|
|
</BOUCLE_corpus>
|
|
</ul>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
jQuery(function () {
|
|
$('.aff_masq').each(function() {
|
|
$(this).siblings('.details').toggleClass('js-hidden');
|
|
});
|
|
|
|
$('.aff_masq').on('click', function() {
|
|
$(this).siblings('.details').toggleClass('js-hidden');
|
|
});
|
|
});
|
|
</script>
|
|
|
|
<style type="text/css" media="screen">
|
|
.aff_masq {
|
|
cursor: pointer;
|
|
font-weight: bold;
|
|
}
|
|
.aff_masq:hover {
|
|
background-color: #DDD;
|
|
}
|
|
.details br:first-of-type {
|
|
display: none;
|
|
}
|
|
textarea {
|
|
width: 100%;
|
|
height: 200px;
|
|
}
|
|
.non_traite {
|
|
color: #777;
|
|
}
|
|
</style> |