edit.html.twig 3.65 KB
Newer Older
arnaudbey's avatar
add app  
arnaudbey committed
1 2 3 4 5
{% extends '::base.html.twig' %}

{% block title %}EDIT ROUND{% endblock %}

{% block body -%}
Arnaud Bey's avatar
Arnaud Bey committed
6 7 8 9 10 11 12 13 14 15 16

<nav aria-label="breadcrumb">
  <ol class="breadcrumb" style="background-color: #fff;">
    <li class="breadcrumb-item"><a href="{{path('home')}}">Accueil</a></li>
    <li class="breadcrumb-item" aria-current="page"><a href="{{path('home_create')}}">Créer</a></li>
    <li class="breadcrumb-item" aria-current="page"><a href="{{path('my_massives_under_construction')}}">{{ 'my_massives_under_construction' | trans }}</a></li>
    <li class="breadcrumb-item" aria-current="page"><a href="{{ path('massive_builder', {"id": round.game.id}) }}">{{ round.game.name }}</a></li>
    <li class="breadcrumb-item active" aria-current="page">Edition manche</li>
  </ol>
</nav>

Arnaud Bey's avatar
Arnaud Bey committed
17 18
<div class="card">
    <div class="card-header">
Arnaud Bey's avatar
Arnaud Bey committed
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
        <strong>
            <span id="round-title">{{ round.title ? round.title : "manche sans titre"}}</span>
        </strong>
        <span class="text-muted">
            <span id="round-description">{{ round.description ? round.description }}</span>
        </span>
        <span class="float-right">
            {% if round.discr == "conquer" %}
            <span onClick="editor.saveAll();" class="btn btn-sm btn-primary">
                <i class="far fa-save" aria-hidden="true"></i>
                {{"save_all"|trans}}
            </span>
            {% else %}
            <span class="btn btn-sm btn-outline-secondary" onclick="gridPatternHandler.list()">
                <i class="fa fa-magic" aria-hidden="true"></i>
                {{ 'patterns_list' | trans }}
            </span>
            <span class="btn btn-sm btn-outline-secondary" data-toggle="modal" data-target="#addword-modal">
                <i class="fa fa-plus" aria-hidden="true"></i>
                {{ 'addwords' | 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 onclick="rushEditor.savegrid()" class="btn btn-sm btn-primary">
                <i class="far fa-save" aria-hidden="true"></i>
                {{ 'save_grid' | trans }}
            </span>
            {% endif %}
        </span>
arnaudbey's avatar
add app  
arnaudbey committed
50
    </div>
Arnaud Bey's avatar
Arnaud Bey committed
51
    <div class="card-body">
Arnaud Bey's avatar
Arnaud Bey committed
52 53 54
        <ul class="nav nav-tabs nav-fill nav-justified" role="tablist">
           <li class="nav-item"><a class="nav-link active" href="#grid-tab" aria-controls="grid-tab" role="tab" data-toggle="tab">Grille {{ round.discr == "conquer" ? "& objectifs" : ""}}</a></li>
           <li class="nav-item"><a class="nav-link" href="#misc" aria-controls="misc" role="tab" data-toggle="tab">{{ "properties" | trans }}</a></li>
arnaudbey's avatar
add app  
arnaudbey committed
55 56
         </ul>
         <div class="tab-content">
Arnaud Bey's avatar
Arnaud Bey committed
57 58 59 60 61 62 63 64
            <div class="tab-pane fade show active mt-4" id="grid-tab">
              {% if round.discr == "rush" %}
                  {% set rush = round %}
                  {% include "MagicWordBundle:Round/Rush:edit.html.twig" %}
              {% else %}
                  {% set conquer = round %}
                  {% include "MagicWordBundle:Round/Conquer:edit.html.twig" %}
              {% endif %}
arnaudbey's avatar
add app  
arnaudbey committed
65
            </div>
Arnaud Bey's avatar
Arnaud Bey committed
66
            <div role="tabpanel" class="tab-pane fade" id="misc">
Arnaud Bey's avatar
Arnaud Bey committed
67 68
                <input id="roundId" type="hidden" name="roundId" value="{{ round.id }}"/>
                {% include "MagicWordBundle:Round:misc.html.twig" %}
arnaudbey's avatar
add app  
arnaudbey committed
69 70 71 72 73 74 75 76 77 78
            </div>
         </div>
    </div>
</div>
{% endblock %}

{% block javascripts -%}
<script type="text/javascript" src="{{ asset('js/edit_round.js') }}"></script>
<script type="text/javascript" src="{{ asset('js/round.js') }}"></script>
{% endblock %}