parent
e8a313be6c
commit
123817df93
|
@ -110,16 +110,17 @@ module WelcomeHelper
|
|||
# activity.scope=['memos']
|
||||
# activity.events_welcome(nil, nil, {:limit => limit})
|
||||
|
||||
# resultSet = Memo.where('memos.parent_id IS NULL').includes(:last_reply).order('COALESCE (last_replies_memos.created_at, memos.created_at) DESC').limit(limit)
|
||||
resultSet = Memo.where('memos.parent_id IS NULL').includes(:last_reply).order('COALESCE (last_replies_memos.created_at, memos.created_at) DESC').limit(limit)
|
||||
# resultSet += Message.where('messages.parent_id IS NULL').includes(:last_reply).order('COALESCE (last_replies_messages.created_on, messages.created_on) DESC').limit(limit)
|
||||
resultSet = Memo.includes(:children).where('parent_id IS NULL').order('updated_at DESC').limit(limit)
|
||||
resultSet += Message.includes(:children).where('parent_id IS NULL').order('updated_on DESC').limit(limit)
|
||||
resultSet.sort! {|x,y| y.event_datetime <=> x.event_datetime}
|
||||
resultSet = resultSet.to_a
|
||||
for i in 0..(resultSet.size-1)
|
||||
resultSet[i] = resultSet[i].children.last if resultSet[i].children.count > 0
|
||||
end
|
||||
resultSet.take(limit)
|
||||
|
||||
# resultSet = Memo.includes(:children).where('parent_id IS NULL').order('updated_at DESC').limit(limit)
|
||||
# resultSet += Message.includes(:children).where('parent_id IS NULL').order('updated_on DESC').limit(limit)
|
||||
# resultSet.sort! {|x,y| y.event_datetime <=> x.event_datetime}
|
||||
# resultSet = resultSet.to_a
|
||||
# for i in 0..(resultSet.size-1)
|
||||
# resultSet[i] = resultSet[i].children.last if resultSet[i].children.count > 0
|
||||
# end
|
||||
# resultSet.take(limit)
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<%= form_tag(:controller => 'bids', :action => 'contest', :method => :get) do %>
|
||||
<table width="940px">
|
||||
<tr>
|
||||
<td class="info_font" style="width: 220px; color: #15bccf""><%= l(:label_contest_innovate) %></td>
|
||||
<td class="info_font" style="width: 220px; color: #15bccf"><%= l(:label_contest_innovate) %></td>
|
||||
<td class="location-list"><strong><%= l(:label_user_location) %> :</strong></td>
|
||||
<td rowspan="2">
|
||||
<% if User.current.logged? %>
|
||||
|
@ -54,4 +54,4 @@
|
|||
<%= render :partial => "layouts/no_content"%>
|
||||
<% end %>
|
||||
|
||||
|
||||
<% html_title l(:label_contest_list)%>
|
||||
|
|
|
@ -36,3 +36,5 @@
|
|||
<%= render :partial => "layouts/no_content"%>
|
||||
<% end %>
|
||||
|
||||
|
||||
<% html_title l(:label_requirement_enterprise_list)%>
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
<div class="tools ">
|
||||
<ul><h3>项目交流</h3>
|
||||
<li><%= link_to l(:project_module_documents), project_documents_path(@project) %></li>
|
||||
<li><%= link_to l(:project_module_wiki), project_wiki_path(@project) %></li>
|
||||
<li><%= link_to l(:label_project_tool_response) ,project_feedback_path(@project) %></li>
|
||||
<li><%= link_to l(:project_module_files) ,project_files_path(@project) %></li>
|
||||
<li><%= link_to l(:project_module_wiki), project_wiki_path(@project) %></li>
|
||||
</ul>
|
||||
<ul><h3>进度跟踪</h3>
|
||||
<li><%= link_to l(:project_module_calendar),project_calendar_path(@project) %></li>
|
||||
|
@ -15,7 +15,7 @@
|
|||
</ul>
|
||||
<ul><h3>其他工具</h3>
|
||||
<li><%= link_to l(:label_module_share) ,share_show_path(@project) %></li>
|
||||
<li><%= link_to l(:label_project_tool_response) ,project_feedback_path(@project) %></li>
|
||||
<li><%= link_to l(:project_module_documents), project_documents_path(@project) %></li>
|
||||
<li></li>
|
||||
</ul>
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<%= form_tag(:controller => 'projects', :action => 'search', :method => :get) do %>
|
||||
<table width="940px">
|
||||
<tr>
|
||||
<td class="info_font" style="width: 220px; color: #15bccf""><%= l(:label_course_practice) %></td>
|
||||
<td class="info_font" style="width: 220px; color: #15bccf"><%= l(:label_course_practice) %></td>
|
||||
<td class="location-list"><strong><%= l(:label_user_location) %> :</strong></td>
|
||||
<td rowspan="2">
|
||||
<% if User.current.logged?%>
|
||||
|
@ -65,4 +65,4 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% html_title(l(:label_project_plural)) -%>
|
||||
<% html_title(l(:label_new_course)) -%>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<% if @journal_destroyed.nil? %>
|
||||
alert('<%=l(:notice_failed_delete)%>');
|
||||
<% elsif (['Principal','Project'].include? @journal_destroyed.jour_type)%>
|
||||
<% elsif (['Principal','Project', 'Bid'].include? @journal_destroyed.jour_type)%>
|
||||
var destroyedItem = $('#word_li_<%=@journal_destroyed.id%>')
|
||||
destroyedItem.fadeOut(600,function(){
|
||||
destroyedItem.remove();
|
||||
|
|
|
@ -1562,6 +1562,7 @@ en:
|
|||
label_noawards: No awards
|
||||
label_user_location: Location
|
||||
label_requirement_enterprise: Requirements
|
||||
label_requirement_enterprise_list: Requirements List
|
||||
label_contest_innovate: Competitions
|
||||
label_software_user: Users
|
||||
label_course_practice: Courses
|
||||
|
|
|
@ -445,7 +445,7 @@ zh:
|
|||
project_module_time_tracking: 时间跟踪
|
||||
project_module_news: 新闻
|
||||
project_module_documents: 文档
|
||||
project_module_files: 文件共享
|
||||
project_module_files: 版本下载
|
||||
project_module_wiki: Wiki
|
||||
project_module_repository: 版本库
|
||||
project_module_boards: 讨论区
|
||||
|
@ -515,6 +515,7 @@ zh:
|
|||
label_software_user: 软件创客
|
||||
label_contest_innovate: 创新竞赛
|
||||
label_requirement_enterprise: 软件众包
|
||||
label_requirement_enterprise_list: 众包列表
|
||||
label_new_homework: 作业
|
||||
label_new_contest: 竞赛
|
||||
label_requirement_focus: 关注需求
|
||||
|
|
Loading…
Reference in New Issue