Files
fizzy/app/views/users/show.html.erb
T
Andy Smith fdbb9c185e Merge branch 'main' into collection-nav
* main: (203 commits)
  Re-write help content, try a modal-like display
  Move to internal registry
  Show date instead of time for notifications older than 1 day
  Ensure checks are visible for tags and assignments
  Adjust padding so card number isn't cut off
  Don't color the collection header in considering
  Golden cards bubble to the top of Considering, too
  Adjust card collection header when colored golden
  Allow cards in Considering to gilded
  Hide focus ring on new card titles and step inputs
  Add hover effect for comment edit button
  Add hover effect to overflow button
  Improve multi-account behavior of the PWA
  Remove unneeded *
  Rename test
  Review the code to move cards
  Update editor
  Generalize and delete mentions too
  Remove unused code
  Make sure we don't remove accesses if collection is accessible
  ...
2025-07-08 15:34:01 -05:00

63 lines
2.3 KiB
Plaintext

<% @page_title = @user.name %>
<% content_for :header do %>
<nav class="header">
<div class="header__actions header__actions--start">
<%= link_to_back %>
</div>
<div class="header__actions header__actions--end">
<% if Current.user == @user %>
<%= link_to edit_user_path(@user), class: "btn flex-item-justify-end" do %>
<%= icon_tag "pencil" %>
<span class="for-screen-reader">Edit</span>
<% end %>
<% end %>
</div>
</nav>
<% end %>
<div class="panel shadow center txt-align-center margin-block-end-double">
<div class="flex flex-column gap">
<div class="avatar txt-xx-large center fill-white">
<%= image_tag user_avatar_path(@user), alt: "Profile avatar for #{@user.name}", size: 128 %>
</div>
<div class="flex flex-column gap-half margin-block-end">
<h1 class="txt-x-large margin-none"><%= @user.name %></h1>
<div class="txt-medium">
<% if @user.active? %>
<%= mail_to @user.email_address %>
<% else %>
<%= @user.name %> is no longer on this account
<% end %>
</div>
</div>
<div class="flex-inline center justify-center flex-wrap gap">
<%= link_to "Which cards are assigned to #{ Current.user == @user ? "you" : @user.first_name }?", cards_path(assignee_ids: [@user.id], indexed_by: "newest"), class: "btn", data: { turbo_frame: "_top" } %>
<%= link_to "Which cards were added by #{ Current.user == @user ? "you" : @user.first_name }?", cards_path(creator_ids: [@user.id], indexed_by: "newest"), class: "btn", data: { turbo_frame: "_top" } %>
</div>
</div>
</div>
<% if Current.user == @user %>
<div class="panel shadow center margin-block-double">
<%= render "users/transfer", user: @user %>
</div>
<div class="panel borderless center margin-block-double">
<%= button_to session_path, method: :delete, class: "btn center txt-medium", data: { turbo: false } do %>
<%= icon_tag "logout" %>
<span>Sign out</span>
<% end %>
</div>
<% end %>
<h1 class="font-weight-black txt-large margin-block-double"><%= "What #{ Current.user == @user ? "have you" : "has #{ @user.first_name }" } been up to?" %></h1>
<div class="events margin-block-double" id="activity">
<%= render "events/day", day_timeline: @day_timeline %>
<%= event_next_page_link(@day_timeline.next_day) %>
</div>