{% if gift is not empty %} {% set inv_accepted_count = 0 %} {% set hash = 'hash' %} {% for inv in gift.invitation %} {% if inv.vUser.id == vUser.id and inv.confirmedAt is not empty %} {% set inv_accepted_count = inv_accepted_count+1 %} {% set hash = inv.hash %} {% endif %} {% endfor %} {% include 'partials/_subheader.html.twig' with { giftId: gift.id } %} {% include 'partials/_steps.html.twig' with { giftId: gift.id, vUser: vUser } %}
| {% if (is_granted("IS_AUTHENTICATED_REMEMBERED") and idea.invitation.vUser.id == app.user.vUser.id) or (idea.invitation.hash == app.request.get('hash')) %} {{ idea.title }} {% else %} {{ idea.title }} {% endif %} | {% if (is_granted("IS_AUTHENTICATED_REMEMBERED") and idea.invitation.vUser.id == app.user.vUser.id) or (idea.invitation.hash == app.request.get('hash')) %} {{ idea.price|price_format }} {% else %} {{ idea.price|price_format }} {% endif %} | {% if not interval.invert and inv_accepted_count > 0 %}{% set votes = 0 %} {% for vote in idea.ideaVote %} {% if vote.invitation.vUser.id == vUser.id %} {% set votes = votes+1 %} {% endif %} {% endfor %} {% if votes == 0 %} {{ render(controller('AppBundle:ImnuuIdeaVote:voteIdeaFormPartial', { giftId: gift.id, ideaId: idea.id, hash: hash, votes: idea.ideaVote|length })) }} {% else %} {{ render(controller('AppBundle:ImnuuIdeaVote:unvoteIdeaFormPartial', { giftId: gift.id, ideaId: idea.id, hash: hash, votes: idea.ideaVote|length })) }} {% endif %} | {% endif %}{% if gift.vUser.id == vUser.id %} {% if not interval.invert %} {% if idea.chosen == 0 %} {{ render(controller('AppBundle:ImnuuIdea:chooseIdeaFormPartial', { giftId: gift.id, ideaId: idea.id })) }} {% else %} {{ render(controller('AppBundle:ImnuuIdea:unchooseIdeaFormPartial', { giftId: gift.id, ideaId: idea.id })) }} {% endif %} {% else %} {% if idea.chosen > 0 %} {{ chosen_icon|raw }} {% endif %} {% endif %} {% else %} {% if idea.chosen > 0 %} {{ chosen_icon|raw }} {% endif %} {% endif %} |
| Idea from: {{ idea.invitation.vUser.user is empty ? is_granted("IS_AUTHENTICATED_REMEMBERED") ? idea.invitation.vUser.email : idea.invitation.hash == app.request.get('hash') ? idea.invitation.vUser.email : idea.invitation.vUser.email|obfuscate_email : idea.invitation.vUser.user.username }} |