<% decorated_article = article.decorate %>
<% if decorated_article.pinned? || article.featured || article.approved || (!article.published? && article.published_from_feed?) || article.video || article.user&.warned? %>
<% if !article.published? && article.published_from_feed? %> Unpublished <% end %> <% if decorated_article.pinned? %> Pinned <% end %> <% if article.featured %> Featured <% end %> <% if article.approved %> Approved <% end %> <% if article.video %> Contains video <% end %> <% cache "admin-user-info-#{article.user_id}-#{article.user&.updated_at}", expires_in: 4.hours do %> <% if article.user&.warned? %> User warned <% end %> <% end %>
<% end %> <% if article.main_image.present? %> <% end %>

<%= article.title %>

<% decorated_article.cached_tag_list_array.each do |tag| %> #<%= tag %> <% end %>
❤️ <%= article.public_reactions_count %> likes 💬 <%= article.comments_count %> comments
@<%= article.user&.username %> <% if article.published_from_feed? && !article.published? %> RSS Import <%= article.created_at.strftime("%b %d, %Y") %> Originally Published <%= article.published_at&.strftime("%b %d, %Y") %> <% elsif article.crossposted_at? %> Crossposted <%= article.crossposted_at.strftime("%b %d, %Y") %> & Published <%= article.published_at&.strftime("%b %d, %Y") %> <% else %> <%= article.published_at&.strftime("%b %d, %Y") %> <% end %>
<% if decorated_article.pinned? %>
<% else %>
<% end %> User Edit
<% cache "admin-user-notes-#{article.user_id}-#{article.user&.updated_at}", expires_in: 4.hours do %> <% if article.user&.notes&.any? %>

<%= article.user&.notes&.size %> user notes

View all
<% article.user&.notes&.last(3)&.each do |note| %>

<%= note.content %> – <%= note.author_id ? User.find(note.author_id).username : "No author" %>

<% end %>
<% end %> <% end %> <%= form_with url: admin_article_path(article.id), model: article, local: true, class: "crayons-card crayons-card--secondary p-4 flex flex-col gap-3" do |f| %>
">
<% if article.published? %>
<%= f.datetime_select :published_at, { required: true, include_blank: true, include_seconds: true }, class: "crayons-select w-auto" %> UTC
<% end %>
<%= f.check_box :featured, id: "featured-#{article.id}", class: "crayons-checkbox" %>
<%= f.check_box :approved, id: "approved-#{article.id}", class: "crayons-checkbox" %>
<% end %>