diff --git a/Controller/Admin/SecurityController.php b/Controller/Admin/SecurityController.php new file mode 100644 index 0000000..42c3408 --- /dev/null +++ b/Controller/Admin/SecurityController.php @@ -0,0 +1,99 @@ +container->get('templating')->renderResponse( + 'KalamuCmsAdminBundle:Security:login.html.twig', + $data + ); + } + + public function profileEditAction(Request $request){ + $user= $this->get('security.token_storage')->getToken()->getUser(); + + /** @var $dispatcher \Symfony\Component\EventDispatcher\EventDispatcherInterface */ + $dispatcher = $this->get('event_dispatcher'); + $event = new GetResponseUserEvent($user, $request); + $dispatcher->dispatch(FOSUserEvents::PROFILE_EDIT_INITIALIZE, $event); + if (null !== $event->getResponse()) { + return $event->getResponse(); + } + + $formFactory = $this->get('fos_user.profile.form.factory'); + $form = $formFactory->createForm()->add('plainPassword', RepeatedType::class, array( + 'type' => PasswordType::class, + 'required' => false, + 'options' => array('translation_domain' => 'FOSUserBundle'), + 'first_options' => array('label' => 'form.password'), + 'second_options' => array('label' => 'form.password_confirmation'), + 'invalid_message' => 'fos_user.password.mismatch', + )); + $form->remove('current_password'); + $form->remove('username'); + $form->setData($user); + + $form->handleRequest($request); + if ($form->isValid()) { + /** @var $userManager \FOS\UserBundle\Model\UserManagerInterface */ + $userManager = $this->get('fos_user.user_manager'); + $event = new FormEvent($form, $request); + $dispatcher->dispatch(FOSUserEvents::PROFILE_EDIT_SUCCESS, $event); + $userManager->updateUser($user); + if (null === $response = $event->getResponse()) { + $url = $this->generateUrl('fos_user_security_profile'); + $response = new RedirectResponse($url); + } + $dispatcher->dispatch(FOSUserEvents::PROFILE_EDIT_COMPLETED, new FilterUserResponseEvent($user, $request, $response)); + return $response; + } + + return $this->render( + 'KalamuCmsAdminBundle:Security:profile_edit.html.twig', + array( + 'form' => $form->createView(), + 'user'=>$user, + 'environment' => 'frontend' + ) + ); + } + + public function profileAction(){ + $user = $this->get('security.token_storage')->getToken()->getUser(); + + return $this->render( + 'KalamuCmsAdminBundle:Security:profile.html.twig', + array( + 'user' => $user, + 'environment' => 'frontend' + ) + ); + } + +} diff --git a/Resources/config/routing.yml b/Resources/config/routing.yml index 5a63f76..7e00a4b 100644 --- a/Resources/config/routing.yml +++ b/Resources/config/routing.yml @@ -1,18 +1,23 @@ - -KalamuCmsAdminBundle_elfinder: - resource: "@KalamuCmsAdminBundle/Resources/config/routing/elfinder.yml" - prefix: /elfinder - -KalamuCmsAdminBundle_link_picker_api: - resource: "@KalamuCmsAdminBundle/Resources/config/routing/api_link_picker.yml" - prefix: /api/link_picker - - -KalamuCmsAdminBundle_menu: - resource: "@KalamuCmsAdminBundle/Resources/config/routing/menu.yml" - prefix: /menu - -# Route for the dashboards API (admin homepage and edition) -kalamu_default_site_dashboard_api: - resource: "@KalamuCmsAdminBundle/Resources/config/routing/dashboard_api.yml" - prefix: /dashboard_storage/api \ No newline at end of file + +KalamuCmsAdminBundle_elfinder: + resource: "@KalamuCmsAdminBundle/Resources/config/routing/elfinder.yml" + prefix: /elfinder + +KalamuCmsAdminBundle_link_picker_api: + resource: "@KalamuCmsAdminBundle/Resources/config/routing/api_link_picker.yml" + prefix: /api/link_picker + + +KalamuCmsAdminBundle_menu: + resource: "@KalamuCmsAdminBundle/Resources/config/routing/menu.yml" + prefix: /menu + +# Route for the dashboards API (admin homepage and edition) +kalamu_default_site_dashboard_api: + resource: "@KalamuCmsAdminBundle/Resources/config/routing/dashboard_api.yml" + prefix: /dashboard_storage/api + +# Routes for login / check login / logout +fos_user_security: + resource: "@KalamuCmsAdminBundle/Resources/config/routing/security.yml" + prefix: / \ No newline at end of file diff --git a/Resources/config/routing/security.yml b/Resources/config/routing/security.yml new file mode 100644 index 0000000..9b0d462 --- /dev/null +++ b/Resources/config/routing/security.yml @@ -0,0 +1,20 @@ +fos_user_security_login: + path: /login + defaults: { _controller: KalamuCmsAdminBundle:Admin\Security:login } + +fos_user_security_check: + path: /login_check + defaults: { _controller: KalamuCmsAdminBundle:Admin\Security:check } + +fos_user_security_logout: + path: /logout + defaults: { _controller: KalamuCmsAdminBundle:Admin\Security:logout } + +# Routes for user profile +fos_user_security_profile: + path: /profile + defaults: { _controller: KalamuCmsAdminBundle:Admin\Security:profile } + +fos_user_security_profile_edit: + path: /profile/edit + defaults: { _controller: KalamuCmsAdminBundle:Admin\Security:profileEdit } \ No newline at end of file diff --git a/Resources/public/css/admin-login.css b/Resources/public/css/admin-login.css new file mode 100644 index 0000000..0b79e3f --- /dev/null +++ b/Resources/public/css/admin-login.css @@ -0,0 +1,62 @@ +body{ + margin: 0; + padding: 0; + overflow: hidden; +} +.content-wrapper{ + margin: 0; + padding: 0 !important; + overflow: hidden; + background: rgba(0,0,0,.05) !important; +} +.form-wrapper{ + max-width: 700px; + width: 80%; + margin: auto; + vertical-align: middle; + padding: 30px; + background: red; + border-radius: 3px; + + margin-top: 50vh; /* poussé de la moitié de hauteur de viewport */ + transform: translateY(-50%); /* tiré de la moitié de sa propre hauteur */ + + background: rgba(255,255,255,0.9); + padding: 30px 40px; + filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#E6FFFFFF', endColorstr='#E6FFFFFF'); + z-index: 999999999; + -webkit-box-shadow: 0 6px 6px rgba(0,0,0,0.3); + -moz-box-shadow: 0 6px 6px rgba(0,0,0,0.3); + box-shadow: 0 6px 6px rgba(0,0,0,0.3); + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + -ms-border-radius: 3px; + -o-border-radius: 3px; + border-radius: 3px; + overflow: hidden; + zoom: 1; +} +.form-wrapper img{ + width: initial; + max-width: 100%; + display: block; + margin: auto; +} +.form-wrapper img.visible-xs{ + max-height: 150px; +} + +.form-wrapper .form-group{ + width: 100%; + display: block; + margin-bottom: 10px; +} +.form-wrapper .form-group .input-group{ + width: 100%; +} + +.form-wrapper .btn{ + border-radius: 0; + display: block; + width: 100%; +} \ No newline at end of file diff --git a/Resources/public/js/passwordStrengthMeter.js b/Resources/public/js/passwordStrengthMeter.js new file mode 100644 index 0000000..547e945 --- /dev/null +++ b/Resources/public/js/passwordStrengthMeter.js @@ -0,0 +1,104 @@ +var m_strUpperCase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; +var m_strLowerCase = "abcdefghijklmnopqrstuvwxyz"; +var m_strNumber = "0123456789"; +var m_strCharacters = "!@#$%^&*?_~.," + +function checkPasswordStrength(strPassword) +{ + // Reset combination count + var nScore = 0; + + // Password length + // -- Less than 4 characters + if (strPassword.length < 5) + { + nScore += 5; + } + // -- 5 to 7 characters + else if (strPassword.length > 4 && strPassword.length < 8) + { + nScore += 10; + } + // -- 8 or more + else if (strPassword.length > 7) + { + nScore += 25; + } + + // Letters + var nUpperCount = countContain(strPassword, m_strUpperCase); + var nLowerCount = countContain(strPassword, m_strLowerCase); + var nLowerUpperCount = nUpperCount + nLowerCount; + // -- Letters are all lower case + if (nUpperCount == 0 && nLowerCount != 0) + { + nScore += 10; + } + // -- Letters are upper case and lower case + else if (nUpperCount != 0 && nLowerCount != 0) + { + nScore += 20; + } + + // Numbers + var nNumberCount = countContain(strPassword, m_strNumber); + // -- 1 number + if (nNumberCount > 0 && nNumberCount < 3) + { + nScore += 10; + } + // -- 3 or more numbers + if (nNumberCount >= 3) + { + nScore += 20; + } + + // Characters + var nCharacterCount = countContain(strPassword, m_strCharacters); + // -- 1 character + if (nCharacterCount == 1) + { + nScore += 10; + } + // -- More than 1 character + if (nCharacterCount > 1) + { + nScore += 25; + } + + // Bonus + // -- Letters and numbers + if (nNumberCount != 0 && nLowerUpperCount != 0) + { + nScore += 2; + } + // -- Letters, numbers, and characters + if (nNumberCount != 0 && nLowerUpperCount != 0 && nCharacterCount != 0) + { + nScore += 3; + } + // -- Mixed case letters, numbers, and characters + if (nNumberCount != 0 && nUpperCount != 0 && nLowerCount != 0 && nCharacterCount != 0) + { + nScore += 5; + } + + return nScore; +} + +// Checks a string for a list of characters +function countContain(strPassword, strCheck) +{ + // Declare variables + var nCount = 0; + + for (i = 0; i < strPassword.length; i++) + { + if (strCheck.indexOf(strPassword.charAt(i)) > -1) + { + nCount++; + } + } + + return nCount; +} \ No newline at end of file diff --git a/Resources/translations/kalamu.en.yml b/Resources/translations/kalamu.en.yml index 0b16d63..0d5fd13 100644 --- a/Resources/translations/kalamu.en.yml +++ b/Resources/translations/kalamu.en.yml @@ -1,104 +1,113 @@ -category.standard: Standard -category.media: Media -category.other: Other -category.default: Default -cms.wysiwyg.title: 'Text editor' -cms.wysiwyg.description: 'Put your text and you can enhance it like in a real text editor.' -cms.image.title: Image -cms.image.description: 'Select an image to put on your content.' -cms.youtube.title: Video -cms.youtube.description: 'Put a YouTube video on your page.' -cms.menu.title: Menu -cms.menu.description: 'Select an existing menu to insert in your content.' -cms.google_map.title: 'Google Maps' -cms.google_map.description: 'Move on the desired zone then clic on the map to add markers.' -cms.form_contact.title: 'Contact form' -cms.form_contact.description: 'Add a configurable contact form to get messages by email.' -cms.section.section_standard.title: 'Standard section' -cms.section.section_standard.description: 'Standard section' -cms.alert.title: 'Alert block' -cms.alert.description: 'Show an alert bloc on a colored background' -Action: Action -Post: Post -'Post Create': 'New post' -'Post List': 'Post list' -'Apply On': 'Apply on' -Class: Classe -Classification: Classification -Content: Content -'Context Publication': 'Publication context' -'Created At': 'Created at' -'Created By': Creator -Default: Default -Description: Description -Id: ID -Image: Image -Infos: Informations -Libelle: Libelle -Menu: Menu -'Menu Create': 'New menu' -'Menu List': 'Menu list' -Metas: Metadatas -Page: Page -'Page List': 'Page list' -Parent: Parent -Place: Place -'Published At': 'Published at' -PublishStatus: 'Publication status' -'Publish Status': 'Publication status' -'Publish Status Create': 'New publication status' -'Publish Status List': 'Publication status list' -Resume: Resume -Slug: Slug -Taxonomy: Taxonomie -'Taxonomy Create': 'New taxonomy' -'Taxonomy List': 'Taxonomy list' -Template: Template -Term: Term -'Term Create': 'New term' -'Term List': 'Term list' -Title: Title -'Updated At': 'Updated at' -'Updated By': Updator -Visible: Visible -'Published Until': 'Published util' -'Page Create': 'New page' -'Add an element': 'Add an element' -Add: Add -Cancel: Cancel -Other: Other -Others: Others -Total: Total -'Add/Edit a link': 'Add/Edit a link' -'Link text': 'Text link' -'Direct link': 'Direct link' -'Link title': 'Link title' -Address: Address -'Title on hover': 'Title on hover' -'Class CSS': 'CSS class' -Opening: Opening -'Current window': 'Current window' -'New window': 'New window' -'Menu elements': 'Menu elements' -Append: Append -All: All -'See the result': 'See the result' -Submit: Submit -'Last published contents': 'Last published contents' -'Publication date': 'Publication date' -'Youtube video': 'Youtube video' -'Main image': 'Main image' -'File selector': 'File selector' -menu_configuration_helper: 'Add element to the menu with right column. Then drag items to reoganise them.' -'General parameters': 'General parameters' -'CMS Configuration': 'CMS Configuration' -'Title shown in browser bar': 'Title shown in browser bar' -'Short description of the website (mainly for search engines)': 'Short description of the website (mainly for search engines)' -'Home page': "Home page" -'Content used as homepage': 'Content used as homepage' -'Allow search engines indexation': "Allow search engines indexation" -'Allow search engines to reference the content of the website.': "Allow search engines to reference the content of the website." -'Google Analytics code': 'Google Analytics code' -'Traking code of Google Analytics to get advanced visitor statistics': "Traking code of Google Analytics to get advanced visitor statistics" -'Footer of the pages': "Footer of the pages" -Save: Save \ No newline at end of file +category.standard: Standard +category.media: Media +category.other: Other +category.default: Default +cms.wysiwyg.title: 'Text editor' +cms.wysiwyg.description: 'Put your text and you can enhance it like in a real text editor.' +cms.image.title: Image +cms.image.description: 'Select an image to put on your content.' +cms.youtube.title: Video +cms.youtube.description: 'Put a YouTube video on your page.' +cms.menu.title: Menu +cms.menu.description: 'Select an existing menu to insert in your content.' +cms.google_map.title: 'Google Maps' +cms.google_map.description: 'Move on the desired zone then clic on the map to add markers.' +cms.form_contact.title: 'Contact form' +cms.form_contact.description: 'Add a configurable contact form to get messages by email.' +cms.section.section_standard.title: 'Standard section' +cms.section.section_standard.description: 'Standard section' +cms.alert.title: 'Alert block' +cms.alert.description: 'Show an alert bloc on a colored background' +Action: Action +Post: Post +'Post Create': 'New post' +'Post List': 'Post list' +'Apply On': 'Apply on' +Class: Classe +Classification: Classification +Content: Content +'Context Publication': 'Publication context' +'Created At': 'Created at' +'Created By': Creator +Default: Default +Description: Description +Id: ID +Image: Image +Infos: Informations +Libelle: Libelle +Menu: Menu +'Menu Create': 'New menu' +'Menu List': 'Menu list' +Metas: Metadatas +Page: Page +'Page List': 'Page list' +Parent: Parent +Place: Place +'Published At': 'Published at' +PublishStatus: 'Publication status' +'Publish Status': 'Publication status' +'Publish Status Create': 'New publication status' +'Publish Status List': 'Publication status list' +Resume: Resume +Slug: Slug +Taxonomy: Taxonomie +'Taxonomy Create': 'New taxonomy' +'Taxonomy List': 'Taxonomy list' +Template: Template +Term: Term +'Term Create': 'New term' +'Term List': 'Term list' +Title: Title +'Updated At': 'Updated at' +'Updated By': Updator +Visible: Visible +'Published Until': 'Published util' +'Page Create': 'New page' +'Add an element': 'Add an element' +Add: Add +Cancel: Cancel +Other: Other +Others: Others +Total: Total +'Add/Edit a link': 'Add/Edit a link' +'Link text': 'Text link' +'Direct link': 'Direct link' +'Link title': 'Link title' +Address: Address +'Title on hover': 'Title on hover' +'Class CSS': 'CSS class' +Opening: Opening +'Current window': 'Current window' +'New window': 'New window' +'Menu elements': 'Menu elements' +Append: Append +All: All +'See the result': 'See the result' +Submit: Submit +'Last published contents': 'Last published contents' +'Publication date': 'Publication date' +'Youtube video': 'Youtube video' +'Main image': 'Main image' +'File selector': 'File selector' +menu_configuration_helper: 'Add element to the menu with right column. Then drag items to reoganise them.' +'General parameters': 'General parameters' +'CMS Configuration': 'CMS Configuration' +'Title shown in browser bar': 'Title shown in browser bar' +'Short description of the website (mainly for search engines)': 'Short description of the website (mainly for search engines)' +'Home page': "Home page" +'Content used as homepage': 'Content used as homepage' +'Allow search engines indexation': "Allow search engines indexation" +'Allow search engines to reference the content of the website.': "Allow search engines to reference the content of the website." +'Google Analytics code': 'Google Analytics code' +'Traking code of Google Analytics to get advanced visitor statistics': "Traking code of Google Analytics to get advanced visitor statistics" +'Footer of the pages': "Footer of the pages" +Save: Save +Error: Error +'Go to homepage': 'Go to homepage' +'Last connection': 'Last connection' +'You are super administrator !': 'You are super administrator !' +'Edit my profile': 'Edit my profile' +'Access groups': 'Access groups' +'Your are in no group': 'Your are in no group' +'Password strength': 'Password strength' +password_strength_help: "The strength of your password depends on it's length and diversity of used characters. Think to use letters, numbers and special characters." \ No newline at end of file diff --git a/Resources/translations/kalamu.fr.yml b/Resources/translations/kalamu.fr.yml index bf31229..b1bf78f 100644 --- a/Resources/translations/kalamu.fr.yml +++ b/Resources/translations/kalamu.fr.yml @@ -1,104 +1,113 @@ -category.standard: Standard -category.media: Médias -category.other: Autre -category.default: Défaut -cms.wysiwyg.title: 'Texte mis en forme' -cms.wysiwyg.description: 'Saisissez votre texte et mettez le en forme comme sur un logiciel de traitement de texte.' -cms.image.title: Image -cms.image.description: 'Sélectionnez une image à insérer dans le contenu.' -cms.youtube.title: Vidéo -cms.youtube.description: 'Insérer une vidéo YouTube dans votre page' -cms.menu.title: Menu -cms.menu.description: 'Sélectionner un des menu existant pour l''insérer dans le contenu.' -cms.google_map.title: 'Carte Google Maps' -cms.google_map.description: 'Déplacez vous sur la zone à affichez, cliquez sur la carte pour ajouter des marquers.' -cms.form_contact.title: 'Formulaire de contact' -cms.form_contact.description: 'Ajoutez un formulaire de contact configurable pour recevoir les messages par mail' -cms.section.section_standard.title: Section standard -cms.section.section_standard.description: Section standard -cms.alert.title: Block alerte -cms.alert.description: Affiche un block de type alerte sur un fond coloré -Action: Action -Post: Actualité -Post Create: Nouvelle actualité -Post List: Liste des actualités -Apply On: S'applique à -Class: Classe -Classification: Classification -Content: Contenu -Context Publication: Contexte de publication -Created At: Créé le -Created By: Créé par -Default: Défaut -Description: Description -Id: ID -Image: Image -Infos: Informations -Libelle: Libelle -Menu: Menu -Menu Create: Nouveau menu -Menu List: Liste des menus -Metas: Métadonnées -Page: Page -Page List: Liste des pages -Parent: Parent -Place: Emplacement -Published At: Publié le -PublishStatus: Statut de publication -Publish Status: Statut de publication -Publish Status Create: Nouveau statut de publication -Publish Status List: Liste des statut de publication -Resume: Résumé -Slug: Identifiant -Taxonomy: Taxonomie -Taxonomy Create: Nouvelle taxonomies -Taxonomy List: Liste des taxonomies -Template: Template -Term: Terme -Term Create: Nouveau terme -Term List: Liste des termes -Title: Titre -Updated At: Mis à jour le -Updated By: Mis à jour par -Visible: Visible -Published Until: Publié jusqu'au -Page Create: Nouvelle page -Add an element: Ajouter un élément -Add: Ajouter -Cancel: Annuler -Other: Autre -Others: Autres -Total: Total -Add/Edit a link: Ajouter/Modifier un lien -Link text: Lien texte -Direct link: Lien direct -Link title: Titre du lien -Address: Adresse -Title on hover: Titre au survole -Class CSS: Class CSS -Opening: Ouverture -Current window: Fenêtre actuelle -New window: Nouvelle fenêtre -Menu elements: Éléments du menu -Append: Ajouter -All: Tout -See the result: Voir le résultat -Submit: Enregistrer -Last published contents: Dernier contenu publié -Publication date: Date de publication -Youtube video: Vidéo Youtube -Main image: Image principale -File selector: Sélecteur de fichier -menu_configuration_helper: Ajouter un élément au menu avec la colonne de droite. Ensuite, faites glisser les éléments pour les réorganiser. -'General parameters': 'Paramètres généraux' -'CMS Configuration': 'Configuration du CMS' -'Title shown in browser bar': 'Titre affiché dans la barre de navigation' -'Short description of the website (mainly for search engines)': 'Brève description du site Web (principalement pour les moteurs de recherche)' -'Home page': "Page d'accueil" -'Content used as homepage': "Contenu utilisé comme page d'accueil" -'Allow search engines indexation': "Autoriser l'indexation des moteurs de recherche" -'Allow search engines to reference the content of the website.': "Autoriser les moteurs de recherche à référencer le contenu du site." -'Google Analytics code': 'Code Google Analytics' -'Traking code of Google Analytics to get advanced visitor statistics': "Code de suivi de Google Analytics pour obtenir des statistiques de visite avancées" -'Footer of the pages': "Pied de page" -Save: Enregistrer \ No newline at end of file +category.standard: Standard +category.media: Médias +category.other: Autre +category.default: Défaut +cms.wysiwyg.title: 'Texte mis en forme' +cms.wysiwyg.description: 'Saisissez votre texte et mettez le en forme comme sur un logiciel de traitement de texte.' +cms.image.title: Image +cms.image.description: 'Sélectionnez une image à insérer dans le contenu.' +cms.youtube.title: Vidéo +cms.youtube.description: 'Insérer une vidéo YouTube dans votre page' +cms.menu.title: Menu +cms.menu.description: 'Sélectionner un des menu existant pour l''insérer dans le contenu.' +cms.google_map.title: 'Carte Google Maps' +cms.google_map.description: 'Déplacez vous sur la zone à affichez, cliquez sur la carte pour ajouter des marquers.' +cms.form_contact.title: 'Formulaire de contact' +cms.form_contact.description: 'Ajoutez un formulaire de contact configurable pour recevoir les messages par mail' +cms.section.section_standard.title: Section standard +cms.section.section_standard.description: Section standard +cms.alert.title: Block alerte +cms.alert.description: Affiche un block de type alerte sur un fond coloré +Action: Action +Post: Actualité +Post Create: Nouvelle actualité +Post List: Liste des actualités +Apply On: S'applique à +Class: Classe +Classification: Classification +Content: Contenu +Context Publication: Contexte de publication +Created At: Créé le +Created By: Créé par +Default: Défaut +Description: Description +Id: ID +Image: Image +Infos: Informations +Libelle: Libelle +Menu: Menu +Menu Create: Nouveau menu +Menu List: Liste des menus +Metas: Métadonnées +Page: Page +Page List: Liste des pages +Parent: Parent +Place: Emplacement +Published At: Publié le +PublishStatus: Statut de publication +Publish Status: Statut de publication +Publish Status Create: Nouveau statut de publication +Publish Status List: Liste des statut de publication +Resume: Résumé +Slug: Identifiant +Taxonomy: Taxonomie +Taxonomy Create: Nouvelle taxonomies +Taxonomy List: Liste des taxonomies +Template: Template +Term: Terme +Term Create: Nouveau terme +Term List: Liste des termes +Title: Titre +Updated At: Mis à jour le +Updated By: Mis à jour par +Visible: Visible +Published Until: Publié jusqu'au +Page Create: Nouvelle page +Add an element: Ajouter un élément +Add: Ajouter +Cancel: Annuler +Other: Autre +Others: Autres +Total: Total +Add/Edit a link: Ajouter/Modifier un lien +Link text: Lien texte +Direct link: Lien direct +Link title: Titre du lien +Address: Adresse +Title on hover: Titre au survole +Class CSS: Class CSS +Opening: Ouverture +Current window: Fenêtre actuelle +New window: Nouvelle fenêtre +Menu elements: Éléments du menu +Append: Ajouter +All: Tout +See the result: Voir le résultat +Submit: Enregistrer +Last published contents: Dernier contenu publié +Publication date: Date de publication +Youtube video: Vidéo Youtube +Main image: Image principale +File selector: Sélecteur de fichier +menu_configuration_helper: Ajouter un élément au menu avec la colonne de droite. Ensuite, faites glisser les éléments pour les réorganiser. +'General parameters': 'Paramètres généraux' +'CMS Configuration': 'Configuration du CMS' +'Title shown in browser bar': 'Titre affiché dans la barre de navigation' +'Short description of the website (mainly for search engines)': 'Brève description du site Web (principalement pour les moteurs de recherche)' +'Home page': "Page d'accueil" +'Content used as homepage': "Contenu utilisé comme page d'accueil" +'Allow search engines indexation': "Autoriser l'indexation des moteurs de recherche" +'Allow search engines to reference the content of the website.': "Autoriser les moteurs de recherche à référencer le contenu du site." +'Google Analytics code': 'Code Google Analytics' +'Traking code of Google Analytics to get advanced visitor statistics': "Code de suivi de Google Analytics pour obtenir des statistiques de visite avancées" +'Footer of the pages': "Pied de page" +Save: Enregistrer +Error: Erreur +'Go to homepage': "Aller à la page d'accueil" +'Last connection': 'Dernière connexion' +'You are super administrator !': 'Vous êtes super administrateur !' +'Edit my profile': 'Éditer mon profil' +'Access groups': "Groupes d'accès" +'Your are in no group': "Vous n'êtes dans aucun groupe" +'Password strength': 'Fiabilité du mot de passe' +password_strength_help: "La force de votre mot de passe dépends de la diversité des caractères. Pensez à utiliser des lettres, chiffres et caractères spéciaux." \ No newline at end of file diff --git a/Resources/views/Security/login.html.twig b/Resources/views/Security/login.html.twig new file mode 100644 index 0000000..421c5ee --- /dev/null +++ b/Resources/views/Security/login.html.twig @@ -0,0 +1,61 @@ +{% extends "SonataAdminBundle::standard_layout.html.twig" %} +{% trans_default_domain 'FOSUserBundle' %} + +{% block stylesheets %} + {{parent()}} + +{% endblock %} +{% block sonata_header %}{% endblock %} +{% block sonata_left_side %}{% endblock %} +{% block body_attributes %}class="sonata-bc fixed"{% endblock %} +{% block sonata_page_content -%} +
+ +
+
+ {% if error %} + + {% endif %} +
+
+
+ +
+
+ + +
+ +
+
+ +
+
+ +
+ +
+
+ +
+
+ + +
+
+

+ + {{'Go to homepage'|trans({}, 'kalamu')}} + +

+
+
+
+{% endblock sonata_page_content %} + diff --git a/Resources/views/Security/profile.html.twig b/Resources/views/Security/profile.html.twig new file mode 100644 index 0000000..6882294 --- /dev/null +++ b/Resources/views/Security/profile.html.twig @@ -0,0 +1,62 @@ +{% extends "SonataAdminBundle::standard_layout.html.twig" %} +{% trans_default_domain 'FOSUserBundle' %} + +{% block sonata_admin_content %} + + {% block notice %} + {% include 'SonataCoreBundle:FlashMessage:render.html.twig' %} + {% endblock notice %} + +
+
+
+
+ +

{{ user.username }}

+ +

{{ user.email }}

+ + + + {{ 'Edit my profile'|trans({}, 'kalamu') }} +
+
+
+ +
+
+
+

+ {{ 'Access groups'|trans({}, 'kalamu') }} +

+
+
+
    + {% for group in user.groups %} +
  • + {{group}} +
  • + {% else %} +
  • + {{ 'Your are in no group'|trans({}, 'kalamu') }} +
  • + {% endfor %} +
+
+
+
+
+ +{% endblock sonata_admin_content %} \ No newline at end of file diff --git a/Resources/views/Security/profile_edit.html.twig b/Resources/views/Security/profile_edit.html.twig new file mode 100644 index 0000000..3bd80b9 --- /dev/null +++ b/Resources/views/Security/profile_edit.html.twig @@ -0,0 +1,107 @@ +{% extends "SonataAdminBundle::standard_layout.html.twig" %} +{% trans_default_domain 'FOSUserBundle' %} + + +{% block sonata_admin_content %} + {% trans_default_domain 'FOSUserBundle' %} + + {% block notice %} + {% include 'SonataCoreBundle:FlashMessage:render.html.twig' %} + {% endblock notice %} + +
+
+
+
+
+
+ +

{{ user.username }}

+

{{ user.email }}

+
+
+ +
+ +

+ {{ 'Edit my profile'|trans({}, 'kalamu') }} +

+ + {{ form_start(form) }} + +
+
+ {{ form_row(form.email) }} + {{ form_row(form.plainPassword) }} +
+
+ +
+
+ +
+ + {{ "Cancel"|trans({}, 'kalamu') }} +
+ {{ form_rest(form) }} + {{ form_end(form) }} + +
+
+
+
+
+ +{% endblock sonata_admin_content %} + + +{% block javascripts_footer %} + + +{% endblock %} \ No newline at end of file