tilde.news/app/views/messages/index.html.erb

55 lines
1.7 KiB
Plaintext
Raw Normal View History

2022-02-09 14:34:00 +00:00
<%= render partial: 'subnav' %>
2012-07-04 01:48:01 +00:00
<div class="box wide">
<% if @messages.any? %>
2022-08-31 13:47:05 +00:00
<%= form_with url: batch_delete_messages_path do |f| %>
<table class="data zebra with_select_all" width="100%" cellspacing=0>
<tr>
<th width="3%"></th>
<th width="15%"><%= @direction == :in ? "From" : "To" %></th>
<th width="17%"><%= @direction == :in ? "Received" : "Sent" %></th>
<th width="60%">Subject</th>
2012-07-04 01:48:01 +00:00
</tr>
<% @messages.each do |message| %>
<tr class="<%= message.has_been_read? ? "" : "bold" %>">
<td><%= check_box_tag "delete_#{message.short_id}" %></td>
2018-05-10 12:56:42 +00:00
<td>
<div style="white-space:nowrap;">
<% if @direction == :in %>
<% if message.author %>
enable mod_userdir diff of `rails routes`: 12,13d11 < GET /newest/:user(.:format) home#newest_by_user < GET /newest/:user/page/:page(.:format) home#newest_by_user 32d29 < user_threads GET /threads/:user(.:format) comments#user_threads 120,122c117,132 < u GET /u(.:format) users#tree < user GET /u/:username(.:format) users#show < user_standing GET /u/:username/standing(.:format) users#standing --- > users_tree GET /users(.:format) users#tree > user GET /~:username(.:format) users#show > user_standing GET /~:username/standing(.:format) users#standing > GET /~:user/stories(/page/:page)(.:format) home#newest_by_user > user_threads GET /~:user/threads(.:format) comments#user_threads > user_ban POST /~:username/ban(.:format) users#ban > user_unban POST /~:username/unban(.:format) users#unban > user_disable_invite POST /~:username/disable_invitation(.:format) users#disable_invitation > user_enable_invite POST /~:username/enable_invitation(.:format) users#enable_invitation > u GET /u(.:format) redirect(302, /users) > GET /u/:username(.:format) redirect(302, /~%{username}) > GET /@:username(.:format) redirect(302, /~%{username}) > GET /u/:username/standing(.:format) redirect(302, ~%{username}/standing) > GET /newest/:user(.:format) redirect(302, ~%{user}/stories) > GET /newest/:user(/page/:page)(.:format) redirect(302, ~%{user}/stories/page/%{page}) > GET /threads/:user(.:format) redirect(302, ~%{user}/threads) 125,128d134 < user_ban POST /users/:username/ban(.:format) users#ban < user_unban POST /users/:username/unban(.:format) users#unban < user_disable_invite POST /users/:username/disable_invitation(.:format) users#disable_invitation < user_enable_invite POST /users/:username/enable_invitation(.:format) users#enable_invitation
2023-08-29 12:45:28 +00:00
<%= styled_user_link message.author %>
2018-05-10 12:56:42 +00:00
<% else %>
<%= message.author_username %>
<% end %>
<%= message.hat.to_html_label if message.hat %>
<% else %>
enable mod_userdir diff of `rails routes`: 12,13d11 < GET /newest/:user(.:format) home#newest_by_user < GET /newest/:user/page/:page(.:format) home#newest_by_user 32d29 < user_threads GET /threads/:user(.:format) comments#user_threads 120,122c117,132 < u GET /u(.:format) users#tree < user GET /u/:username(.:format) users#show < user_standing GET /u/:username/standing(.:format) users#standing --- > users_tree GET /users(.:format) users#tree > user GET /~:username(.:format) users#show > user_standing GET /~:username/standing(.:format) users#standing > GET /~:user/stories(/page/:page)(.:format) home#newest_by_user > user_threads GET /~:user/threads(.:format) comments#user_threads > user_ban POST /~:username/ban(.:format) users#ban > user_unban POST /~:username/unban(.:format) users#unban > user_disable_invite POST /~:username/disable_invitation(.:format) users#disable_invitation > user_enable_invite POST /~:username/enable_invitation(.:format) users#enable_invitation > u GET /u(.:format) redirect(302, /users) > GET /u/:username(.:format) redirect(302, /~%{username}) > GET /@:username(.:format) redirect(302, /~%{username}) > GET /u/:username/standing(.:format) redirect(302, ~%{username}/standing) > GET /newest/:user(.:format) redirect(302, ~%{user}/stories) > GET /newest/:user(/page/:page)(.:format) redirect(302, ~%{user}/stories/page/%{page}) > GET /threads/:user(.:format) redirect(302, ~%{user}/threads) 125,128d134 < user_ban POST /users/:username/ban(.:format) users#ban < user_unban POST /users/:username/unban(.:format) users#unban < user_disable_invite POST /users/:username/disable_invitation(.:format) users#disable_invitation < user_enable_invite POST /users/:username/enable_invitation(.:format) users#enable_invitation
2023-08-29 12:45:28 +00:00
<%= styled_user_link message.recipient %>
<% end %>
2018-05-10 12:56:42 +00:00
</div>
</td>
<td><%= time_ago_in_words_label(message.created_at) %></td>
<td><a href="/messages/<%= message.short_id %>"><%= message.subject
%></a></td>
</tr>
<% end %>
</table>
<p>
<%= f.submit "Delete Selected" %>
</p>
2012-07-04 01:48:01 +00:00
<% end %>
<% else %>
<p>
You do not have any <%= @direction == :in ? "" : "sent" %> private
messages.
2012-07-04 01:48:01 +00:00
</p>
<% end %>
<br>
<p>
Compose Message
</p>
<%= render partial: 'form', locals: { new_message: @new_message, replying: false } %>
2012-07-04 01:48:01 +00:00
</div>