{# @var basket \Alchemy\Phrasea\Model\Entities\Basket #}
{% if app.getAuthenticatedUser().getId() == basket.getUser().getId() or (basket.isParticipant(app.getAuthenticatedUser()) and basket.getParticipant(app.getAuthenticatedUser()).canModify()) %}
{% endif %}
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right(constant('\\ACL::CANMODIFRECORD')) %} {% endif %} {% if app.getAclForUser(app.getAuthenticatedUser()).has_right(constant('\\ACL::CHGSTATUS')) %} {% endif %} {% if app.getAclForUser(app.getAuthenticatedUser()).has_right(constant('\\ACL::CANDELETERECORD')) and app.getAclForUser(app.getAuthenticatedUser()).has_right(constant('\\ACL::CANADDRECORD')) %} {% endif %} {% if app.getAclForUser(app.getAuthenticatedUser()).has_right(constant('\\ACL::CANPUSH')) or app.getAclForUser(app.getAuthenticatedUser()).has_right(constant('\\ACL::CANPUSH')) or app.getAclForUser(app.getAuthenticatedUser()).has_right(constant('\\ACL::BAS_CHUPUB')) or app.getAclForUser(app.getAuthenticatedUser()).has_right(constant('\\ACL::IMGTOOLS')) %}
{% endif %} {% if app.getAclForUser(app.getAuthenticatedUser()).has_right(constant('\\ACL::CANPUSH')) %} {% endif %} {% if app.getAclForUser(app.getAuthenticatedUser()).has_right(constant('\\ACL::CANPUSH')) %} {% endif %} {% if app.getAclForUser(app.getAuthenticatedUser()).has_right(constant('\\ACL::BAS_CHUPUB')) %} {##} {% endif %} {% if app.getAclForUser(app.getAuthenticatedUser()).has_right(constant('\\ACL::IMGTOOLS')) %} {% endif %} {% if app.getAclForUser(app.getAuthenticatedUser()).has_right(constant('\\ACL::CANDELETERECORD')) %}
{% endif %} {% if plugins['actionbar'] is not empty %} {% for plugin in plugins['actionbar'] %} {% for key, action in plugin.getBasketActionBar() %} {% set label = action.label %} {% endfor %} {% endfor %} {% endif %}
{% set nparticipants = basket.getParticipants | length %} {% if nparticipants > 0 and basket.getUser().getId() == app.getAuthenticatedUser().getId() %} {% set disabled = '' %} {% if (basket.isVoteBasket() and basket.isVoteFinished()) or (not basket.isVoteBasket() and basket.isShareExpires()) %} {% set disabled = 'disabled' %} {% endif %}
{% set nb_records = basket.getElements()|length %} {% set date = app['date-formatter'].getPrettyString(basket.getCreated()) %}

{{ 'prod:workzone:basket:creation-date' | trans }} : {{ date }}

{% trans with {'%nb_records%' : nb_records} %}%nb_records% records{% endtrans %}
{% if basket.isVoteBasket() %} {% set dateExpired = app['date-formatter'].getFormatedDate(basket.getVoteExpires()) %} {% else %} {% set dateExpired = app['date-formatter'].getFormatedDate(basket.getShareExpires()) %} {% endif %}
{% if basket.isVoteBasket() %} {% if basket.isVoteFinished() %} {{ 'workzone:feedback:expiration-closed' | trans }} : {% else %} {{ 'workzone:feedback:expiration-open' | trans }} : {% endif %} {% else %} {% if basket.isShareExpires() %} {{ 'workzone:shared:expiration-closed' | trans }} : {% else %} {% if dateExpired is empty %} {{ 'workzone:shared: permanent sharing' | trans }} {% else %} {{ 'workzone:shared:expiration-open' | trans }} : {% endif %} {% endif %} {% endif %}

{{ 'prod:workzone:basket:updated-message' | trans }}

{% endif %} {% set mailto_basket_user_name = '' ~ basket.getUser().displayName() ~'' %} {% if not basket.isVoteBasket() and basket.getUser().getId() != app.getAuthenticatedUser().getId() %}

{% if basket.getShareExpires() is null %} {% trans with {'%user_name%' : mailto_basket_user_name } %}Basket shared by %user_name% indefinitely{% endtrans %} {% else %} {% trans with {'%user_name%' : mailto_basket_user_name, '%expires%': app['date-formatter'].getFormatedDate(basket.getShareExpires()) } %}Basket shared by %user_name% until %expires%{% endtrans %} {% endif %}

{% elseif basket.isVoteBasket() and basket.getUser().getId() != app.getAuthenticatedUser().getId() %}

{% trans with {'%user_name%' : mailto_basket_user_name, '%vote_expires%': app['date-formatter'].getFormatedDate(basket.getVoteExpires()) } %}Feedback request by %user_name% until %vote_expires%{% endtrans %}

{% endif %}
{% set basket_length = basket.getElements()|length %}
{{ 'Certaines donnees du panier ont change' | trans }} {{ 'rafraichir' | trans }}
{% if basket_length == 0 %}
{% endif %} {% set basket_scope = 'objects' %} {% import 'prod/WorkZone/Macros.html.twig' as Macros %} {% if basket.isVoteBasket() %} {{ Macros.display_validation(app, basket, ordre) }} {% else %} {{ Macros.display_basket(app, basket) }} {% endif %} {% if basket.getUser().getId() == app.getAuthenticatedUser().getId() %} {% endif %}