on limite l'accès au forum privé aux membres du bureau
This commit is contained in:
parent
374208ea75
commit
68ce64a64f
9 changed files with 147 additions and 69 deletions
|
@ -156,3 +156,26 @@ function autoriser_sujet_supprimer($faire, $type, $id, $qui, $opt) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function autoriser_forum_voir($faire, $type, $id, $qui, $opt) {
|
||||||
|
$id_auteur = $qui['id_auteur'];
|
||||||
|
// Il faut être au moins membre
|
||||||
|
if ($qui['statut']=='1comite'){
|
||||||
|
// si le forum est privé, il faut être membre du bureau
|
||||||
|
if ($id==lire_config('balint/id_rub_forum_prive')){
|
||||||
|
if (sql_getfetsel('bureau','spip_auteurs',"id_auteur=$id_auteur")=='on'){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Les admins ont accès à tout
|
||||||
|
if ($qui['statut']=='0minirezo'){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -78,5 +78,17 @@ function balint_declarer_champs_extras($champs = array()) {
|
||||||
'modifier' => array('auteur' => '0minirezo')),//Seuls les admins peuvent modifier
|
'modifier' => array('auteur' => '0minirezo')),//Seuls les admins peuvent modifier
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
/*
|
||||||
|
$champs['spip_auteurs']['bureau'] = array(
|
||||||
|
'saisie' => 'case',//Type du champ (voir plugin Saisies)
|
||||||
|
'options' => array(
|
||||||
|
'nom' => 'bureau',
|
||||||
|
'label' => 'Membre du bureau',
|
||||||
|
'defaut' => '',// Valeur par défaut
|
||||||
|
'restrictions'=>array(
|
||||||
|
'voir' => array('auteur' => '0minirezo'),//Tout le monde peut voir
|
||||||
|
'modifier' => array('auteur' => '0minirezo')),//Seuls les admins peuvent modifier
|
||||||
|
),
|
||||||
|
);*/
|
||||||
return $champs;
|
return $champs;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,10 @@
|
||||||
else {
|
else {
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
<div class="text-center h5">
|
||||||
|
Il faut vous connecter pour accéder au forum.
|
||||||
|
Connectez-vous avec vos identifiants ou inscrivez-vous !
|
||||||
|
</div>
|
||||||
<div class="row mt-4">
|
<div class="row mt-4">
|
||||||
<div class="se_connecter bloc_connexion col-lg-5">
|
<div class="se_connecter bloc_connexion col-lg-5">
|
||||||
[(#FORMULAIRE_LOGIN{#SELF})]
|
[(#FORMULAIRE_LOGIN{#SELF})]
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
<section class="section-top section-bottom">
|
<section class="section-top section-bottom">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>Connexion</h1>
|
<h1>Connexion</h1>
|
||||||
|
<div class="text-center h5">
|
||||||
|
Connectez-vous avec vos identifiants ou inscrivez-vous !
|
||||||
|
</div>
|
||||||
<div class="row mt-4">
|
<div class="row mt-4">
|
||||||
<div class="se_connecter bloc_connexion col-lg-5">
|
<div class="se_connecter bloc_connexion col-lg-5">
|
||||||
[(#FORMULAIRE_LOGIN{#ENV{url}})]
|
[(#FORMULAIRE_LOGIN{#ENV{url}})]
|
||||||
|
|
|
@ -742,6 +742,15 @@ body{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bouton-toggle{
|
||||||
|
color:lightgrey;
|
||||||
|
display: block;
|
||||||
|
text-align: center;
|
||||||
|
&.vert{
|
||||||
|
color: green;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.formulaire_spip{
|
.formulaire_spip{
|
||||||
fieldset legend{
|
fieldset legend{
|
||||||
|
@ -782,54 +791,56 @@ body{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.docs-article {
|
|
||||||
justify-content: left;
|
|
||||||
display: flex;
|
|
||||||
.une_photo {
|
|
||||||
margin-right: 1rem;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
max-width: 320px;
|
|
||||||
}
|
|
||||||
.btn_poubelle{
|
|
||||||
color: red;
|
|
||||||
:hover{
|
|
||||||
color: #ee9e9e;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.btn_une{
|
|
||||||
color: black;
|
|
||||||
:hover{
|
|
||||||
color: grey;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.boutons_actions {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-around;
|
|
||||||
align-items: center;
|
|
||||||
background-color: $gris-clair;
|
|
||||||
i.green {
|
|
||||||
padding: .6rem;
|
|
||||||
color: rgb(28, 158, 28);
|
|
||||||
}
|
|
||||||
a {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
.premier-plan{
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
align-items: center;
|
|
||||||
padding: 0.2rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
legend {
|
legend {
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.docs-article {
|
||||||
|
justify-content: left;
|
||||||
|
display: flex;
|
||||||
|
.une_photo {
|
||||||
|
margin-right: 1rem;
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
max-width: 320px;
|
||||||
|
}
|
||||||
|
.btn_poubelle{
|
||||||
|
color: red;
|
||||||
|
:hover{
|
||||||
|
color: #ee9e9e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.btn_une{
|
||||||
|
color: black;
|
||||||
|
:hover{
|
||||||
|
color: grey;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.boutons_actions {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-around;
|
||||||
|
align-items: center;
|
||||||
|
background-color: $gris-clair;
|
||||||
|
i.green {
|
||||||
|
padding: .6rem;
|
||||||
|
color: rgb(28, 158, 28);
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.premier-plan{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0.2rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.titre_img{
|
.titre_img{
|
||||||
background: $gris-moyen;
|
background: $gris-moyen;
|
||||||
color: white;
|
color: white;
|
||||||
|
@ -838,7 +849,7 @@ body{
|
||||||
|
|
||||||
.photo-premier-plan{
|
.photo-premier-plan{
|
||||||
margin-bottom: 1.5rem;
|
margin-bottom: 1.5rem;
|
||||||
border: solid 1px #BBB;
|
text-align:center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container fieldset {
|
.container fieldset {
|
||||||
|
@ -891,6 +902,7 @@ body{
|
||||||
|
|
||||||
.liste-auteurs{
|
.liste-auteurs{
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
|
@ -916,6 +928,10 @@ body{
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.editer_docs_forum{
|
||||||
|
background: $light;
|
||||||
|
}
|
||||||
|
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
/**************************** PAGE CONTACT ****************************/
|
/**************************** PAGE CONTACT ****************************/
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
|
|
|
@ -12709,6 +12709,16 @@ body {
|
||||||
background-color: #ffb284;
|
background-color: #ffb284;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bouton-toggle {
|
||||||
|
color: lightgrey;
|
||||||
|
display: block;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bouton-toggle.vert {
|
||||||
|
color: green;
|
||||||
|
}
|
||||||
|
|
||||||
.formulaire_spip fieldset legend {
|
.formulaire_spip fieldset legend {
|
||||||
background: none;
|
background: none;
|
||||||
}
|
}
|
||||||
|
@ -12761,15 +12771,20 @@ body {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.formulaire_editer_post .docs-article {
|
.formulaire_editer_post legend {
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.docs-article {
|
||||||
-webkit-box-pack: left;
|
-webkit-box-pack: left;
|
||||||
justify-content: left;
|
justify-content: left;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.formulaire_editer_post .docs-article .une_photo {
|
.docs-article .une_photo {
|
||||||
margin-right: 1rem;
|
margin-right: 1rem;
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
|
@ -12778,23 +12793,23 @@ body {
|
||||||
max-width: 320px;
|
max-width: 320px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.formulaire_editer_post .docs-article .btn_poubelle {
|
.docs-article .btn_poubelle {
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
.formulaire_editer_post .docs-article .btn_poubelle :hover {
|
.docs-article .btn_poubelle :hover {
|
||||||
color: #ee9e9e;
|
color: #ee9e9e;
|
||||||
}
|
}
|
||||||
|
|
||||||
.formulaire_editer_post .docs-article .btn_une {
|
.docs-article .btn_une {
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
.formulaire_editer_post .docs-article .btn_une :hover {
|
.docs-article .btn_une :hover {
|
||||||
color: grey;
|
color: grey;
|
||||||
}
|
}
|
||||||
|
|
||||||
.formulaire_editer_post .docs-article .boutons_actions {
|
.docs-article .boutons_actions {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -12807,16 +12822,16 @@ body {
|
||||||
background-color: #f2f2f2;
|
background-color: #f2f2f2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.formulaire_editer_post .docs-article .boutons_actions i.green {
|
.docs-article .boutons_actions i.green {
|
||||||
padding: .6rem;
|
padding: .6rem;
|
||||||
color: #1c9e1c;
|
color: #1c9e1c;
|
||||||
}
|
}
|
||||||
|
|
||||||
.formulaire_editer_post .docs-article .boutons_actions a {
|
.docs-article .boutons_actions a {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.formulaire_editer_post .docs-article .boutons_actions .premier-plan {
|
.docs-article .boutons_actions .premier-plan {
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
-webkit-box-orient: horizontal;
|
-webkit-box-orient: horizontal;
|
||||||
|
@ -12827,10 +12842,6 @@ body {
|
||||||
padding: 0.2rem;
|
padding: 0.2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.formulaire_editer_post legend {
|
|
||||||
width: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.titre_img {
|
.titre_img {
|
||||||
background: #7d7d7d;
|
background: #7d7d7d;
|
||||||
color: white;
|
color: white;
|
||||||
|
@ -12839,7 +12850,7 @@ body {
|
||||||
|
|
||||||
.photo-premier-plan {
|
.photo-premier-plan {
|
||||||
margin-bottom: 1.5rem;
|
margin-bottom: 1.5rem;
|
||||||
border: solid 1px #BBB;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container fieldset {
|
.container fieldset {
|
||||||
|
@ -12892,6 +12903,7 @@ body {
|
||||||
.liste-auteurs {
|
.liste-auteurs {
|
||||||
-webkit-box-align: center;
|
-webkit-box-align: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
|
@ -12921,6 +12933,10 @@ body {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.editer_docs_forum {
|
||||||
|
background: #f8f9fa;
|
||||||
|
}
|
||||||
|
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
/**************************** PAGE CONTACT ****************************/
|
/**************************** PAGE CONTACT ****************************/
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
[(#INFO_ORDRE{mots,#ENV{id_mot}}|set{ordre})]
|
[(#ENV{ordre}|=={DESC}|?{
|
||||||
|
|
||||||
[(#GET{ordre}|=={DESC}|?{
|
|
||||||
#SET{tri,1},
|
#SET{tri,1},
|
||||||
#SET{tri,0}
|
#SET{tri,0}
|
||||||
})]
|
})]
|
||||||
|
@ -12,15 +10,17 @@
|
||||||
|
|
||||||
<?php if (isset($GLOBALS['visiteur_session']['statut']) AND $GLOBALS['visiteur_session']['statut'] == '0minirezo') { ?>
|
<?php if (isset($GLOBALS['visiteur_session']['statut']) AND $GLOBALS['visiteur_session']['statut'] == '0minirezo') { ?>
|
||||||
[(#ENV{id_forum}|non)
|
[(#ENV{id_forum}|non)
|
||||||
<INCLURE{fond=inclure/bouton_ordre,env,ordre=#GET{ordre,DESC},objet=mot}>
|
<INCLURE{fond=inclure/bouton_ordre,env,ordre=#ENV{ordre,ASC},objet=mot}>
|
||||||
]
|
]
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
[(#ENV{id_forum}|oui)
|
[(#ENV{id_forum}|oui)
|
||||||
[(#ENV{id_article}|oui)
|
[(#AUTORISER{voir,forum,#ENV{id_forum}}|oui)
|
||||||
<INCLURE{fond=inclure/article-forum,env}/>
|
[(#ENV{id_article}|oui)
|
||||||
]
|
<INCLURE{fond=inclure/article-forum,env}/>
|
||||||
[(#ENV{id_article}|non)
|
]
|
||||||
<INCLURE{fond=inclure/forum_discussion,env}/>
|
[(#ENV{id_article}|non)
|
||||||
|
<INCLURE{fond=inclure/forum_discussion,env}/>
|
||||||
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -13,9 +13,11 @@
|
||||||
<a class="nav-link ajax nocache" href="[(#URL_PAGE{espace_membre}|parametre_url{id_mot,#ID_MOT})]">#TITRE</a>
|
<a class="nav-link ajax nocache" href="[(#URL_PAGE{espace_membre}|parametre_url{id_mot,#ID_MOT})]">#TITRE</a>
|
||||||
</li>
|
</li>
|
||||||
</BOUCLE_menu_membre>
|
</BOUCLE_menu_membre>
|
||||||
|
[(#AUTORISER{voir,forum,#CONFIG{balint/id_rub_forum_prive}}|oui)
|
||||||
<li class="nav-item [(#ENV{id_forum}|=={#CONFIG{balint/id_rub_forum_prive}}|oui) active]">
|
<li class="nav-item [(#ENV{id_forum}|=={#CONFIG{balint/id_rub_forum_prive}}|oui) active]">
|
||||||
<a class="nav-link ajax nocache" href="[(#URL_PAGE{espace_membre}||parametre_url{id_forum,#CONFIG{balint/id_rub_forum_prive}})]">Échanges privés</a>
|
<a class="nav-link ajax nocache" href="[(#URL_PAGE{espace_membre}||parametre_url{id_forum,#CONFIG{balint/id_rub_forum_prive}})]">Échanges privés</a>
|
||||||
</li>
|
</li>
|
||||||
|
]
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
|
@ -35,7 +35,7 @@
|
||||||
<a class="nav-link" href="[(#URL_PAGE{association})]">L'association</a>
|
<a class="nav-link" href="[(#URL_PAGE{association})]">L'association</a>
|
||||||
</li>
|
</li>
|
||||||
<?php
|
<?php
|
||||||
if (isset($GLOBALS['visiteur_session']['statut']) AND $GLOBALS['visiteur_session']['statut']=="6forum") {
|
if (!isset($GLOBALS['visiteur_session']['statut']) OR $GLOBALS['visiteur_session']['statut']=="6forum") {
|
||||||
?>
|
?>
|
||||||
<li class="nav-item [(#SI_PAGE{forum_discussion}|oui) active]">
|
<li class="nav-item [(#SI_PAGE{forum_discussion}|oui) active]">
|
||||||
<a class="nav-link" href="[(#URL_PAGE{forum_discussion})]">Forum</a>
|
<a class="nav-link" href="[(#URL_PAGE{forum_discussion})]">Forum</a>
|
||||||
|
@ -51,7 +51,9 @@
|
||||||
<BOUCLE_menu_prive(MOTS){id_groupe=#CONFIG{balint/id_mots_espace_membre}}{par id_mot}{tout}>
|
<BOUCLE_menu_prive(MOTS){id_groupe=#CONFIG{balint/id_mots_espace_membre}}{par id_mot}{tout}>
|
||||||
<a class="dropdown-item" href="[(#URL_PAGE{espace_membre}|parametre_url{id_mot,#ID_MOT})]">#TITRE</a>
|
<a class="dropdown-item" href="[(#URL_PAGE{espace_membre}|parametre_url{id_mot,#ID_MOT})]">#TITRE</a>
|
||||||
</BOUCLE_menu_prive>
|
</BOUCLE_menu_prive>
|
||||||
|
[(#AUTORISER{voir,forum,#CONFIG{balint/id_rub_forum_prive}}|oui)
|
||||||
<a class="dropdown-item" href="[(#URL_PAGE{espace_membre}|parametre_url{id_forum,#CONFIG{balint/id_rub_forum_prive}})]">Échanges privés</a>
|
<a class="dropdown-item" href="[(#URL_PAGE{espace_membre}|parametre_url{id_forum,#CONFIG{balint/id_rub_forum_prive}})]">Échanges privés</a>
|
||||||
|
]
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
Loading…
Add table
Reference in a new issue