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; }
public function lineItem($actions = '', $backUrl = '', $passId = '') { $line = ''; // ligne 1 : Infos heure $line .= Xtable::tr(); // Nom (Openable) $line .= Xtable::openTd(['colspan' => '2', 'class' => 'dark-txt bold']); $txt = gl('Trou') . ' ' . $this->starttee . ' | '; $txt .= gl('à partir de') . ' ' . showHeure($this->startheure) . ' | '; $txt .= gl('toutes les') . ' ' . showHeure($this->interval) . ' ' . gl('minutes'); if (!(strpos($actions, 'open') === false)) { $line .= Xtable::link('configdepart.open', $txt, [$this->id]); } else { $line .= $txt; } $line .= Xtable::closeTd(); // Buttons $line .= Xtable::openTdButton(['rowspan' => '2']); // Editable if (!(strpos($actions, 'edit') === false)) { $line .= Xbutton::bttEdit('configdepart.create', [$backUrl, $this->id]); } // Deletable if (!(strpos($actions, 'delete') === false)) { $line .= Xbutton::bttdelete('configdepart.delete', [$backUrl, $this->id]); } $line .= Xtable::closeTd(); $line .= Xtable::trClose(); // ligne 2 : Parcours $line .= Xtable::tr(); // Parcours $line .= Xtable::openTd(['colspan' => '2']); $line .= gl('Parcours') . ' : ' . $this->parcour->nom; $line .= Xtable::closeTd(); $line .= Xtable::trClose(); // Separation $line .= Xtable::trSepare(); return $line; }