Commit 6fb40798 by Anton Sudak

Fix styles for user dashboard

parent cc3da853
Pipeline #12492 passed with stages
in 21 minutes 11 seconds
......@@ -8,37 +8,38 @@
)
@main(page) {
<div class="spacer spacer-xs"></div>
<div class="row section">
<div class="col-md-3">
@views.html.account.partials.sidebar.render(user)
</div>
<div class="col-md-6">
<h3>
<i class="glyphicon glyphicon-user"></i>
@Messages("account.dashboard.details.profile.title")
</h3>
<div class="row">
<div class="col-md-12">
<p>
<a class="pull-right" href="@ch.insign.cms.controllers.routes.AuthController.logout(request.path)">
<span> <i class="glyphicon glyphicon-log-out"></i> @Messages("account.dashboard.details.profile.logout")</span>
</a>
<strong>@user.getFirstName @user.getLastName<br></strong>
</p>
<p>
@Messages("user.register.email"): <span>@user.getEmail</span>
</p>
@if(user.getPhone != null && !user.getPhone.isEmpty){
<div class="container">
<div class="row">
<div class="col-md-3">
@views.html.account.partials.sidebar.render(user)
</div>
<div class="col-md-6">
<h3>
<i class="glyphicon glyphicon-user"></i>
@Messages("account.dashboard.details.profile.title")
</h3>
<div class="row">
<div class="col-md-12">
<p>
@Messages("user.register.phone"): <span>@user.getPhone</span>
<a class="pull-right" href="@ch.insign.cms.controllers.routes.AuthController.logout(request.path)">
<span> <i class="glyphicon glyphicon-log-out"></i> @Messages("account.dashboard.details.profile.logout")</span>
</a>
<strong>@user.getFirstName @user.getLastName<br></strong>
</p>
}
@if(user.getLanguage != null && !user.getLanguage.isEmpty) {
<p>
@Messages("user.register.language"): <span>@user.getLanguage</span>
@Messages("user.register.email"): <span>@user.getEmail</span>
</p>
}
@if(user.getPhone != null && !user.getPhone.isEmpty){
<p>
@Messages("user.register.phone"): <span>@user.getPhone</span>
</p>
}
@if(user.getLanguage != null && !user.getLanguage.isEmpty) {
<p>
@Messages("user.register.language"): <span>@user.getLanguage</span>
</p>
}
</div>
</div>
</div>
</div>
......
......@@ -8,39 +8,46 @@
@(page: StandalonePage, form: Form[EditPasswordForm], user: User)
@main(page) {
<div class="col-md-3">
@views.html.account.partials.sidebar.render(user)
</div>
<div class="col-md-6">
<div class="section-header">
<h3 class="section-title"> <i class="glyphicon glyphicon-lock"></i> @Messages("account.dashboard.editPassword")</h3>
<div class="spacer spacer-xs"></div>
</div>
@helper.form(controller.routes.AccountController.doEditPassword) {
<div class="container">
<div class="row">
<div class="col-md-3">
@views.html.account.partials.sidebar.render(user)
</div>
<div class="col-md-6">
<div class="section-header">
<h3 class="section-title">
<i class="glyphicon glyphicon-lock"></i> @Messages("account.dashboard.editPassword")
</h3>
<div class="spacer spacer-xs"></div>
</div>
@b3.password(
form("oldPassword"),
'_label -> Messages("account.dashboard.editPassword.old"),
'_required -> true
)
@helper.form(controller.routes.AccountController.doEditPassword) {
@b3.password(
form("oldPassword"),
'_label -> Messages("account.dashboard.editPassword.old"),
'_required -> true
)
@b3.password(
form("password"),
'_label -> Messages("user.register.password"),
'_required -> true,
'_help -> Messages("auth.login.password.pattern.help")
)
@b3.password(
form("password"),
'_label -> Messages("user.register.password"),
'_required -> true,
'_help -> Messages("auth.login.password.pattern.help")
)
@b3.password(
form("passwordRepeat"),
'_label -> Messages("user.register.passwordRepeat"),
'_required -> true
)
@b3.password(
form("passwordRepeat"),
'_label -> Messages("user.register.passwordRepeat"),
'_required -> true
)
<div class="form-group">
<button type="submit" class="btn btn-primary" >@Messages("account.dashboard.editPassword.submit")</button>
<div class="form-group">
<button type="submit" class="btn btn-primary">
@Messages("account.dashboard.editPassword.submit")
</button>
</div>
}
</div>
}
</div>
</div>
</div>
}
......@@ -20,59 +20,65 @@
<script src="@_asset("javascripts/user-avatar-dropzone.js")"></script>
}
@main(page, "", footer) {
<div class="col-md-3">
@views.html.account.partials.sidebar.render(user)
</div>
<div class="col-md-6">
<div class="section-header">
<h3 class="section-title"> <i class="glyphicon glyphicon-cog"></i> @Messages("account.dashboard.editProfile")</h3>
<div class="spacer spacer-xs"></div>
</div>
@main(page, footer = footer) {
<div class="container">
<div class="row">
<div class="col-md-3">
@views.html.account.partials.sidebar.render(user)
</div>
<div class="col-md-6">
<div class="section-header">
<h3 class="section-title"> <i class="glyphicon glyphicon-cog"></i> @Messages("account.dashboard.editProfile")</h3>
<div class="spacer spacer-xs"></div>
</div>
@helper.form(controller.routes.AccountController.doEditProfile, 'autocomplete -> "off") {
@b3.radio(
form("gender"),
Seq(ISOGender.MALE, ISOGender.FEMALE).map(v => (v.name(), Messages("user.gender." + v.name()))),
'_inline -> true,
'_required -> true
)
@b3.text(
form("firstName"),
'_label -> Messages("user.register.firstName"),
'_required -> true
)
@b3.text(
form("lastName"),
'_label -> Messages("user.register.lastName"),
'_required -> true
)
@b3.email(
form("email"),
'_label -> Messages("user.register.email"),
'_required -> true
)
@b3.tel(
form("phone"),
'_label -> Messages("user.register.phone"),
'_maxlength -> "11"
)
@b3.select(
form("language"),
options = languages,
'_label -> Messages("user.register.language"),
'_default -> Messages("user.register.language.select")
)
@b3.password(
form("password"),
'_label -> Messages("account.dashboard.editProfile.password.enter"),
'_required -> true,
'_help -> Messages("account.dashboard.editProfile.password.help"),
'autocomplete -> "new-password"
)
<div class="form-group">
<button type="submit" class="btn btn-primary" >@Messages("account.dashboard.edit.submit")</button>
@helper.form(controller.routes.AccountController.doEditProfile, 'autocomplete -> "off") {
@b3.radio(
form("gender"),
Seq(ISOGender.MALE, ISOGender.FEMALE).map(v => (v.name(), Messages("user.gender." + v.name()))),
'_inline -> true,
'_required -> true
)
@b3.text(
form("firstName"),
'_label -> Messages("user.register.firstName"),
'_required -> true
)
@b3.text(
form("lastName"),
'_label -> Messages("user.register.lastName"),
'_required -> true
)
@b3.email(
form("email"),
'_label -> Messages("user.register.email"),
'_required -> true
)
@b3.tel(
form("phone"),
'_label -> Messages("user.register.phone"),
'_maxlength -> "11"
)
@b3.select(
form("language"),
options = languages,
'_label -> Messages("user.register.language"),
'_default -> Messages("user.register.language.select")
)
@b3.password(
form("password"),
'_label -> Messages("account.dashboard.editProfile.password.enter"),
'_required -> true,
'_help -> Messages("account.dashboard.editProfile.password.help"),
'autocomplete -> "new-password"
)
<div class="form-group">
<button type="submit" class="btn btn-primary">
@Messages("account.dashboard.edit.submit")
</button>
</div>
}
</div>
}
</div>
</div>
</div>
}
......@@ -52,30 +52,29 @@
</div>
<div class="profile-usermenu">
<ul class="nav">
<ul class="nav flex-column nav-pills">
@if((request.path.equals(controller.routes.AccountController.editProfile.toString)) && (!StringUtils.isBlank(user.getImage))) {
<li id="delete-avatar-image" style="display: inline">
<a href="@controller.routes.AccountController.deleteAvatarImage">
<button class="btn btn-default" id="delete-image-link" data-confirm-question="@Messages("account.dashboard.image.delete.confirmation")">
<i class="glyphicon glyphicon-trash"></i>
@Messages("account.dashboard.image.delete")
</button>
<a href="@controller.routes.AccountController.deleteAvatarImage" class="btn btn-default"
id="delete-image-link" data-confirm-question="@Messages("account.dashboard.image.delete.confirmation")">
<i class="glyphicon glyphicon-trash"></i>
@Messages("account.dashboard.image.delete")
</a>
<br/>
</li>
}
<li class="active">
<a href="@controller.routes.AccountController.dashboard">
<li class="nav-item">
<a href="@controller.routes.AccountController.dashboard" class="nav-link">
<i class="glyphicon glyphicon-user"></i>
@Messages("account.dashboard.overview") </a>
</li>
<li>
<a href="@controller.routes.AccountController.editProfile">
<li class="nav-item">
<a href="@controller.routes.AccountController.editProfile" class="nav-link">
<i class="glyphicon glyphicon-cog"></i>
@Messages("account.dashboard.editProfile") </a>
</li>
<li>
<a href="@controller.routes.AccountController.editPassword">
<li class="nav-item">
<a href="@controller.routes.AccountController.editPassword" class="nav-link">
<i class="glyphicon glyphicon-lock"></i>
@Messages("account.dashboard.editPassword") </a>
</li>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment