Commit a87d9167 authored by Florian Joriot's avatar Florian Joriot
Browse files

Passage en rouge des elements pedagogique n'ayant pas de type intervention associé

parent 4e9f4f93
Loading
Loading
Loading
Loading
+19 −1
Original line number Diff line number Diff line
@@ -173,7 +173,11 @@ class ElementPedagogiqueController extends AbstractController
                    $item['LIBELLE_ETAPE'] = 'Enseignement commun à plusieurs parcours';
                }


                //TODO : verif sur has_type_intervention --> changer title and mettre bg-danger-light --> créer nouvelle regle CSS rouge claire
                $extra = '';
                $template = '';
                if($item['HAS_TYPE_INTERVENTION'] == 1){
                    if (!$niveau) {
                        $extra .= sprintf('<span class="niveau" title="%s">%s</span>', "Niveau", $item['LIBELLE_GTF'] . $item['NIVEAU']);
                    }
@@ -181,8 +185,22 @@ class ElementPedagogiqueController extends AbstractController
                        $extra .= sprintf('<span class="etape" title="%s">%s</span>', "Formation", $item['LIBELLE_ETAPE']);
                    }
                    $extra .= "Année" !== $item['LIBELLE_PE'] ? sprintf('<span class="periode" title="%s">%s</span>', "Période", $item['LIBELLE_PE']) : null;

                    $template = sprintf('<span class="extra">{extra}</span><span class="element" title="%s">{label}</span>', "Enseignement");

                }else{
                    $SaisieImpossible = "Saisie impossible sur cet élément pédagogique : aucun type d'intervention associé";
                    if (!$niveau) {
                        $extra .= sprintf('<span class="niveau" title="%s">%s</span>', $SaisieImpossible, $item['LIBELLE_GTF'] . $item['NIVEAU']);
                    }
                    if (!$etape) {
                        $extra .= sprintf('<span class="etape" title="%s">%s</span>', $SaisieImpossible, $item['LIBELLE_ETAPE']);
                    }
                    $extra .= "Année" !== $item['LIBELLE_PE'] ? sprintf('<span class="periode" title="%s">%s</span>', $SaisieImpossible, $item['LIBELLE_PE']) : null;
                    $template = sprintf('<span class="extra danger-light">{extra}</span><span class="element danger-light" title="%s">{label}</span>', $SaisieImpossible);
                }



                $result[] = [
                    'id'       => $item['ID'],
                    'label'    => $item['CODE'] . ' ' . $item['LIBELLE'],
+3 −1
Original line number Diff line number Diff line
@@ -133,7 +133,8 @@ select * from (
    pe.libelle_long libelle_pe,
    gtf.libelle_court libelle_gtf,
    tf.libelle_long libelle_tf,
    ep.source_code || ' ' || ep.libelle|| ' ' || e.source_code || ' ' || e.libelle || ' ' || gtf.LIBELLE_COURT || ' ' || e.NIVEAU || ' ' || tf.LIBELLE_COURT etape_info
    ep.source_code || ' ' || ep.libelle|| ' ' || e.source_code || ' ' || e.libelle || ' ' || gtf.LIBELLE_COURT || ' ' || e.NIVEAU || ' ' || tf.LIBELLE_COURT etape_info,
    CASE WHEN tiep.element_pedagogique_id is NULL THEN 0 ELSE 1 END has_type_intervention
  from
    chemin_pedagogique cp
    JOIN element_pedagogique ep ON$af cp.element_pedagogique_id = ep.id  AND ep.histo_destruction IS NULL$orEp
@@ -142,6 +143,7 @@ select * from (
    JOIN GROUPE_TYPE_FORMATION gtf on tf.GROUPE_ID = gtf.ID
    JOIN structure s ON s.id = e.structure_id OR s.id = ep.structure_id
    LEFT JOIN periode pe ON ep.periode_id = pe.id
    LEFT JOIN (SELECT DISTINCT element_pedagogique_id FROM type_intervention_ep WHERE histo_destruction IS NULL) tiep ON tiep.element_pedagogique_id = ep.id
  where
    (cp.histo_destruction IS NULL$orCp)
    and $whereTerm
+5 −0
Original line number Diff line number Diff line
@@ -27392,6 +27392,11 @@ dd, dt {
  background-image: none;
}
.danger-light {
  background-color: #dc4c64;
  color: #fff;
}
/* -------------- Personnalisation du bootstrap-select -------------- */
.bootstrap-select .btn {
  box-shadow: none;
+1 −1

File changed.

Preview size limit exceeded, changes collapsed.

+4 −1
Original line number Diff line number Diff line
@@ -241,7 +241,10 @@ dd, dt {
  background-image: none;
}


.danger-light{
  background-color: #dc4c64;
  color: #fff;
}

/* -------------- Personnalisation du bootstrap-select -------------- */