Pour CYRILLE, var_mode=gamutable compatible minibando
This commit is contained in:
parent
40d68933e3
commit
2e4fe5e1e3
5 changed files with 34 additions and 13 deletions
|
@ -12,3 +12,28 @@
|
|||
if (!defined('_ECRIRE_INC_VERSION')) {
|
||||
return;
|
||||
}
|
||||
|
||||
function gamutable_formulaire_admin($flux) {
|
||||
include_spip('inc/autoriser');
|
||||
if (autoriser("purger","gamutable")) {
|
||||
$btn = recuperer_fond('inclure/calculer_gamutable');
|
||||
$flux['data'] = preg_replace('%(<!--extra-->)%is', $btn.'$1', $flux['data']);
|
||||
}
|
||||
|
||||
return $flux;
|
||||
}
|
||||
|
||||
|
||||
function gamutable_affichage_final($flux) {
|
||||
include_spip('inc/autoriser');
|
||||
if (autoriser("purger","gamutable")) {
|
||||
$p = stripos($flux, '</body>');
|
||||
$url_relecture = parametre_url(self(), 'var_mode', 'gamutable', '&');
|
||||
$label = "Mode gamuTable";
|
||||
$js .= "jQuery('#minibando_bouton_debug ul').append('<li><a class=\"spip-admin-boutons \" href=\"$url_relecture\">$label</a></li>');";
|
||||
$js = "jQuery(function(){ $js });";
|
||||
$js = "<script>$js</script>";
|
||||
$flux = substr_replace($flux, $js, $p, 0);
|
||||
}
|
||||
return $flux;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue