puce_statut.php
SPIP, Système de publication pour l'internet
Copyright © avec tendresse depuis 2001 Arnaud Martin, Antoine Pitrou, Philippe Rivière, Emmanuel Saint-James
Ce programme est un logiciel libre distribué sous licence GNU/GPL.
Table of Contents
Constants
- _ACTIVER_PUCE_RAPIDE = \true
- Activer le changement rapide de statut sur les listes d'objets ?
Functions
- inc_puce_statut_dist() : string
- Afficher la puce statut d'un objet
- statut_image() : string|null
- Récuperer l'image correspondant au statut pour un objet éditorial indiqué
- statut_titre() : string
- Récupérer le titre correspondant au statut pour un objet éditorial indiqué
- statut_texte_instituer() : string
- Recuperer le texte correspondant au choix de statut, tel que declare dans declarer_tables_objets_sql sous la forme array('statut1'=>'texte statut 1','statut2'=>'texte statut 2' ...) mettre une chaine vide pour ne pas proposer un statut les statuts seront proposes dans le meme ordre que dans la declaration
- puce_statut_auteur_dist() : string
- Afficher la puce statut d'un auteur
- puce_statut_rubrique_dist() : mixed
- puce_statut_changement_rapide() : string
- Retourne le contenu d'une puce avec changement de statut possible si on en a l'autorisation, sinon simplement l'image de la puce
- afficher_script_statut() : mixed
- puce_statut() : mixed
Constants
_ACTIVER_PUCE_RAPIDE
Activer le changement rapide de statut sur les listes d'objets ?
    public
        mixed
    _ACTIVER_PUCE_RAPIDE
    = \true
        Peut ralentir un site sur des listes très longues.
Tags
Functions
inc_puce_statut_dist()
Afficher la puce statut d'un objet
    
                    inc_puce_statut_dist(int $id_objet, string $statut, int $id_parent, string $type[, bool $ajax = false ][, bool $menu_rapide = _ACTIVER_PUCE_RAPIDE ]) : string
        Utilise une fonction spécifique pour un type d'objet si elle existe, tel que puce_statut_$type_dist(), sinon tente avec puce_statut_changement_rapide().
Parameters
- $id_objet : int
- 
                    Identifiant de l'objet 
- $statut : string
- 
                    Statut actuel de l'objet 
- $id_parent : int
- 
                    Identifiant du parent 
- $type : string
- 
                    Type d'objet 
- $ajax : bool = false
- 
                    Indique s'il ne faut renvoyer que le coeur du menu car on est dans une requete ajax suite à un post de changement rapide 
- $menu_rapide : bool = _ACTIVER_PUCE_RAPIDE
- 
                    Indique si l'on peut changer le statut, ou si on l'affiche simplement 
Tags
Return values
string —Code HTML de l'image de puce de statut à insérer (et du menu de changement si présent)
statut_image()
Récuperer l'image correspondant au statut pour un objet éditorial indiqué
    
                    statut_image(string $objet, string $statut) : string|null
        Retrouve l'image correspondant au statut, telle que declarée dans
declarer_tables_objets_sql sous la forme :
```
array(
    'imagepardefaut.png',
    'statut1' => 'imagestatut1.png',
    'statut2' => 'imagestatut2.png',
    ...
)
```
Mettre une chaine vide pour ne pas avoir d'image pour un statut particulier.
Si rien n'est declaré et que le statut est dans un des cas connus habituels (prepa, prop, publie, refuse, poubelle), alors on renvoie l'image par défaut pour ce statut
Parameters
- $objet : string
- $statut : string
Return values
string|null —null si pas capable de déterminer l'image
statut_titre()
Récupérer le titre correspondant au statut pour un objet éditorial indiqué
    
                    statut_titre(string $objet, string $statut) : string
        Retrouve le titre correspondant au statut, tel qu'il a été declaré dans
declarer_tables_objets_sql sous la forme :
```
array(
    'titre par defaut',
    'statut1' => 'titre statut 1',
    'statut2' => 'titre statut 2',
     ...
)
Mettre une chaine vide pour ne pas avoir de titre pour un statut particulier.
Si rien n'est declaré et que le statut est dans un des cas connus habituels
(prepa, prop, publie, refuse, poubelle), alors on renvoie le texte par défaut pour ce statut
Parameters
- $objet : string
- $statut : string
Return values
stringstatut_texte_instituer()
Recuperer le texte correspondant au choix de statut, tel que declare dans declarer_tables_objets_sql sous la forme array('statut1'=>'texte statut 1','statut2'=>'texte statut 2' ...) mettre une chaine vide pour ne pas proposer un statut les statuts seront proposes dans le meme ordre que dans la declaration
    
                    statut_texte_instituer(string $objet, string $statut) : string
        si rien de declare et que le statut est dans les cas connus (prepa, prop, publie, refuse, poubelle) renvoyer le texte par defaut
Parameters
- $objet : string
- $statut : string
Return values
stringpuce_statut_auteur_dist()
Afficher la puce statut d'un auteur
    
                    puce_statut_auteur_dist(int $id, string $statut, int $id_parent, string $type[, string $ajax = '' ][, bool $menu_rapide = _ACTIVER_PUCE_RAPIDE ]) : string
        Ne semble plus servir : desactive Hack de compatibilite: les appels directs ont un $type != 'auteur' si l'auteur ne peut pas se connecter
Parameters
- $id : int
- $statut : string
- $id_parent : int
- $type : string
- $ajax : string = ''
- $menu_rapide : bool = _ACTIVER_PUCE_RAPIDE
Return values
stringpuce_statut_rubrique_dist()
    
                    puce_statut_rubrique_dist(mixed $id, mixed $statut, mixed $id_rubrique, mixed $type[, mixed $ajax = '' ][, mixed $menu_rapide = _ACTIVER_PUCE_RAPIDE ]) : mixed
    
        Parameters
- $id : mixed
- $statut : mixed
- $id_rubrique : mixed
- $type : mixed
- $ajax : mixed = ''
- $menu_rapide : mixed = _ACTIVER_PUCE_RAPIDE
puce_statut_changement_rapide()
Retourne le contenu d'une puce avec changement de statut possible si on en a l'autorisation, sinon simplement l'image de la puce
    
                    puce_statut_changement_rapide(int $id, string $statut, int $id_rubrique[, string $type = 'article' ][, bool $ajax = false ][, bool $menu_rapide = _ACTIVER_PUCE_RAPIDE ]) : string
    
        Parameters
- $id : int
- 
                    Identifiant de l'objet 
- $statut : string
- 
                    Statut actuel de l'objet 
- $id_rubrique : int
- 
                    Identifiant du parent, une rubrique 
- $type : string = 'article'
- 
                    Type d'objet 
- $ajax : bool = false
- 
                    Indique s'il ne faut renvoyer que le coeur du menu car on est dans une requete ajax suite à un post de changement rapide 
- $menu_rapide : bool = _ACTIVER_PUCE_RAPIDE
- 
                    Indique si l'on peut changer le statut, ou si on l'affiche simplement 
Return values
string —Code HTML de l'image de puce de statut à insérer (et du menu de changement si présent)
afficher_script_statut()
    
                    afficher_script_statut(mixed $id, mixed $type, mixed $n, mixed $img, mixed $statut, mixed $titre[, mixed $act = '' ]) : mixed
    
        Parameters
- $id : mixed
- $type : mixed
- $n : mixed
- $img : mixed
- $statut : mixed
- $titre : mixed
- $act : mixed = ''
puce_statut()
    
                    puce_statut(mixed $statut[, mixed $atts = '' ]) : mixed
    
        Parameters
- $statut : mixed
- $atts : mixed = ''