]> Raphaƫl G. Git Repositories - userbundle/blobdiff - templates/index.html.twig
Add user bundle templates
[userbundle] / templates / index.html.twig
diff --git a/templates/index.html.twig b/templates/index.html.twig
new file mode 100644 (file)
index 0000000..2369d00
--- /dev/null
@@ -0,0 +1,24 @@
+{% extends '@RapsysUser/base.html.twig' %}
+{% block content %}
+       <section>
+               <header>
+                       <h2><a href="{{ self_url }}">{{ title }}</a></h2>
+               </header>
+               {% if groups is defined and groups %}
+                       {% for group, users in groups %}
+                               <article id="rapsysuser_index_{{ group|lower }}">
+                                       <header>
+                                               <h3>{{ group }}</h3>
+                                       </header>
+                                       {% if users is defined and users %}
+                                               <ul>
+                                                       {% for id, user in users %}
+                                                               <li><a href="{{ user.edit }}">{{ [user.forename, user.surname]|filter(v => v)|join(' ') }} &lt;{{ user.mail }}&gt;</a></li>
+                                                       {% endfor %}
+                                               </ul>
+                                       {% endif %}
+                               </article>
+                       {% endfor %}
+               {% endif %}
+       </section>
+{% endblock %}