Files
plottservice/app/views/profiles/show.html.erb

52 lines
1.6 KiB
Plaintext

<div>
<h1 class="p-1 text-4xl font-bold border-b-2 border-hsrm-red">Profile</h1>
<ul>
<li>Name: <%= current_user.name %>
<% if is_admin_or_operator? %>
<p class="inline badge"><%= current_user.role %></p>
<% end %>
</li>
<li>E-Mail: <%= current_user.email %></li>
<% if current_user.verified? %>
<p>
E-Mail is verified
</p>
<% else %>
<p>
<div>
Please validate your E-mail-adress (<%= button_to 'Re-send verification email', identity_email_verification_path, form_class: "inline" %>)
</div>
</p>
<% end %>
</ul>
<h2 class="p-1 text-lg font-bold border-b-2 border-hsrm-red">Aufgegebene Druckaufträge</h2>
<p>
Aufgegebene Druckaufträge
<%= current_user.costumer_jobs.size %>
</p>
<p>
Abgebrochene Druckaufgräge
<%= current_user.costumer_jobs.canceled.size %>
</p>
<% if is_admin_or_operator? %>
<h2 class="p-1 text-lg font-bold border-b-2 border-hsrm-red">Bearbeitete Druckaufträge</h2>
<p>
Gedruckte Druckaufträge
<%= current_user.operator_jobs.paid.size %>
</p>
<% end %>
<h2 class="p-1 text-lg font-bold border-b-2 border-hsrm-red">Actions</h2>
<div>
<%= link_to "Change password", edit_password_path %>
</div>
<div>
<%= link_to "Change email address", edit_identity_email_path %>
</div>
<h2 class="p-1 text-lg font-bold border-b-2 border-hsrm-red">Access history</h2>
<div>
<%= link_to "Devices & Sessions", sessions_path %>
</div>
<br>
<%= button_to "Log out", Current.session, method: :delete, class: "btn btn-primary" %>
</div>