Commit a7da8dd3 authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Modification libellé compétences dans select & sorting de metier

parent d07c0123
Loading
Loading
Loading
Loading
+5 −3
Changes for module/Application/src/Application/Service/Competence/CompetenceService.php: 5 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -176,15 +176,17 @@ class CompetenceService {

    /**
     * @param Competence $competence
     * @param int $max_length
     * @return array
     */
    private function competenceOptionify(Competence $competence) {
    private function competenceOptionify(Competence $competence, $max_length=60) {
        $texte = (strlen($competence->getLibelle())>$max_length)?substr($competence->getLibelle(),0,$max_length)." ...":$competence->getLibelle();
        $this_option = [
            'value' =>  $competence->getId(),
            'attributes' => [
                'data-content' => ($competence->getType())?"<span class='badge ".$competence->getType()->getLibelle()."'>".$competence->getType()->getLibelle()."</span> &nbsp;". $competence->getLibelle():"",
                'data-content' => ($competence->getType())?"<span class='badge ".$competence->getType()->getLibelle()."'>".$competence->getType()->getLibelle()."</span> &nbsp;". $texte:"",
            ],
            'label' => $competence->getLibelle(),
            'label' => $texte,
        ];
        return $this_option;
    }
+1 −1
Changes for module/Application/view/application/metier/index.phtml: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -114,7 +114,7 @@ $droits = [
<script>
    $(document).ready(function() {
        $('.datatable').DataTable( {
            sorting: false,
            // sorting: false,
            // paging: false,
            language: {
                url: '/localisation/fr_FR.json'