Browse Source

Ajoute un lien vers OSM sur les utilisateurs

master
vincent 6 days ago
parent
commit
4d8ca439c7
10 changed files with 21 additions and 8 deletions
  1. +1
    -0
      templates/_header.html.twig
  2. +2
    -1
      templates/comment/cancel.md.twig
  3. +2
    -1
      templates/comment/finish.md.twig
  4. +2
    -1
      templates/comment/reset.md.twig
  5. +2
    -1
      templates/comment/start.md.twig
  6. +4
    -0
      templates/macro.html.twig
  7. +2
    -1
      templates/partials/_comment-metadata.html.twig
  8. +2
    -1
      templates/partials/_project-metadata.html.twig
  9. +2
    -1
      templates/partials/_task-locking.html.twig
  10. +2
    -1
      templates/partials/_task-metadata.html.twig

+ 1
- 0
templates/_header.html.twig View File

@ -21,6 +21,7 @@
{{ app.user.username }} {{ app.user.username }}
</a> </a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a class="dropdown-item" href="{{ 'https://osm.org/user/' ~ app.user.username }}" target="_blank">Sur OSM</a></li>
<li><a class="dropdown-item" href="{{ path('app_osm_logout') }}">Déconnexion</a></li> <li><a class="dropdown-item" href="{{ path('app_osm_logout') }}">Déconnexion</a></li>
</ul> </ul>
</li> </li>


+ 2
- 1
templates/comment/cancel.md.twig View File

@ -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}) }})

+ 2
- 1
templates/comment/finish.md.twig View File

@ -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}) }})

+ 2
- 1
templates/comment/reset.md.twig View File

@ -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}) }})

+ 2
- 1
templates/comment/start.md.twig View File

@ -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}) }})

+ 4
- 0
templates/macro.html.twig View File

@ -90,3 +90,7 @@ serait pas du luxe…
</button> </button>
</div> </div>
{% endmacro %} {% endmacro %}
{% macro osmLinkTo(user) %}
<a href="{{ 'https://osm.org/user/' ~ user }}" target="_blank">{{ user }}</a>
{% endmacro %}

+ 2
- 1
templates/partials/_comment-metadata.html.twig View File

@ -1,8 +1,9 @@
{% import 'macro.html.twig' as macro %}
<span class="me-2"> <span class="me-2">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-person" viewBox="0 0 16 16"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-person" viewBox="0 0 16 16">
<path d="M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6m2-3a2 2 0 1 1-4 0 2 2 0 0 1 4 0m4 8c0 1-1 1-1 1H3s-1 0-1-1 1-4 6-4 6 3 6 4m-1-.004c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10s-3.516.68-4.168 1.332c-.678.678-.83 1.418-.832 1.664z"/> <path d="M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6m2-3a2 2 0 1 1-4 0 2 2 0 0 1 4 0m4 8c0 1-1 1-1 1H3s-1 0-1-1 1-4 6-4 6 3 6 4m-1-.004c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10s-3.516.68-4.168 1.332c-.678.678-.83 1.418-.832 1.664z"/>
</svg> </svg>
{{ comment.createdBy.username }}
{{ macro.osmLinkTo(comment.createdBy.username) }}
</span> </span>
<span class="me-2"> <span class="me-2">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-calendar" viewBox="0 0 16 16"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-calendar" viewBox="0 0 16 16">


+ 2
- 1
templates/partials/_project-metadata.html.twig View File

@ -1,8 +1,9 @@
{% import 'macro.html.twig' as macro %}
<span class="me-2"> <span class="me-2">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-person" viewBox="0 0 16 16"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-person" viewBox="0 0 16 16">
<path d="M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6m2-3a2 2 0 1 1-4 0 2 2 0 0 1 4 0m4 8c0 1-1 1-1 1H3s-1 0-1-1 1-4 6-4 6 3 6 4m-1-.004c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10s-3.516.68-4.168 1.332c-.678.678-.83 1.418-.832 1.664z"/> <path d="M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6m2-3a2 2 0 1 1-4 0 2 2 0 0 1 4 0m4 8c0 1-1 1-1 1H3s-1 0-1-1 1-4 6-4 6 3 6 4m-1-.004c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10s-3.516.68-4.168 1.332c-.678.678-.83 1.418-.832 1.664z"/>
</svg> </svg>
{{ project.createdBy.username }}
{{ macro.osmLinkTo(project.createdBy.username) }}
</span> </span>
<span class="me-2"> <span class="me-2">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-calendar" viewBox="0 0 16 16"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-calendar" viewBox="0 0 16 16">


+ 2
- 1
templates/partials/_task-locking.html.twig View File

@ -1,10 +1,11 @@
{% import 'macro.html.twig' as macro %}
{% if workflow_metadata(task, 'locking', task.status) %} {% if workflow_metadata(task, 'locking', task.status) %}
{% if task.isLocked %} {% if task.isLocked %}
<span class="me-2"> <span class="me-2">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-lock" viewBox="0 0 16 16"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-lock" viewBox="0 0 16 16">
<path d="M8 1a2 2 0 0 1 2 2v4H6V3a2 2 0 0 1 2-2m3 6V3a3 3 0 0 0-6 0v4a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2M5 8h6a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1"/> <path d="M8 1a2 2 0 0 1 2 2v4H6V3a2 2 0 0 1 2-2m3 6V3a3 3 0 0 0-6 0v4a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2M5 8h6a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1"/>
</svg> </svg>
{{ task.lockedBy.username }}
{{ macro.osmLinkTo(task.lockedBy.username) }}
</span> </span>
<span class="me-2"> <span class="me-2">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-calendar" viewBox="0 0 16 16"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-calendar" viewBox="0 0 16 16">


+ 2
- 1
templates/partials/_task-metadata.html.twig View File

@ -1,8 +1,9 @@
{% import 'macro.html.twig' as macro %}
<span class="me-2"> <span class="me-2">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-person" viewBox="0 0 16 16"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-person" viewBox="0 0 16 16">
<path d="M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6m2-3a2 2 0 1 1-4 0 2 2 0 0 1 4 0m4 8c0 1-1 1-1 1H3s-1 0-1-1 1-4 6-4 6 3 6 4m-1-.004c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10s-3.516.68-4.168 1.332c-.678.678-.83 1.418-.832 1.664z"/> <path d="M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6m2-3a2 2 0 1 1-4 0 2 2 0 0 1 4 0m4 8c0 1-1 1-1 1H3s-1 0-1-1 1-4 6-4 6 3 6 4m-1-.004c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10s-3.516.68-4.168 1.332c-.678.678-.83 1.418-.832 1.664z"/>
</svg> </svg>
{{ task.createdBy.username }}
{{ macro.osmLinkTo(task.createdBy.username) }}
</span> </span>
<span class="me-2"> <span class="me-2">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-calendar" viewBox="0 0 16 16"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-calendar" viewBox="0 0 16 16">


Loading…
Cancel
Save