Merge branch 'hjq_new_course' of https://git.trustie.net/jacknudt/trustieforge into hjq_new_course

Conflicts:
	app/helpers/users_helper.rb
	app/views/users/_project_issue_detail.html.erb
	app/views/users/search_user_course.js.erb
	app/views/users/search_user_org.js.erb
	app/views/users/search_user_project.js.erb
	db/schema.rb
This commit is contained in:
huang 2016-02-25 11:17:54 +08:00
commit 635e6300a1
3 changed files with 710 additions and 705 deletions

File diff suppressed because it is too large Load Diff

View File

@ -85,6 +85,11 @@ module UsersHelper
end
end
def link_to_user_version(version, options = {})
return '' unless version && version.is_a?(Version)
link_to_if version.visible?, format_version_name(version), { :controller => 'versions', :action => 'show', :id => version }, :class => "linkBlue"
end
# 统计未读消息数
def unviewed_message(user)
course_count = CourseMessage.where("user_id =? and viewed =?", user, 0).count

View File

@ -1,11 +1,11 @@
<% if @obj %>
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_list',
:locals => {:obj => @obj,:object_flag => @obj_flag,:select_tag_name => @select_tag_name}) %>');
$("#tags_name_<%=@obj.id%>").val("");
$("#add_tag_<%=@obj.id%>").hide();
<% else %>
$("#course_list").html("<%= escape_javascript(render :partial => 'files/project_list',
:locals => {project: @project,all_attachments: @all_attachments,sort:@sort,order:@order,project_attachments:@obj_attachments}) %>");
<% end %>
<% if @obj %>
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_list',
:locals => {:obj => @obj,:object_flag => @obj_flag,:select_tag_name => @select_tag_name}) %>');
$("#tags_name_<%=@obj.id%>").val("");
$("#add_tag_<%=@obj.id%>").hide();
<% else %>
$("#course_list").html("<%= escape_javascript(render :partial => 'files/project_list',
:locals => {project: @project,all_attachments: @all_attachments,sort:@sort,order:@order,project_attachments:@obj_attachments}) %>");
<% end %>
$("#files_tag_project").html("<%= escape_javascript(render :partial => "files/tag_yun_project", :locals => {:tag_list => @tag_list,:project => @project,:tag_name => @select_tag_name}) %>");