Commit 7da0b123 authored by Arnaud Bey's avatar Arnaud Bey
Browse files

fixes in rush round editor

parent f3ebe6f6
......@@ -5,10 +5,10 @@
<div class="row">
{% for j in range(0, 3) %}
{% set value = grid.squares[x] is defined ? grid.squares[x].letter.value|upper : "_" %}
<li class="col-xs-3 col-sm-3 col-md-3" id="li-square-{{ i }}-{{ j }}">
<p data-value="{{value}}" id="square-{{ i }}-{{ j }}" class="col-xs-12 col-sm-12 col-md-12 {{ editable == false ? "read-only": "read-write"}}">
<li class="col-3 col-3 col-3" id="li-square-{{ i }}-{{ j }}">
<p data-value="{{value}}" style="padding:1px" id="square-{{ i }}-{{ j }}" class="col {{ editable == false ? "read-only": "read-write"}}">
{% if editable %}
<input required id="square-{{ x }}" type="text" name="squares[]" size="1" maxlength="1" value="{{ grid.squares[x] is defined ? grid.squares[x].letter.value : "_" }}"/>
<input required id="square-{{ x }}" type="text" style="text-align:center;" name="squares[]" size="1" maxlength="1" value="{{ grid.squares[x] is defined ? grid.squares[x].letter.value : "_" }}" spellcheck=false />
{% else %}
{{ value }}
{% endif %}
......@@ -19,5 +19,5 @@
</div>
{% endfor %}
</ul>
<input id="gridLanguageId" type="hidden" name="gridLanguage" value="{{ grid ? grid.language.id }}">
<input id="gridLanguageId" type="hidden" name="gridLanguage" value="{{ grid ? grid.language.id }}">
{% endmacro %}
<div class="row">
<div class="col-md-6">
<div class="col">
{% set grid = rush.grid %}
<form id="grid">
{% include "MagicWordBundle:Round/Conquer:grid.html.twig" %}
......@@ -7,20 +7,7 @@
<input id="languageId" type="hidden" name="language" value="{{ rush.language.id }}">
</form>
</div>
<div class="col-md-6">
<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 onclick="rushEditor.savegrid()" class="btn btn-sm btn-outline-secondary">
<i class="far fa-save" aria-hidden="true"></i>
{{ 'save_grid' | trans }}
</span>
<hr/>
<div class="col">
<div id="foundables">
{% include 'MagicWordBundle:Grid:possible-inflections.html.twig' with {'foundableForms': grid.foundableForms, 'btn': false } %}
</div>
......
......@@ -17,7 +17,7 @@
<div class="card">
<div class="card-header">
<strong>
<span id="round-title">{{ round.title ? round.title }}</span>
<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>
......@@ -28,6 +28,23 @@
<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>
</div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment