From f84e30e374598278ad994af5d0422edb375d5760 Mon Sep 17 00:00:00 2001 From: Geoffrey Frogeye Date: Sat, 8 Nov 2014 20:43:38 +0100 Subject: [PATCH] [Orga] Retravail --- orga.php | 165 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------- 1 file changed, 125 insertions(+), 40 deletions(-) diff --git a/orga.php b/orga.php index 2508bff..6889b07 100644 --- a/orga.php +++ b/orga.php @@ -4,49 +4,134 @@ # DEBUG # e_ : est # r_ : a le droit de -$e_connecte = true; -$r_voir = $e_connecte; -$r_vote = true; -$r_proposer = true; - -if ($r_voir) { - if ($r_vote) { - if ($r_proposer) { -?> -

Ajouter un évènement

-
-

-

-

Dates proposées

-
- Pas de date proposée pour l'instant. -
- -
Proposer une date
-

-

- -
- - -'; + + # Titre + $html .= '

'.$this->nom; + if ($this->annule) { + $html .= ' Annulé'; + } + if (in_array('annuler', $droits) && !$this->annule) { # TODO + $html .= ' '; + } + if (in_array('supprimer', $droits) && !$this->valide) { # TODO + $html .= ' '; + } + $html .= '

'; + + # Description + $html .= '
'; + $html .= '
'; + $html .= '

Description'; + if (in_array('modifier', $droits)) { + $html .= ' '; + } + $html .= '

'; + $html .= '
'; + $html .= '
'; + $html .= '

'; + $html .= nl2br(htmlspecialchars($this->description)); + $html .= '

'; + // $html .= '
'; + $html .= '

'; + $html .= 'Durée : '.$this->duree.' minutes
'; + if ($this->valide) { + $html .= 'Date : '.date('c', $this->valide).'
'; + } + $html .= '

'; + if ($this->annule) { + $html .= ''; + + } + $html .= '
'; + $html .= '
'; + + # Dates + if (!$this->valide && !$this->annule) { + $html .= '
'; + $html .= '
'; + $html .= '

Dates possibles'; + if (in_array('proposer', $droits)) { + $html .= ''; + } + $html .= '

'; + $html .= '
'; + $html .= '
'; + $html .= '
    '; + foreach ($this->dates as $dateIndex => $date) { + $html .= '
  • '.date('c', $date).' (6 )
  • '; + } + $html .= '
'; + if (in_array('valider', $droits) && !$this->valide) { + $html .= '

'; + } + $html .= '
'; + $html .= '
'; + } + + $html .= ''; + return $html; + } +} + ?> -

Évènements à planifier

-
-
-Évènements + +

Plannifiés

+