{# @var push \Alchemy\Phrasea\Helper\Record\Push #} {# @var basket \Alchemy\Phrasea\Model\Entities\Basket #} {# @var participant \Alchemy\Phrasea\Model\Entities\BasketParticipant #} {% if push._count_actionable == 0 %}
{# !!!!!!!!!!!!!!!! "recommendations" should come from [vocabularyType=user] fields, but this seems not implemented in 4.1 #}
{#
{% set recommendation = '' %}
{% set total = RecommendedUsers|length %}
{% for user in RecommendedUsers %}
{% if total <= 4 or loop.index <= 4 %}
{% if recommendation != '' and not loop.last %}
{% set recommendation = recommendation ~ ', ' %}
{% elseif recommendation != '' and loop.last %}
{% set recommendation = recommendation %}
{% endif %}
{% set recommendation = recommendation
~ ' '
~ ''
~ user.getDisplayName() | e
~ '' %}
{% endif %}
{% endfor %}
{% if total > 4 %}
{% set n = total - 4 %}
{% set and_many_more %}
{% trans with {'%n%' : n} %}and %n% more peoples{% endtrans %}
{% endset %}
{% set recommendation = recommendation
~ ''
~ and_many_more ~ '' %}
{% endif %}
{% if recommendation != '' %}
{% set recommendation = '
' ~ recommendation %}
{% if context == 'Push' %}
{% trans with {'%recommendation%' : recommendation} %}Please consider send this push to the following users : %recommendation%{% endtrans %}
{% elseif context == 'Sharebasket' %}
{% trans with {'%recommendation%' : recommendation} %}Please consider share this basket with the following users : %recommendation%{% endtrans %}
{% else %}
{% trans with {'%recommendation%' : recommendation} %}Please consider send this validation to the following users : %recommendation%{% endtrans %}
{% endif %}
{% endif %}
#}
{# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! #}
{% set nb_push_items = push.get_count_actionable() %} {% set nb_not_available = push.get_count_not_actionable() %} {% if context == 'Push' %} {% if nb_not_available == 0 %} {% trans with {'%nb_push_items%' : nb_push_items} %}prod::share: You are about to push %nb_push_items% records.{% endtrans %} {% else %} {% trans with {'%nb_push_items%' : nb_push_items, '%nb_not_available%' : nb_not_available} %}prod::share: You are about to push %nb_push_items% records, %nb_not_available% records can not be processed.{% endtrans %} {% endif %} {% elseif context == 'Sharebasket' %} {% if nb_not_available == 0 %} {% trans with {'%nb_push_items%' : nb_push_items} %}prod::share: You are about to share a basket with %nb_push_items% records.{% endtrans %} {% else %} {% trans with {'%nb_push_items%' : nb_push_items, '%nb_not_available%' : nb_not_available} %}prod::share: You are about to share a basket with %nb_push_items% records, %nb_not_available% records can not be processed.{% endtrans %} {% endif %} {% else %} {# should not happen, only 2 posssible contexts #} {# {% if nb_not_available == 0 %} {% trans with {'%nb_push_items%' : nb_push_items} %}You are about to ask for feedback for %nb_push_items% records.{% endtrans %} {% else %} {% trans with {'%nb_push_items%' : nb_push_items, '%nb_not_available%' : nb_not_available} %}You are about to ask for feedback for %nb_push_items% records, %nb_not_available% records can not be processed.{% endtrans %} {% endif %} #} {% endif %} |