combo.html.twig 1.46 KB
Newer Older
1
2
{% import _self as my_macros %}

Arnaud Bey's avatar
Arnaud Bey committed
3
4
<div class="card">
    <div class="card-header">
Arnaud Bey's avatar
fix UI    
Arnaud Bey committed
5
        <span class="float-right">
Arnaud Bey's avatar
Arnaud Bey committed
6
            <span class="btn btn-outline-secondary btn-sm" onclick="combo.add()" >
arnaudbey's avatar
add app    
arnaudbey committed
7
8
9
                <i class="fa fa-plus" aria-hidden="true"></i>
                {{ 'add_combo' | trans }}
            </span>
Arnaud Bey's avatar
Arnaud Bey committed
10
            <button type="button" class="btn btn-outline-secondary btn-sm" data-toggle="modal" data-target="#helper-combos">
arnaudbey's avatar
add app    
arnaudbey committed
11
12
13
                <i class="fa fa-eye" aria-hidden="true"></i>
                {{ 'see_combos' | trans }}
            </button>
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
16
17
                <i class="fa fa-floppy-o" aria-hidden="true"></i>
                {{ 'save_objectives' | trans }}
            </span>
arnaudbey's avatar
add app    
arnaudbey committed
18
19
20
        </span>
    </div>

Arnaud Bey's avatar
Arnaud Bey committed
21
    <ul class="list-group list-group-flush" id="combos" data-prototype="{{ my_macros.combos_prototype(form.combos.vars.prototype)|e }}">
arnaudbey's avatar
add app    
arnaudbey committed
22
    {% for combo in form.combos %}
23
	      {{ my_macros.combos_prototype(combo) }}
arnaudbey's avatar
add app    
arnaudbey committed
24
25
26
27
28
29
30
    {% endfor %}
    </ul>
</div>

{% macro combos_prototype(combo) %}
<li class="list-group-item combo">
    {{ form_label(combo.number) }} : {{ form_widget(combo.number) }} - {{ form_label(combo.lenght) }} : {{ form_widget(combo.lenght) }}
Arnaud Bey's avatar
fix UI    
Arnaud Bey committed
31
    <span class="float-right">
Arnaud Bey's avatar
Arnaud Bey committed
32
        <span onclick="objectives.remove(this);" class="btn btn-sm btn-danger">
arnaudbey's avatar
add app    
arnaudbey committed
33
34
35
36
37
            <i class="fa fa-times" aria-hidden="true"></i>
        </span>
    </span>
</li>
{% endmacro %}