1 | <?php |
---|
2 | |
---|
3 | if (!defined('_ECRIRE_INC_VERSION')) return; |
---|
4 | |
---|
5 | |
---|
6 | function compagnon_compagnon_messages($flux) { |
---|
7 | |
---|
8 | $exec = $flux['args']['exec']; |
---|
9 | $pipeline = $flux['args']['pipeline']; |
---|
10 | $aides = &$flux['data']; |
---|
11 | |
---|
12 | switch ($pipeline) { |
---|
13 | |
---|
14 | case 'affiche_milieu': |
---|
15 | switch ($exec) { |
---|
16 | |
---|
17 | |
---|
18 | case 'accueil': |
---|
19 | $aides[] = array( |
---|
20 | 'id' => 'accueil', |
---|
21 | 'inclure' => 'compagnon/accueil', |
---|
22 | 'statuts'=> array('1comite', '0minirezo', 'webmestre') |
---|
23 | ); |
---|
24 | $aides[] = array( |
---|
25 | 'id' => 'accueil_configurer', |
---|
26 | 'titre' => _T('compagnon:c_accueil_configurer_site'), |
---|
27 | 'texte' => _T('compagnon:c_accueil_configurer_site_texte', array('nom'=>$GLOBALS['meta']['nom_site'])), |
---|
28 | 'statuts'=> array('webmestre'), |
---|
29 | 'target' => '#bando_identite .nom_site_spip .nom', |
---|
30 | ); |
---|
31 | $aides[] = array( |
---|
32 | 'id' => 'accueil_publication', |
---|
33 | 'titre' => _T('compagnon:c_accueil_publication'), |
---|
34 | 'texte' => _T('compagnon:c_accueil_publication_texte'), |
---|
35 | 'statuts'=> array('webmestre'), |
---|
36 | 'target'=> '#bando1_menu_edition', |
---|
37 | ); |
---|
38 | break; |
---|
39 | |
---|
40 | |
---|
41 | case 'rubriques': |
---|
42 | $aides[] = array( |
---|
43 | 'id' => 'rubriques', |
---|
44 | 'titre' => _T('compagnon:c_rubriques_creer'), |
---|
45 | 'texte' => _T('compagnon:c_rubriques_creer_texte'), |
---|
46 | 'statuts'=> array('webmestre'), |
---|
47 | 'target'=> '#contenu .icone:first-of-type', |
---|
48 | ); |
---|
49 | break; |
---|
50 | |
---|
51 | |
---|
52 | case 'rubrique': |
---|
53 | $aides[] = array( |
---|
54 | 'id' => 'rubrique', |
---|
55 | 'titre' => _T('compagnon:c_rubrique_publier'), |
---|
56 | 'texte' => _T('compagnon:c_rubrique_publier_texte'), |
---|
57 | 'statuts'=> array('webmestre'), |
---|
58 | 'target'=> '#contenu .icone.article-new-24' |
---|
59 | ); |
---|
60 | break; |
---|
61 | |
---|
62 | case 'articles': |
---|
63 | if (!sql_countsel('spip_rubriques')) { |
---|
64 | $aides[] = array( |
---|
65 | 'id' => 'articles', |
---|
66 | 'titre' => _T('compagnon:c_articles_creer'), |
---|
67 | 'texte' => _T('compagnon:c_articles_creer_texte'), |
---|
68 | 'statuts'=> array('webmestre') |
---|
69 | ); |
---|
70 | } |
---|
71 | break; |
---|
72 | |
---|
73 | case 'article': |
---|
74 | $aides[] = array( |
---|
75 | 'id' => 'article_redaction', |
---|
76 | 'inclure' => 'compagnon/article_redaction', |
---|
77 | 'statuts'=> array('0minirezo', 'webmestre') |
---|
78 | ); |
---|
79 | $aides[] = array( |
---|
80 | 'id' => 'article_redaction_redacteur', |
---|
81 | 'inclure' => 'compagnon/article_redaction_redacteur', |
---|
82 | 'statuts'=> array('1comite') |
---|
83 | ); |
---|
84 | break; |
---|
85 | } |
---|
86 | break; |
---|
87 | |
---|
88 | case 'affiche_gauche': |
---|
89 | switch ($exec) { |
---|
90 | case 'job_queue': |
---|
91 | $aides[] = array( |
---|
92 | 'id' => 'job_queue', |
---|
93 | 'titre' => _T('compagnon:c_job'), |
---|
94 | 'texte' => _T('compagnon:c_job_texte'), |
---|
95 | 'statuts'=> array('webmestre') |
---|
96 | ); |
---|
97 | break; |
---|
98 | } |
---|
99 | break; |
---|
100 | } |
---|
101 | |
---|
102 | |
---|
103 | return $flux; |
---|
104 | } |
---|
105 | |
---|
106 | ?> |
---|