summaryrefslogtreecommitdiff
path: root/app/views/pms/show.html.erb
diff options
context:
space:
mode:
authornfoy <nfoy@purdue.edu>2014-04-26 20:57:21 -0400
committernfoy <nfoy@purdue.edu>2014-04-26 20:57:21 -0400
commit00f3d70445d7cae0976ec9794e555c52a1765b24 (patch)
tree7a89dcf1466ad8b2fd3df587f1807ba9dfc08468 /app/views/pms/show.html.erb
parentd5e4ac14fc51631f5cd77ba4226ba5911ffe7e37 (diff)
Messages is working (besides default permissions)!
Diffstat (limited to 'app/views/pms/show.html.erb')
-rw-r--r--app/views/pms/show.html.erb51
1 files changed, 36 insertions, 15 deletions
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 @@
<p>
- <strong>Author:</strong>
- <%# @conversation.last_sender.user_name %>
+ <strong>Participants:</strong>
+ <% receps = @pm.conversation.participants %>
+ <% receps.each do |recep| %>
+ <% #unless recep == @pm.conversation.last_sender %>
+ <%= recep.user_name %>
+ <%= "and" %>
+ <% #end %>
+ <% end %>
+ <%= "the NSA" %>
</p>
<p>
- <strong>Recipient:</strong>
- <%#@pm.recipient.user_name %>
+ <strong>Subject:</strong>
+ <%= @pm.conversation.subject %>
</p>
-<p>
- <strong>Message:</strong>
- <%# @pm.message %>
-</p>
+<% receipts = @pm.conversation.receipts_for current_user %>
+<% receipts.each do |receipt| %>
+ <% message = receipt.message %>
-<p>
- <strong>Subject:</strong>
- <%= @pm.subject %>
-</p>
+ <p> ________________________________________________ </p>
-<p>
- <strong>Conversation:</strong>
- <%= @pm.conversation %>
+ <p>
+ <%= message.sender.user_name %>
+ <%= ":" %>
+ <%= message.body %>
+ </p>
+
+<% end %>
+
+<p> ________________________________________________ </p>
+<p>
+ <%= form_for(@pm) do |f| %>
+ <div class="field">
+ <%= f.text_area :message %>
+ </div>
+
+ <div class="actions">
+ <%= submit_tag("Reply", :class => "signup") %>
+ </div>
+
+ <% end %>
</p>
+
<%= link_to 'Back', pms_path %>