Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mathieu Loiseau
MagicWord
Commits
7da0b123
Commit
7da0b123
authored
Jun 19, 2019
by
Arnaud Bey
Browse files
fixes in rush round editor
parent
f3ebe6f6
Changes
3
Hide whitespace changes
Inline
Side-by-side
application/src/MagicWordBundle/Resources/views/Grid/macros.html.twig
View file @
7da0b123
...
...
@@ -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
%}
application/src/MagicWordBundle/Resources/views/Round/Rush/edit.html.twig
View file @
7da0b123
<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>
...
...
application/src/MagicWordBundle/Resources/views/Round/edit.html.twig
View file @
7da0b123
...
...
@@ -16,20 +16,37 @@
<div
class=
"card"
>
<div
class=
"card-header"
>
<strong>
<span
id=
"round-title"
>
{{
round.title
?
round.title
}}
</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>
{%
endif
%}
</span>
<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>
</div>
<div
class=
"card-body"
>
<ul
class=
"nav nav-tabs nav-fill nav-justified"
role=
"tablist"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment