2022-02-09 14:34:00 +00:00
|
|
|
<%= render partial: 'subnav' %>
|
|
|
|
|
2012-07-04 01:48:01 +00:00
|
|
|
<div class="box wide">
|
2013-01-24 20:06:10 +00:00
|
|
|
<% if @messages.any? %>
|
2022-08-31 13:47:05 +00:00
|
|
|
<%= form_with url: batch_delete_messages_path do |f| %>
|
2023-07-26 14:23:38 +00:00
|
|
|
<table class="data zebra with_select_all" width="100%" cellspacing=0>
|
2014-02-19 19:31:48 +00:00
|
|
|
<tr>
|
2023-07-26 14:23:38 +00:00
|
|
|
<th width="3%"></th>
|
2014-02-19 19:31:48 +00:00
|
|
|
<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>
|
2022-03-02 14:31:27 +00:00
|
|
|
<% @messages.each do |message| %>
|
2014-02-19 19:31:48 +00:00
|
|
|
<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 %>
|
2015-10-15 15:01:42 +00:00
|
|
|
<% 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 %>
|
2015-10-15 15:01:42 +00:00
|
|
|
<% end %>
|
2018-05-10 12:56:42 +00:00
|
|
|
</div>
|
|
|
|
</td>
|
2015-09-23 18:24:47 +00:00
|
|
|
<td><%= time_ago_in_words_label(message.created_at) %></td>
|
2014-02-19 19:31:48 +00:00
|
|
|
<td><a href="/messages/<%= message.short_id %>"><%= message.subject
|
|
|
|
%></a></td>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</table>
|
|
|
|
<p>
|
2018-12-09 15:51:30 +00:00
|
|
|
<%= f.submit "Delete Selected" %>
|
2014-02-19 19:31:48 +00:00
|
|
|
</p>
|
2012-07-04 01:48:01 +00:00
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
<p>
|
2013-01-24 20:06:10 +00:00
|
|
|
You do not have any <%= @direction == :in ? "" : "sent" %> private
|
|
|
|
messages.
|
2012-07-04 01:48:01 +00:00
|
|
|
</p>
|
|
|
|
<% end %>
|
|
|
|
|
2016-04-02 02:21:28 +00:00
|
|
|
<br>
|
|
|
|
|
2022-02-11 14:07:58 +00:00
|
|
|
<p>
|
2016-04-02 02:21:28 +00:00
|
|
|
Compose Message
|
2022-02-11 14:07:58 +00:00
|
|
|
</p>
|
2016-04-02 02:21:28 +00:00
|
|
|
|
2018-07-11 13:59:09 +00:00
|
|
|
<%= render partial: 'form', locals: { new_message: @new_message, replying: false } %>
|
2012-07-04 01:48:01 +00:00
|
|
|
</div>
|