From 422a7b39a06e2fe54415f2be08548021a981e8a8 Mon Sep 17 00:00:00 2001 From: nfoy Date: Wed, 23 Apr 2014 20:40:56 -0400 Subject: Beginnings of actual messageboxer api --- app/views/pms/index.html.erb | 51 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 47 insertions(+), 4 deletions(-) (limited to 'app/views/pms') diff --git a/app/views/pms/index.html.erb b/app/views/pms/index.html.erb index ceb1a40..73c7a87 100644 --- a/app/views/pms/index.html.erb +++ b/app/views/pms/index.html.erb @@ -25,8 +25,8 @@ <%= pm.recipient.user_name %> <%= pm.message %> <%= link_to 'Show', pm %> - <%= link_to 'Edit', edit_pm_path(pm) %> - <%= link_to 'Destroy', pm, method: :delete, data: { confirm: 'Are you sure?' } %> + <%# link_to 'Edit', edit_pm_path(pm) %> + <%= link_to 'Delete', pm, method: :delete, data: { confirm: 'Are you sure (also deletes the author\'s copy)?' } %> <% end %> <% else %> @@ -44,13 +44,56 @@ <%= pm.recipient.user_name %> <%= pm.message %> <%= link_to 'Show', pm %> - <%= link_to 'Edit', edit_pm_path(pm) %> - <%= link_to 'Destroy', pm, method: :delete, data: { confirm: 'Are you sure?' } %> + <%# link_to 'Edit', edit_pm_path(pm) %> + <%= link_to 'Delete', pm, method: :delete, data: { confirm: 'Are you sure (also deletes the recipient\'s copy)?'} %> <% end %> <% else %>

No New Messages

<% end %> + + +

Conversations

+ + +

Inbox

+ + + <% conversation1 = current_user.mailbox.inbox.first %> + <% if !conversation1.nil? %> + <% receipts1 = conversation1.receipts_for current_user %> + <% receipts1.each do |receipt1| %> + <% message1 = receipt1.message %> + <%= message1.subject %> + <%= message1.body %> + <% end %> + <% else %> +

No Messages

+ <% end %> + + + +

Outbox

+ + + <% conversation1 = current_user.mailbox.sentbox.first %> + <% if !conversation1.nil? %> + + From + Subject + Body + + <% receipts1 = conversation1.receipts_for current_user %> + <% receipts1.each do |receipt1| %> + <% message1 = receipt1.message %> + <%= message1.subject %> + <%= message1.body %> + <% end %> + <% else %> +

No Messages

+ <% end %> + + -- cgit v1.2.3-2-g168b