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/

edit.html.twig 3.83 KB
Newer Older
arnaudbey's avatar
add app  
arnaudbey committed
1
2
{% set hasObj =  conquer.objectives|length > 0 ? true : false %}

Arnaud Bey's avatar
Arnaud Bey committed
3
4
5
{# OBJECTIVES #}

<div class="row mb-3">
Arnaud Bey's avatar
Arnaud Bey committed
6
7
8
9
  <div class="col">
    <ul class="nav nav-tabs nav-justified nav-fill" role="tablist">
        <li role="presentation" class="nav-item">
            <a href="#find-words-tab" class="nav-link active" aria-controls="find-words-tab" role="tab" data-toggle="tab">
Arnaud Bey's avatar
Arnaud Bey committed
10
11
12
                <i class="fa fa-binoculars" aria-hidden="true"></i> {{ 'find_words' | trans }}
            </a>
        </li>
Arnaud Bey's avatar
Arnaud Bey committed
13
14
        <li role="presentation" class="nav-item">
            <a href="#combos-tab" class="nav-link" aria-controls="combos-tab" role="tab" data-toggle="tab">
Arnaud Bey's avatar
Arnaud Bey committed
15
16
17
                <i class="fa fa-tachometer" aria-hidden="true"></i> {{ 'combos' | trans }}
            </a>
        </li>
Arnaud Bey's avatar
Arnaud Bey committed
18
19
        <li role="presentation" class="nav-item">
            <a href="#constraints-tab" class="nav-link" aria-controls="constraints-tab" role="tab" data-toggle="tab">
Arnaud Bey's avatar
Arnaud Bey committed
20
21
22
23
                <i class="fa fa-map-o" aria-hidden="true"></i> {{ 'constraint' | trans }}
            </a>
        </li>
    </ul>
Arnaud Bey's avatar
Arnaud Bey committed
24
    <form class="form" id="objectives">
Arnaud Bey's avatar
Arnaud Bey committed
25
        <div class="tab-content">
Arnaud Bey's avatar
Arnaud Bey committed
26
            <div role="tabpanel" class="tab-pane active show fade" id="find-words-tab">
Arnaud Bey's avatar
Arnaud Bey committed
27
28
29
30
31
32
33
                {% include "MagicWordBundle:Round/Conquer/Objective:findword.html.twig" %}
            </div>
            <div role="tabpanel" class="tab-pane fade" id="combos-tab">
                {% include "MagicWordBundle:Round/Conquer/Objective:combo.html.twig" %}
            </div>
            <div role="tabpanel" class="tab-pane fade" id="constraints-tab">
                {% include "MagicWordBundle:Round/Conquer/Objective:constraint.html.twig" %}
arnaudbey's avatar
add app  
arnaudbey committed
34
            </div>
Arnaud Bey's avatar
Arnaud Bey committed
35
36
37
38
        </div>
        {{ form_widget(form._token) }}
    </form>
  </div>
arnaudbey's avatar
add app  
arnaudbey committed
39
40
41
</div>

{# GRID + INFLECTIONS #}
Arnaud Bey's avatar
Arnaud Bey committed
42
43
44
  <div class="row">
      <div class="col-5">
          <div class="card">
Arnaud Bey's avatar
Arnaud Bey committed
45
46
47
48
49
50
51
52
53
54
              <div class="card-header text-center">
                    <span class="btn btn-outline-secondary btn-sm" onclick="gridPatternHandler.list()">
                        <i class="fa fa-magic" aria-hidden="true"></i>
                        {{ 'patterns' | trans }}
                    </span>
                    <span class="btn btn-outline-secondary btn-sm" onclick="gridHandler.autofill()">
                        <i class="fa fa-magic" aria-hidden="true"></i>
                        {{ 'autofill_grid' | trans }}
                    </span>
                    <span class='btn btn-primary btn-sm' onclick="gridHandler.save()">
Arnaud Bey's avatar
Arnaud Bey committed
55
                        <i class="far fa-save" aria-hidden="true"></i>
Arnaud Bey's avatar
Arnaud Bey committed
56
57
                        {{ 'save_grid' | trans }}
                    </span>
Arnaud Bey's avatar
Arnaud Bey committed
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
              </div>
              <div class="card-body">
                  <div id="language-inconsistency" style="display:none" class="alert alert-warning" role="alert">
                      grid & foundables language are different from round language. Please resave your grid or change round language.
                  </div>
                  <form id="grid" method="POST">
                      <div id="result">
                          {% set grid = conquer.grid %}
                          {% include "MagicWordBundle:Round/Conquer:grid.html.twig" %}
                      </div>
                      <input id="conquerId" type="hidden" name="conquerId" value="{{ conquer.id }}"/>
                      <input id="languageId" type="hidden" name="language" value="{{ conquer.language.id }}">
                  </form>
              </div>
          </div>
      </div>
      <div id="foundables" class="col">
        {% if grid.foundableForms is defined  %}
Arnaud Bey's avatar
Arnaud Bey committed
76
          {% include 'MagicWordBundle:Grid:possible-inflections.html.twig' with {'foundableForms': grid.foundableForms, 'btn': true } %}
Arnaud Bey's avatar
Arnaud Bey committed
77
78
79
        {% endif %}
      </div>
  </div>
arnaudbey's avatar
add app  
arnaudbey committed
80
{% include "MagicWordBundle:Round/Conquer/Objective:helper-combos.html.twig" %}