Defaulty add login button in navbar if user is not authenticated

This commit is contained in:
Benjamin Renard 2023-03-11 11:54:47 +01:00
parent 85f631a911
commit 317afd31f2
5 changed files with 318 additions and 302 deletions

File diff suppressed because one or more lines are too long

View file

@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: 2023-03-09 18:09+0100\n"
"POT-Creation-Date: 2023-03-11 11:52+0100\n"
"PO-Revision-Date: \n"
"Last-Translator: Benjamin Renard <brenard@easter-eggs.com>\n"
"Last-Translator: Benjamin Renard <brenard@zionetrix.net>\n"
"Language-Team: \n"
"Language: fr_FR\n"
"MIME-Version: 1.0\n"
@ -12,104 +12,6 @@ msgstr ""
"X-Generator: Poedit 2.4.2\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: Tpl.php:421
msgid "No template specified."
msgstr "Aucun template spécifié."
#: Tpl.php:454
msgid "An error occurred while displaying this page."
msgstr "Une erreur est survenue en affichant cette page."
#: Db.php:74
msgid "Unable to connect to the database."
msgstr "Impossible de se connecter à la base de données."
#: Auth/Form.php:41
msgid "Invalid username or password."
msgstr "Nom d'utilisateur ou mot de passe invalide."
#: Auth/Form.php:74
msgid "Sign in"
msgstr "Connexion"
#: Auth/Http.php:37 Url.php:181
msgid "Authentication required"
msgstr "Authentification requise"
#: Auth/Http.php:124 Auth/Http.php:127 Url.php:185
msgid "Access denied"
msgstr "Accès interdit"
#: Auth/Http.php:128 Auth/Http.php:132
msgid "You must login to access this page."
msgstr "Vous devez vous connecter pour accéder à cette page."
#: Url.php:177
msgid "Bad request"
msgstr "Mauvaise requête"
#: Url.php:178
msgid "Invalid request."
msgstr "Requête invalide."
#: Url.php:182
msgid "You have to be authenticated to access to this page."
msgstr "Vous devez être authentifié pour accéder à cette page."
#: Url.php:186
msgid ""
"You do not have access to this application. If you think this is an error, "
"please contact support."
msgstr ""
"Vous n'avez pas accès à cette application. Si vous pensez qu'il s'agit d'une "
"erreur, merci de prendre contact avec le support."
#: Url.php:189
msgid "Whoops ! Page not found"
msgstr "Oups ! Page introuvable"
#: Url.php:190
msgid "The requested page can not be found."
msgstr "La page demandée est introuvable."
#: Url.php:198
msgid "Error"
msgstr "Erreur"
#: Url.php:199
msgid "An unknown error occurred. If problem persist, please contact support."
msgstr ""
"Une erreur inconnue est survenue. Si le problème persiste, merci de prendre "
"contact avec le support."
#: Url.php:262
msgid ""
"Unable to determine the requested page. If the problem persists, please "
"contact support."
msgstr ""
"Impossible de déterminer la page demandée. Si le problème persiste, merci de "
"prendre contact avec le support."
#: Url.php:416
msgid ""
"Unable to determine the requested page (loop detected). If the problem "
"persists, please contact support."
msgstr ""
"Impossible de déterminer la page demandée (boucle détectée). Si le problème "
"persiste, merci de prendre contact avec le support."
#: Url.php:446
msgid "This request cannot be processed."
msgstr "Cette requête ne peut être traitée."
#: Url.php:456
msgid "Authentication required but fail to authenticate you."
msgstr "Authentification requise mais impossible pour vous authentifier."
#: Url.php:475
msgid "This request could not be processed correctly."
msgstr "Cette requête n'a put être traitée correctement."
#: Cli.php:44
msgid "Create a new project using EesyPHP framework"
msgstr "Créer un nouveau projet utilisant le framework EesyPHP"
@ -236,22 +138,140 @@ msgstr ""
msgid "Please enter password:"
msgstr "Merci de saisir le mot de passe :"
#: App.php:238 I18n.php:118
#: Db.php:74
msgid "Unable to connect to the database."
msgstr "Impossible de se connecter à la base de données."
#: Auth/Form.php:41
msgid "Invalid username or password."
msgstr "Nom d'utilisateur ou mot de passe invalide."
#: Auth/Form.php:74
msgid "Sign in"
msgstr "Connexion"
#: Auth/Http.php:37 Url.php:181
msgid "Authentication required"
msgstr "Authentification requise"
#: Auth/Http.php:124 Auth/Http.php:127 Url.php:185
msgid "Access denied"
msgstr "Accès interdit"
#: Auth/Http.php:128 Auth/Http.php:132
msgid "You must login to access this page."
msgstr "Vous devez vous connecter pour accéder à cette page."
#: Email.php:101
#, php-format
msgid "</hr><p><small>Mail initialy intended for %s.</small></p>"
msgstr "</hr><p><small>Email initialement destiné à %s.</small></p>"
#: Email.php:102
#, php-format
msgid ""
"\n"
"\n"
"\n"
"Mail initialy intended for %s."
msgstr ""
"\n"
"\n"
"\n"
"Mail originalement destiné à %s."
#: Email.php:139
#, php-format
msgid "<p><small>%s: %s</small></p>"
msgstr "<p><small>%s: %s</small></p>"
#: Email.php:140
#, php-format
msgid ""
"\n"
"%s: %s"
msgstr ""
"\n"
"%s: %s"
#: Tpl.php:421
msgid "No template specified."
msgstr "Aucun template spécifié."
#: Tpl.php:454
msgid "An error occurred while displaying this page."
msgstr "Une erreur est survenue en affichant cette page."
#: Url.php:177
msgid "Bad request"
msgstr "Mauvaise requête"
#: Url.php:178
msgid "Invalid request."
msgstr "Requête invalide."
#: Url.php:182
msgid "You have to be authenticated to access to this page."
msgstr "Vous devez être authentifié pour accéder à cette page."
#: Url.php:186
msgid ""
"You do not have access to this application. If you think this is an error, "
"please contact support."
msgstr ""
"Vous n'avez pas accès à cette application. Si vous pensez qu'il s'agit d'une "
"erreur, merci de prendre contact avec le support."
#: Url.php:189
msgid "Whoops ! Page not found"
msgstr "Oups ! Page introuvable"
#: Url.php:190
msgid "The requested page can not be found."
msgstr "La page demandée est introuvable."
#: Url.php:198
msgid "Error"
msgstr "Erreur"
#: Url.php:199
msgid "An unknown error occurred. If problem persist, please contact support."
msgstr ""
"Une erreur inconnue est survenue. Si le problème persiste, merci de prendre "
"contact avec le support."
#: Url.php:262
msgid ""
"Unable to determine the requested page. If the problem persists, please "
"contact support."
msgstr ""
"Impossible de déterminer la page demandée. Si le problème persiste, merci de "
"prendre contact avec le support."
#: Url.php:416
msgid ""
"Unable to determine the requested page (loop detected). If the problem "
"persists, please contact support."
msgstr ""
"Impossible de déterminer la page demandée (boucle détectée). Si le problème "
"persiste, merci de prendre contact avec le support."
#: Url.php:446
msgid "This request cannot be processed."
msgstr "Cette requête ne peut être traitée."
#: Url.php:456
msgid "Authentication required but fail to authenticate you."
msgstr "Authentification requise mais impossible pour vous authentifier."
#: Url.php:475
msgid "This request could not be processed correctly."
msgstr "Cette requête n'a put être traitée correctement."
#: I18n.php:118 App.php:238
msgid "Hello world !"
msgstr "Bonjour tout le monde !"
#: App.php:240
msgid "Hello world!"
msgstr "Salut tout le monde !"
#: App.php:251
msgid "Disconnected"
msgstr "Déconnecté"
#: App.php:253
msgid "You are now disconnected."
msgstr "Vous êtes maintenant déconnecté."
#: I18n.php:138
msgid "Extract messages that need to be translated"
msgstr "Extraire les messages devant être traduit"
@ -454,37 +474,17 @@ msgstr "Impossible d'écrire le fichier du catalogue JS %s (%s)."
msgid "%s JS catalog writed (%s)."
msgstr "Catalogue JS %s créé (%s)."
#: Email.php:101
#, php-format
msgid "</hr><p><small>Mail initialy intended for %s.</small></p>"
msgstr "</hr><p><small>Email initialement destiné à %s.</small></p>"
#: App.php:240
msgid "Hello world!"
msgstr "Salut tout le monde !"
#: Email.php:102
#, php-format
msgid ""
"\n"
"\n"
"\n"
"Mail initialy intended for %s."
msgstr ""
"\n"
"\n"
"\n"
"Mail originalement destiné à %s."
#: App.php:251
msgid "Disconnected"
msgstr "Déconnecté"
#: Email.php:139
#, php-format
msgid "<p><small>%s: %s</small></p>"
msgstr "<p><small>%s: %s</small></p>"
#: Email.php:140
#, php-format
msgid ""
"\n"
"%s: %s"
msgstr ""
"\n"
"%s: %s"
#: App.php:253
msgid "You are now disconnected."
msgstr "Vous êtes maintenant déconnecté."
#: static/js/myconfirm.js:4 static/js/myconfirm.js:187
#: static/js/myconfirm.js:216
@ -527,18 +527,6 @@ msgstr "Merci de patienter pendant le traitement de votre requête."
msgid "Are you sure?"
msgstr "Êtes-vous sure ?"
#: templates/login.tpl:19 templates/login.tpl:20
msgid "Username"
msgstr "Nom d'utilisateur"
#: templates/login.tpl:24 templates/login.tpl:25
msgid "Password"
msgstr "Mot de passe"
#: templates/login.tpl:29
msgid "Submit"
msgstr "Envoyer"
#: templates/fatal_error.tpl:3
msgid "Oops..."
msgstr "Oups..."
@ -560,10 +548,6 @@ msgstr "Erreur : %1"
msgid "Back"
msgstr "Retour"
#: templates/empty.tpl:72
msgid "Sign out"
msgstr "Déconnexion"
#: templates/homepage.tpl:6
msgid "Hello, world!"
msgstr "Bonjour tout le monde !"
@ -580,6 +564,26 @@ msgstr ""
"fichier <em>homepage.tpl</em> pour l'écraser. Vous pouvez également écraser "
"le gestionnaire de l'URL racine de l'application web."
#: templates/empty.tpl:72
msgid "Sign out"
msgstr "Déconnexion"
#: templates/empty.tpl:81
msgid "Log in"
msgstr "Connexion"
#: templates/login.tpl:19 templates/login.tpl:20
msgid "Username"
msgstr "Nom d'utilisateur"
#: templates/login.tpl:24 templates/login.tpl:25
msgid "Password"
msgstr "Mot de passe"
#: templates/login.tpl:29
msgid "Submit"
msgstr "Envoyer"
#~ msgid "Logout"
#~ msgstr "Déconnexion"

View file

@ -1,101 +1,11 @@
msgid ""
msgstr ""
"POT-Creation-Date: 2023-03-09 18:09+0100\n"
"PO-Revision-Date: 2023-03-09 18:09+0100\n"
"POT-Creation-Date: 2023-03-11 11:52+0100\n"
"PO-Revision-Date: 2023-03-11 11:52+0100\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: Tpl.php:421
msgid "No template specified."
msgstr ""
#: Tpl.php:454
msgid "An error occurred while displaying this page."
msgstr ""
#: Db.php:74
msgid "Unable to connect to the database."
msgstr ""
#: Auth/Form.php:41
msgid "Invalid username or password."
msgstr ""
#: Auth/Form.php:74
msgid "Sign in"
msgstr ""
#: Auth/Http.php:37 Url.php:181
msgid "Authentication required"
msgstr ""
#: Auth/Http.php:124 Auth/Http.php:127 Url.php:185
msgid "Access denied"
msgstr ""
#: Auth/Http.php:128 Auth/Http.php:132
msgid "You must login to access this page."
msgstr ""
#: Url.php:177
msgid "Bad request"
msgstr ""
#: Url.php:178
msgid "Invalid request."
msgstr ""
#: Url.php:182
msgid "You have to be authenticated to access to this page."
msgstr ""
#: Url.php:186
msgid ""
"You do not have access to this application. If you think this is an error, "
"please contact support."
msgstr ""
#: Url.php:189
msgid "Whoops ! Page not found"
msgstr ""
#: Url.php:190
msgid "The requested page can not be found."
msgstr ""
#: Url.php:198
msgid "Error"
msgstr ""
#: Url.php:199
msgid "An unknown error occurred. If problem persist, please contact support."
msgstr ""
#: Url.php:262
msgid ""
"Unable to determine the requested page. If the problem persists, please "
"contact support."
msgstr ""
#: Url.php:416
msgid ""
"Unable to determine the requested page (loop detected). If the problem "
"persists, please contact support."
msgstr ""
#: Url.php:446
msgid "This request cannot be processed."
msgstr ""
#: Url.php:456
msgid "Authentication required but fail to authenticate you."
msgstr ""
#: Url.php:475
msgid "This request could not be processed correctly."
msgstr ""
#: Cli.php:44
msgid "Create a new project using EesyPHP framework"
msgstr ""
@ -204,22 +114,126 @@ msgstr ""
msgid "Please enter password:"
msgstr ""
#: App.php:238 I18n.php:118
#: Db.php:74
msgid "Unable to connect to the database."
msgstr ""
#: Auth/Form.php:41
msgid "Invalid username or password."
msgstr ""
#: Auth/Form.php:74
msgid "Sign in"
msgstr ""
#: Auth/Http.php:37 Url.php:181
msgid "Authentication required"
msgstr ""
#: Auth/Http.php:124 Auth/Http.php:127 Url.php:185
msgid "Access denied"
msgstr ""
#: Auth/Http.php:128 Auth/Http.php:132
msgid "You must login to access this page."
msgstr ""
#: Email.php:101
#, php-format
msgid "</hr><p><small>Mail initialy intended for %s.</small></p>"
msgstr ""
#: Email.php:102
#, php-format
msgid ""
"\n"
"\n"
"\n"
"Mail initialy intended for %s."
msgstr ""
#: Email.php:139
#, php-format
msgid "<p><small>%s: %s</small></p>"
msgstr ""
#: Email.php:140
#, php-format
msgid ""
"\n"
"%s: %s"
msgstr ""
#: Tpl.php:421
msgid "No template specified."
msgstr ""
#: Tpl.php:454
msgid "An error occurred while displaying this page."
msgstr ""
#: Url.php:177
msgid "Bad request"
msgstr ""
#: Url.php:178
msgid "Invalid request."
msgstr ""
#: Url.php:182
msgid "You have to be authenticated to access to this page."
msgstr ""
#: Url.php:186
msgid ""
"You do not have access to this application. If you think this is an error, "
"please contact support."
msgstr ""
#: Url.php:189
msgid "Whoops ! Page not found"
msgstr ""
#: Url.php:190
msgid "The requested page can not be found."
msgstr ""
#: Url.php:198
msgid "Error"
msgstr ""
#: Url.php:199
msgid "An unknown error occurred. If problem persist, please contact support."
msgstr ""
#: Url.php:262
msgid ""
"Unable to determine the requested page. If the problem persists, please "
"contact support."
msgstr ""
#: Url.php:416
msgid ""
"Unable to determine the requested page (loop detected). If the problem "
"persists, please contact support."
msgstr ""
#: Url.php:446
msgid "This request cannot be processed."
msgstr ""
#: Url.php:456
msgid "Authentication required but fail to authenticate you."
msgstr ""
#: Url.php:475
msgid "This request could not be processed correctly."
msgstr ""
#: I18n.php:118 App.php:238
msgid "Hello world !"
msgstr ""
#: App.php:240
msgid "Hello world!"
msgstr ""
#: App.php:251
msgid "Disconnected"
msgstr ""
#: App.php:253
msgid "You are now disconnected."
msgstr ""
#: I18n.php:138
msgid "Extract messages that need to be translated"
msgstr ""
@ -387,30 +401,16 @@ msgstr ""
msgid "%s JS catalog writed (%s)."
msgstr ""
#: Email.php:101
#, php-format
msgid "</hr><p><small>Mail initialy intended for %s.</small></p>"
#: App.php:240
msgid "Hello world!"
msgstr ""
#: Email.php:102
#, php-format
msgid ""
"\n"
"\n"
"\n"
"Mail initialy intended for %s."
#: App.php:251
msgid "Disconnected"
msgstr ""
#: Email.php:139
#, php-format
msgid "<p><small>%s: %s</small></p>"
msgstr ""
#: Email.php:140
#, php-format
msgid ""
"\n"
"%s: %s"
#: App.php:253
msgid "You are now disconnected."
msgstr ""
#: static/js/myconfirm.js:4 static/js/myconfirm.js:187
@ -454,18 +454,6 @@ msgstr ""
msgid "Are you sure?"
msgstr ""
#: templates/login.tpl:19 templates/login.tpl:20
msgid "Username"
msgstr ""
#: templates/login.tpl:24 templates/login.tpl:25
msgid "Password"
msgstr ""
#: templates/login.tpl:29
msgid "Submit"
msgstr ""
#: templates/fatal_error.tpl:3
msgid "Oops..."
msgstr ""
@ -484,10 +472,6 @@ msgstr ""
msgid "Back"
msgstr ""
#: templates/empty.tpl:72
msgid "Sign out"
msgstr ""
#: templates/homepage.tpl:6
msgid "Hello, world!"
msgstr ""
@ -499,3 +483,23 @@ msgid ""
"it. You could also overwrite the URL handler for the root of the web "
"application."
msgstr ""
#: templates/empty.tpl:72
msgid "Sign out"
msgstr ""
#: templates/empty.tpl:81
msgid "Log in"
msgstr ""
#: templates/login.tpl:19 templates/login.tpl:20
msgid "Username"
msgstr ""
#: templates/login.tpl:24 templates/login.tpl:25
msgid "Password"
msgstr ""
#: templates/login.tpl:29
msgid "Submit"
msgstr ""

View file

@ -55,8 +55,8 @@
{block name="navbar-extra-content"}{/block}
{block name="navbar-user"}
{if isset($auth_user) && $auth_user}
<ul class="navbar-nav text-end">
{if isset($auth_user) && $auth_user}
<li class="nav-item dropdown">
{block name="navbar-user-name"}
<a class="nav-link active dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
@ -75,8 +75,16 @@
</ul>
{/block}
</li>
{else}
{block name="navbar-login-btn"}
<li class="nav-item">
<a href="login" class="btn btn-sm btn-success">
<i class="fa fa-sign-in"></i> {t domain=$CORE_TEXT_DOMAIN}Log in{/t}
</a>
</li>
{/block}
{/if}
</ul>
{/if}
{/block}
</div>
</div>