From: Raphaƫl Gertz Date: Thu, 31 Oct 2024 06:05:07 +0000 (+0100) Subject: Add user bundle templates X-Git-Tag: 0.5.1~3 X-Git-Url: https://git.rapsys.eu/userbundle/commitdiff_plain/c3013f0052a8f56d6f7bd6bcd54a596c794d20b5?ds=sidebyside Add user bundle templates --- diff --git a/templates/_footer.html.twig b/templates/_footer.html.twig new file mode 100644 index 0000000..8df1ba8 --- /dev/null +++ b/templates/_footer.html.twig @@ -0,0 +1,17 @@ + diff --git a/templates/_message.html.twig b/templates/_message.html.twig new file mode 100644 index 0000000..525992c --- /dev/null +++ b/templates/_message.html.twig @@ -0,0 +1,12 @@ +{# pass an array argument to get the messages of those types (['warning', 'error']) #} +{% for label, messages in app.flashes %} + {% if messages %} +
+ +
+ {% endif %} +{% endfor %} diff --git a/templates/base.html.twig b/templates/base.html.twig new file mode 100644 index 0000000..f6e912c --- /dev/null +++ b/templates/base.html.twig @@ -0,0 +1,22 @@ + + + + + {% block title %}{{ title }} - {{ site }}{% endblock %} + + {% block stylesheets %}{% endblock %} + {% block javascripts %}{% endblock %} + + + {% block body %} +
+
+

{{ site }}

+
+ {{ include('@RapsysUser/_message.html.twig') }} + {% block content %}{% endblock %} + {{ include('@RapsysUser/_footer.html.twig') }} +
+ {% endblock %} + + diff --git a/templates/index.html.twig b/templates/index.html.twig new file mode 100644 index 0000000..2369d00 --- /dev/null +++ b/templates/index.html.twig @@ -0,0 +1,24 @@ +{% extends '@RapsysUser/base.html.twig' %} +{% block content %} +
+
+

{{ title }}

+
+ {% if groups is defined and groups %} + {% for group, users in groups %} + + {% endfor %} + {% endif %} +
+{% endblock %} diff --git a/templates/login.html.twig b/templates/login.html.twig new file mode 100644 index 0000000..c57fd6e --- /dev/null +++ b/templates/login.html.twig @@ -0,0 +1,37 @@ +{% extends '@RapsysUser/base.html.twig' %} +{% block content %} +
+
+

{{ title }}

+
+ {{ form_start(login) }} +
+ {{ form_row(login.mail) }} + + {{ form_row(login.password) }} + + {{ form_row(login.submit) }} +
+ + {# Render CSRF token etc .#} +
{{ form_rest(login) }}
+ {{ form_end(login) }} +
+ {% if recover is defined %} +
+
+

{% trans from "rapsysuser" %}Recover{% endtrans %}

+
+ {{ form_start(recover) }} +
+ {{ form_row(recover.mail) }} + + {{ form_row(recover.submit) }} +
+ + {# Render CSRF token etc .#} +
{{ form_rest(recover) }}
+ {{ form_end(recover) }} +
+ {% endif %} +{% endblock %} diff --git a/templates/recover.html.twig b/templates/recover.html.twig new file mode 100644 index 0000000..3b7dab9 --- /dev/null +++ b/templates/recover.html.twig @@ -0,0 +1,28 @@ +{% extends '@RapsysUser/base.html.twig' %} +{% block content %} +
+
+

{{ title }}

+
+ {% if sent %} +

{% trans from "rapsysuser" %}Your recover account message has been sent{% endtrans %}

+ {% else %} + {{ form_start(recover) }} +
+ {% if recover.mail is defined %} + {{ form_row(recover.mail) }} + {% endif %} + + {% if recover.password is defined %} + {{ form_row(recover.password) }} + {% endif %} + + {{ form_row(recover.submit) }} +
+ + {# Render CSRF token etc .#} +
{{ form_rest(recover) }}
+ {{ form_end(recover) }} + {% endif %} +
+{% endblock %} diff --git a/templates/register.html.twig b/templates/register.html.twig new file mode 100644 index 0000000..222c90c --- /dev/null +++ b/templates/register.html.twig @@ -0,0 +1,49 @@ +{% extends '@RapsysUser/base.html.twig' %} +{% block content %} +
+
+

{{ title }}

+
+ {% if disabled is defined and disabled %} +

{% trans from "rapsysuser" %}Your account has been disabled{% endtrans %}

+ {% elseif sent is defined and sent %} +

{% trans from "rapsysuser" %}Your verification mail has been sent, to activate your account you must follow the confirmation link inside{% endtrans %}

+

{% trans from "rapsysuser" %}If you did not receive a verification mail, check your Spam or Junk mail folders{% endtrans %}

+ {% else %} + {{ form_start(register) }} + {% if register.mail is defined %} + {{ form_row(register.mail) }} + {% endif %} + + {% if register.password is defined %} + {{ form_row(register.password) }} + {% endif %} + + {% if register.civility is defined %} + {{ form_row(register.civility) }} + {% endif %} + + {% if register.forename is defined %} + {{ form_row(register.forename) }} + {% endif %} + + {% if register.surname is defined %} + {{ form_row(register.surname) }} + {% endif %} + + {% if register.phone is defined %} + {{ form_row(register.phone) }} + {% endif %} + + {% if register.captcha is defined %} + {{ form_row(register.captcha) }} + {% endif %} + + {{ form_row(register.submit) }} + + {# Render CSRF token etc .#} + + {{ form_end(register) }} + {% endif %} +
+{% endblock %}