diff --git a/balint_autorisations.php b/balint_autorisations.php index aa364dc..d805bd1 100644 --- a/balint_autorisations.php +++ b/balint_autorisations.php @@ -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; + } +} diff --git a/base/balint.php b/base/balint.php index 5a8e4e6..d733bb8 100644 --- a/base/balint.php +++ b/base/balint.php @@ -78,5 +78,17 @@ function balint_declarer_champs_extras($champs = array()) { '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; } diff --git a/content/forum_discussion.html b/content/forum_discussion.html index 6dd0737..7a675c4 100644 --- a/content/forum_discussion.html +++ b/content/forum_discussion.html @@ -14,6 +14,10 @@ else { ?> +
+ Il faut vous connecter pour accéder au forum. + Connectez-vous avec vos identifiants ou inscrivez-vous ! +
[(#FORMULAIRE_LOGIN{#SELF})] diff --git a/content/login.html b/content/login.html index c5342af..d3fb926 100644 --- a/content/login.html +++ b/content/login.html @@ -5,6 +5,9 @@

Connexion

+
+ Connectez-vous avec vos identifiants ou inscrivez-vous ! +
[(#FORMULAIRE_LOGIN{#ENV{url}})] diff --git a/css/_sq_balint.scss b/css/_sq_balint.scss index 8b2e675..d3fab04 100644 --- a/css/_sq_balint.scss +++ b/css/_sq_balint.scss @@ -742,6 +742,15 @@ body{ } } +.bouton-toggle{ + color:lightgrey; + display: block; + text-align: center; + &.vert{ + color: green; + } +} + .formulaire_spip{ 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 { 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{ background: $gris-moyen; color: white; @@ -838,7 +849,7 @@ body{ .photo-premier-plan{ margin-bottom: 1.5rem; - border: solid 1px #BBB; + text-align:center; } .container fieldset { @@ -891,6 +902,7 @@ body{ .liste-auteurs{ align-items: center; + text-align: center; } /**********************************************************************/ @@ -916,6 +928,10 @@ body{ display: none; } +.editer_docs_forum{ + background: $light; +} + /**********************************************************************/ /**************************** PAGE CONTACT ****************************/ /**********************************************************************/ diff --git a/css/mon_site.css b/css/mon_site.css index 1e01717..c1b2db2 100644 --- a/css/mon_site.css +++ b/css/mon_site.css @@ -12709,6 +12709,16 @@ body { background-color: #ffb284; } +.bouton-toggle { + color: lightgrey; + display: block; + text-align: center; +} + +.bouton-toggle.vert { + color: green; +} + .formulaire_spip fieldset legend { background: none; } @@ -12761,15 +12771,20 @@ body { } } -.formulaire_editer_post .docs-article { +.formulaire_editer_post legend { + width: auto; +} + +.docs-article { -webkit-box-pack: left; justify-content: left; display: -webkit-box; display: flex; } -.formulaire_editer_post .docs-article .une_photo { +.docs-article .une_photo { margin-right: 1rem; + margin-bottom: 1.5rem; display: -webkit-box; display: flex; -webkit-box-orient: vertical; @@ -12778,23 +12793,23 @@ body { max-width: 320px; } -.formulaire_editer_post .docs-article .btn_poubelle { +.docs-article .btn_poubelle { color: red; } -.formulaire_editer_post .docs-article .btn_poubelle :hover { +.docs-article .btn_poubelle :hover { color: #ee9e9e; } -.formulaire_editer_post .docs-article .btn_une { +.docs-article .btn_une { color: black; } -.formulaire_editer_post .docs-article .btn_une :hover { +.docs-article .btn_une :hover { color: grey; } -.formulaire_editer_post .docs-article .boutons_actions { +.docs-article .boutons_actions { width: 100%; display: -webkit-box; display: flex; @@ -12807,16 +12822,16 @@ body { background-color: #f2f2f2; } -.formulaire_editer_post .docs-article .boutons_actions i.green { +.docs-article .boutons_actions i.green { padding: .6rem; color: #1c9e1c; } -.formulaire_editer_post .docs-article .boutons_actions a { +.docs-article .boutons_actions a { margin: 0; } -.formulaire_editer_post .docs-article .boutons_actions .premier-plan { +.docs-article .boutons_actions .premier-plan { display: -webkit-box; display: flex; -webkit-box-orient: horizontal; @@ -12827,10 +12842,6 @@ body { padding: 0.2rem; } -.formulaire_editer_post legend { - width: auto; -} - .titre_img { background: #7d7d7d; color: white; @@ -12839,7 +12850,7 @@ body { .photo-premier-plan { margin-bottom: 1.5rem; - border: solid 1px #BBB; + text-align: center; } .container fieldset { @@ -12892,6 +12903,7 @@ body { .liste-auteurs { -webkit-box-align: center; align-items: center; + text-align: center; } /**********************************************************************/ @@ -12921,6 +12933,10 @@ body { display: none; } +.editer_docs_forum { + background: #f8f9fa; +} + /**********************************************************************/ /**************************** PAGE CONTACT ****************************/ /**********************************************************************/ diff --git a/inclure/espace_membre_contenu.html b/inclure/espace_membre_contenu.html index 3b31a79..21f13fa 100644 --- a/inclure/espace_membre_contenu.html +++ b/inclure/espace_membre_contenu.html @@ -1,6 +1,4 @@ -[(#INFO_ORDRE{mots,#ENV{id_mot}}|set{ordre})] - -[(#GET{ordre}|=={DESC}|?{ +[(#ENV{ordre}|=={DESC}|?{ #SET{tri,1}, #SET{tri,0} })] @@ -12,15 +10,17 @@ [(#ENV{id_forum}|non) - + ] [(#ENV{id_forum}|oui) - [(#ENV{id_article}|oui) - - ] - [(#ENV{id_article}|non) - + [(#AUTORISER{voir,forum,#ENV{id_forum}}|oui) + [(#ENV{id_article}|oui) + + ] + [(#ENV{id_article}|non) + + ] ] ] diff --git a/inclure/menu-espace_membre.html b/inclure/menu-espace_membre.html index ddef11e..a205c2c 100644 --- a/inclure/menu-espace_membre.html +++ b/inclure/menu-espace_membre.html @@ -13,9 +13,11 @@ #TITRE + [(#AUTORISER{voir,forum,#CONFIG{balint/id_rub_forum_prive}}|oui) + ]
\ No newline at end of file diff --git a/inclure/menu_principal.html b/inclure/menu_principal.html index 88fe4f9..2a9310c 100644 --- a/inclure/menu_principal.html +++ b/inclure/menu_principal.html @@ -35,7 +35,7 @@ L'association