mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-11-15 17:31:27 +00:00
4f26f5a559
Added styling to private messages Updated puma config and deployment scripts
47 lines
1.2 KiB
Text
47 lines
1.2 KiB
Text
<div id="messages" class="tabbed">
|
|
<h1>Private Messages</h1>
|
|
|
|
<ul id="messages-nav" class="tabs">
|
|
<li>
|
|
<a href="#inbox">
|
|
Inbox (<%= cuser.new_messages.count %>/<%= cuser.received_messages.count %>)
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="#sent">
|
|
Sent (<%= cuser.sent_messages.count %>)
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="tabbed-contents">
|
|
<div id="inbox" class="tab">
|
|
<% if cuser.received_messages.any? %>
|
|
<% cuser.received_messages.reverse_each do |message| %>
|
|
<div class="message <% 'highlight' if cuser.new_messages.include?(message) %>">
|
|
<%= render partial: 'message', locals: { message: message } %>
|
|
</div>
|
|
<% end %>
|
|
<% else %>
|
|
<p>You have no incoming messages.</p>
|
|
<% end %>
|
|
</div>
|
|
<div id="sent" class="tab">
|
|
<% if cuser.sent_messages.any? %>
|
|
<% cuser.sent_messages.reverse_each do |message| %>
|
|
<div class="message">
|
|
<%= render partial: 'message', locals: { message: message } %>
|
|
</div>
|
|
<% end %>
|
|
<% else %>
|
|
<p>You have no sent messages.</p>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
new Yetii({
|
|
id: 'messages'
|
|
});
|
|
</script>
|