2016-02-12 23:52:43 +08:00
|
|
|
<% provide(:head_title, t("users.registrations.edit.head_title")) %>
|
2018-05-08 22:33:42 +08:00
|
|
|
<% provide(:container_class, "no-second-nav-container") %>
|
2016-02-12 23:52:43 +08:00
|
|
|
|
2018-04-05 22:30:02 +08:00
|
|
|
<%= render partial: "users/settings/sidebar" %>
|
2016-02-12 23:52:43 +08:00
|
|
|
|
2020-07-07 21:59:02 +08:00
|
|
|
<div class="content-pane active flexible user-settings">
|
|
|
|
<div class="content-header">
|
|
|
|
<h1><%=t "users.registrations.edit.title" %></h1>
|
|
|
|
</div>
|
|
|
|
<div class="row settings-row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<% if not resource.errors.empty? %>
|
|
|
|
<div class="alert alert-danger">
|
|
|
|
<%= devise_error_messages! %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<div class="row">
|
2020-11-25 17:43:59 +08:00
|
|
|
<div class="col-md-2">
|
2020-07-07 21:59:02 +08:00
|
|
|
<%= render partial: 'users/registrations/edit_partials/avatar' %>
|
|
|
|
</div>
|
2020-11-25 17:43:59 +08:00
|
|
|
<div class="col-md-10">
|
2020-07-07 21:59:02 +08:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-6">
|
|
|
|
<%= render partial: 'users/registrations/edit_partials/full_name' %>
|
|
|
|
<%= render partial: 'users/registrations/edit_partials/initials' %>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
|
|
<%= render partial: 'users/registrations/edit_partials/email' %>
|
|
|
|
<%= render partial: 'users/registrations/edit_partials/password' %>
|
2017-02-09 18:34:52 +08:00
|
|
|
</div>
|
2016-10-27 19:23:14 +08:00
|
|
|
</div>
|
2016-02-12 23:52:43 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-07-07 21:59:02 +08:00
|
|
|
<%= render partial: 'users/registrations/edit_partials/2fa' %>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-07-07 18:59:48 +08:00
|
|
|
|
2020-07-07 21:59:02 +08:00
|
|
|
<!-- User statistics -->
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<div class="row user-statistics">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<h2><%=t "users.statistics.title" %></h2>
|
|
|
|
<ul class="list-inline">
|
|
|
|
<li class="label label-primary">
|
|
|
|
<h2><%= @user.statistics[:number_of_teams]%></h2>
|
|
|
|
<%= t("users.statistics.team").pluralize(@user.statistics[:number_of_teams]) %>
|
|
|
|
</li>
|
|
|
|
<li class="label label-primary">
|
|
|
|
<h2><%= @user.statistics[:number_of_projects] %></h2>
|
|
|
|
<%= t("users.statistics.project").pluralize(@user.statistics[:number_of_projects]) %>
|
|
|
|
</li>
|
|
|
|
<li class="label label-primary">
|
|
|
|
<h2><%= @user.statistics[:number_of_experiments] %></h2>
|
|
|
|
<%= t("users.statistics.experiment").pluralize(@user.statistics[:number_of_experiments]) %>
|
|
|
|
</li>
|
|
|
|
<li class="label label-primary">
|
|
|
|
<h2><%= @user.statistics[:number_of_protocols] %></h2>
|
|
|
|
<%= t("users.statistics.protocol").pluralize(@user.statistics[:number_of_protocols]) %>
|
|
|
|
</li>
|
|
|
|
</ul>
|
2020-07-07 18:59:48 +08:00
|
|
|
</div>
|
2016-02-12 23:52:43 +08:00
|
|
|
</div>
|
2020-07-07 21:59:02 +08:00
|
|
|
<span style="display: none;" data-hook="profile-statistics"></span>
|
2016-11-02 19:18:30 +08:00
|
|
|
</div>
|
2016-10-27 19:23:14 +08:00
|
|
|
</div>
|
2016-02-12 23:52:43 +08:00
|
|
|
</div>
|
|
|
|
|
2020-06-29 16:56:06 +08:00
|
|
|
<%= render partial: '2fa_modal' %>
|
2019-10-01 22:49:46 +08:00
|
|
|
<%= render partial: 'users/shared/user_avatars_modal' %>
|
|
|
|
|
2019-05-31 21:44:27 +08:00
|
|
|
<%= javascript_pack_tag 'custom/croppie' %>
|
|
|
|
<%= stylesheet_pack_tag 'custom/croppie_styles' %>
|
2016-02-12 23:52:43 +08:00
|
|
|
<%= javascript_include_tag("canvas-to-blob.min") %>
|
|
|
|
<%= javascript_include_tag "users/registrations/edit" %>
|