系统消息的tips中,没有内容就不显示“内容”

This commit is contained in:
ouyangxuhua 2015-09-19 11:29:51 +08:00
parent b9bac42c1a
commit 964738f203
1 changed files with 2 additions and 4 deletions

View File

@ -64,10 +64,8 @@
<% unless usm.subject.nil? %>
<p><strong>标题:</strong><%= usm.subject %></p>
<% end %>
<% if usm.description.nil? && usm.content.nil? %>
<% else %>
<div class="fl"><strong>内容:</strong></div><div class="ml36"><%= usm.description.html_safe %></div>
<% if (!usm.description.nil? && usm.description != "") || (!usm.content.nil? && usm.content != "") %>
<div class="fl"><strong>内容:</strong></div><div class="ml36"><%= usm.description.nil? ? usm.content.html_safe : usm.description.html_safe %></div>
<% end %>
</div>
<li class="homepageNewsTime fl"><%= time_tag(usm.created_at).html_safe %> </li>