diff --git a/templates/_header.html.twig b/templates/_header.html.twig index 3392829..67bebbb 100644 --- a/templates/_header.html.twig +++ b/templates/_header.html.twig @@ -21,6 +21,7 @@ {{ app.user.username }}
diff --git a/templates/comment/cancel.md.twig b/templates/comment/cancel.md.twig index a909604..831663f 100644 --- a/templates/comment/cancel.md.twig +++ b/templates/comment/cancel.md.twig @@ -1 +1,2 @@ -{{ user.username }} abandonne la tâche [{{ task.name }}]({{ path('app_task_show', {'slug': task.slug}) }}) +{% import 'macro.html.twig' as macro %} +{{ macro.osmLinkTo(user.username) }} abandonne la tâche [{{ task.name }}]({{ path('app_task_show', {'slug': task.slug}) }}) diff --git a/templates/comment/finish.md.twig b/templates/comment/finish.md.twig index bd4e3dd..cc1e34c 100644 --- a/templates/comment/finish.md.twig +++ b/templates/comment/finish.md.twig @@ -1 +1,2 @@ -{{ user.username }} termine la tâche [{{ task.name }}]({{ path('app_task_show', {'slug': task.slug}) }}) +{% import 'macro.html.twig' as macro %} +{{ macro.osmLinkTo(user.username) }} termine la tâche [{{ task.name }}]({{ path('app_task_show', {'slug': task.slug}) }}) diff --git a/templates/comment/reset.md.twig b/templates/comment/reset.md.twig index 52f2a04..656d852 100644 --- a/templates/comment/reset.md.twig +++ b/templates/comment/reset.md.twig @@ -1 +1,2 @@ -{{ user.username }} recommence la tâche [{{ task.name }}]({{ path('app_task_show', {'slug': task.slug}) }}) +{% import 'macro.html.twig' as macro %} +{{ macro.osmLinkTo(user.username) }} recommence la tâche [{{ task.name }}]({{ path('app_task_show', {'slug': task.slug}) }}) diff --git a/templates/comment/start.md.twig b/templates/comment/start.md.twig index 49b4489..f1750c9 100644 --- a/templates/comment/start.md.twig +++ b/templates/comment/start.md.twig @@ -1 +1,2 @@ -{{ user.username }} commence la tâche [{{ task.name }}]({{ path('app_task_show', {'slug': task.slug}) }}) +{% import 'macro.html.twig' as macro %} +{{ macro.osmLinkTo(user.username) }} commence la tâche [{{ task.name }}]({{ path('app_task_show', {'slug': task.slug}) }}) diff --git a/templates/macro.html.twig b/templates/macro.html.twig index 228aeab..69ec1ef 100644 --- a/templates/macro.html.twig +++ b/templates/macro.html.twig @@ -90,3 +90,7 @@ serait pas du luxe… {% endmacro %} + +{% macro osmLinkTo(user) %} +{{ user }} +{% endmacro %} diff --git a/templates/partials/_comment-metadata.html.twig b/templates/partials/_comment-metadata.html.twig index d76f8a5..fc5a429 100644 --- a/templates/partials/_comment-metadata.html.twig +++ b/templates/partials/_comment-metadata.html.twig @@ -1,8 +1,9 @@ +{% import 'macro.html.twig' as macro %} - {{ comment.createdBy.username }} + {{ macro.osmLinkTo(comment.createdBy.username) }}