{%extends 'layout.html.twig' %} {% block body %} {{ parent() }}
{{ knp_pagination_sortable(pagination,'ID','c.id') }} | {{ knp_pagination_sortable(pagination,'NOMBRE','c.name') }} | {{ knp_pagination_sortable(pagination,'RONDAS','c.rondas') }} | {{ knp_pagination_sortable(pagination,'PARTIDAS','c.plays') }} | {{ knp_pagination_sortable(pagination,'VIDAS','c.vidas') }} | {{ knp_pagination_sortable(pagination,'TIEMPO','c.tiempomaximo') }} | {{ knp_pagination_sortable(pagination,'COMPETICION','x.name') }} | {{ knp_pagination_sortable(pagination,'CATEGORIAS','c.name') }} | {% if app.user.role != 'ROLE_TUTOR' %}PARTIDA ACTUAL | {% endif %}ACCIONES |
---|---|---|---|---|---|---|---|---|---|
{{trivial.id}} | {{trivial.name}} | {{trivial.rondas}} | {{trivial.plays}} | {{trivial.vidas}} | {{trivial.tiempomaximo}} | {{trivial.competition.name}} | {{trivial.category|length}} | {% if app.user.role != 'ROLE_TUTOR' %}{% if trivial.plays > 0 and trivial.rondas!=0 and trivial.vidas==0 %} {% for at in attempts %} {% if at.trivial.id == trivial.id %} {% if at.tracking|length == trivial.rondas %} {% set cont = cont + 1 %} {% endif %} {% endif %} {% endfor %} {% if cont == trivial.plays %} COMPLETED {% elseif cont == 0 %} PARTIDA : {{ cont +1 }} {% else %} PARTIDA : {{ cont +1 }} {% endif %} {% elseif trivial.plays > 0 and trivial.rondas!=0 and trivial.vidas!=0 %} {% for at in attempts %} {% if at.trivial.id == trivial.id %} {% for tr in at.tracking %} {% if tr.status == 0 %} {% set contvidas = contvidas + 1 %} {% endif %} {% endfor %} {% if at.tracking|length == trivial.rondas and contvidas != trivial.vidas %} {% set cont = cont + 1 %} {% elseif at.tracking|length != trivial.rondas and contvidas == trivial.vidas %} {% set cont = cont + 1 %} {% elseif at.tracking|length == trivial.rondas and contvidas == trivial.vidas %} {% set cont = cont + 1 %} {% endif %} {% endif %} {% set contvidas = 0 %} {% endfor %} {% if cont == trivial.plays %} COMPLETED {% elseif cont == 0 %} PARTIDA : {{ cont +1 }} {% else %} PARTIDA : {{ cont +1 }} {% endif %} {% elseif trivial.plays > 0 and trivial.rondas==0 and trivial.vidas!=0%} {% for at in attempts %} {% if at.trivial.id == trivial.id %} {% for tr in at.tracking %} {% if tr.status == 0 %} {% set contvidas = contvidas + 1 %} {% endif %} {% endfor %} {% if contvidas == trivial.vidas %} {% set cont = cont + 1 %} {% endif %} {% endif %} {% set contvidas = 0 %} {% endfor %} {% if cont == trivial.plays %} COMPLETED {% elseif cont == 0 %} PARTIDA : {{ cont +1 }} {% else %} PARTIDA : {{ cont +1 }} {% endif %} {% else %} INFINITO {% endif %} | {% endif %}{% if date(trivial.competition.beginAt) > date() %} {% if app.user.role == 'ROLE_ADMIN' %} Editar {% endif %} {% endif %} {% if app.user.role == 'ROLE_ADMIN' %} Categorias Records Jugar Medallas Borrar {% endif %} {% if app.user.role == 'ROLE_USER' %} Jugar Records {% endif %} {% if app.user.role == 'ROLE_TUTOR' %} Categorias Records Medallas {% endif %} |