修复某些课程动态内容为空的BUG #1128
This commit is contained in:
parent
5f3ab0322b
commit
37e5bdee22
|
@ -43,292 +43,295 @@
|
||||||
<% (Rails.logger.error "[Error] =========================================================> NameError: uninitialized constant " + e.act_type.to_s; next;) if e.act_type.safe_constantize.nil? %>
|
<% (Rails.logger.error "[Error] =========================================================> NameError: uninitialized constant " + e.act_type.to_s; next;) if e.act_type.safe_constantize.nil? %>
|
||||||
<% act = e.act %>
|
<% act = e.act %>
|
||||||
<% unless act.nil? %>
|
<% unless act.nil? %>
|
||||||
<table width="660" border="0" align="left" style="border-bottom: 1px dashed rgb(204, 204, 204); margin-bottom: 10px;font-size:14px;">
|
<% if e.act_type == 'JournalsForMessage' || e.act_type == 'Bid' || e.act_type == 'Journal'|| e.act_type == 'Changeset' || e.act_type == 'Message' || e.act_type == 'Principal' || e.act_type == 'News' || e.act_type == 'Issue' || e.act_type == 'Contest'%>
|
||||||
<tr>
|
<table width="660" border="0" align="left" style="border-bottom: 1px dashed rgb(204, 204, 204); margin-bottom: 10px;font-size:14px;">
|
||||||
<td colspan="2" valign="top" width="50"><%= image_tag(url_to_avatar(e.user), :class => "avatar") %></td>
|
|
||||||
<td>
|
|
||||||
<table width="580" border="0" class="info-break">
|
|
||||||
<% case e.act_type %>
|
|
||||||
<% when 'JournalsForMessage' %>
|
|
||||||
<% if User.current.login == e.user.try(:login) %>
|
|
||||||
<%# if e.user_id == act.jour.id %>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" valign="top">
|
<td colspan="2" valign="top" width="50"><%= image_tag(url_to_avatar(e.user), :class => "avatar") %></td>
|
||||||
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_have_feedback) %>
|
<td>
|
||||||
<%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %><%= l(:label_of_feedback) + l(:label_layouts_feedback) %></span>
|
<table width="580" border="0" class="info-break">
|
||||||
</td>
|
<% case e.act_type %>
|
||||||
|
<% when 'JournalsForMessage' %>
|
||||||
|
<% if User.current.login == e.user.try(:login) %>
|
||||||
|
<%# if e.user_id == act.jour.id %>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" valign="top">
|
||||||
|
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_have_feedback) %>
|
||||||
|
<%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %><%= l(:label_of_feedback) + l(:label_layouts_feedback) %></span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<%# else %>
|
||||||
|
<!-- <tr><td colspan="2" valign="top" class="font_lighter"><strong><%#= link_to("#{e.user.name}", user_path(e.user_id)) %> 给 <%#= link_to("#{act.at_user.name if act.at_user}", user_path(act.jour.id)) %> 留言了</strong> </td></tr> -->
|
||||||
|
<%# end %>
|
||||||
|
<% else %>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" valign="top">
|
||||||
|
<strong><%= link_to("#{e.user.name}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_have_feedback) %><%=
|
||||||
|
link_to("#{e.act.user.name}", user_path(e.act.user.id)) %><%= l(:label_of_feedback) + l(:label_layouts_feedback) %></span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" width="580">
|
||||||
|
<p class="font_description"> <%= textilizable act.notes %> </p>
|
||||||
|
|
||||||
|
<div style="display: inline-block; float: right; margin-top: 0px"><span><%= link_to(l(:label_goto), user_newfeedback_user_path(e.user_id)) %>
|
||||||
|
</span></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
||||||
|
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
||||||
|
</div>
|
||||||
|
<div style="display: inline-block; float: right; margin-top: 0px"></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% when 'Bid' %>
|
||||||
|
<tr>
|
||||||
|
<% if act.reward_type == 3 && @show_course == 1%>
|
||||||
|
<% if e.user == User.current %>
|
||||||
|
<td colspan="2" valign="top">
|
||||||
|
<strong> <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong><span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %>
|
||||||
|
</td>
|
||||||
|
<% else %>
|
||||||
|
<td colspan="2" valign="top">
|
||||||
|
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %>
|
||||||
|
</td>
|
||||||
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
<% if e.user == User.current %>
|
||||||
|
<td colspan="2" valign="top">
|
||||||
|
<strong> <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong><span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %>
|
||||||
|
</td>
|
||||||
|
<% else %>
|
||||||
|
<td colspan="2" valign="top">
|
||||||
|
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %>
|
||||||
|
</td>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" width="580">
|
||||||
|
<p class="font_description"> <%= act.description.html_safe %> </p></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
||||||
|
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
||||||
|
</div>
|
||||||
|
<div style="display: inline-block; float: right; margin-top: 0px">
|
||||||
|
<span><%= link_to l(:label_find_all_comments), respond_path(e.act_id) %></span><a class="font_lighter"><%= l(:label_comments_count, :count => e.act.commit) %></a>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% when 'Journal' %>
|
||||||
|
<tr>
|
||||||
|
<% if e.user == User.current %>
|
||||||
|
<td colspan="2" valign="top">
|
||||||
|
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to(l(:label_activity_project)+act.issue.project.name, project_path(act.issue.project.identifier)) %> <%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.id}: #{act.issue.subject}"), {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"} %>
|
||||||
|
</td>
|
||||||
|
<% else %>
|
||||||
|
<td colspan="2" valign="top">
|
||||||
|
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to(l(:label_activity_project)+act.issue.project.name, project_path(act.issue.project.identifier)) %> <%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.id}: #{act.issue.subject}"), {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"} %>
|
||||||
|
</td>
|
||||||
|
<% end %>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<% if act.notes.nil? %>
|
||||||
|
<% desStr = '' %>
|
||||||
|
<% else %>
|
||||||
|
<% desStr=act.notes.html_safe %>
|
||||||
|
<% end %>
|
||||||
|
<td colspan="2" width="580"><p class="font_description"> <%= desStr %> </p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
||||||
|
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
||||||
|
</div>
|
||||||
|
<div style="display: inline-block; float: right; margin-top: 0px"></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% when 'Changeset' %>
|
||||||
|
<tr>
|
||||||
|
<% if e.user == User.current %>
|
||||||
|
<td colspan="2" valign="top">
|
||||||
|
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to format_activity_title(act.title), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %></span>
|
||||||
|
</td>
|
||||||
|
<% else %>
|
||||||
|
<td colspan="2" valign="top">
|
||||||
|
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title(act.title), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %>
|
||||||
|
</td>
|
||||||
|
<% end %>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" width="580">
|
||||||
|
<p class="font_description"> <%= act.long_comments.html_safe %> </p></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
||||||
|
<span class="font_lighter"> <%= format_time(e.act.committed_on) %></span>
|
||||||
|
</div>
|
||||||
|
<div style="display: inline-block; float: right; margin-top: 0px">
|
||||||
|
<span><%= link_to l(:label_find_all_comments), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %></span><a class="font_lighter"><%= l(:label_comments_count, :count => e.act.count) %></a>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% when 'Message' %>
|
||||||
|
<tr>
|
||||||
|
<% if e.user == User.current %>
|
||||||
|
<td colspan="2" valign="top">
|
||||||
|
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to format_activity_title("#{act.board.name}: #{act.subject}"), {:controller => 'messages', :action => 'show', :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}) %>
|
||||||
|
</td>
|
||||||
|
<% else %>
|
||||||
|
<td colspan="2" valign="top">
|
||||||
|
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{act.board.name}: #{act.subject}"), {:controller => 'messages', :action => 'show', :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}) %>
|
||||||
|
</td>
|
||||||
|
<% end %>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" width="580">
|
||||||
|
<p class="font_description"> <%= h act.content.truncate(240, omission: '...') %> </p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
||||||
|
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
||||||
|
</div>
|
||||||
|
<div style="display: inline-block; float: right; margin-top: 0px"></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% when 'Principal' %>
|
||||||
|
<tr>
|
||||||
|
<% if e.user == User.current %>
|
||||||
|
<td colspan="2" valign="top">
|
||||||
|
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_user) %></span>
|
||||||
|
</td>
|
||||||
|
<% else %>
|
||||||
|
<td colspan="2" valign="top">
|
||||||
|
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_user) %></span>
|
||||||
|
</td>
|
||||||
|
<% end %>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" width="580"><p class="font_description"></p></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
||||||
|
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
||||||
|
</div>
|
||||||
|
<div style="display: inline-block; float: right; margin-top: 0px"></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% when 'News' %>
|
||||||
|
<tr>
|
||||||
|
<% if e.user == User.current %>
|
||||||
|
<td colspan="2" valign="top">
|
||||||
|
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %>
|
||||||
|
</td>
|
||||||
|
<% else %>
|
||||||
|
<td colspan="2" valign="top">
|
||||||
|
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %>
|
||||||
|
</td>
|
||||||
|
<% end %>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" width="580">
|
||||||
|
<p class="font_description"> <%= act.description.html_safe %> </p></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
||||||
|
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
||||||
|
</div>
|
||||||
|
<div style="display: inline-block; float: right; margin-top: 0px">
|
||||||
|
<span><%= link_to l(:label_find_all_comments), {:controller => 'news', :action => 'show', :id => act.id} %></span><a class="font_lighter"><%= l(:label_comments_count, :count => e.act.comments_count) %></a>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% when 'Issue' %>
|
||||||
|
<tr>
|
||||||
|
<% if e.user == User.current %>
|
||||||
|
<td colspan="2" valign="top">
|
||||||
|
<strong>
|
||||||
|
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %>
|
||||||
|
</strong>
|
||||||
|
<span class="font_lighter">
|
||||||
|
<%= l(:label_i_new_activity) %>
|
||||||
|
</span>
|
||||||
|
<%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %>
|
||||||
|
</td>
|
||||||
|
<% else %>
|
||||||
|
<td colspan="2" valign="top">
|
||||||
|
<strong>
|
||||||
|
<%= link_to(h(e.user), user_path(e.user_id)) %>
|
||||||
|
</strong>
|
||||||
|
<span class="font_lighter">
|
||||||
|
<%= l(:label_new_activity) %>
|
||||||
|
</span>
|
||||||
|
<%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %>
|
||||||
|
</td>
|
||||||
|
<% end %>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" width="580" style="WORD-BREAK: break-all; WORD-WRAP: break-word">
|
||||||
|
<!--
|
||||||
|
<div class="issue-list-description">
|
||||||
|
<div class="wiki">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
-->
|
||||||
|
<%= textilizable act, :description %>
|
||||||
|
<!-- <p class="font_description"> <%#= textilizable(act.description) %> </p> -->
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
||||||
|
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
||||||
|
</div>
|
||||||
|
<div style="display: inline-block; float: right; margin-top: 0px">
|
||||||
|
<span><%= link_to l(:label_find_all_comments), {:controller => 'issues', :action => 'show', :id => act.id} %></span><a class="font_lighter"><%= l(:label_comments_count, :count => e.act.journals.count) %></a>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% when 'Contest' %>
|
||||||
|
<tr>
|
||||||
|
<% if e.user == User.current && @show_contest == 1%>
|
||||||
|
<td colspan="2" valign="top">
|
||||||
|
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %>
|
||||||
|
</td>
|
||||||
|
<% else %>
|
||||||
|
<td colspan="2" valign="top">
|
||||||
|
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %>
|
||||||
|
</td>
|
||||||
|
<% end %>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" width="580"><p class="font_description"> <%= h act.description %> </p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
||||||
|
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
||||||
|
</div>
|
||||||
|
</tr>
|
||||||
|
<% else %>
|
||||||
|
<%# f=1 %>
|
||||||
|
<% end %><!-- < % #case end %> -->
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<%# else %>
|
|
||||||
<!-- <tr><td colspan="2" valign="top" class="font_lighter"><strong><%#= link_to("#{e.user.name}", user_path(e.user_id)) %> 给 <%#= link_to("#{act.at_user.name if act.at_user}", user_path(act.jour.id)) %> 留言了</strong> </td></tr> -->
|
|
||||||
<%# end %>
|
|
||||||
<% else %>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2" valign="top">
|
|
||||||
<strong><%= link_to("#{e.user.name}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_have_feedback) %><%=
|
|
||||||
link_to("#{e.act.user.name}", user_path(e.act.user.id)) %><%= l(:label_of_feedback) + l(:label_layouts_feedback) %></span>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<% end %>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2" width="580">
|
|
||||||
<p class="font_description"> <%= textilizable act.notes %> </p>
|
|
||||||
|
|
||||||
<div style="display: inline-block; float: right; margin-top: 0px"><span><%= link_to(l(:label_goto), user_newfeedback_user_path(e.user_id)) %>
|
</table>
|
||||||
</span></div>
|
<% end %>
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
|
||||||
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
|
||||||
</div>
|
|
||||||
<div style="display: inline-block; float: right; margin-top: 0px"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<% when 'Bid' %>
|
|
||||||
<tr>
|
|
||||||
<% if act.reward_type == 3 && @show_course == 1%>
|
|
||||||
<% if e.user == User.current %>
|
|
||||||
<td colspan="2" valign="top">
|
|
||||||
<strong> <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong><span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %>
|
|
||||||
</td>
|
|
||||||
<% else %>
|
|
||||||
<td colspan="2" valign="top">
|
|
||||||
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %>
|
|
||||||
</td>
|
|
||||||
<% end %>
|
|
||||||
<% else %>
|
|
||||||
<% if e.user == User.current %>
|
|
||||||
<td colspan="2" valign="top">
|
|
||||||
<strong> <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong><span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %>
|
|
||||||
</td>
|
|
||||||
<% else %>
|
|
||||||
<td colspan="2" valign="top">
|
|
||||||
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %>
|
|
||||||
</td>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2" width="580">
|
|
||||||
<p class="font_description"> <%= act.description.html_safe %> </p></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
|
||||||
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
|
||||||
</div>
|
|
||||||
<div style="display: inline-block; float: right; margin-top: 0px">
|
|
||||||
<span><%= link_to l(:label_find_all_comments), respond_path(e.act_id) %></span><a class="font_lighter"><%= l(:label_comments_count, :count => e.act.commit) %></a>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<% when 'Journal' %>
|
|
||||||
<tr>
|
|
||||||
<% if e.user == User.current %>
|
|
||||||
<td colspan="2" valign="top">
|
|
||||||
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to(l(:label_activity_project)+act.issue.project.name, project_path(act.issue.project.identifier)) %> <%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.id}: #{act.issue.subject}"), {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"} %>
|
|
||||||
</td>
|
|
||||||
<% else %>
|
|
||||||
<td colspan="2" valign="top">
|
|
||||||
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to(l(:label_activity_project)+act.issue.project.name, project_path(act.issue.project.identifier)) %> <%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.id}: #{act.issue.subject}"), {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"} %>
|
|
||||||
</td>
|
|
||||||
<% end %>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<% if act.notes.nil? %>
|
|
||||||
<% desStr = '' %>
|
|
||||||
<% else %>
|
|
||||||
<% desStr=act.notes.html_safe %>
|
|
||||||
<% end %>
|
|
||||||
<td colspan="2" width="580"><p class="font_description"> <%= desStr %> </p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
|
||||||
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
|
||||||
</div>
|
|
||||||
<div style="display: inline-block; float: right; margin-top: 0px"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<% when 'Changeset' %>
|
|
||||||
<tr>
|
|
||||||
<% if e.user == User.current %>
|
|
||||||
<td colspan="2" valign="top">
|
|
||||||
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to format_activity_title(act.title), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %></span>
|
|
||||||
</td>
|
|
||||||
<% else %>
|
|
||||||
<td colspan="2" valign="top">
|
|
||||||
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title(act.title), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %>
|
|
||||||
</td>
|
|
||||||
<% end %>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2" width="580">
|
|
||||||
<p class="font_description"> <%= act.long_comments.html_safe %> </p></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
|
||||||
<span class="font_lighter"> <%= format_time(e.act.committed_on) %></span>
|
|
||||||
</div>
|
|
||||||
<div style="display: inline-block; float: right; margin-top: 0px">
|
|
||||||
<span><%= link_to l(:label_find_all_comments), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %></span><a class="font_lighter"><%= l(:label_comments_count, :count => e.act.count) %></a>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<% when 'Message' %>
|
|
||||||
<tr>
|
|
||||||
<% if e.user == User.current %>
|
|
||||||
<td colspan="2" valign="top">
|
|
||||||
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to format_activity_title("#{act.board.name}: #{act.subject}"), {:controller => 'messages', :action => 'show', :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}) %>
|
|
||||||
</td>
|
|
||||||
<% else %>
|
|
||||||
<td colspan="2" valign="top">
|
|
||||||
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{act.board.name}: #{act.subject}"), {:controller => 'messages', :action => 'show', :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}) %>
|
|
||||||
</td>
|
|
||||||
<% end %>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2" width="580">
|
|
||||||
<p class="font_description"> <%= h act.content.truncate(240, omission: '...') %> </p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
|
||||||
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
|
||||||
</div>
|
|
||||||
<div style="display: inline-block; float: right; margin-top: 0px"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<% when 'Principal' %>
|
|
||||||
<tr>
|
|
||||||
<% if e.user == User.current %>
|
|
||||||
<td colspan="2" valign="top">
|
|
||||||
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_user) %></span>
|
|
||||||
</td>
|
|
||||||
<% else %>
|
|
||||||
<td colspan="2" valign="top">
|
|
||||||
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_user) %></span>
|
|
||||||
</td>
|
|
||||||
<% end %>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2" width="580"><p class="font_description"></p></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
|
||||||
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
|
||||||
</div>
|
|
||||||
<div style="display: inline-block; float: right; margin-top: 0px"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<% when 'News' %>
|
|
||||||
<tr>
|
|
||||||
<% if e.user == User.current %>
|
|
||||||
<td colspan="2" valign="top">
|
|
||||||
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %>
|
|
||||||
</td>
|
|
||||||
<% else %>
|
|
||||||
<td colspan="2" valign="top">
|
|
||||||
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %>
|
|
||||||
</td>
|
|
||||||
<% end %>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2" width="580">
|
|
||||||
<p class="font_description"> <%= act.description.html_safe %> </p></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
|
||||||
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
|
||||||
</div>
|
|
||||||
<div style="display: inline-block; float: right; margin-top: 0px">
|
|
||||||
<span><%= link_to l(:label_find_all_comments), {:controller => 'news', :action => 'show', :id => act.id} %></span><a class="font_lighter"><%= l(:label_comments_count, :count => e.act.comments_count) %></a>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<% when 'Issue' %>
|
|
||||||
<tr>
|
|
||||||
<% if e.user == User.current %>
|
|
||||||
<td colspan="2" valign="top">
|
|
||||||
<strong>
|
|
||||||
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %>
|
|
||||||
</strong>
|
|
||||||
<span class="font_lighter">
|
|
||||||
<%= l(:label_i_new_activity) %>
|
|
||||||
</span>
|
|
||||||
<%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %>
|
|
||||||
</td>
|
|
||||||
<% else %>
|
|
||||||
<td colspan="2" valign="top">
|
|
||||||
<strong>
|
|
||||||
<%= link_to(h(e.user), user_path(e.user_id)) %>
|
|
||||||
</strong>
|
|
||||||
<span class="font_lighter">
|
|
||||||
<%= l(:label_new_activity) %>
|
|
||||||
</span>
|
|
||||||
<%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %>
|
|
||||||
</td>
|
|
||||||
<% end %>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2" width="580" style="WORD-BREAK: break-all; WORD-WRAP: break-word">
|
|
||||||
<!--
|
|
||||||
<div class="issue-list-description">
|
|
||||||
<div class="wiki">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
-->
|
|
||||||
<%= textilizable act, :description %>
|
|
||||||
<!-- <p class="font_description"> <%#= textilizable(act.description) %> </p> -->
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
|
||||||
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
|
||||||
</div>
|
|
||||||
<div style="display: inline-block; float: right; margin-top: 0px">
|
|
||||||
<span><%= link_to l(:label_find_all_comments), {:controller => 'issues', :action => 'show', :id => act.id} %></span><a class="font_lighter"><%= l(:label_comments_count, :count => e.act.journals.count) %></a>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<% when 'Contest' %>
|
|
||||||
<tr>
|
|
||||||
<% if e.user == User.current && @show_contest == 1%>
|
|
||||||
<td colspan="2" valign="top">
|
|
||||||
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %>
|
|
||||||
</td>
|
|
||||||
<% else %>
|
|
||||||
<td colspan="2" valign="top">
|
|
||||||
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %>
|
|
||||||
</td>
|
|
||||||
<% end %>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2" width="580"><p class="font_description"> <%= h act.description %> </p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
|
||||||
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
|
||||||
</div>
|
|
||||||
</tr>
|
|
||||||
<% else %>
|
|
||||||
<% f=1 %>
|
|
||||||
<% end %><!-- < % #case end %> -->
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<% end %><!-- < % #unless act.nil? end %> -->
|
<% end %><!-- < % #unless act.nil? end %> -->
|
||||||
|
|
||||||
<% end %><!-- < % #@activity.each do |e| end%> -->
|
<% end %><!-- < % #@activity.each do |e| end%> -->
|
||||||
|
|
|
@ -1801,3 +1801,4 @@ en:
|
||||||
modal_valid_passing: can be used.
|
modal_valid_passing: can be used.
|
||||||
|
|
||||||
label_company_name: Company Name
|
label_company_name: Company Name
|
||||||
|
notice_account_invalid_creditentials_new: You have not to the mailbox activation
|
||||||
|
|
Loading…
Reference in New Issue