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

arnaudbey's avatar
add app    
arnaudbey committed
3
4
5
6
7
8
9
10
<div class="panel panel-default">
    <div class="panel-heading">
        &nbsp;
        <span class="pull-right">
            <span class="btn btn-default btn-xs" onclick="combo.add()" >
                <i class="fa fa-plus" aria-hidden="true"></i>
                {{ 'add_combo' | trans }}
            </span>
Arnaud Bey's avatar
Arnaud Bey committed
11
            <button type="button" class="btn btn-default btn-xs" data-toggle="modal" data-target="#helper-combos">
arnaudbey's avatar
add app    
arnaudbey committed
12
13
14
                <i class="fa fa-eye" aria-hidden="true"></i>
                {{ 'see_combos' | trans }}
            </button>
Arnaud Bey's avatar
Arnaud Bey committed
15
16
17
18
            <span class='btn btn-primary btn-xs' onclick="objectives.save()">
                <i class="fa fa-floppy-o" aria-hidden="true"></i>
                {{ 'save_objectives' | trans }}
            </span>
arnaudbey's avatar
add app    
arnaudbey committed
19
20
21
        </span>
    </div>

22
    <ul class="list-group" id="combos" data-prototype="{{ my_macros.combos_prototype(form.combos.vars.prototype)|e }}">
arnaudbey's avatar
add app    
arnaudbey committed
23
    {% for combo in form.combos %}
24
	      {{ my_macros.combos_prototype(combo) }}
arnaudbey's avatar
add app    
arnaudbey committed
25
26
27
28
29
30
31
32
33
34
35
36
37
38
    {% 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) }}
    <span class="pull-right">
        <span onclick="objectives.remove(this);" class="btn btn-danger">
            <i class="fa fa-times" aria-hidden="true"></i>
        </span>
    </span>
</li>
{% endmacro %}