Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

constraint.html.twig 1.63 KB
Newer Older
1
2
{% import _self as my_macros %}

Arnaud Bey's avatar
Arnaud Bey committed
3
<div class="card">
Arnaud Bey's avatar
Arnaud Bey committed
4
5
6
7
    <div id="prototypes"
      data-prototype-constraint="{{ my_macros.constraints_prototype(form.constraints.vars.prototype)|e }}">
    </div>

Arnaud Bey's avatar
Arnaud Bey committed
8
    <div class="card-header">
Arnaud Bey's avatar
fix UI  
Arnaud Bey committed
9
        <span class="float-right">
Arnaud Bey's avatar
Arnaud Bey committed
10
            <span class="btn btn-outline-secondary btn-sm" onclick="constraints.add()" >
arnaudbey's avatar
add app  
arnaudbey committed
11
12
13
                <i class="fa fa-plus" aria-hidden="true"></i>
                {{ 'add_constraint' | trans }}
            </span>
Arnaud Bey's avatar
Arnaud Bey committed
14
            <span class='btn btn-primary btn-sm' onclick="objectives.save()">
Arnaud Bey's avatar
Arnaud Bey committed
15
                <i class="far fa-save" aria-hidden="true"></i>
Arnaud Bey's avatar
Arnaud Bey committed
16
17
                {{ 'save_objectives' | trans }}
            </span>
arnaudbey's avatar
add app  
arnaudbey committed
18
            {#
Arnaud Bey's avatar
Arnaud Bey committed
19
            <button type="button" class="btn btn-outline-secondary  btn-sm" data-toggle="modal" data-target="#helper-constraint">
arnaudbey's avatar
add app  
arnaudbey committed
20
21
22
23
24
25
26
                <i class="fa fa-eye" aria-hidden="true"></i>
                {{ 'see_constraints' | trans }}
            </button>
            #}
        </span>
    </div>

Arnaud Bey's avatar
Arnaud Bey committed
27
    <ul class="list-group" id="constraints">
arnaudbey's avatar
add app  
arnaudbey committed
28
    {% for constraint in form.constraints %}
29
	      {{ my_macros.constraints_prototype(constraint) }}
arnaudbey's avatar
add app  
arnaudbey committed
30
31
32
33
34
    {% endfor %}
    </ul>
</div>

{% macro constraints_prototype(constraint) %}
Arnaud Bey's avatar
Arnaud Bey committed
35
36
37
  <li class="list-group-item constraint-objective">
        {{ form_label(constraint.numberToFind) }} : {{ form_widget(constraint.numberToFind) }}
        <span>{{ form_widget(constraint.features) }}</span>
Arnaud Bey's avatar
fix UI  
Arnaud Bey committed
38
      <span class="float-right">
Arnaud Bey's avatar
Arnaud Bey committed
39
          <span onclick="objectives.remove(this);" class="btn btn-sm btn-danger">
Arnaud Bey's avatar
Arnaud Bey committed
40
41
42
43
              <i class="fa fa-times" aria-hidden="true"></i>
          </span>
      </span>
  </li>
arnaudbey's avatar
add app  
arnaudbey committed
44
{% endmacro %}