<% decorated_article = article.decorate %>

<%= article.title %>

Edit Manage User <% if decorated_article.pinned? %> <%= link_to( "Unpin Post", unpin_admin_article_path(decorated_article.id), method: :delete, remote: true, class: "btn btn-sm btn-secondary", data: { "article-target": "unpinButton" }, ) %> <% end %> @<%= article.user&.username %> ❤️ <%= article.public_reactions_count %> 💬 <%= article.comments_count %> <% 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 %> <% decorated_article.cached_tag_list_array.each do |tag| %> #<%= tag %> <% end %>
<% featured = article.featured ? "bg-featured" : "" %> <% approved = article.approved ? "bg-approved" : featured %> <% pinned = decorated_article.pinned? ? "bg-pinned" : approved %> <% background_color = pinned %>
"> <% 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 %> <% if article.user&.notes&.any? %>

User Notes (<%= article.user&.notes&.size %> total)

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

<%= note.created_at.strftime("%d %B %Y %H:%M UTC") %> by <%= note.author_id ? User.find(note.author_id).username : "No Author" %> - <%= note.content %>

<% end %>

View All

<% end %> <% end %> <% if article.main_image.present? %>
cover image
<% end %> <%= form_with url: admin_article_path(article.id), model: article, local: true do |f| %>
">
<% if article.published? %>
<%= f.datetime_select :published_at, required: true, include_blank: true, include_seconds: true, class: "form-control" %> UTC
<% end %>
<%= f.check_box :featured, id: "featured-#{article.id}" %>
<%= f.check_box :approved, id: "approved-#{article.id}" %>
<%= f.check_box :boosted_additional_articles, id: "boosted_additional_articles-#{article.id}" %>
<%= check_box_tag :pinned, "1", decorated_article.pinned?, name: "article[pinned]", id: "pinned-#{article.id}", data: { "article-target": "pinnedCheckbox", "article-pinned-modal-target": "pinnedCheckbox", action: "click->article#togglePin" } %>
<% end %> <% if article.boosted_dev_digest_email %>

<% phrase = "#{article.path}?booster_org=#{article.organization&.slug || 'generic'}" %> BOOSTED IN <%= EmailMessage.where("subject LIKE ?", "%#{phrase}%").where.not(opened_at: nil).size %> EMAILS
BOOSTED IN <%= EmailMessage.where("subject LIKE ?", "%#{phrase}%").where.not(opened_at: nil).where("sent_at > ?", 1.week.ago).size %> EMAILS IN THE PAST WEEK

BOOSTED IN <%= EmailMessage.where("subject LIKE ?", "%#{phrase}%").where.not(opened_at: nil).where.not(opened_at: nil).size %> OPENED EMAILS
BOOSTED IN <%= EmailMessage.where("subject LIKE ?", "%#{phrase}%").where.not(opened_at: nil).where.not(opened_at: nil).where("sent_at > ?", 1.week.ago).size %> OPENED EMAILS IN THE PAST WEEK <% end %>