Beispiel #1
0
 public function newListItem($param)
 {
     $actions = $param['actions'];
     $backUrl = $param['backUrl'];
     // Si action select
     $selectRoute = strpos($actions, 'select') === false ? false : $param['selectRoute'];
     $line = "";
     // 1er Col - Unique
     $line .= '<td class="table-col-auto">';
     $line .= '<div class="divOnLeft">' . $this->categorie->sexe->icone() . '</div>';
     $line .= '</td>';
     $line .= '<td>';
     // Corps
     $line .= '<div>';
     // 1er ligne
     // Nom - Openable
     $line .= '<div class="divOnLeft dark-txt bold">';
     if (!(strpos($actions, 'open') === false)) {
         $line .= Xtable::link('competcategorie.create', $this->categorie->nom, [$backUrl, $this->id]);
     } else {
         $line .= $this->categorie->nom;
     }
     $line .= '</div>';
     // Delete
     if (!(strpos($actions, 'delete') === false)) {
         $line .= '<div class="pull-right">';
         $line .= Xbutton::bttDelete('competcategorie.delete', [$backUrl, $this->id]);
         $line .= '</div>';
     }
     // Edit
     if (!(strpos($actions, 'edit') === false)) {
         $line .= '<div class="pull-right">';
         $line .= Xbutton::bttEdit('competcategorie.changetee', [$backUrl, $this->id]);
         $line .= '</div>';
     }
     // Select
     if (!(strpos($actions, 'select') === false)) {
         $line .= '<div class="pull-right">';
         $line .= Xbutton::bttSelect('competcategorie.select', [$backUrl, $selectRoute, $this->id]);
         $line .= '</div>';
     }
     // Change ligne
     $line .= '<div></div>';
     // 2ème ligne
     $line .= '<div class="divOnLeft">' . $this->categorie->showHcp() . '</div>';
     $line .= '<div class="divOnLeft">' . $this->categorie->showAge() . '</div>';
     $line .= '<div class="divOnLeft">' . gl('Boites') . ' ' . $this->tee->icone() . '</div>';
     $line .= '</div>';
     $line .= '</td>';
     return $line;
 }