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">
|
2021-01-25 22:36:23 +08:00
|
|
|
<div class="title-row">
|
|
|
|
<h1><%=t "users.registrations.edit.title" %></h1>
|
|
|
|
</div>
|
2020-07-07 21:59:02 +08:00
|
|
|
</div>
|
|
|
|
<div class="row settings-row">
|
|
|
|
<div class="col-md-12">
|
2021-07-23 17:56:28 +08:00
|
|
|
<% if resource.errors.present? %>
|
2020-07-07 21:59:02 +08:00
|
|
|
<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' %>
|
2021-04-14 15:44:09 +08:00
|
|
|
<%= render partial: 'users/registrations/edit_partials/external_id' %>
|
2020-07-07 21:59:02 +08:00
|
|
|
</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' %>
|
2022-07-12 22:45:07 +08:00
|
|
|
|
|
|
|
<% if Rails.application.config.x.core_api_v1_enabled %>
|
|
|
|
<%= render partial: 'users/registrations/edit_partials/api_key' %>
|
|
|
|
<% end %>
|
2020-07-07 21:59:02 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-07-07 18:59:48 +08:00
|
|
|
|
2023-03-22 19:15:01 +08:00
|
|
|
<% if Rails.application.config.x.connected_devices_enabled %>
|
|
|
|
<!-- Manage devices -->
|
|
|
|
<div class="manage-devices">
|
|
|
|
<%= render partial: 'users/registrations/manage_devices' %>
|
|
|
|
<div>
|
|
|
|
<% end %>
|
2023-03-17 20:44:41 +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">
|
2023-01-26 21:01:54 +08:00
|
|
|
<h3><%=t "users.statistics.title" %></h3>
|
2020-07-07 21:59:02 +08:00
|
|
|
<ul class="list-inline">
|
|
|
|
<li class="label label-primary">
|
2023-03-31 16:01:58 +08:00
|
|
|
<h2><%= @user_statistics[:number_of_teams]%></h2>
|
|
|
|
<%= t("users.statistics.team").pluralize(@user_statistics[:number_of_teams]) %>
|
2020-07-07 21:59:02 +08:00
|
|
|
</li>
|
|
|
|
<li class="label label-primary">
|
2023-03-31 16:01:58 +08:00
|
|
|
<h2><%= @user_statistics[:number_of_projects] %></h2>
|
|
|
|
<%= t("users.statistics.project").pluralize(@user_statistics[:number_of_projects]) %>
|
2020-07-07 21:59:02 +08:00
|
|
|
</li>
|
|
|
|
<li class="label label-primary">
|
2023-03-31 16:01:58 +08:00
|
|
|
<h2><%= @user_statistics[:number_of_experiments] %></h2>
|
|
|
|
<%= t("users.statistics.experiment").pluralize(@user_statistics[:number_of_experiments]) %>
|
2020-07-07 21:59:02 +08:00
|
|
|
</li>
|
|
|
|
<li class="label label-primary">
|
2023-03-31 16:01:58 +08:00
|
|
|
<h2><%= @user_statistics[:number_of_protocols] %></h2>
|
|
|
|
<%= t("users.statistics.protocol").pluralize(@user_statistics[:number_of_protocols]) %>
|
2020-07-07 21:59:02 +08:00
|
|
|
</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' %>
|
2023-03-17 20:44:41 +08:00
|
|
|
|
2019-10-01 22:49:46 +08:00
|
|
|
<%= render partial: 'users/shared/user_avatars_modal' %>
|
|
|
|
|
2023-03-30 19:27:10 +08:00
|
|
|
<%= javascript_include_tag 'croppie' %>
|
|
|
|
<%= stylesheet_link_tag 'croppie_styles' %>
|
2016-02-12 23:52:43 +08:00
|
|
|
<%= javascript_include_tag "users/registrations/edit" %>
|