summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornfoy <nfoy@purdue.edu>2014-04-28 19:39:32 -0400
committernfoy <nfoy@purdue.edu>2014-04-28 19:39:32 -0400
commit3a4412f08bed438ebf14f6cdfa5bb6eb4d239138 (patch)
tree8040568b4f793abc9d7056396b7f33ecc6cc7497
parent10ddfede25fbe6cf448e30323e1ffee98ed6e23a (diff)
Some more changes for alerts with messages.
-rw-r--r--app/views/alerts/new.html.erb2
-rw-r--r--app/views/pms/index.html.erb15
2 files changed, 9 insertions, 8 deletions
diff --git a/app/views/alerts/new.html.erb b/app/views/alerts/new.html.erb
index 6d04589..db5af2d 100644
--- a/app/views/alerts/new.html.erb
+++ b/app/views/alerts/new.html.erb
@@ -2,4 +2,4 @@
<%= render 'form' %>
-<%= link_to 'Back', alerts_path %>
+<%= link_to 'See past Alerts', alerts_path %>
diff --git a/app/views/pms/index.html.erb b/app/views/pms/index.html.erb
index fec6db2..c823efb 100644
--- a/app/views/pms/index.html.erb
+++ b/app/views/pms/index.html.erb
@@ -97,14 +97,12 @@
<table>
<col width="150">
- <col width="250">
- <col width="300">
+ <col width="650">
<tbody>
<%# if conversations.reject { |c| c.is_read?(current_user) || (c.receipts_for current_user).last.message.sender == current_user }.empty? %>
<tr>
<tr>
<td><b>With</b></td>
- <td><b>Subject</b></td>
<td><b>Body</b></td>
</tr>
<% conversations.each do |conversation| %>
@@ -112,7 +110,7 @@
<% if conversation.is_read?(current_user) || receipts.last.message.sender == current_user %>
<% message = receipts.last.message %>
<tr>
- <% if conversation.subject == "Pay Attention!" %>
+ <% if conversation.subject == "Pay Attention!" && message.sender != current_user %>
<td>
<% people = conversation.participants %>
<% people.each do |person| %>
@@ -121,8 +119,7 @@
<% end %>
<% end %>
</td>
- <td><%= truncate(conversation.subject, length: 30) %></td>
- <td><%= truncate(message.body, length: 42) %></td>
+ <td><%= truncate(message.body, length: 80) %></td>
<td><%= link_to 'View', @pms.find_by(conversation: conversation) %></td>
<% end %>
</tr>
@@ -133,4 +130,8 @@
<% #end %>
</tbody>
-</table> \ No newline at end of file
+</table>
+
+<br>
+<br>
+<br> \ No newline at end of file