summaryrefslogtreecommitdiff
path: root/app/views/pms/show.html.erb
diff options
context:
space:
mode:
authorLuke Shumaker <shumakl@purdue.edu>2014-04-26 21:12:06 -0400
committerLuke Shumaker <shumakl@purdue.edu>2014-04-26 21:12:06 -0400
commit2c1e5ab5e7b20dabec9ddb9b34e0cf534afc6d06 (patch)
treec47e8dbc1f4c80ef9bd4531fd7f0de3f0e30c9ca /app/views/pms/show.html.erb
parentedb9e6a59459b42acb8dc751044d51c70e81429c (diff)
parentf156d56096e08254a249304b68ae0cb433ef9db3 (diff)
Merge branch 'master' of https://github.com/LukeShu/leaguer
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 %>