#1198 项目--项目新闻--新闻回复、课程--课程通知--添加评论:通知或评论中含图片内容,其显示超出边框

This commit is contained in:
sw 2014-10-10 14:39:07 +08:00
parent 5180c959a8
commit 2dc5b1f18c
3 changed files with 31 additions and 10 deletions

View File

@ -123,9 +123,10 @@
</tr> </tr>
<tr> <tr>
<td colspan="2" width="580px" > <td colspan="2" width="580px" >
<p class="font_description"> <span class="font_description">
<%= textilizable(comment.comments) %> <%= textilizable(comment.comments) %>
</p></td> </span>
</td>
</tr> </tr>
<tr> <tr>
<td align="left"><span class="font_lighter"> <%= format_time(comment.created_on) %></span></td> <td align="left"><span class="font_lighter"> <%= format_time(comment.created_on) %></span></td>

View File

@ -80,7 +80,9 @@
<div id="comments" style="margin-bottom:16px;"> <div id="comments" style="margin-bottom:16px;">
<div style="margin:15px"> <div style="margin:15px">
<span class="font_description"> <%= textilizable(@news, :description) %> </span> <span class="font_description">
<%= textilizable(@news, :description) %>
</span>
<br/> <br/>
<%= link_to_attachments @news %> <%= link_to_attachments @news %>
<br/> <br/>
@ -115,22 +117,35 @@
<% next if comment.new_record? %> <% next if comment.new_record? %>
<table width="660px" border="0" align="center"> <table width="660px" border="0" align="center">
<tr> <tr>
<td colspan="2" valign="top" width="50" ><%= image_tag(url_to_avatar(comment.author), :class => "avatar")%></td> <td colspan="2" valign="top" width="50" >
<%= image_tag(url_to_avatar(comment.author), :class => "avatar")%>
</td>
<td> <td>
<table width="580px" border="0"> <table width="580px" border="0">
<tr> <tr>
<td colspan="2" valign="top"><strong><%= link_to_user(comment.author) if comment.respond_to?(:author) %> </strong><span class="font_lighter"><%= l(:label_project_newadd) %></span><%= l(:label_comment_plural) %></td> <td colspan="2" valign="top">
<strong><%= link_to_user(comment.author) if comment.respond_to?(:author) %> </strong>
<span class="font_lighter"><%= l(:label_project_newadd) %></span>
<%= l(:label_comment_plural) %>
</td>
</tr> </tr>
<tr> <tr>
<td colspan="2" width="580px" > <td colspan="2" width="580px" >
<p class="font_description"> <span class="font_description">
<%= textilizable(comment.comments) %> <%= textilizable(comment.comments) %>
</p></td> </span>
</td>
</tr> </tr>
<tr> <tr>
<td align="left"><span class="font_lighter"> <%= format_time(comment.created_on) %></span></td> <td align="left">
<td width="200" align="right" class="a"><%= link_to_if_authorized image_tag('delete.png'), {:controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment}, <span class="font_lighter"> <%= format_time(comment.created_on) %></span>
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :title => l(:button_delete) %></td> </td>
<td width="200" align="right" class="a">
<%= link_to_if_authorized image_tag('delete.png'), {:controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment},
:data => {:confirm => l(:text_are_you_sure)},
:method => :delete,
:title => l(:button_delete) %>
</td>
</tr> </tr>
</table></td> </table></td>
</tr> </tr>

View File

@ -753,6 +753,11 @@ ul.user_course_sort li{list-style-type:none;
word-break:break-all; word-break:break-all;
word-wrap: break-word; word-wrap: break-word;
} }
.font_description img{
max-width: 90%;
max-height: 90%; /* 设置最大宽度和高度 */
}
.font_description2{ .font_description2{
font-size:13px; font-size:13px;
line-height: 1.5em; line-height: 1.5em;