예제 #1
0
 /**
  * Créer la vue de la page
  */
 private function createView()
 {
     //Affichage des utilisateurs
     $this->oView->addData('titre', 'Administration des invitations');
     //Construction du tableau
     $oTable = new TableGenerator();
     $oTable->setId(md5('Administration des invitations'));
     $oTable->addColumn('Parrain');
     $oTable->addColumn('Code');
     $oTable->addColumn('Filleul');
     $oTable->addColumn('');
     $aInvites = Invites::getInvites();
     foreach ($aInvites as $oInvite) {
         //Affichage du type
         if ($oInvite->getFilleulId() === 0) {
             $sType = 'danger';
             $sText = 'Aucun';
             $oLabel = new View('label');
             $oLabel->addData('text', $sText);
             $oLabel->addData('type', $sType);
             $oLabel->create();
             $sFilleul = $oLabel->getCode();
         } else {
             $sFilleul = $oInvite->getFilleulLogin();
         }
         $oTable->addLine(array($oInvite->getParrainLogin(), $oInvite->getCode(), $sFilleul, $this->createEditPopup($oInvite)));
     }
     $oTable->setBottom($this->createAddPopup());
     $oTable->create();
     $this->oView->addData('content', $oTable->getCode());
     $this->oView->create();
 }