From 3a4412f08bed438ebf14f6cdfa5bb6eb4d239138 Mon Sep 17 00:00:00 2001 From: nfoy Date: Mon, 28 Apr 2014 19:39:32 -0400 Subject: Some more changes for alerts with messages. --- app/views/alerts/new.html.erb | 2 +- app/views/pms/index.html.erb | 15 ++++++++------- 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 @@ - - + <%# if conversations.reject { |c| c.is_read?(current_user) || (c.receipts_for current_user).last.message.sender == current_user }.empty? %> - <% conversations.each do |conversation| %> @@ -112,7 +110,7 @@ <% if conversation.is_read?(current_user) || receipts.last.message.sender == current_user %> <% message = receipts.last.message %> - <% if conversation.subject == "Pay Attention!" %> + <% if conversation.subject == "Pay Attention!" && message.sender != current_user %> - - + <% end %> @@ -133,4 +130,8 @@ <% #end %> -
WithSubject Body
<% people = conversation.participants %> <% people.each do |person| %> @@ -121,8 +119,7 @@ <% end %> <% end %> <%= truncate(conversation.subject, length: 30) %><%= truncate(message.body, length: 42) %><%= truncate(message.body, length: 80) %> <%= link_to 'View', @pms.find_by(conversation: conversation) %>
\ No newline at end of file + + +
+
+
\ No newline at end of file -- cgit v1.2.3