From 00f3d70445d7cae0976ec9794e555c52a1765b24 Mon Sep 17 00:00:00 2001 From: nfoy Date: Sat, 26 Apr 2014 20:57:21 -0400 Subject: Messages is working (besides default permissions)! --- app/views/pms/show.html.erb | 51 ++++++++++++++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 15 deletions(-) (limited to 'app/views/pms/show.html.erb') diff --git a/app/views/pms/show.html.erb b/app/views/pms/show.html.erb index 6f81d1b..64dd66e 100644 --- a/app/views/pms/show.html.erb +++ b/app/views/pms/show.html.erb @@ -1,26 +1,47 @@

- Author: - <%# @conversation.last_sender.user_name %> + Participants: + <% receps = @pm.conversation.participants %> + <% receps.each do |recep| %> + <% #unless recep == @pm.conversation.last_sender %> + <%= recep.user_name %> + <%= "and" %> + <% #end %> + <% end %> + <%= "the NSA" %>

- Recipient: - <%#@pm.recipient.user_name %> + Subject: + <%= @pm.conversation.subject %>

-

- Message: - <%# @pm.message %> -

+<% receipts = @pm.conversation.receipts_for current_user %> +<% receipts.each do |receipt| %> + <% message = receipt.message %> -

- Subject: - <%= @pm.subject %> -

+

________________________________________________

-

- Conversation: - <%= @pm.conversation %> +

+ <%= message.sender.user_name %> + <%= ":" %> + <%= message.body %> +

+ +<% end %> + +

________________________________________________

+

+ <%= form_for(@pm) do |f| %> +

+ <%= f.text_area :message %> +
+ +
+ <%= submit_tag("Reply", :class => "signup") %> +
+ + <% end %>

+ <%= link_to 'Back', pms_path %> -- cgit v1.2.3-2-g168b