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/

Commit fff72249 authored by Arnaud Bey's avatar Arnaud Bey
Browse files

fix started games view

parent 6ed0b643
...@@ -79,7 +79,7 @@ export_game: Exporter la partie ...@@ -79,7 +79,7 @@ export_game: Exporter la partie
feminine: féminin feminine: féminin
find_words: FindWord find_words: FindWord
firstPerson: 1ère personne firstPerson: 1ère personne
forfeit: Abandonner la partie forfeit: Abandonner
form: Forme form: Forme
forms_found_count: Nombre de formes trouvées forms_found_count: Nombre de formes trouvées
forms_found: 'forme(s) trouvée(s)' forms_found: 'forme(s) trouvée(s)'
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
{% block body -%} {% block body -%}
{% import _self as my_macros %} {% import _self as my_macros %}
<nav aria-label="breadcrumb"> <nav aria-badge="breadcrumb">
<ol class="breadcrumb" style="background-color: #fff;"> <ol class="breadcrumb" style="background-color: #fff;">
<li class="breadcrumb-item"><a href="{{path('home')}}">Accueil</a></li> <li class="breadcrumb-item"><a href="{{path('home')}}">Accueil</a></li>
<li class="breadcrumb-item" aria-current="page"><a href="{{path('home_play')}}">Jouer</a></li> <li class="breadcrumb-item" aria-current="page"><a href="{{path('home_play')}}">Jouer</a></li>
...@@ -30,32 +30,30 @@ ...@@ -30,32 +30,30 @@
</button> </button>
</span> </span>
</div> </div>
<div class="panel-group games" id="accordion" role="tablist" aria-multiselectable="true"> <div class="accordion games" id="accordion" role="tablist" aria-multiselectable="true">
{% for game in games if game.discr != "training" %} {% for game in games if game.discr != "training" %}
{% set popularity = getActivityCount(game) %} {% set popularity = getActivityCount(game) %}
{% set roundCount = game.rounds|length %} {% set roundCount = game.rounds|length %}
<div data-gametype="{{ game.discr }}" data-roundcount="roundCount" data-popularity="{{ popularity }}" data-author="{{ game.author }}" class="card game"> <div data-gametype="{{ game.discr }}" data-roundcount="roundCount" data-popularity="{{ popularity }}" data-author="{{ game.author }}" class="card game">
<div class="card-header" role="tab" id="headingOne"> <div class="card-header">
<h4 class="panel-title">
{{ my_macros.game_name(game) }} {{ my_macros.game_name(game) }}
<span class="pull-right"> <span class="float-right">
{% if game.discr == "massive" %} {% if game.discr == "massive" %}
<span class="label label-info">{{ "popularity" | trans }}: {{ getActivityCount(game) }}</span> <span class="badge badge-info">{{ "popularity" | trans }}: {{ getActivityCount(game) }}</span>
<a class="btn btn-outline-secondary btn-sm" role="button" data-toggle="collapse" data-parent="#accordion" href="#{{ game.id }}" aria-expanded="true" aria-controls="{{ game.id }}"> <span class="btn btn-outline-secondary btn-sm" role="button" data-toggle="collapse" data-parent="#accordion" data-target="#game-{{ game.id }}">
<i class="fa fa-info" aria-hidden="true"></i> Infos <i class="fa fa-info" aria-hidden="true"></i> Infos
</a> </span>
{% endif %} {% endif %}
{{ my_macros.game_play_link(game) }} {{ my_macros.game_play_link(game) }}
</span> </span>
</h4>
</div> </div>
{% if game.discr == "massive" %} {% if game.discr == "massive" %}
<div id="{{ game.id }}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne"> <div id="game-{{ game.id }}" class="collapse" role="tabpanel">
<ul class="list-group"> <ul class="list-group">
{% for i, round in game.rounds %} {% for i, round in game.rounds %}
<li class="list-group-item"> <li class="list-group-item">
<span class="label label-default">{{ round.discr | trans }}</span> <span class="badge badge-secondary">{{ round.discr | trans }}</span>
<span class="label label-default">{{ round.language.name | trans }}</span> <span class="badge badge-info">{{ round.language.value | trans }}</span>
{% set order = i + 1 %} {% set order = i + 1 %}
{{ round.title ? round.title : "round" | trans ~ " " ~ order }} {{ round.title ? round.title : "round" | trans ~ " " ~ order }}
<span class="text-muted">{{ round.description ? "(" ~ round.description ~ ")" }}</span> <span class="text-muted">{{ round.description ? "(" ~ round.description ~ ")" }}</span>
...@@ -104,12 +102,12 @@ ...@@ -104,12 +102,12 @@
{% macro game_name(game) %} {% macro game_name(game) %}
{% if game.discr == "massive" %} {% if game.discr == "massive" %}
<span class="label label-primary">{{ "massive" | trans }}</span> <span class="badge badge-secondary">{{ "massive" | trans }}</span>
{{ game.name }} {% if game.description %}<span class="text-muted">({{ game.description }})</span>{% endif %} {{ game.name }} {% if game.description %}<span class="text-muted">({{ game.description }})</span>{% endif %}
par <a href="{{ path('profile', {"id": game.author.id}) }}">{{ game.author }}</a> par <a href="{{ path('profile', {"id": game.author.id}) }}">{{ game.author }}</a>
{% elseif game.discr == "challenge" %} {% elseif game.discr == "challenge" %}
{% set user = (game.challenged == app.user) ? game.author : game.challenged %} {% set user = (game.challenged == app.user) ? game.author : game.challenged %}
<span class="label label-success">{{ "challenge" | trans }}</span> <span class="badge badge-success">{{ "challenge" | trans }}</span>
avec <a href="{{ path('profile', {"id": user.id}) }}">{{ user }}</a> avec <a href="{{ path('profile', {"id": user.id}) }}">{{ user }}</a>
{% if game.message %}<span class="text-muted">({{ game.message }})</span>{% endif %} {% if game.message %}<span class="text-muted">({{ game.message }})</span>{% endif %}
{% endif %} {% endif %}
......
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