122 lines
4.3 KiB
Text
122 lines
4.3 KiB
Text
|
<header class="header header#home">
|
||
|
<nav class="navbar navbar-expand-md navbar-dark bg-bleu_violet">
|
||
|
<div class="navbar-brand">
|
||
|
<a class="navbar-item" href="<%= root_url %>"><b>TuxBot</b></a>
|
||
|
</div>
|
||
|
</nav>
|
||
|
</header>
|
||
|
|
||
|
<div id="content">
|
||
|
<div class="columns mar-t-40">
|
||
|
<div class="column is-12">
|
||
|
<div class="card is-full-width">
|
||
|
<div class="header bg-bleu_violet">
|
||
|
<div class="avatar">
|
||
|
<img src="<%= @user.useravatar %>" alt="user_avatar" onerror="this.onerror=null;this.src='<%= image_url "default.png" %>'">
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="card-body">
|
||
|
<div class="user-info has-text-centered">
|
||
|
<h3 class="username"><%= @user.username %></h3>
|
||
|
<h6 class="created_at"><%= t('users.created_at') %> <%= iso2human(@user.userbirth) %></h6>
|
||
|
<hr>
|
||
|
<div class="columns is-multiline">
|
||
|
<div class="column is-12">
|
||
|
<div class="columns is-multiline">
|
||
|
<div class="column is-12">
|
||
|
<span class="subtitle"><i class="fab fa-linux"></i> <%= t('user.oses') %></span>
|
||
|
</div>
|
||
|
<div class="column is-12">
|
||
|
<span><%= raw markdown(@user.os) %></span>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="columns is-multiline pad-t-20">
|
||
|
<div class="column is-12">
|
||
|
<span class="subtitle"><i class="fas fa-cogs"></i> <%= t('user.config') %></span>
|
||
|
</div>
|
||
|
<div class="column is-12 has-text-left block_code">
|
||
|
<div><%= raw markdown(@user.config) %></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="columns is-multiline pad-t-20">
|
||
|
<div class="column is-12">
|
||
|
<span class="subtitle"><i class="fa fa-flag" aria-hidden="true"></i> <%= t('user.country') %></span>
|
||
|
</div>
|
||
|
<div class="column is-12">
|
||
|
<span><%= raw markdown(@user.pays) %></span>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="columns is-multiline pad-t-20">
|
||
|
<div class="column is-12">
|
||
|
<span class="subtitle"><i class="fas fa-sign-in-alt" aria-hidden="true"></i> <%= t('user.discord_created_at') %></span>
|
||
|
</div>
|
||
|
<div class="column is-12">
|
||
|
<span><%= iso2human(@user.userbirth) %></span>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="columns is-multiline pad-t-20">
|
||
|
<div class="column is-12">
|
||
|
<span><i class="fa fa-user-plus" aria-hidden="true"></i> <%= t('user.ci_created_at', date: iso2human(@user.cidate), office: @user.cibureau) %></span>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="subcard_action has-text-centered">
|
||
|
<ul class="mar-t-20">
|
||
|
<li>
|
||
|
<a href="<%= users_path %>" class="grey-link"><%= t('action.back') %></a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<% if session[:identified_at] ? ((Time.now - Time.iso8601(session[:identified_at])) < 60 * 20) : false %>
|
||
|
<a href="<%= edit_user_path(id: @user.id, locale: locale) %>" class="grey-link"><%= t('action.edit') %></a>
|
||
|
<% else %>
|
||
|
<a data-target="key_modal" class="grey-link modal-button"><%= t('action.edit') %></a>
|
||
|
<% end %>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="modal <%= 'is-active' if flash[:success] or flash[:error] %>" id="key_modal">
|
||
|
<div class="modal-background"></div>
|
||
|
<div class="modal-content">
|
||
|
<div class="box">
|
||
|
<article class="media">
|
||
|
<div class="media-content">
|
||
|
<div class="content">
|
||
|
<%= form_tag(validate_user_path, method: "post") do %>
|
||
|
<%= hidden_field_tag(:id, @user.id) %>
|
||
|
<strong><%= t('user.key_message') %></strong>
|
||
|
<a class="tooltip is-tooltip-dark is-tooltip-right is-tooltip-multiline" data-tooltip="<%= t('user.key_help') %>">
|
||
|
<i class="far fa-question-circle"></i>
|
||
|
</a>
|
||
|
<br>
|
||
|
<div class="field">
|
||
|
<div class="control has-icons-left mar-t-10">
|
||
|
<%= text_field_tag(:key, nil, class: flash[:error] ? "input is-danger" : "input", placeholder: "XXXXXXXXXXXXXXXXXXXXXXXXX", maxlength: "25", autofocus: true) %>
|
||
|
<span class="icon is-left">
|
||
|
<i class="fas fa-key"></i>
|
||
|
</span>
|
||
|
</div>
|
||
|
<% if flash[:error] %>
|
||
|
<p class="help is-danger"><%= t('user.key_error') %></p>
|
||
|
<% end %>
|
||
|
</div>
|
||
|
<% end %>
|
||
|
</div>
|
||
|
</div>
|
||
|
</article>
|
||
|
</div>
|
||
|
</div>
|
||
|
<button class="modal-close is-large" aria-label="close"></button>
|
||
|
</div>
|
||
|
</div>
|