Skip to content
Snippets Groups Projects
Commit c9de9fe6 authored by Pierre Fleutot's avatar Pierre Fleutot
Browse files

Fix merge labels

parent 9e047039
No related branches found
No related tags found
No related merge requests found
...@@ -85,6 +85,7 @@ class LabelController extends AppBaseController ...@@ -85,6 +85,7 @@ class LabelController extends AppBaseController
if ($identicalLabel) { if ($identicalLabel) {
$this->addFlash('warning', sprintf("Création impossible. Un label identique existe déjà.")); $this->addFlash('warning', sprintf("Création impossible. Un label identique existe déjà."));
} else { } else {
$this->em->persist($label);
$this->em->flush(); $this->em->flush();
$this->addFlash('success', "Le label a été ajouté"); $this->addFlash('success', "Le label a été ajouté");
...@@ -92,8 +93,8 @@ class LabelController extends AppBaseController ...@@ -92,8 +93,8 @@ class LabelController extends AppBaseController
} }
} }
return $this->render('genericModalForm.html.twig', [ return $this->render('label/edit.html.twig', [
'title' => "Créer un label", 'label' => $label,
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
} }
......
<div class="badge rounded-pill {{ label.isMilestone ? 'badge-milestone'}} position-relative text-black {{ label|labelClass }} <div class="badge rounded-pill {{ label.isMilestone ? 'badge-milestone'}} position-relative text-black {{ label|labelClass }}
{{ label.isMilestone or label.isInstitutional or label.isMasterPublic ? 'border-auto'}}" style="margin-right: 5px;" {{ label.isMilestone or label.isInstitutional or label.isMasterPublic ? 'border-auto'}}" style="margin-right: 5px;"
title="{{ label.description }}. Updated: {{ label.updatedAt|date('d/m/Y') }}"> title="{{ label.description ? label.description~'.' : }} Updated: {{ label.updatedAt|date('d/m/Y') }}">
{{ label }} {{ label }}
{% if label.isMilestone %}<br>{{ label.getMilestone|date('d/m/Y') }}{% endif %} {% if label.isMilestone %}<br>{{ label.getMilestone|date('d/m/Y') }}{% endif %}
{% if showHeadwordsCounter|default(false) %} {% if showHeadwordsCounter|default(false) %}
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
<tr> <tr>
<td></td> <td></td>
{% for lexicon in app.user.myLexicons %} {% for lexicon in app.user.myLexicons %}
<td class="text-center col-collapse {{ (showVisibility|default(false) != category) ? 'hidden-column' }}">{{ lexicon|badge }}</td> <td class="text-center col-collapse {{ (showVisibility|default(false) != category) ? 'hidden-column' }}">
<a href="{{ path('app_lexicon_show', {id: app.user.lexicon.id}) }}" title=" {{ "Lexique du groupe"|trans }} « {{ lexicon }} »">{{ lexicon|badge }}</a>
</td>
{% endfor %} {% endfor %}
</tr> </tr>
\ No newline at end of file
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<div class="row pt-3"> <div class="row pt-3">
<div class="col-sm-4"></div> <div class="col-sm-4"></div>
<div class="col-sm-8"> <div class="col-sm-8">
{% if displayForceValidation %} {% if displayForceValidation|default(false) %}
{{ form_widget(form.forceValidation) }} {{ form_widget(form.forceValidation) }}
{% else %} {% else %}
{{ form_widget(form.submit) }} {{ form_widget(form.submit) }}
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div class="col-md-12"> <div class="col-md-12">
<h1 class="my-3"> <h1 class="my-3">
<i class="fa fa-tag"></i> {{ "Labels"|trans }} <i class="fa fa-tag"></i> {{ "Label"|trans }}
</h1> </h1>
<div class="row"> <div class="row">
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<th class="text-center"> <th class="text-center">
<div class="d-flex justify-content-around align-items-center"> <div class="d-flex justify-content-around align-items-center">
<span>{{ "Mots-vedettes"|trans }}</span> <span>{{ "Mots-vedettes"|trans }}</span>
<a title="{{ "Ajouter"|trans }}" href="#" data-url="{{ path('app_label_add_headword', {id: label.id}) }}" class="ms-2 modal-form"><i class="fa fa-plus-circle text-success"></i></a> <a title="{{ "Ajouter le label à un autre mot-vedette"|trans }}" href="#" data-url="{{ path('app_label_add_headword', {id: label.id}) }}" class="ms-2 modal-form"><i class="fa fa-plus-circle text-success"></i></a>
</th> </th>
<th colspan="{{ lexiconsNb }}" class="text-center">{{ "Présence des mots dans les lexiques"|trans }}</th> <th colspan="{{ lexiconsNb }}" class="text-center">{{ "Présence des mots dans les lexiques"|trans }}</th>
</tr> </tr>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment