Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into cxt_course
Conflicts: app/views/users/_anonymous_evaluation_list.html.erb
This commit is contained in:
commit
fc67e6e3be
|
@ -1872,7 +1872,7 @@ class UsersController < ApplicationController
|
|||
@applied_message_alls << mess
|
||||
end
|
||||
elsif message_all.message_type == "CourseMessage"
|
||||
if (mess.course_message_type == "JoinCourse" && mess.status == 0)
|
||||
if mess.course_message_type == "JoinCourseRequest" && mess.status == 0
|
||||
@applied_message_alls << mess
|
||||
end
|
||||
end
|
||||
|
@ -2079,11 +2079,11 @@ class UsersController < ApplicationController
|
|||
@message_alls << mess
|
||||
end
|
||||
elsif (message_all.message_type == "AppliedMessage" )
|
||||
if (mess.applied_type == "AppliedProject" && mess.status == 1) || (mess.applied_type == "ApplyAddSchools" && mess.status == 0)
|
||||
if (mess.applied_type == "AppliedProject" && mess.status == 1) || ( mess.applied_type == "ApplyAddSchools" && ApplyAddSchools.where(:school_id => mess.applied_id, :status => 0).count != 0 )
|
||||
@message_alls << mess
|
||||
end
|
||||
elsif message_all.message_type == "CourseMessage"
|
||||
if (mess.course_message_type == "JoinCourse" && mess.status == 0)
|
||||
if mess.course_message_type == "JoinCourseRequest" && mess.status == 0
|
||||
@message_alls << mess
|
||||
end
|
||||
end
|
||||
|
|
|
@ -33,6 +33,12 @@ module UsersHelper
|
|||
result = unsolved_issues_count + unfinished_homework_count + unfinished_test_count + unfinished_poll_count + anonymous_evaluation_count + unapproval_homework
|
||||
end
|
||||
|
||||
# 判断某个时间再多少天前
|
||||
# params[:num] 天数
|
||||
def many_days_ago time, num
|
||||
time > Time.now - 86400 * num
|
||||
end
|
||||
|
||||
def issue_list(issues, &block)
|
||||
ancestors = []
|
||||
issues.each do |issue|
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
<div class="sub-menu-title c_dark">
|
||||
<em></em>
|
||||
<font></font>
|
||||
<div>课程:<%= link_to course.syllabus.title, syllabus_path(course.syllabus_id), :target => '_blank' %></div>
|
||||
<div>班级:<%= link_to course.name, course_path(course.id,:host=>Setting.host_course), :target => '_blank' %></div>
|
||||
<div>课程:<%= link_to course.syllabus.title, syllabus_path(course.syllabus_id), :target => '_blank', :style => "background-color:#fff; height:auto; line-height:1; font-size:12px; color:#aaa;" %></div>
|
||||
<div>班级:<%= link_to course.name, course_path(course.id,:host=>Setting.host_course), :target => '_blank', :style => "background-color:#fff; height:auto; line-height:1; font-size:12px; color:#aaa;" %></div>
|
||||
</div>
|
||||
<%#= link_to course.name+"("+current_time_and_term_short(course)+")", course_path(course.id,:host=>Setting.host_course),
|
||||
:id => "show_course_#{course.id}", :class => 'course_list_menu hidden', :target => '_blank', :title => (course.is_public? ? "公开班级:":"私有班级:")+course.name+"("+current_time_and_term(course)+")"%>
|
||||
|
|
|
@ -161,13 +161,13 @@
|
|||
<% if is_current_user %>
|
||||
<div class="home-user-leftnav">
|
||||
<h3 >
|
||||
<%= link_to "课程社区", user_course_community_path(User.current), :class => "fl" %>
|
||||
<%= link_to "课程社区", user_course_community_path(User.current), :class => "fl" , :target => "_blank"%>
|
||||
</h3>
|
||||
<%# if hidden_unproject_infos %>
|
||||
<ul>
|
||||
<li class="home-user-leftnav-li icons-class clear">
|
||||
<%= link_to user_course_count > 0 ? "课程<span class='issues_nav_tag mr10 fr' style='line-height:18px;margin-top: 9px;'>#{user_course_count}</span>".html_safe : "课程",
|
||||
{:controller => "users", :action => "user_courselist", :id => @user}, :id => "user_course_list" %>
|
||||
{:controller => "users", :action => "user_courselist", :id => @user}, :id => "user_course_list", :target => "_blank" %>
|
||||
<!-- <div class="user_navmore_box" >
|
||||
<ul>
|
||||
<li class="user_navmore_icons">
|
||||
|
@ -203,12 +203,12 @@
|
|||
|
||||
<div class="home-user-leftnav">
|
||||
<h3 >
|
||||
<%= link_to "项目社区", user_project_community_path(User.current), :class => "fl" %>
|
||||
<%= link_to "项目社区", user_project_community_path(User.current), :class => "fl", :target => "_blank" %>
|
||||
</h3>
|
||||
<ul>
|
||||
<li class="home-user-leftnav-li icons-project clear">
|
||||
<%= link_to user_project_count > 0 ? "项目<span class='issues_nav_tag mr10 fr' style='line-height:18px;margin-top: 9px;'>#{user_project_count}</span>".html_safe : "项目",
|
||||
{:controller => "users", :action => "user_projectlist", :id => @user}, :id => 'user_project_list' %>
|
||||
{:controller => "users", :action => "user_projectlist", :id => @user}, :id => 'user_project_list', :target => "_blank" %>
|
||||
<!-- <div class="user_navmore_box" >
|
||||
<ul>
|
||||
<li class="user_navmore_icons">
|
||||
|
@ -230,11 +230,11 @@
|
|||
</li>
|
||||
<li class="home-user-leftnav-li icons-issue clear">
|
||||
<%= link_to issues_author_is_self_count > 0 ? "我发布的issue<span class='issues_nav_tag mr10 fr'style='line-height:18px;margin-top: 9px;'>#{issues_author_is_self_count}</span>".html_safe : "我发布的issue",
|
||||
user_issues_user_path(@user, :type => "author" ) %>
|
||||
user_issues_user_path(@user, :type => "author" ), :target => "_blank" %>
|
||||
</li>
|
||||
<li class="home-user-leftnav-li icons-issue clear">
|
||||
<%= link_to issues_assigned_is_self_count > 0 ? "我收到的issue<span class='issues_nav_tag mr10 fr' style='line-height:18px;margin-top: 9px;'>#{issues_assigned_is_self_count}</span>".html_safe : "我收到的issue",
|
||||
user_issues_user_path(@user, :type => "assigned") %>
|
||||
user_issues_user_path(@user, :type => "assigned"), :target => "_blank" %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -246,11 +246,11 @@
|
|||
<ul>
|
||||
<li class="home-user-leftnav-li icons-class clear">
|
||||
<%= link_to user_course_count > 0 ? "课程<span class='issues_nav_tag ml140'>#{user_course_count}</span>".html_safe : "课程",
|
||||
{:controller => "users", :action => "user_courselist", :id => @user}, :id => "user_course_list", :class => "fl" %>
|
||||
{:controller => "users", :action => "user_courselist", :id => @user}, :id => "user_course_list", :class => "fl", :target => "_blank" %>
|
||||
</li>
|
||||
<li class="home-user-leftnav-li icons-project clear">
|
||||
<%= link_to user_project_count > 0 ? "项目<span class='issues_nav_tag ml140'>#{user_project_count}</span>".html_safe : "项目",
|
||||
{:controller => "users", :action => "user_projectlist", :id => @user}, :id => 'user_project_list', :class => "fl" %>
|
||||
{:controller => "users", :action => "user_projectlist", :id => @user}, :id => 'user_project_list', :class => "fl", :target => "_blank" %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
<p>
|
||||
<span class="c_blue" style="color:#1b55a7;">
|
||||
|
||||
<%= link_to(h("#{@user.login}(#{@user.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %>
|
||||
</span>给你留言了
|
||||
</p>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="pro_new_info">
|
||||
<div class="icons_tishi"><img src="/images/new_project/icons_smile.png" width="110" height="110" alt=""></div>
|
||||
<p class="sy_tab_con_p ">没有数据可供显示!</p>
|
||||
<p class="sy_tab_con_p ">没有数据可以显示!</p>
|
||||
</div>
|
|
@ -9,10 +9,10 @@
|
|||
<div class="homepagePostTo break_word">
|
||||
<%= link_to activity.try(:author).show_name, user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
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">
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
<table class="sy_new_table clear" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>作业标题</th>
|
||||
<th><li class="fl ml5">作业标题</li></th>
|
||||
<th style="width:160px">来源</th>
|
||||
<th style="width:80px">类型</th>
|
||||
<th style="width:160px">截止剩余时间</th>
|
||||
<th style="width:120px">截止剩余时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -19,7 +19,7 @@
|
|||
</th>
|
||||
<th>
|
||||
<li class="homepageTabProjectName ml5">
|
||||
<%= link_to ae.course.name, course_path(ae.course), :target => "_blank", :class => "homepageTabTitle ml5"%>
|
||||
<%= link_to ae.course.try(:name),course_path(ae.course), :class => "homepageTabTitle ml5", :target => "_blank"%>
|
||||
<li>
|
||||
</th>
|
||||
<th>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="pro_new_info mt50" style="width:748px;height:405px;">
|
||||
<div class="icons_tishi"><img src="/images/new_project/icons_smile.png" width="110" height="110" alt=""></div>
|
||||
<p class="sy_tab_con_p ">该用户无公开动态~</p>
|
||||
<p class="sy_tab_con_p ">没有数据可以显示!</p>
|
||||
</div>
|
|
@ -1,4 +0,0 @@
|
|||
<div class="pro_new_info mt50" style="width:748px;height:405px;">
|
||||
<div class="icons_tishi"><img src="/images/new_project/icons_smile.png" width="110" height="110" alt=""></div>
|
||||
<p class="sy_tab_con_p ">该用户无公开动态~</p>
|
||||
</div>
|
|
@ -1,4 +0,0 @@
|
|||
<div class="pro_new_info mt50" style="width:748px;height:405px;">
|
||||
<div class="icons_tishi"><img src="/images/new_project/icons_smile.png" width="110" height="110" alt=""></div>
|
||||
<p class="sy_tab_con_p ">该用户无公开动态~</p>
|
||||
</div>
|
|
@ -3,10 +3,10 @@
|
|||
<table class="sy_new_table clear" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>作业标题</th>
|
||||
<th><li class="fl ml5">作业标题</li></th>
|
||||
<th style="width:160px">来源</th>
|
||||
<th style="width:80px">类型</th>
|
||||
<th style="width:160px">截止剩余时间</th>
|
||||
<th style="width:120px">截止剩余时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -14,12 +14,12 @@
|
|||
<tr>
|
||||
<th>
|
||||
<li class="homepageTabTitle">
|
||||
<%= link_to uh.name.to_s, student_work_index_path( :homework => uh.id, :tab => 1), :target => "_blank", :class => "homepageTabTitle fl ml5" %>
|
||||
<%= link_to uh.name.to_s, student_work_index_path( :homework => uh.id, :tab => 1), :target => "_blank", :class => "homepageTabTitle fl ml5", :title => "#{uh.name.to_s}" %>
|
||||
</li>
|
||||
</th>
|
||||
<th>
|
||||
<li class="homepageTabProjectName ml5">
|
||||
<%= link_to uh.course.try(:name), course_path(uh.course_id), :target => "_blank", :class => "homepageTabTitle ml5"%>
|
||||
<%= link_to uh.course.try(:name), course_path(uh.course_id), :target => "_blank", :class => "homepageTabTitle ml5", :target => "_blank", :title => "#{uh.course.try(:name)}" %>
|
||||
<li>
|
||||
</th>
|
||||
<th>
|
||||
|
|
|
@ -12,13 +12,13 @@
|
|||
<tr>
|
||||
<th>
|
||||
<li class="homepageTabPollTitle">
|
||||
<%= link_to up.polls_name.to_s, poll_path(up.id), :target => "_blank", :class => "homepageTabPollTitle fl ml5" %>
|
||||
<%= link_to up.polls_name.to_s, poll_path(up.id), :target => "_blank", :class => "homepageTabPollTitle fl ml5", :title => "#{up.polls_name.to_s}" %>
|
||||
</li>
|
||||
</th>
|
||||
<th>
|
||||
<li class="homepageTabProjectName ml5">
|
||||
<% if up.polls_type == "Course" %>
|
||||
<%= link_to Course.find(up.polls_group_id).name, course_path(Course.find(up.polls_group_id)) %>
|
||||
<%= link_to Course.find(up.polls_group_id).name, course_path(Course.find(up.polls_group_id)), :target => "_blank", :title => "#{Course.find(up.polls_group_id).name}" %>
|
||||
<% end %>
|
||||
<li>
|
||||
</th>
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
<table class="sy_new_table clear" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>测验标题</th>
|
||||
<th><li class="fl ml5">测验标题</li></th>
|
||||
<th style="width:160px">来源</th>
|
||||
<th style="width:80px">测验时长</th>
|
||||
<th style="width:160px">截止剩余时间</th>
|
||||
<th style="width:120px">截止剩余时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -14,12 +14,12 @@
|
|||
<tr>
|
||||
<th>
|
||||
<li class="homepageTabTitle">
|
||||
<%= link_to ut.exercise_name.to_s, exercise_index_path(:course_id => ut.course_id), :target => "_blank", :class => "homepageTabTitle fl ml5" %>
|
||||
<%= link_to ut.exercise_name.to_s, exercise_index_path(:course_id => ut.course_id), :target => "_blank", :class => "homepageTabTitle fl ml5", :title => "#{ut.exercise_name.to_s}" %>
|
||||
</li>
|
||||
</th>
|
||||
<th>
|
||||
<li class="homepageTabProjectName ml5">
|
||||
<%= link_to ut.course.try(:name), course_path(ut.course_id), :target => "_blank", :class => "homepageTabTitle ml5"%>
|
||||
<%= link_to ut.course.try(:name), course_path(ut.course_id), :target => "_blank", :class => "homepageTabTitle ml5", :title => "#{ut.course.try(:name)}" %>
|
||||
<li>
|
||||
</th>
|
||||
<th>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<table class="sy_new_table clear" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>标题</th>
|
||||
<th><li class="fl ml5">标题</li></th>
|
||||
<th style="width:160px">来源</th>
|
||||
<th style="width:80px">发布人</th>
|
||||
<th style="width:80px">优先度</th>
|
||||
|
@ -15,20 +15,20 @@
|
|||
<tr>
|
||||
<th>
|
||||
<li class="homepageTabTitle">
|
||||
<%= link_to ui.subject.to_s, issue_path(ui), :target => "_blank", :class => "homepageTabTitle fl ml5" %>
|
||||
<%= link_to ui.subject.to_s, issue_path(ui), :target => "_blank", :class => "homepageTabTitle fl ml5", :title => "#{ui.subject.to_s}" %>
|
||||
</li>
|
||||
</th>
|
||||
<th>
|
||||
<li class="homepageTabProjectName ml5">
|
||||
<%= link_to ui.project.try(:name), project_path(ui.project_id) %>
|
||||
<%= link_to ui.project.try(:name), project_path(ui.project_id), :target => "_blank", :title => "#{ui.project.try(:name)}" %>
|
||||
<li>
|
||||
</th>
|
||||
<th>
|
||||
<li class="homepageTabAuthor ml5" >
|
||||
<% if ui.author.show_name == ' ' %>
|
||||
<%= link_to ui.try(:author), user_path(ui.author_id) %>
|
||||
<%= link_to ui.try(:author), user_path(ui.author_id), :target => "_blank", :title => "#{ui.try(:author)}" %>
|
||||
<% else %>
|
||||
<%= link_to ui.author.show_name, user_path(ui.author_id) %>
|
||||
<%= link_to ui.author.show_name, user_path(ui.author_id), :target => "_blank", :title => "#{ui.author.show_name}" %>
|
||||
<% end %>
|
||||
</li>
|
||||
</th>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<% if ma.class == SystemMessage %>
|
||||
<% if ma.class == SystemMessage && many_days_ago(ma.created_at, 30) %>
|
||||
<%# @user_system_messages.each do |usm| %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script src="/javascripts/i18n/jquery.ui.datepicker-zh-CN.js" type="text/javascript"></script>
|
||||
<input type="hidden" value="<%= @type%>" name="type" id="user_activities_type">
|
||||
<div class="homepageRightBanner">
|
||||
<div class="NewsBannerName">消息动态</div>
|
||||
<div class="NewsBannerName">最新动态</div>
|
||||
<ul class="resourcesSelect">
|
||||
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
|
||||
<ul class="homepagePostType" style="margin-left:95px; width:80px" >
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script src="/javascripts/i18n/jquery.ui.datepicker-zh-CN.js" type="text/javascript"></script>
|
||||
<input type="hidden" value="<%= @type%>" name="type" id="user_activities_type">
|
||||
<div class="homepageRightBanner">
|
||||
<div class="NewsBannerName">消息动态</div>
|
||||
<div class="NewsBannerName">最新动态</div>
|
||||
<ul class="resourcesSelect">
|
||||
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
|
||||
<ul class="homepagePostType" style="margin-left:95px; width:80px" >
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
$("#show_more_activities").replaceWith("<%= escape_javascript( render :partial => 'users/user_activities',
|
||||
:locals => {:user_activities => @user_activities,
|
||||
:page => @page,
|
||||
:type => @type,
|
||||
:user_id => (@user.type == "AnonymousUser" ? User.current.id : @user.id),
|
||||
:action => "project_community"} )%>");
|
|
@ -1,6 +0,0 @@
|
|||
$("#show_more_activities").replaceWith("<%= escape_javascript( render :partial => 'users/user_activities',
|
||||
:locals => {:user_activities => @user_activities,
|
||||
:page => @page,
|
||||
:type => @type,
|
||||
:user_id => (@user.type == "AnonymousUser" ? User.current.id : @user.id),
|
||||
:action => "project_community"} )%>");
|
|
@ -175,8 +175,10 @@
|
|||
<% if @type %>
|
||||
<% if @type == "assigned" %>
|
||||
HoverLi(2);
|
||||
switch_assign_to(<%= User.current.id %>);
|
||||
<% else %>
|
||||
HoverLi(3);
|
||||
createByMe(<%= User.current.id %>);
|
||||
<% end %>
|
||||
<% end %>
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue