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
db4a455d
Commit
db4a455d
authored
May 28, 2019
by
Arnaud Bey
Browse files
fix massive list
parent
d36cd4d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
application/src/MagicWordBundle/Resources/views/Game/Massive/list.html.twig
View file @
db4a455d
...
...
@@ -29,38 +29,36 @@
</button>
</span>
</div>
<div
class=
"
panel-group
games"
id=
"accordion"
role=
"tablist"
aria-multiselectable=
"true"
>
<div
class=
"games"
id=
"accordion"
role=
"tablist"
aria-multiselectable=
"true"
>
{%
for
massive
in
massives
if
massive
not
in
app.user.endedGames
and
massive
not
in
app.user.startedGames
and
massive.author
!=
app.user
%}
{%
set
popularity
=
getActivityCount
(
massive
)
%}
{%
set
roundCount
=
massive.rounds
|
length
%}
<div
data-roundcount=
"roundCount"
data-popularity=
"
{{
popularity
}}
"
data-author=
"
{{
massive.author
}}
"
data-date=
"
{{
massive.publishDate
|
date
(
'Y-m-d H:i:s'
)
}}
"
class=
"card game"
>
<div
class=
"card-header"
role=
"tab"
id=
"headingOne"
>
<h4
class=
"panel-title"
>
"
{{
massive.name
}}
"
{%
if
massive.description
%}
<span
class=
"text-muted"
>
(
{{
massive.description
}}
)
</span>
{%
endif
%}
par
<a
href=
"
{{
path
(
'profile'
,
{
"id"
:
massive.author.id
}
)
}}
"
>
{{
massive.author
}}
</a>
<span
class=
"float-right"
>
<span
class=
"label label-info"
>
<i
class=
"fa fa-users"
aria-hidden=
"true"
></i>
<span
class=
"d-none d-md-inline"
>
{{
"popularity"
|
trans
}}
:
</span>
{{
popularity
}}
</span>
<a
class=
"btn btn-outline-secondary btn-sm"
role=
"button"
data-toggle=
"collapse"
data-parent=
"#accordion"
href=
"#
{{
massive.id
}}
"
aria-expanded=
"true"
aria-controls=
"
{{
massive.id
}}
"
>
<i
class=
"fa fa-info"
aria-hidden=
"true"
></i>
<span
class=
"d-none d-md-inline"
>
Infos
</span>
</a>
<a
class=
"btn btn-outline-secondary btn-sm"
href=
"
{{
path
(
'massive_play'
,
{
"code"
:
massive.code
}
)
}}
"
>
<i
class=
"fa fa-gamepad"
aria-hidden=
"true"
></i>
<span
class=
"d-none d-md-inline"
>
Jouer
</span>
</a>
</span>
</h4>
{{
massive.name
}}
{%
if
massive.description
%}
<span
class=
"text-muted"
>
(
{{
massive.description
}}
)
</span>
{%
endif
%}
par
<a
href=
"
{{
path
(
'profile'
,
{
"id"
:
massive.author.id
}
)
}}
"
>
{{
massive.author
}}
</a>
<span
class=
"float-right"
>
<span
class=
"badge badge-info"
>
<i
class=
"fa fa-users"
aria-hidden=
"true"
></i>
<span
class=
"d-none d-md-inline"
>
{{
"popularity"
|
trans
}}
:
</span>
{{
popularity
}}
</span>
<a
class=
"btn btn-outline-secondary btn-sm"
role=
"button"
data-toggle=
"collapse"
data-parent=
"#accordion"
href=
"#massive-
{{
massive.id
}}
"
aria-expanded=
"true"
aria-controls=
"
{{
massive.id
}}
"
>
<i
class=
"fa fa-info"
aria-hidden=
"true"
></i>
<span
class=
"d-none d-md-inline"
>
Infos
</span>
</a>
<a
class=
"btn btn-outline-secondary btn-sm"
href=
"
{{
path
(
'massive_play'
,
{
"code"
:
massive.code
}
)
}}
"
>
<i
class=
"fa fa-gamepad"
aria-hidden=
"true"
></i>
<span
class=
"d-none d-md-inline"
>
Jouer
</span>
</a>
</span>
</div>
<div
id=
"
{{
massive.id
}}
"
class=
"panel-collapse collapse"
role=
"tabpanel"
aria-labelledby=
"headingOne"
>
<div
id=
"
massive-
{{
massive.id
}}
"
class=
"panel-collapse collapse"
role=
"tabpanel"
aria-labelledby=
"headingOne"
>
<ul
class=
"list-group"
>
{%
for
i
,
round
in
massive.rounds
%}
<li
class=
"list-group-item"
>
<span
class=
"
label label-default
"
>
{{
round.discr
|
trans
}}
</span>
<span
class=
"
label label-default
"
>
{{
round.language.value
|
trans
}}
</span>
<span
class=
"
badge badge-secondary
"
>
{{
round.discr
|
trans
}}
</span>
<span
class=
"
badge badge-info
"
>
{{
round.language.value
|
trans
}}
</span>
{%
set
order
=
i
+
1
%}
{{
round.title
?
round.title
:
"round"
|
trans
~
" "
~
order
}}
<span
class=
"text-muted"
>
{{
round.description
?
"("
~
round.description
~
")"
}}
</span>
...
...
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