scinote-web/app/views/users/registrations/edit.html.erb
2020-11-25 10:43:59 +01:00

75 lines
2.9 KiB
Text

<% provide(:head_title, t("users.registrations.edit.head_title")) %>
<% provide(:container_class, "no-second-nav-container") %>
<%= render partial: "users/settings/sidebar" %>
<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">
<div class="col-md-2">
<%= render partial: 'users/registrations/edit_partials/avatar' %>
</div>
<div class="col-md-10">
<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' %>
</div>
</div>
</div>
</div>
<%= render partial: 'users/registrations/edit_partials/2fa' %>
</div>
</div>
<!-- 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>
</div>
</div>
<span style="display: none;" data-hook="profile-statistics"></span>
</div>
</div>
</div>
<%= render partial: '2fa_modal' %>
<%= render partial: 'users/shared/user_avatars_modal' %>
<%= javascript_pack_tag 'custom/croppie' %>
<%= stylesheet_pack_tag 'custom/croppie_styles' %>
<%= javascript_include_tag("canvas-to-blob.min") %>
<%= javascript_include_tag "users/registrations/edit" %>