2016-05-12 13:53:59 +02:00
|
|
|
<div>
|
|
|
|
|
2019-12-16 16:54:40 +01:00
|
|
|
<ng-include src="'<%= asset_path "dashboard/nav.html" %>'"></ng-include>
|
2016-05-12 13:53:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<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>
|
2019-12-16 16:54:40 +01:00
|
|
|
<div class="text-xs" ng-show="user.last_sign_in_at"><i>{{ 'app.logged.dashboard.settings.last_activity_on_' | translate:{DATE:(user.last_sign_in_at | amDateFormat: 'LL')} }}</i></div>
|
2016-05-12 13:53:59 +02:00
|
|
|
</div>
|
|
|
|
<div class="widget-content no-bg b-b auto wrapper">
|
|
|
|
<div class="m-b-md">
|
2019-12-16 16:54:40 +01:00
|
|
|
<h3 class="text-u-c" translate>{{ 'app.logged.dashboard.settings.group' }}</h3>
|
2019-06-13 12:52:56 +02:00
|
|
|
<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-hide="user.subscribed_plan.name || user.role === 'admin'"
|
|
|
|
translate>
|
2019-12-16 16:54:40 +01:00
|
|
|
{{ 'app.logged.dashboard.settings.i_want_to_change_group' }}
|
2019-06-13 12:52:56 +02:00
|
|
|
</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>
|
2016-05-12 13:53:59 +02:00
|
|
|
</div>
|
|
|
|
<div ng-hide="fablabWithoutPlans">
|
2019-12-16 16:54:40 +01:00
|
|
|
<h3 class="text-u-c" translate>{{ 'app.logged.dashboard.settings.subscription' }}</h3>
|
2019-06-13 12:52:56 +02:00
|
|
|
<div ng-show="user.subscribed_plan">
|
|
|
|
<uib-alert type="warning">
|
|
|
|
<span class="text-black font-sbold">{{ user.subscribed_plan | humanReadablePlanName }}</span>
|
2019-12-16 16:54:40 +01:00
|
|
|
<div class="font-sbold" ng-if="user.subscription">{{ 'app.logged.dashboard.settings.your_subscription_expires_on_' | translate }} {{user.subscription.expired_at | amDateFormat: 'LL'}}</div>
|
2019-06-13 12:52:56 +02:00
|
|
|
</uib-alert>
|
2016-05-12 13:53:59 +02:00
|
|
|
|
2019-06-13 12:52:56 +02:00
|
|
|
</div>
|
2019-12-16 16:54:40 +01:00
|
|
|
<div ng-show="!user.subscribed_plan.name">{{ 'app.logged.dashboard.settings.no_subscriptions' | translate }} <br><a class="btn text-black btn-warning-full btn-sm m-t-xs" ui-sref="app.public.plans" translate>{{ 'app.logged.dashboard.settings.i_want_to_subscribe' }}</a></div>
|
2016-05-12 13:53:59 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="m-t">
|
2019-12-16 16:54:40 +01:00
|
|
|
<h3 class="text-u-c" translate>{{ 'app.logged.dashboard.settings.trainings' }}</h3>
|
2019-06-13 12:52:56 +02:00
|
|
|
<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'">
|
2019-12-16 16:54:40 +01:00
|
|
|
{{r.reservable.name}} - {{ 'app.logged.dashboard.settings.to_come' | translate }}
|
2019-06-13 12:52:56 +02:00
|
|
|
</li>
|
|
|
|
<li ng-repeat="t in user.trainings">
|
2019-12-16 16:54:40 +01:00
|
|
|
{{t.name}} - {{ 'app.logged.dashboard.settings.approved' | translate }}
|
2019-06-13 12:52:56 +02:00
|
|
|
</li>
|
|
|
|
</ul>
|
2019-12-16 16:54:40 +01:00
|
|
|
<div ng-if="user.training_reservations.length == 0 && user.trainings.length == 0" translate>{{ 'app.logged.dashboard.settings.no_trainings' }}</div>
|
2016-05-12 13:53:59 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="m-t">
|
2019-12-16 16:54:40 +01:00
|
|
|
<h3 class="text-u-c" translate>{{ 'app.logged.dashboard.settings.projects' }}</h3>
|
2019-06-13 12:52:56 +02:00
|
|
|
<ul class="list-unstyled" ng-if="user.all_projects.length > 0">
|
|
|
|
<li ng-repeat="p in user.all_projects">
|
|
|
|
{{p.name}}
|
|
|
|
</li>
|
|
|
|
</ul>
|
2019-12-16 16:54:40 +01:00
|
|
|
<div ng-if="user.all_projects.length == 0" translate>{{ 'app.logged.dashboard.settings.no_projects' }}</div>
|
2016-05-12 13:53:59 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="m-t">
|
2019-12-16 16:54:40 +01:00
|
|
|
<h3 class="text-u-c" translate>{{ 'app.logged.dashboard.settings.labels' }}</h3>
|
2019-06-13 12:52:56 +02:00
|
|
|
<span ng-if="user.tags.length > 0" ng-repeat="t in user.tags">
|
|
|
|
<span class='label label-success text-white'>{{t.name}}</span>
|
|
|
|
</span>
|
2019-12-16 16:54:40 +01:00
|
|
|
<div ng-if="user.tags.length == 0" translate>{{ 'app.logged.dashboard.settings.no_labels' }}</div>
|
2016-05-12 13:53:59 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-06-13 12:52:56 +02:00
|
|
|
<div class="widget-content no-bg b-b auto wrapper">
|
2019-12-16 16:54:40 +01:00
|
|
|
<h3 class="text-u-c" translate>{{ 'app.logged.dashboard.settings.cookies' }}</h3>
|
|
|
|
<div ng-show="cookiesStatus === 'accept'" translate>{{ 'app.logged.dashboard.settings.cookies_accepted' }}</div>
|
|
|
|
<div ng-show="cookiesStatus === 'decline'" translate>{{ 'app.logged.dashboard.settings.cookies_declined' }}</div>
|
|
|
|
<div ng-hide="cookiesStatus" translate>{{ 'app.logged.dashboard.settings.cookies_unset' }}</div>
|
|
|
|
<button ng-click="resetCookies()" ng-show="cookiesStatus" class="btn text-black btn-warning-full btn-sm m-t-xs" translate>{{ 'app.logged.dashboard.settings.reset_cookies' }}</button>
|
2019-06-13 12:52:56 +02:00
|
|
|
</div>
|
2019-06-17 11:12:05 +02:00
|
|
|
<div class="widget-content no-bg text-center auto wrapper" ng-hide="isSuperAdmin">
|
2019-12-16 16:54:40 +01:00
|
|
|
<button class="btn text-white btn-danger btn-sm" ng-click="deleteUser(user)"><i class="fa fa-warning m-r-xs"></i> {{ 'app.logged.dashboard.settings.delete_my_account' | translate }}</button>
|
2016-05-12 13:53:59 +02:00
|
|
|
</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">
|
2019-12-16 16:54:40 +01:00
|
|
|
<h1 class="red text-u-c" translate>{{ 'app.logged.dashboard.settings.edit_my_profile' }}</h1>
|
2016-05-12 13:53:59 +02:00
|
|
|
</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">
|
2019-12-16 16:54:40 +01:00
|
|
|
<i class="fa fa-edit"></i> {{ 'app.logged.dashboard.settings.change_my_data' | translate }}
|
2016-05-12 13:53:59 +02:00
|
|
|
</a>
|
2019-12-16 16:54:40 +01:00
|
|
|
<p>{{ 'app.logged.dashboard.settings.once_your_data_are_up_to_date_' | translate }} <strong translate>{{ 'app.logged.dashboard.settings._click_on_the_synchronization_button_opposite_' }}</strong> {{ 'app.logged.dashboard.settings.or' | translate}} <strong translate>{{ 'app.logged.dashboard.settings._disconnect_then_reconnect_' }}</strong> {{ 'app.logged.dashboard.settings._for_your_changes_to_take_effect' | translate }}</p>
|
2016-05-12 13:53:59 +02:00
|
|
|
</div>
|
|
|
|
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
|
|
|
|
<a class="btn btn-default" ng-click="syncProfile()">
|
2019-12-16 16:54:40 +01:00
|
|
|
<i class="fa fa-refresh"></i> {{ 'app.logged.dashboard.settings.sync_my_profile' | translate }}
|
2016-05-12 13:53:59 +02:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
<section class="panel panel-default bg-light m">
|
|
|
|
<div class="panel-body m-r">
|
2019-12-16 16:54:40 +01:00
|
|
|
<ng-include src="'<%= asset_path "shared/_member_form.html" %>'"></ng-include>
|
2016-05-12 13:53:59 +02:00
|
|
|
</div> <!-- ./panel-body -->
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
<div class="panel-footer no-padder">
|
2019-12-16 16:54:40 +01:00
|
|
|
<input type="submit" value="{{ 'app.logged.dashboard.settings.confirm_changes' | translate }}" class="r-b btn-valid btn btn-warning btn-block p-lg btn-lg text-u-c" ng-disabled="userForm.$invalid"/>
|
2016-05-12 13:53:59 +02:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|