1 <% content_for :heading do %>
 
   2   <h1><%= t ".heading", :user => @user.display_name %></h1>
 
   3   <p><%= t ".subheading_html",
 
   4            :user => link_to(@user.display_name, @user),
 
   5            :submitted => tag.span(t(".subheading_submitted"), :class => "px-2 py-1 bg-primary bg-opacity-25"),
 
   6            :commented => tag.span(t(".subheading_commented"), :class => "px-2 py-1 bg-body") %></p>
 
   9 <%= form_with :url => user_notes_path(@user), :method => :get, :data => { :turbo => true } do %>
 
  10   <div class="row gx-2 align-items-end">
 
  11     <div class="col-sm-auto mb-3">
 
  12       <%= label_tag :status, t(".status") %>
 
  13       <%= select_tag :status,
 
  14                      options_for_select([[t(".all"), "all"], [t(".open"), "open"], [t(".closed"), "closed"]], params[:status] || "all"),
 
  15                      :class => "form-select" %>
 
  17     <div class="col-sm-auto mb-3">
 
  18       <%= submit_tag t(".apply"), :name => nil, :class => "btn btn-primary" %>
 
  23 <% if @notes.empty? %>
 
  24   <h4><%= t ".no_notes" %></h4>
 
  27   <%= render :partial => "notes_paging_nav" %>
 
  29   <%= render :partial => "layouts/markers", :locals => { :types => %w[cross tick minus] } %>
 
  31   <table class="table table-sm note_list">
 
  35         <th><%= t ".id" %></th>
 
  36         <th><%= t ".creator" %></th>
 
  37         <th><%= t ".description" %></th>
 
  38         <th><%= t ".created_at" %></th>
 
  39         <th><%= t ".last_changed" %></th>
 
  42   <% @notes.each do |note| -%>
 
  43     <tr<% if note.author == @user %> class="table-primary"<% end %>>
 
  46              alt_text_key = ".hidden"
 
  47              pin_marker = tag.use :href => "#pin-minus", :color => "gray"
 
  49              alt_text_key = ".closed"
 
  50              pin_marker = tag.use :href => "#pin-tick", :color => "var(--marker-green)"
 
  52              alt_text_key = ".open"
 
  53              pin_marker = tag.use :href => "#pin-cross", :color => "var(--marker-red)"
 
  55         <svg width="25" height="40" alt="<%= t alt_text_key %>">
 
  59       <td><%= link_to note.id, note %></td>
 
  60       <td><%= note_author(note.author) %></td>
 
  61       <td><%= note_description(note.author, note.description, current_user&.moderator? ? note.comments.unscope(:where => :visible).first : note.comments.first).to_html %></td>
 
  62       <td><%= friendly_date_ago(note.created_at) %></td>
 
  63       <td><%= friendly_date_ago(note.updated_at) %></td>
 
  68   <%= render :partial => "notes_paging_nav" %>