修复个人动态图片显示不准确的问题

This commit is contained in:
sw 2014-07-28 09:47:11 +08:00
parent 4fae105b96
commit cc215e6c7b
3 changed files with 27 additions and 4 deletions

View File

@ -25,6 +25,11 @@
<%= link_to "#{eventToLanguageCourse(e.event_type, @project)}: "<< format_activity_title(e.event_title), (e.event_type.eql?("attachment")&&e.container.kind_of?(Project)) ? project_files_path(e.container) : e.event_url %> <%= link_to "#{eventToLanguageCourse(e.event_type, @project)}: "<< format_activity_title(e.event_title), (e.event_type.eql?("attachment")&&e.container.kind_of?(Project)) ? project_files_path(e.container) : e.event_url %>
<div class="activity_description info-break" style="font-size: 13px;"> <div class="activity_description info-break" style="font-size: 13px;">
<div class="issue-list-description">
<div class="wiki">
<%#= textilizable e.event_url,:description %>
</div>
</div>
<%= h(truncate(strip_tags(e.event_description).gsub(/&nbsp;/, ' '), length: 30, omission: '...')) %> <%= h(truncate(strip_tags(e.event_description).gsub(/&nbsp;/, ' '), length: 30, omission: '...')) %>
</div> </div>
<div class="activity_status" style="position:relative; padding-top: 3px;"> <div class="activity_status" style="position:relative; padding-top: 3px;">

View File

@ -252,17 +252,35 @@
<tr> <tr>
<% if e.user == User.current %> <% if e.user == User.current %>
<td colspan="2" valign="top"> <td colspan="2" valign="top">
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong>&nbsp;<span class="font_lighter"><%= l(:label_i_new_activity) %></span>&nbsp;<%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %> <strong>
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %>
</strong>&nbsp;
<span class="font_lighter">
<%= l(:label_i_new_activity) %>
</span>&nbsp;
<%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %>
</td> </td>
<% else %> <% else %>
<td colspan="2" valign="top"> <td colspan="2" valign="top">
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong>&nbsp;<span class="font_lighter"><%= l(:label_new_activity) %></span>&nbsp;<%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %> <strong>
<%= link_to(h(e.user), user_path(e.user_id)) %>
</strong>&nbsp;
<span class="font_lighter">
<%= l(:label_new_activity) %>
</span>&nbsp;
<%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %>
</td> </td>
<% end %> <% end %>
</tr> </tr>
<tr> <tr>
<td colspan="2" width="580"> <td colspan="2" width="580">
<p class="font_description"> <%= textilizable(act.description) %> </p></td> <div class="issue-list-description">
<div class="wiki">
<%= textilizable act, :description %>
</div>
</div>
<!-- <p class="font_description"> <%#= textilizable(act.description) %> </p> -->
</td>
</tr> </tr>
<tr> <tr>
<td> <td>

View File

@ -11,7 +11,7 @@
# #
# It's strongly recommended to check this file into your version control system. # It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20140725062302) do ActiveRecord::Schema.define(:version => 20140725073357) do
create_table "activities", :force => true do |t| create_table "activities", :force => true do |t|
t.integer "act_id", :null => false t.integer "act_id", :null => false