mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-17 06:52:27 +01:00
migrate profile edit to 'my parameters' tab and add public profile in dashboard
This commit is contained in:
parent
ff316f7bdd
commit
c499771433
@ -211,8 +211,8 @@ Application.Controllers.controller "EditProfileController", ["$scope", "$rootSco
|
||||
##
|
||||
# Controller used on the public user's profile page (seeing another user's profile)
|
||||
##
|
||||
Application.Controllers.controller "ShowProfileController", ["$scope", "$stateParams", 'Member', 'memberPromise', ($scope, $stateParams, Member, memberPromise) ->
|
||||
Application.Controllers.controller "ShowProfileController", ["$scope", 'memberPromise', ($scope, memberPromise) ->
|
||||
|
||||
## Selected user's profile (id from the current URL)
|
||||
## Selected user's informations
|
||||
$scope.user = memberPromise
|
||||
]
|
||||
|
@ -136,6 +136,16 @@ angular.module('application.router', ['ui.router']).
|
||||
views:
|
||||
'main@':
|
||||
templateUrl: '<%= asset_path "dashboard/profile.html" %>'
|
||||
controller: 'DashboardController'
|
||||
resolve:
|
||||
translations: [ 'Translations', (Translations) ->
|
||||
Translations.query(['app.logged.dashboard.profile']).$promise
|
||||
]
|
||||
.state 'app.logged.dashboard.settings',
|
||||
url: '/settings'
|
||||
views:
|
||||
'main@':
|
||||
templateUrl: '<%= asset_path "dashboard/settings.html" %>'
|
||||
controller: 'EditProfileController'
|
||||
resolve:
|
||||
groups: ['Group', (Group)->
|
||||
@ -145,7 +155,7 @@ angular.module('application.router', ['ui.router']).
|
||||
AuthProvider.active().$promise
|
||||
]
|
||||
translations: [ 'Translations', (Translations) ->
|
||||
Translations.query(['app.logged.dashboard.profile', 'app.shared.user']).$promise
|
||||
Translations.query(['app.logged.dashboard.settings', 'app.shared.user']).$promise
|
||||
]
|
||||
.state 'app.logged.dashboard.projects',
|
||||
url: '/projects'
|
||||
|
@ -11,6 +11,7 @@
|
||||
<h4 class="m-l text-sm" translate>{{ 'dashboard' }}</h4>
|
||||
<ul class="nav-page nav nav-pills text-u-c text-sm">
|
||||
<li ui-sref-active="active"><a class="text-black" href="#" ui-sref="app.logged.dashboard.profile" translate>{{ 'my_profile' }}</a></li>
|
||||
<li ui-sref-active="active"><a class="text-black" href="#" ui-sref="app.logged.dashboard.settings" translate>{{ 'my_settings' }}</a></li>
|
||||
<li ui-sref-active="active"><a class="text-black" href="#" ui-sref="app.logged.dashboard.projects" translate>{{ 'my_projects' }}</a></li>
|
||||
<li ui-sref-active="active"><a class="text-black" href="#" ui-sref="app.logged.dashboard.trainings" translate>{{ 'my_trainings' }}</a></li>
|
||||
<li ui-sref-active="active"><a class="text-black" href="#" ui-sref="app.logged.dashboard.events" translate>{{ 'my_courses_and_workshops' }}</a></li>
|
||||
|
@ -1,125 +1,16 @@
|
||||
<div>
|
||||
|
||||
<ng-include src="'<%= asset_path 'dashboard/nav.html' %>'"></ng-include>
|
||||
|
||||
|
||||
|
||||
<div class="row no-gutter wrapper">
|
||||
<div class="col-sm-12 col-md-12 col-lg-3">
|
||||
<div class="widget panel b-a m m-t-lg">
|
||||
<div class="panel-heading b-b small text-center">
|
||||
<span class="avatar ">
|
||||
<fab-user-avatar ng-model="user.profile.user_avatar" avatar-class="thumb-50">test</fab-user-avatar>
|
||||
</span>
|
||||
<div class="font-sbold m-t-sm">{{user.name}}</div>
|
||||
<div>{{user.email}}</div>
|
||||
<div class="text-xs" ng-if="user.last_sign_in_at"><i>{{ 'last_activity_on_' | translate }} {{user.last_sign_in_at | amDateFormat: 'LL'}}</i></div>
|
||||
</div>
|
||||
<div class="widget-content no-bg b-b auto wrapper">
|
||||
<div class="m-b-md">
|
||||
<h3 class="text-u-c" translate>{{ 'group' }}</h3>
|
||||
<div ng-show="!group.change">
|
||||
<uib-alert type="warning">
|
||||
<span class="text-black font-sbold">{{getUserGroup().name}}</span>
|
||||
</uib-alert>
|
||||
<button class="btn text-black btn-warning-full btn-sm m-t-n-sm" ng-click="group.change = !group.change" ng-show="!user.subscribed_plan.name" translate>{{ 'i_want_to_change_group' }}</button>
|
||||
</div>
|
||||
<div ng-show="group.change">
|
||||
<select class="form-control" ng-options="g.id as g.name for g in groups" ng-model="userGroup"></select>
|
||||
<button class="btn btn-success m-t" ng-click="selectGroup()">Changer mon groupe</button>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-hide="fablabWithoutPlans">
|
||||
<h3 class="text-u-c" translate>{{ 'subscription' }}</h3>
|
||||
<div ng-show="user.subscribed_plan">
|
||||
<uib-alert type="warning">
|
||||
<span class="text-black font-sbold">{{ user.subscribed_plan | humanReadablePlanName }}</span>
|
||||
<div class="font-sbold" ng-if="user.subscription">{{ 'your_subscription_expires_on_' | translate }} {{user.subscription.expired_at | amDateFormat: 'LL'}}</div>
|
||||
</uib-alert>
|
||||
|
||||
</div>
|
||||
<div ng-show="!user.subscribed_plan.name">{{ 'no_subscriptions' | translate }} <br><a class="btn text-black btn-warning-full btn-sm m-t-xs" ui-sref="app.public.plans" translate>{{ 'i_want_to_subscribe' }}</a></div>
|
||||
</div>
|
||||
|
||||
<div class="m-t">
|
||||
<h3 class="text-u-c" translate>{{ 'trainings' }}</h3>
|
||||
<ul class="list-unstyled" ng-if="user.training_reservations.length > 0 || user.trainings.length > 0">
|
||||
<li ng-repeat="r in user.training_reservations | trainingReservationsFilter:'future'">
|
||||
{{r.reservable.name}} - {{ 'to_come' | translate }}
|
||||
</li>
|
||||
<li ng-repeat="t in user.trainings">
|
||||
{{t.name}} - {{ 'approved' | translate }}
|
||||
</li>
|
||||
</ul>
|
||||
<div ng-if="user.training_reservations.length == 0 && user.trainings.length == 0" translate>{{ 'no_trainings' }}</div>
|
||||
</div>
|
||||
|
||||
<div class="m-t">
|
||||
<h3 class="text-u-c" translate>{{ 'projects' }}</h3>
|
||||
<ul class="list-unstyled" ng-if="user.all_projects.length > 0">
|
||||
<li ng-repeat="p in user.all_projects">
|
||||
{{p.name}}
|
||||
</li>
|
||||
</ul>
|
||||
<div ng-if="user.all_projects.length == 0" translate>{{ 'no_projects' }}</div>
|
||||
</div>
|
||||
|
||||
<div class="m-t">
|
||||
<h3 class="text-u-c" translate>{{ 'labels' }}</h3>
|
||||
<span ng-if="user.tags.length > 0" ng-repeat="t in user.tags">
|
||||
<span class='label label-success text-white'>{{t.name}}</span>
|
||||
</span>
|
||||
<div ng-if="user.tags.length == 0" translate>{{ 'no_labels' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="widget-content no-bg text-center auto wrapper">
|
||||
<button class="btn text-white btn-danger btn-sm" ng-click="deleteUser(user)"><i class="fa fa-warning"></i> {{ 'delete_my_account' | translate }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="heading">
|
||||
<div class="row no-gutter">
|
||||
<ng-include src="'<%= asset_path 'dashboard/nav.html' %>'"></ng-include>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-12 col-lg-9">
|
||||
<div class="widget panel b-a m m-t-lg">
|
||||
<div class="panel-heading b-b">
|
||||
<h1 class="red text-u-c" translate>{{ 'edit_my_profile' }}</h1>
|
||||
</div>
|
||||
<form role="form" name="userForm" class="form-horizontal" novalidate action="{{ actionUrl }}" ng-upload="submited(content)" upload-options-enable-rails-csrf="true">
|
||||
<div class="widget-content no-bg auto">
|
||||
<section class="panel panel-default bg-light m p-lg row" ng-if="hasSsoFields()">
|
||||
<div class="panel-heading">
|
||||
<h2>
|
||||
<img class="v-middle" height="16" width="16" src='https://www.google.com/s2/favicons?domain={{activeProvider.domain}}' />
|
||||
<span class="v-middle">{{activeProvider.name}}</span>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="panel-body row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
|
||||
<a class="btn btn-default" ng-href="{{activeProvider.link_to_sso_profile}}" target="_blank">
|
||||
<i class="fa fa-edit"></i> {{ 'change_my_data' | translate }}
|
||||
</a>
|
||||
<p>{{ 'once_your_data_are_up_to_date_' | translate }} <strong translate>{{ '_click_on_the_synchronization_button_opposite_' }}</strong> {{ 'or' | translate}} <strong translate>{{ '_disconnect_then_reconnect_' }}</strong> {{ '_for_your_changes_to_take_effect' | translate }}</p>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
|
||||
<a class="btn btn-default" ng-click="syncProfile()">
|
||||
<i class="fa fa-refresh"></i> {{ 'sync_my_profile' | translate }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="panel panel-default bg-light m">
|
||||
<div class="panel-body m-r">
|
||||
<ng-include src="'<%= asset_path 'shared/_member_form.html' %>'"></ng-include>
|
||||
</div> <!-- ./panel-body -->
|
||||
</section>
|
||||
</div>
|
||||
<div class="panel-footer no-padder">
|
||||
<input type="submit" value="{{ 'confirm_changes' | translate }}" class="r-b btn-valid btn btn-warning btn-block p-lg btn-lg text-u-c" ng-disabled="userForm.$invalid"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<div class="row no-gutter">
|
||||
<div class="col-md-12 m m-t-lg">
|
||||
<ng-include src="'<%= asset_path 'shared/publicProfile.html' %>'"></ng-include>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
125
app/assets/templates/dashboard/settings.html.erb
Normal file
125
app/assets/templates/dashboard/settings.html.erb
Normal file
@ -0,0 +1,125 @@
|
||||
<div>
|
||||
|
||||
<ng-include src="'<%= asset_path 'dashboard/nav.html' %>'"></ng-include>
|
||||
|
||||
|
||||
|
||||
<div class="row no-gutter wrapper">
|
||||
<div class="col-sm-12 col-md-12 col-lg-3">
|
||||
<div class="widget panel b-a m m-t-lg">
|
||||
<div class="panel-heading b-b small text-center">
|
||||
<span class="avatar ">
|
||||
<fab-user-avatar ng-model="user.profile.user_avatar" avatar-class="thumb-50">test</fab-user-avatar>
|
||||
</span>
|
||||
<div class="font-sbold m-t-sm">{{user.name}}</div>
|
||||
<div>{{user.email}}</div>
|
||||
<div class="text-xs" ng-if="user.last_sign_in_at"><i>{{ 'last_activity_on_' | translate }} {{user.last_sign_in_at | amDateFormat: 'LL'}}</i></div>
|
||||
</div>
|
||||
<div class="widget-content no-bg b-b auto wrapper">
|
||||
<div class="m-b-md">
|
||||
<h3 class="text-u-c" translate>{{ 'group' }}</h3>
|
||||
<div ng-show="!group.change">
|
||||
<uib-alert type="warning">
|
||||
<span class="text-black font-sbold">{{getUserGroup().name}}</span>
|
||||
</uib-alert>
|
||||
<button class="btn text-black btn-warning-full btn-sm m-t-n-sm" ng-click="group.change = !group.change" ng-show="!user.subscribed_plan.name" translate>{{ 'i_want_to_change_group' }}</button>
|
||||
</div>
|
||||
<div ng-show="group.change">
|
||||
<select class="form-control" ng-options="g.id as g.name for g in groups" ng-model="userGroup"></select>
|
||||
<button class="btn btn-success m-t" ng-click="selectGroup()">Changer mon groupe</button>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-hide="fablabWithoutPlans">
|
||||
<h3 class="text-u-c" translate>{{ 'subscription' }}</h3>
|
||||
<div ng-show="user.subscribed_plan">
|
||||
<uib-alert type="warning">
|
||||
<span class="text-black font-sbold">{{ user.subscribed_plan | humanReadablePlanName }}</span>
|
||||
<div class="font-sbold" ng-if="user.subscription">{{ 'your_subscription_expires_on_' | translate }} {{user.subscription.expired_at | amDateFormat: 'LL'}}</div>
|
||||
</uib-alert>
|
||||
|
||||
</div>
|
||||
<div ng-show="!user.subscribed_plan.name">{{ 'no_subscriptions' | translate }} <br><a class="btn text-black btn-warning-full btn-sm m-t-xs" ui-sref="app.public.plans" translate>{{ 'i_want_to_subscribe' }}</a></div>
|
||||
</div>
|
||||
|
||||
<div class="m-t">
|
||||
<h3 class="text-u-c" translate>{{ 'trainings' }}</h3>
|
||||
<ul class="list-unstyled" ng-if="user.training_reservations.length > 0 || user.trainings.length > 0">
|
||||
<li ng-repeat="r in user.training_reservations | trainingReservationsFilter:'future'">
|
||||
{{r.reservable.name}} - {{ 'to_come' | translate }}
|
||||
</li>
|
||||
<li ng-repeat="t in user.trainings">
|
||||
{{t.name}} - {{ 'approved' | translate }}
|
||||
</li>
|
||||
</ul>
|
||||
<div ng-if="user.training_reservations.length == 0 && user.trainings.length == 0" translate>{{ 'no_trainings' }}</div>
|
||||
</div>
|
||||
|
||||
<div class="m-t">
|
||||
<h3 class="text-u-c" translate>{{ 'projects' }}</h3>
|
||||
<ul class="list-unstyled" ng-if="user.all_projects.length > 0">
|
||||
<li ng-repeat="p in user.all_projects">
|
||||
{{p.name}}
|
||||
</li>
|
||||
</ul>
|
||||
<div ng-if="user.all_projects.length == 0" translate>{{ 'no_projects' }}</div>
|
||||
</div>
|
||||
|
||||
<div class="m-t">
|
||||
<h3 class="text-u-c" translate>{{ 'labels' }}</h3>
|
||||
<span ng-if="user.tags.length > 0" ng-repeat="t in user.tags">
|
||||
<span class='label label-success text-white'>{{t.name}}</span>
|
||||
</span>
|
||||
<div ng-if="user.tags.length == 0" translate>{{ 'no_labels' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="widget-content no-bg text-center auto wrapper">
|
||||
<button class="btn text-white btn-danger btn-sm" ng-click="deleteUser(user)"><i class="fa fa-warning"></i> {{ 'delete_my_account' | translate }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-12 col-lg-9">
|
||||
<div class="widget panel b-a m m-t-lg">
|
||||
<div class="panel-heading b-b">
|
||||
<h1 class="red text-u-c" translate>{{ 'edit_my_profile' }}</h1>
|
||||
</div>
|
||||
<form role="form" name="userForm" class="form-horizontal" novalidate action="{{ actionUrl }}" ng-upload="submited(content)" upload-options-enable-rails-csrf="true">
|
||||
<div class="widget-content no-bg auto">
|
||||
<section class="panel panel-default bg-light m p-lg row" ng-if="hasSsoFields()">
|
||||
<div class="panel-heading">
|
||||
<h2>
|
||||
<img class="v-middle" height="16" width="16" src='https://www.google.com/s2/favicons?domain={{activeProvider.domain}}' />
|
||||
<span class="v-middle">{{activeProvider.name}}</span>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="panel-body row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
|
||||
<a class="btn btn-default" ng-href="{{activeProvider.link_to_sso_profile}}" target="_blank">
|
||||
<i class="fa fa-edit"></i> {{ 'change_my_data' | translate }}
|
||||
</a>
|
||||
<p>{{ 'once_your_data_are_up_to_date_' | translate }} <strong translate>{{ '_click_on_the_synchronization_button_opposite_' }}</strong> {{ 'or' | translate}} <strong translate>{{ '_disconnect_then_reconnect_' }}</strong> {{ '_for_your_changes_to_take_effect' | translate }}</p>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
|
||||
<a class="btn btn-default" ng-click="syncProfile()">
|
||||
<i class="fa fa-refresh"></i> {{ 'sync_my_profile' | translate }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="panel panel-default bg-light m">
|
||||
<div class="panel-body m-r">
|
||||
<ng-include src="'<%= asset_path 'shared/_member_form.html' %>'"></ng-include>
|
||||
</div> <!-- ./panel-body -->
|
||||
</section>
|
||||
</div>
|
||||
<div class="panel-footer no-padder">
|
||||
<input type="submit" value="{{ 'confirm_changes' | translate }}" class="r-b btn-valid btn btn-warning btn-block p-lg btn-lg text-u-c" ng-disabled="userForm.$invalid"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
@ -21,97 +21,5 @@
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<div class="row no-gutter wrapper">
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
|
||||
|
||||
|
||||
<div class="wrapper">
|
||||
<section class="widget panel no-border bg-black-light text-white lt">
|
||||
<div class="panel-body">
|
||||
<div class="row m-t-xl">
|
||||
<div class="col-xs-3 text-right padder-v">
|
||||
<!-- <a href="#" class="btn btn-primary btn-icon btn-rounded m-t-xl"><i class="fa fa-flag"></i></a> -->
|
||||
</div>
|
||||
<div class="col-xs-6 text-center">
|
||||
<div class="inline">
|
||||
<div class="easypiechart easyPieChart" data-percent="75" data-line-width="6" data-bar-color="#fff" data-track-color="#2796de" data-scale-color="false" data-size="140" data-line-cap="butt" data-animate="1000" style="width: 140px; height: 140px; line-height: 140px;">
|
||||
<div class="thumb-lg avatar thumb-128-wrapper img">
|
||||
<fab-user-avatar ng-model="user.profile.user_avatar" avatar-class="thumb-140"></fab-user-avatar>
|
||||
</div>
|
||||
<canvas width="140" height="140"></canvas></div>
|
||||
<div class="h4 m-t m-b-xs font-bold text-lt text-white">{{user.name}}</div>
|
||||
<small class="text-muted m-b">{{user.username}}</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-3 padder-v">
|
||||
<!-- <a href="#" class="btn btn-primary btn-icon btn-rounded m-t-xl" data-toggle="class:btn-danger">
|
||||
<i class="i i-phone text"></i>
|
||||
<i class="i i-phone2 text-active"></i>
|
||||
</a> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="wrapper m-t-xl m-b">
|
||||
<div class="row m-b">
|
||||
<div class="col-xs-6 text-right">
|
||||
<small translate>{{ 'last_activity_' }}</small>
|
||||
<div class="text-lt font-bold" ng-if="user.last_sign_in_at">{{ '_on_' | translate }} {{user.last_sign_in_at | amDateFormat: 'LL'}}</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<small translate>{{ 'email_address' }}</small>
|
||||
<div class="text-lt font-bold break-word">{{user.email}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 text-right">
|
||||
<small translate>{{ 'CAD_softwares_mastered' }}</small>
|
||||
<div class="text-lt font-bold">{{user.profile.software_mastered}}</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<small translate>{{ 'interests' }}</small>
|
||||
<div class="text-lt font-bold">{{user.profile.interest}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="widget panel b-a m ">
|
||||
<div class="panel-heading b-b">
|
||||
<h1 class="red text-u-c" translate>{{ 'trainings' }}</h1>
|
||||
<!-- <h3 class="text-u-c">Formations</h3> -->
|
||||
<ul class="list-unstyled" ng-if="user.training_reservations.length > 0 || user.trainings.length > 0">
|
||||
<li ng-repeat="r in user.training_reservations | trainingReservationsFilter:'future'">
|
||||
{{r.reservable.name}} - <span class="label label-info text-white" translate>{{ 'to_come' }}</span>
|
||||
</li>
|
||||
<li ng-repeat="t in user.trainings">
|
||||
{{t.name}} - <span class="label label-success text-white" translate>{{ 'approved' }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
<div ng-if="user.training_reservations.length == 0 && user.trainings.length == 0" translate>{{ 'no_trainings' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="widget panel b-a m ">
|
||||
<div class="panel-heading b-b">
|
||||
<h1 class="red text-u-c" translate>{{ 'projects' }}</h1>
|
||||
<ul class="list-unstyled" ng-if="user.all_projects.length > 0">
|
||||
<li ng-repeat="p in user.all_projects" class="m-t-sm">
|
||||
<a class="text-u-c" ui-sref="app.public.projects_show({id:p.slug})" role="button">{{p.name}} <span class="m-l-sm label label-success text-white">{{p.author_id == currentUser.id ? 'author' : 'collaborator' | translate}}</span></a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<div ng-if="user.all_projects.length == 0" translate>{{ 'no_projects' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<ng-include src="'<%= asset_path 'shared/publicProfile.html' %>'"></ng-include>
|
||||
</div>
|
||||
|
@ -35,6 +35,7 @@
|
||||
</a>
|
||||
<ul class="uib-dropdown-menu animated fadeInRight">
|
||||
<li><a href="#" ui-sref="app.logged.dashboard.profile" translate>{{ 'my_profile' }}</a></li>
|
||||
<li><a href="#" ui-sref="app.logged.dashboard.settings" translate>{{ 'my_settings' }}</a></li>
|
||||
<li><a href="#" ui-sref="app.logged.dashboard.projects" translate>{{ 'my_projects' }}</a></li>
|
||||
<li><a href="#" ui-sref="app.logged.dashboard.trainings" translate>{{ 'my_trainings' }}</a></li>
|
||||
<li><a href="#" ui-sref="app.logged.dashboard.events" translate>{{ 'my_courses_and_workshops' }}</a></li>
|
||||
|
@ -32,8 +32,13 @@
|
||||
</a>
|
||||
</li>
|
||||
<li class="hidden-sm hidden-md hidden-lg" >
|
||||
<a href="#" ui-sref="app.logged.dashboard.profile">
|
||||
<i class="fa fa-user"></i> <span translate>{{ 'my_profile' }}</span>
|
||||
<a href="#" ui-sref="app.logged.dashboard.profile">
|
||||
<i class="fa fa-user"></i> <span translate>{{ 'my_profile' }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="hidden-sm hidden-md hidden-lg" >
|
||||
<a href="#" ui-sref="app.logged.dashboard.settings">
|
||||
<i class="fa fa-user"></i> <span translate>{{ 'my_settings' }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="hidden-sm hidden-md hidden-lg">
|
||||
|
91
app/assets/templates/shared/publicProfile.html.erb
Normal file
91
app/assets/templates/shared/publicProfile.html.erb
Normal file
@ -0,0 +1,91 @@
|
||||
<div class="row no-gutter wrapper">
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
|
||||
|
||||
|
||||
<div class="wrapper">
|
||||
<section class="widget panel no-border bg-black-light text-white lt">
|
||||
<div class="panel-body">
|
||||
<div class="row m-t-xl">
|
||||
<div class="col-xs-3 text-right padder-v">
|
||||
<!-- <a href="#" class="btn btn-primary btn-icon btn-rounded m-t-xl"><i class="fa fa-flag"></i></a> -->
|
||||
</div>
|
||||
<div class="col-xs-6 text-center">
|
||||
<div class="inline">
|
||||
<div class="easypiechart easyPieChart" data-percent="75" data-line-width="6" data-bar-color="#fff" data-track-color="#2796de" data-scale-color="false" data-size="140" data-line-cap="butt" data-animate="1000" style="width: 140px; height: 140px; line-height: 140px;">
|
||||
<div class="thumb-lg avatar thumb-128-wrapper img">
|
||||
<fab-user-avatar ng-model="user.profile.user_avatar" avatar-class="thumb-140"></fab-user-avatar>
|
||||
</div>
|
||||
<canvas width="140" height="140"></canvas></div>
|
||||
<div class="h4 m-t m-b-xs font-bold text-lt text-white">{{user.name}}</div>
|
||||
<small class="text-muted m-b">{{user.username}}</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-3 padder-v">
|
||||
<!-- <a href="#" class="btn btn-primary btn-icon btn-rounded m-t-xl" data-toggle="class:btn-danger">
|
||||
<i class="i i-phone text"></i>
|
||||
<i class="i i-phone2 text-active"></i>
|
||||
</a> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="wrapper m-t-xl m-b">
|
||||
<div class="row m-b">
|
||||
<div class="col-xs-6 text-right">
|
||||
<small translate>{{ 'last_activity_' }}</small>
|
||||
<div class="text-lt font-bold" ng-if="user.last_sign_in_at">{{ '_on_' | translate }} {{user.last_sign_in_at | amDateFormat: 'LL'}}</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<small translate>{{ 'email_address' }}</small>
|
||||
<div class="text-lt font-bold break-word">{{user.email}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 text-right">
|
||||
<small translate>{{ 'CAD_softwares_mastered' }}</small>
|
||||
<div class="text-lt font-bold">{{user.profile.software_mastered}}</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<small translate>{{ 'interests' }}</small>
|
||||
<div class="text-lt font-bold">{{user.profile.interest}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="widget panel b-a m ">
|
||||
<div class="panel-heading b-b">
|
||||
<h1 class="red text-u-c" translate>{{ 'trainings' }}</h1>
|
||||
<!-- <h3 class="text-u-c">Formations</h3> -->
|
||||
<ul class="list-unstyled" ng-if="user.training_reservations.length > 0 || user.trainings.length > 0">
|
||||
<li ng-repeat="r in user.training_reservations | trainingReservationsFilter:'future'">
|
||||
{{r.reservable.name}} - <span class="label label-info text-white" translate>{{ 'to_come' }}</span>
|
||||
</li>
|
||||
<li ng-repeat="t in user.trainings">
|
||||
{{t.name}} - <span class="label label-success text-white" translate>{{ 'approved' }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
<div ng-if="user.training_reservations.length == 0 && user.trainings.length == 0" translate>{{ 'no_trainings' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="widget panel b-a m ">
|
||||
<div class="panel-heading b-b">
|
||||
<h1 class="red text-u-c" translate>{{ 'projects' }}</h1>
|
||||
<ul class="list-unstyled" ng-if="user.all_projects.length > 0">
|
||||
<li ng-repeat="p in user.all_projects" class="m-t-sm">
|
||||
<a class="text-u-c" ui-sref="app.public.projects_show({id:p.slug})" role="button">{{p.name}} <span class="m-l-sm label label-success text-white">{{p.author_id == currentUser.id ? 'author' : 'collaborator' | translate}}</span></a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<div ng-if="user.all_projects.length == 0" translate>{{ 'no_projects' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
@ -23,8 +23,11 @@ en:
|
||||
an_unexpected_error_occurred_check_your_authentication_code: "An unexpected error occurred, please check your authentication code."
|
||||
|
||||
dashboard:
|
||||
# dashboard: public profile
|
||||
profile:
|
||||
# dashboard: my profile
|
||||
empty: ''
|
||||
settings:
|
||||
# dashboard: edit my profile
|
||||
last_activity_on_: "Last activity on"
|
||||
i_want_to_change_group: "I want to change group!"
|
||||
your_subscription_expires_on_: "Your subscription expires on"
|
||||
|
@ -23,8 +23,11 @@ fr:
|
||||
an_unexpected_error_occurred_check_your_authentication_code: "Une erreur inattendue est survenue, vérifiez votre code d'authentification."
|
||||
|
||||
dashboard:
|
||||
# tableau de bord: profile publique
|
||||
profile:
|
||||
# tableau de bord : mon profil
|
||||
empty: ''
|
||||
settings:
|
||||
# tableau de bord : éditer mon profil
|
||||
last_activity_on_: "Dernière activité le"
|
||||
i_want_to_change_group: "Je veux changer de groupe !"
|
||||
your_subscription_expires_on_: "Votre abonnement expire le"
|
||||
|
@ -9,6 +9,7 @@ en:
|
||||
# dashboard sections
|
||||
dashboard: "Dashboard"
|
||||
my_profile: "My Profile"
|
||||
my_settings: "My Settings"
|
||||
my_projects: "My Projects"
|
||||
my_trainings: "My Trainings"
|
||||
my_courses_and_workshops: "My Courses and Workshops"
|
||||
|
@ -9,6 +9,7 @@ fr:
|
||||
# sections du tableau de bord
|
||||
dashboard: "Tableau de bord"
|
||||
my_profile: "Mon profil"
|
||||
my_settings: "Mes paramètres"
|
||||
my_projects: "Mes projets"
|
||||
my_trainings: "Mes formations"
|
||||
my_courses_and_workshops: "Mes stages et ateliers"
|
||||
|
Loading…
x
Reference in New Issue
Block a user