Files
danbooru/app/views/dmails/index.html.erb
evazion 6a984de3d5 views: refactor page titles.
Refactor `page_title` helper to automatically include site name.
2020-01-25 01:52:18 -06:00

37 lines
1.1 KiB
Plaintext

<% page_title "Messages" %>
<%= render "secondary_links" %>
<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 autofit", width: "100%" do |t| %>
<% t.column "Date" do |dmail| %>
<%= compact_time(dmail.created_at) %>
<% end %>
<% t.column "From" do |dmail| %>
<%= link_to_user dmail.from %>
<% end %>
<% t.column "To" do |dmail| %>
<%= link_to_user dmail.to %>
<% end %>
<% t.column "Subject", td: { class: "col-expand" } do |dmail| %>
<%= link_to dmail.title, dmail_path(dmail) %>
<% 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>