项目社区加入资源库动态
This commit is contained in:
parent
36c099c305
commit
208ca67d35
|
@ -2383,7 +2383,7 @@ class UsersController < ApplicationController
|
|||
shield_project_ids = ShieldActivity.select("shield_id").where("container_type='User' and container_id=#{@user.id} and shield_type='Project'").map(&:shield_id)
|
||||
@page = params[:page] ? params[:page].to_i + 1 : 0
|
||||
user_project_ids = (@user.favorite_projects.visible.map{|project| project.id}-shield_project_ids).empty? ? "(-1)" : "(" + (@user.favorite_projects.visible.map{|project| project.id}-shield_project_ids).join(",") + ")"
|
||||
project_types = "('Message','Issue','Project')"
|
||||
project_types = "('Message','Issue','Project', 'Attachment')"
|
||||
principal_types = "JournalsForMessage"
|
||||
container_type = ''
|
||||
act_type = ''
|
||||
|
@ -2398,6 +2398,9 @@ class UsersController < ApplicationController
|
|||
when "current_user"
|
||||
container_type = 'Principal'
|
||||
act_type = 'Principal'
|
||||
when "project_resource"
|
||||
container_type = 'Project'
|
||||
act_type = "Attachment"
|
||||
when "all"
|
||||
container_type = 'all'
|
||||
act_type = 'all'
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
<div class="container-big mt10">
|
||||
<div class="pr">
|
||||
<!-- 项目社区赛选的资源库动态为短版,具体项目赛选的资源库为宽版 -->
|
||||
<div class="<%= @project_community.nil? ? 'container-big' : 'resources' %> mt10">
|
||||
<div class="<%= @project_community.nil? ? 'pr' : 'homepagePostBrief' %>">
|
||||
<div class="homepagePostPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
|
||||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||
</div>
|
||||
<div class="content-big">
|
||||
<div class="<%= @project_community.nil? ? 'content-big' : 'homepagePostDes' %>">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
|
@ -12,10 +13,10 @@
|
|||
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% end %>
|
||||
TO
|
||||
<%= link_to activity.project.name.to_s+" | 项目资源", project_files_path(activity.course), :class => "newsBlue ml15" %>
|
||||
<%= link_to activity.project.name.to_s+" | 项目资源", project_files_path(activity.project), :class => "newsBlue ml15" %>
|
||||
</div>
|
||||
<div class="homepagePostTitle break_word" >
|
||||
<%= link_to activity.filename, project_files_path(activity.course), :class => "postGrey" %>
|
||||
<%= link_to activity.filename, project_files_path(activity.project), :class => "postGrey" %>
|
||||
</div>
|
||||
<div class="homepagePostSubmitContainer">
|
||||
<div class="homepagePostDeadline mr15">
|
||||
|
|
|
@ -78,6 +78,8 @@
|
|||
<%# end %>
|
||||
<% when 'Message' %>
|
||||
<%= render :partial => 'project_message', :locals => {:activity => act, :user_activity_id => user_activity.id, :is_course => 0, :is_board => 0} %>
|
||||
<% when 'Attachment'%>
|
||||
<%= render :partial => 'users/project_attachment', :locals => {:activity => act, :user_activity_id => user_activity.id} %>
|
||||
<% when 'Project' %>
|
||||
<%# cache (act) do %>
|
||||
<%= render :partial => 'project_create', :locals => {:activity => act, :user_activity_id => user_activity.id} %>
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
:class => "homepagePostTypeMine postTypeGrey" %></li>
|
||||
<li><%= link_to "问题动态", {:controller => "users", :action => "project_community", :type => "project_issue"}, :class => "homepagePostTypeQuestion postTypeGrey"%></li>
|
||||
<li><%= link_to "论坛动态", {:controller => "users", :action => "project_community", :type => "project_message"}, :class => "homepagePostTypeForum postTypeGrey"%></li>
|
||||
<li><%= link_to "资源库动态", {:controller => "users", :action => "project_community", :type => "project_resource"}, :class => "homepagePostTypeNotice postTypeGrey" %></li>
|
||||
<!-- <li><%#= link_to "个人留言", {:controller => "users", :action => "project_community", :type => "user_journals"}, :class => "homepagePostTypeMessage postTypeGrey" %></li>-->
|
||||
<% end %>
|
||||
</ul>
|
||||
|
|
Loading…
Reference in New Issue