Files
danbooru/app/views/dmails/index.html.erb
BrokenEagle 4b904dff5a Convert classes to use data attributes
- Remote resolved classes on post flags since they were unused
2020-01-04 22:02:45 +00:00

48 lines
1.4 KiB
Plaintext

<div id="c-dmails">
<div id="a-index">
<% if params[:folder] == "sent" %>
<h1>Sent Messages</h1>
<% elsif params[:folder] == "received" %>
<h1>Received Messages</h1>
<% else %>
<h1>Messages</h1>
<% end %>
<%= render "search" %>
<%= table_for @dmails, {class: "striped", width: "100%"} do |t| %>
<% t.column "Date" do |dmail| %>
<%= compact_time(dmail.created_at) %>
<% end %>
<% t.column "From" do |dmail| %>
<% if dmail.filtered? %>
<%= link_to "[filtered]", user_path(dmail.from) %>
<% else %>
<%= link_to_user dmail.from %>
<% end %>
<% end %>
<% t.column "To" do |dmail| %>
<%= link_to_user dmail.from %>
<% end %>
<% t.column "Subject" do |dmail| %>
<% if dmail.filtered? %>
<%= link_to "[filtered]", dmail_path(dmail) %>
<% else %>
<%= link_to dmail.title, dmail_path(dmail) %>
<% end %>
<% end %>
<% t.column "" do |dmail| %>
<%= link_to "delete", dmail_path(dmail), :method => :delete, :data => {:confirm => "Are you sure you want to delete this Dmail?"} %>
<% end %>
<% end %>
<%= numbered_paginator(@dmails) %>
</div>
</div>
<%= render "secondary_links" %>
<% content_for(:page_title) do %>
Messages - <%= Danbooru.config.app_name %>
<% end %>