This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit 37204ee826fc40e5ad8b7a8d1cd48d2eb7198a35 Author: Kevin Morin <morin@codelutin.com> Date: Thu Oct 5 17:28:34 2017 +0200 mise en page de la section avatar du profil --- pollen-ui-riot-js/src/main/web/i18n/en.json | 6 ++- pollen-ui-riot-js/src/main/web/i18n/fr.json | 5 +- .../src/main/web/tag/UserProfile.tag.html | 53 +++++++++++----------- 3 files changed, 33 insertions(+), 31 deletions(-) diff --git a/pollen-ui-riot-js/src/main/web/i18n/en.json b/pollen-ui-riot-js/src/main/web/i18n/en.json index 6fabe3ea..6d73063a 100644 --- a/pollen-ui-riot-js/src/main/web/i18n/en.json +++ b/pollen-ui-riot-js/src/main/web/i18n/en.json @@ -399,6 +399,7 @@ "user_save": "Save", "userProfile_title": "My profile", "userProfile_deleteAccount": "Delete your account", + "userProfile_deleteUserMessage": "Delete your account? All the polls you created will be deleted; your votes and comments will be anonymized.", "userProfile_identity": "Identity", "userProfile_name": "Name", "userProfile_name_placeholder": "Enter your user name", @@ -423,10 +424,11 @@ "userProfile_linkProvider": "Link an external account to connect to Pollen:", "userProfile_unlinkProviderMessage": "Unlink this external account? You will not be able to connect to your Pollen account with this external account.", "userProfile_avatar": "Avatar", - "userProfile_deleteAvatarMessage": "Remove your avatar?", + "userProfile_deleteAvatar": "Delete", + "userProfile_deleteAvatarMessage": "Delete your avatar?", + "userProfile_uploadAvatar": "Upload", "userProfile_fileSizeMax_message": "File \"{0}\" for size {1} can't be over {2}.", "userProfile_fileNotImage_message": "The file \"{0}\" is not an image.", - "userProfile_deleteUserMessage": "Delete your account? All the polls you created will be deleted; your votes and comments will be anonymized.", "choice_description_placeholder": "You can enter a description for this choice", "date-picker_today": "Today", "date-picker_dateplaceholder": "Date", diff --git a/pollen-ui-riot-js/src/main/web/i18n/fr.json b/pollen-ui-riot-js/src/main/web/i18n/fr.json index 7d04f77d..0049ddb5 100644 --- a/pollen-ui-riot-js/src/main/web/i18n/fr.json +++ b/pollen-ui-riot-js/src/main/web/i18n/fr.json @@ -399,6 +399,7 @@ "user_save": "Enregistrer", "userProfile_title": "Mon profil", "userProfile_deleteAccount": "Supprimer votre compte", + "userProfile_deleteUserMessage": "Supprimer votre compte ? Tous les sondages que vous avez créés seront supprimés ; vos votes et commentaires seront anonymisés.", "userProfile_identity": "Identité", "userProfile_name": "Nom", "userProfile_name_placeholder": "Entrez votre nom d'utilisateur", @@ -423,12 +424,12 @@ "userProfile_linkProvider": "Associez un compte externe pour vous connecter à Pollen :", "userProfile_unlinkProviderMessage": "Désassossier ce compte externe ? Vous ne pourrez plus vous connectez à votre compte Pollen avec ce compte externe.", "userProfile_avatar": "Avatar", + "userProfile_deleteAvatar": "Supprimer", "userProfile_deleteAvatarMessage": "Supprimer votre avatar ?", - "userProfile_uploadAvatar": "Téléverser un fichier", + "userProfile_uploadAvatar": "Téléverser", "userProfile_getProviderAvatar": "ou utiliser votre avatar d'un service tiers", "userProfile_fileSizeMax_message": "Le fichier « {0} » de taille de {1} ne doit pas dépasser {2}.", "userProfile_fileNotImage_message": "Le fichier « {0} » n'est pas une image.", - "userProfile_deleteUserMessage": "Supprimer votre compte ? Tous les sondages que vous avez créés seront supprimés ; vos votes et commentaires seront anonymisés.", "choice_description_placeholder": "Vous pouvez saisir une description pour ce choix", "date-picker_today": "Aujourd'hui", "date-picker_dateplaceholder": "Date", diff --git a/pollen-ui-riot-js/src/main/web/tag/UserProfile.tag.html b/pollen-ui-riot-js/src/main/web/tag/UserProfile.tag.html index 6624a4f7..8852a355 100644 --- a/pollen-ui-riot-js/src/main/web/tag/UserProfile.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/UserProfile.tag.html @@ -19,7 +19,7 @@ #L% --> require("./components/HumanInput.tag.html"); -require("./components/LetterAvatar.tag.html"); +require("./components/Avatar.tag.html"); <UserProfile> <div class="container"> @@ -174,35 +174,38 @@ require("./components/LetterAvatar.tag.html"); </div> <div class="avatar column-content"> - <h3 class="c-heading"><i class="fa fa-sign-in"/> {__.avatar}</h3> + <h3 class="c-heading"><i class="fa fa-id-badge"/> {__.avatar}</h3> <div class="avatar-container"> - <div class="avatar-column" if="{user.avatar}"> - <img class="user-avatar" src="{resourceService.getPreviewUrl(user.avatar, true)}"/> - <button onclick="{deleteAvatar}" class="c-button u-small c-button--error"><i class="fa fa-trash"></i></button> + <div class="avatar-column"> + <Avatar class="user-avatar" avatar="{user.avatar}" name={user && user.name || ""} rounded="true"/> </div> - <LetterAvatar class="avatar-column user-avatar" name={user && user.name || ""} if="{!user.avatar}" rounded="true"/> <div class="form-column"> <div class="o-form-element"> <label class="c-label" for="avatar">{__.uploadAvatar}</label> - <span class="c-input-group"> - <input type="file" accept="image/*" class="c-field" ref="avatar" - onchange={onAvatarChange} /> - <button class="c-button" onclick="{uploadAvatar}" disabled="{!avatarFile}"><i class="fa fa-upload"></i></button> - </span> + <input type="file" accept="image/*" class="c-field -field--label" ref="avatar" onchange={onAvatarChange} /> </div> - <div class="align-center" if="{loginProviders.length > 0}"> - {__.getProviderAvatar} - <div> - <a each="{loginProvider in loginProviders}" class="provider-link" - onclick="{getProviderAvatar(loginProvider)}"> - <i class="fa fa-{authService.providerIcons[loginProvider]}" - if="{authService.providerIcons[loginProvider]}"></i> - <span if="{!authService.providerIcons[loginProvider]}">{loginProvider}</span> - </a> - </div> + <div class="actions-right"> + <button if="{user.avatar}" + onclick="{deleteAvatar}" + class="c-button c-button--error"><i class="fa fa-trash"></i> {__.deleteAvatar}</button> + <button class="c-button c-button--info" + onclick="{uploadAvatar}" + disabled="{!avatarFile}"><i class="fa fa-upload"></i> {__.uploadAvatar}</button> </div> </div> </div> + <div class="align-center" if="{loginProviders.length > 0}"> + {__.getProviderAvatar} + <div> + <a each="{loginProvider in loginProviders}" class="provider-link" + onclick="{getProviderAvatar(loginProvider)}"> + <i class="fa fa-{authService.providerIcons[loginProvider]}" + if="{authService.providerIcons[loginProvider]}"></i> + <span if="{!authService.providerIcons[loginProvider]}">{loginProvider}</span> + </a> + </div> + </div> + </div> </div> </div> </div> @@ -442,18 +445,14 @@ require("./components/LetterAvatar.tag.html"); .avatar-container { display: flex; flex-direction: row; + margin-bottom: 10px; } .avatar-column { - display: flex; - flex-direction: column; - margin: 20px 20px 0 0; - } - - .user-avatar { width: 100px; height: 100px; font-size: 3em; + margin: 20px 20px 0 0; } .form-column { -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.