point-tools/templates/Telegram/last_user_subscriptions.md.twig

11 lines
520 B
Twig

{# @var user \App\Entity\User #}
*Last for @{{ user.login }}:*
{% set subscription = constant('\\App\\Entity\\SubscriptionEvent::ACTION_SUBSCRIBE') %}
{# @var event \App\Entity\SubscriptionEvent #}
{% for event in events %}
{% set sub_login = event.subscriber.login %}
{{ event.date|date('d M y H:i') }} {% if subscription == event.action %} + {% else %} - {% endif %} [@{{ sub_login }}]({{ sub_login|point_user_url }})
{% endfor %}
See more events on [Point Tools]({{ url('user_show', {'login': user.login}) }}) site.