mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-04-25 21:44:29 +09:00
70 lines
2.4 KiB
Plaintext
70 lines
2.4 KiB
Plaintext
<% @page_title = @user.name %>
|
|
|
|
<% content_for :nav do %>
|
|
<div class="flex-item-justify-start">
|
|
<%= link_back %>
|
|
</div>
|
|
|
|
<div class="flex align-center gap flex-item-justify-end">
|
|
<% if Current.user == @user %>
|
|
<%= link_to user_profile_path, class: "btn" do %>
|
|
<%= image_tag "pencil.svg", aria: { hidden: "true" } %>
|
|
<span class="for-screen-reader">Edit my profile</span>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
<% end %>
|
|
|
|
<section class="panel txt-align-center">
|
|
<div class="flex flex-column gap <%= "banned" if @user.banned? %>">
|
|
<div class="avatar txt-xx-large center" style="background: white">
|
|
<%= image_tag fresh_user_avatar_path(@user), alt: "Profile avatar", class: "avatar" %>
|
|
</div>
|
|
|
|
<% if @user.bot? %>
|
|
<div class="pad-double--inline push--inline push--block-start">
|
|
<% if @user.active? %>
|
|
<%= button_to_direct_room_with @user%>
|
|
<% else %>
|
|
<div><%= @user.name %> is no longer on this account</div>
|
|
<% end %>
|
|
</div>
|
|
<% else %>
|
|
<% unless @user.deactivated? %>
|
|
<div class="flex flex-column gap" style="--row-gap: calc(var(--block-space) / 3)">
|
|
<h1 class="txt-x-large txt-tight-lines margin-none"><%= @user.name %></h1>
|
|
<% if Current.user.can_administer? %>
|
|
<div><%= mail_to @user.email_address %></div>
|
|
<% end %>
|
|
<div><%= @user.bio %></div>
|
|
</div>
|
|
|
|
<% if @user.active? %>
|
|
<div class="pad-inline-double margin-inline margin-block-start">
|
|
<%= button_to rooms_directs_path(user_ids: [ @user.id ]), class: "btn btn--reversed full-width txt-large" do %>
|
|
<%= image_tag "messages.svg", aria: { hidden: "true", label: "Ping #{@user.name}" } %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<% if Current.user.can_administer? %>
|
|
<hr class="margin-block-start borderless">
|
|
|
|
<%= render "users/profiles/transfer", user: @user %>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<% if Current.user.can_administer? && Current.user != @user %>
|
|
<div class="margin-block-start">
|
|
<%= render "users/ban_button", user: @user %>
|
|
</div>
|
|
<% end %>
|
|
<% else %>
|
|
<div>
|
|
<h1 class="txt-x-large margin-none"><%= @user.name %></h1>
|
|
<div><%= @user.name %> is no longer on this account</div>
|
|
</div>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
</section>
|