commit
09e0d2d856
|
@ -35,10 +35,10 @@ class UsersController < ApplicationController
|
|||
|
||||
#
|
||||
before_filter :can_show_course, :only => [:user_courses,:user_homeworks]
|
||||
before_filter :find_user, :only => [:user_fanslist, :user_watchlist, :show, :edit, :update, :destroy, :edit_membership, :user_courses, :unsolved_issues_list,
|
||||
:user_homeworks,:student_homeworks, :destroy_membership, :user_activities, :user_projects, :user_newfeedback, :user_comments,
|
||||
:watch_contests, :info, :watch_projects, :show_score, :topic_score_index, :project_score_index,
|
||||
:activity_score_index, :influence_score_index, :score_index,:show_new_score, :topic_new_score_index, :project_new_score_index,
|
||||
before_filter :find_user, :only => [:user_fanslist, :user_watchlist, :show, :edit, :update, :destroy, :edit_membership, :user_courses, :unsolved_issues_list, :unfinished_homework_list,
|
||||
:unfinished_poll_list, :user_homeworks,:student_homeworks, :destroy_membership, :user_activities, :user_projects, :user_newfeedback, :user_comments,
|
||||
:anonymous_evaluation_list,:unfinished_test_list, :watch_contests, :info, :watch_projects, :show_score, :topic_score_index, :project_score_index,
|
||||
:unapproval_applied_list, :activity_score_index, :influence_score_index, :score_index,:show_new_score, :topic_new_score_index, :project_new_score_index,
|
||||
:activity_new_score_index, :influence_new_score_index, :score_new_index,:user_projects_index,:user_resource,
|
||||
:user_courses4show,:user_projects4show,:user_course_activities,:user_project_activities,:user_feedback4show,:user_visitorlist,:user_messages,:edit_brief_introduction,
|
||||
:user_import_homeworks,:user_search_homeworks,:user_import_resource, :user_system_messages,:choose_user_course,:user_courselist,:user_projectlist,:sort_syllabus_list,
|
||||
|
@ -90,6 +90,7 @@ class UsersController < ApplicationController
|
|||
# order 排序条件
|
||||
# subject 主题:搜索用(注意:搜索和列表调用同一方法,通过参数或者remote区分)
|
||||
def user_issues
|
||||
@type = params[:type] unless params[:type].nil?
|
||||
@subject = params[:subject]
|
||||
# author_id = params[:author_id]
|
||||
params[:assigned_to_id].to_i == 0 ? @assigned_to = nil : @assigned_to = params[:assigned_to_id].to_i
|
||||
|
@ -1860,7 +1861,7 @@ class UsersController < ApplicationController
|
|||
# 待评阅的作业 暂不做
|
||||
@unreview_homework = 1
|
||||
# 待审批的作业
|
||||
@unapproval_homework = 1
|
||||
@unapproval_homework = AppliedMessage.where(:user_id => @user.id, :status => 0 ).count
|
||||
else
|
||||
# 看别人的主页显示动态
|
||||
#更新用户申请成为课程老师或教辅消息的状态
|
||||
|
@ -1968,27 +1969,95 @@ class UsersController < ApplicationController
|
|||
|
||||
# 待完成的作业
|
||||
def unfinished_homework_list
|
||||
my_course_ids = StudentsForCourse.where(:student_id => @user.id).blank? ? "(-1)" : "(" + StudentsForCourse.where(:student_id => @user.id).map{|sc| sc.course_id}.join(",") + ")"
|
||||
homeworks = HomeworkCommon.where("course_id in #{my_course_ids} and publish_time <= '#{Date.today}'")
|
||||
homework_ids = homeworks.blank? ? "(-1)" : "(" + homeworks.map{|homework| homework.id}.join(",") + ")"
|
||||
student_works = StudentWork.where("user_id = #{@user.id} and homework_common_id in #{homework_ids} and work_status != 0")
|
||||
finished_works_id = student_works.blank? ? "(-1)" : "(" + student_works.map{ |sw| sw.homework_common_id.to_i }.join(",") + ")"
|
||||
@unfinished_homeworks = HomeworkCommon.where("course_id in #{my_course_ids} and publish_time <= '#{Date.today}' and id not in #{finished_works_id}").order("updated_at desc")
|
||||
@unfinished_homeworks_count = @unfinished_homeworks.count
|
||||
@limit = 20
|
||||
@unfinished_homework_pages = Paginator.new @unfinished_homeworks_count, @limit, params['page'] || 1
|
||||
@offset ||= @unfinished_homework_pages.offset
|
||||
@unfinished_homeworks = paginateHelper @unfinished_homeworks, @limit
|
||||
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
# 待完成的测验
|
||||
def unfinished_test_list
|
||||
my_course_ids = StudentsForCourse.where(:student_id => @user.id).blank? ? "(-1)" : "(" + StudentsForCourse.where(:student_id => @user.id).map{|sc| sc.course_id}.join(",") + ")"
|
||||
exercises = Exercise.where("course_id in #{my_course_ids} and exercise_status = 2")
|
||||
exercise_ids = exercises.blank? ? "(-1)" : "(" + exercises.map{|ex| ex.id}.join(",") + ")"
|
||||
exercise_users = ExerciseUser.where("user_id = #{@user.id} and exercise_id in #{exercise_ids}")
|
||||
finished_test_ids = exercise_users.blank? ? "(-1)" : "(" + exercise_users.map{|eu| eu.exercise_id }.join(",") + ")"
|
||||
@unfinished_test = Exercise.where("course_id in #{my_course_ids} and exercise_status = 2 and id not in #{finished_test_ids}")
|
||||
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
# 待完成的问卷
|
||||
def unfinished_poll_list
|
||||
|
||||
my_course_ids = StudentsForCourse.where(:student_id => @user.id).blank? ? "(-1)" : "(" + StudentsForCourse.where(:student_id => @user.id).map{|sc| sc.course_id}.join(",") + ")"
|
||||
polls = Poll.where("polls_type = 'Course' and polls_group_id in #{my_course_ids} and polls_status = 2")
|
||||
poll_ids = polls.blank? ? "(-1)" : "(" + polls.map{|poll| poll.id}.join(",") + ")"
|
||||
poll_users = PollUser.where("user_id = #{@user.id} and poll_id in #{poll_ids}")
|
||||
finished_poll_ids = poll_users.blank? ? "(-1)" : "(" + poll_users.map{|pu| pu.poll_id }.join(",") + ")"
|
||||
@unfinished_poll = Poll.where("polls_type = 'Course' and polls_group_id in #{my_course_ids} and polls_status = 2 and id not in #{finished_poll_ids}").order("updated_at desc")
|
||||
@unfinished_poll_count = @unfinished_poll.count
|
||||
@limit = 20
|
||||
@unfinished_poll_pages = Paginator.new @unfinished_poll_count, @limit, params['page'] || 1
|
||||
@offset ||= @unfinished_poll_pages.offset
|
||||
@unfinished_poll = paginateHelper @unfinished_poll, @limit
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
# 待匿评的作业
|
||||
def anonymous_evaluation_list
|
||||
student_work_evaluations = @user.student_works_evaluation_distributions
|
||||
student_work_ids = student_work_evaluations.blank? ? "(-1)" : "(" + student_work_evaluations.map{|st| st.student_work_id}.join(",") + ")"
|
||||
student_work_scores = @user.student_works_scores.where("student_work_id in #{student_work_ids} and reviewer_role = 3")
|
||||
anonymous_evaluation_ids = student_work_scores.blank? ? "(-1)" : "(" + student_work_scores.map{|st| st.student_work_id}.join(",") + ")"
|
||||
@anonymous_evaluation = @user.student_works_evaluation_distributions.where("student_work_id not in #{anonymous_evaluation_ids}")
|
||||
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
# 待审批的申请
|
||||
def unapproval_homework_list
|
||||
|
||||
def unapproval_applied_list
|
||||
@message_alls = []
|
||||
messages = MessageAll.where("(user_id =? and message_type !=?) or message_type =?" ,@user.id, "SystemMessage", "SystemMessage").includes(:message).order("created_at desc")
|
||||
messages.each do |message_all|
|
||||
mess = message_all.message
|
||||
if !mess.nil?
|
||||
if (message_all.message_type == "OrgMessage")
|
||||
if mess.message_type == "ApplySubdomain" && OrgMessage.where(:organization_id => mess.organization_id, :message_type => "AgreeApplySubdomain").count == 0
|
||||
@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)
|
||||
@message_alls << mess
|
||||
end
|
||||
elsif message_all.message_type == "CourseMessage"
|
||||
if (mess.course_message_type == "JoinCourse" && mess.status == 0)
|
||||
@message_alls << mess
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@message_count = @message_alls.count
|
||||
@message_alls = paginateHelper @message_alls, 20
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
# 课程社区
|
||||
|
|
|
@ -78,6 +78,20 @@ module UsersHelper
|
|||
end
|
||||
end
|
||||
|
||||
# 作业类型提示
|
||||
def homework_type_tip homework_type
|
||||
case homework_type
|
||||
when 0
|
||||
"普通作业"
|
||||
when 1
|
||||
"匿评作业"
|
||||
when 2
|
||||
"编程作业"
|
||||
when 3
|
||||
"分组作业"
|
||||
end
|
||||
end
|
||||
|
||||
# 获取消息角色
|
||||
def applied_project_message_type role
|
||||
case role
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#encoding: utf-8
|
||||
#老师布置的作业表
|
||||
#homework_type: 0:普通作业;1:匿评作业;2:编程作业
|
||||
#homework_type: 0:普通作业;1:匿评作业;2:编程作业;3:分组作业;
|
||||
class HomeworkCommon < ActiveRecord::Base
|
||||
# attr_accessible :name, :user_id, :description, :publish_time, :end_time, :homework_type, :late_penalty, :course_id,:simi_time
|
||||
require 'net/http'
|
||||
|
|
|
@ -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) %>
|
||||
user_issues_user_path(@user, :type => "author" ) %>
|
||||
</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) %>
|
||||
user_issues_user_path(@user, :type => "assigned") %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
<div class="resources" >
|
||||
<div class="clear" >
|
||||
<table class="sy_new_table clear" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>作业标题</th>
|
||||
<th style="width:160px">来源</th>
|
||||
<th style="width:80px">类型</th>
|
||||
<th style="width:160px">截止剩余时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<%# @anonymous_evaluation.student_common.each do |ae| %>
|
||||
<tr>
|
||||
<th>
|
||||
<li class="homepageTabTitle">
|
||||
1 <%#= link_to ae.name.to_s, "", :target => "_blank", :class => "homepageTabTitle fl ml5" %>
|
||||
</li>
|
||||
</th>
|
||||
<th>
|
||||
<li class="homepageTabProjectName ml5">
|
||||
1 <%#= link_to uh.course.try(:name),"", :target => "_blank", :class => "homepageTabTitle ml5"%>
|
||||
<li>
|
||||
</th>
|
||||
<th>
|
||||
<li class="homepageTabAuthor ml5" >
|
||||
<%= 1111 %>
|
||||
</li>
|
||||
</th>
|
||||
<th>
|
||||
<li class="homepageTabTime ml5" >
|
||||
1
|
||||
<!-- <%# if uh.end_time > Time.now.to_i %>
|
||||
<span class="c_red"><%#= (uh.end_time - Time.now.to_i) / (24*60*60) %></span> 天
|
||||
<span class="c_red"><%#= ((uh.end_time - Time.now.to_i) % (24*60*60)) / (60*60)%></span> 小时
|
||||
<span class="c_red"><%#= (((uh.end_time - Time.now.to_i) % (24*60*60)) % (60*60)) / 60%></span> 分
|
||||
<%# else %>
|
||||
<span class="c_red">已截止</span>
|
||||
<%# end %>-->
|
||||
</li>
|
||||
</th>
|
||||
</tr>
|
||||
<%# end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<ul class="pages" style="width: auto;display: table;margin-left: auto;margin-right: auto; padding-top: 10px">
|
||||
<%#= pagination_links_full @unfinished_homework_pages, @unfinished_homeworks_count, :per_page_links => false, :remote => true, :flag => true, :is_new => true %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
|
@ -23,5 +23,5 @@
|
|||
<% end %>
|
||||
|
||||
<ul class="pages" style="width: auto;display: table;margin-left: auto;margin-right: auto; padding-top: 10px">
|
||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true, :is_new => true %>
|
||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => true, :flag => true, :is_new => true %>
|
||||
</ul>
|
|
@ -0,0 +1,8 @@
|
|||
<div class="homepageRightBanner">
|
||||
<div class="NewsBannerName">
|
||||
申请内容
|
||||
</div>
|
||||
</div>
|
||||
<div class="resources">
|
||||
<%= render :partial => 'users/new_user_message', :locals => { :message_alls => @message_alls } %>
|
||||
</div>
|
|
@ -0,0 +1,49 @@
|
|||
<div class="resources" >
|
||||
<div class="clear" >
|
||||
<table class="sy_new_table clear" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>作业标题</th>
|
||||
<th style="width:160px">来源</th>
|
||||
<th style="width:80px">类型</th>
|
||||
<th style="width:160px">截止剩余时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @unfinished_homeworks.each do |uh| %>
|
||||
<tr>
|
||||
<th>
|
||||
<li class="homepageTabTitle">
|
||||
<%= link_to uh.name.to_s, student_work_index_path( :homework => uh.id), :target => "_blank", :class => "homepageTabTitle fl ml5" %>
|
||||
</li>
|
||||
</th>
|
||||
<th>
|
||||
<li class="homepageTabProjectName ml5">
|
||||
<%= link_to uh.course.try(:name), course_path(uh.course_id), :target => "_blank", :class => "homepageTabTitle ml5"%>
|
||||
<li>
|
||||
</th>
|
||||
<th>
|
||||
<li class="homepageTabAuthor ml5" >
|
||||
<%= homework_type_tip(uh.homework_type) %>
|
||||
</li>
|
||||
</th>
|
||||
<th>
|
||||
<li class="homepageTabTime ml5" >
|
||||
<% if uh.end_time > Time.now %>
|
||||
<span class="c_red"><%= (uh.end_time.to_i - Time.now.to_i) / (24*60*60) %></span> 天
|
||||
<span class="c_red"><%= ((uh.end_time.to_i - Time.now.to_i) % (24*60*60)) / (60*60)%></span> 小时
|
||||
<span class="c_red"><%= (((uh.end_time.to_i - Time.now.to_i) % (24*60*60)) % (60*60)) / 60%></span> 分
|
||||
<% else %>
|
||||
<span class="c_red">已截止</span>
|
||||
<% end %>
|
||||
</li>
|
||||
</th>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<ul class="pages" style="width: auto;display: table;margin-left: auto;margin-right: auto; padding-top: 10px">
|
||||
<%= pagination_links_full @unfinished_homework_pages, @unfinished_homeworks_count, :per_page_links => false, :remote => true, :flag => true, :is_new => true %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,33 @@
|
|||
<div class="resources" >
|
||||
<div class="clear" >
|
||||
<table class="sy_new_table clear" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><li class="fl ml5">问卷标题</li></th>
|
||||
<th style="width:160px">来源</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @unfinished_poll.each do |up| %>
|
||||
<tr>
|
||||
<th>
|
||||
<li class="homepageTabPollTitle">
|
||||
<%= link_to up.polls_name.to_s, poll_path(up.id), :target => "_blank", :class => "homepageTabPollTitle fl ml5" %>
|
||||
</li>
|
||||
</th>
|
||||
<th>
|
||||
<li class="homepageTabProjectName ml5">
|
||||
<% if up.polls_type == "Course" %>
|
||||
<%= Course.find(up.polls_group_id).name %>
|
||||
<% end %>
|
||||
<li>
|
||||
</th>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<ul class="pages" style="width: auto;display: table;margin-left: auto;margin-right: auto; padding-top: 10px">
|
||||
<%= pagination_links_full @unfinished_poll_pages, @unfinished_poll_count, :per_page_links => false, :remote => true, :flag => true, :is_new => true %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,49 @@
|
|||
<div class="resources" >
|
||||
<div class="clear" >
|
||||
<table class="sy_new_table clear" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>作业标题</th>
|
||||
<th style="width:160px">来源</th>
|
||||
<th style="width:80px">测验时长</th>
|
||||
<th style="width:160px">截止剩余时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @unfinished_test.each do |ut| %>
|
||||
<tr>
|
||||
<th>
|
||||
<li class="homepageTabTitle">
|
||||
<%= link_to ut.exercise_name.to_s, "", :target => "_blank", :class => "homepageTabTitle fl ml5" %>
|
||||
</li>
|
||||
</th>
|
||||
<th>
|
||||
<li class="homepageTabProjectName ml5">
|
||||
<%= link_to ut.course.try(:name), course_path(ut.course_id), :target => "_blank", :class => "homepageTabTitle ml5"%>
|
||||
<li>
|
||||
</th>
|
||||
<th>
|
||||
<li class="homepageTabAuthor ml5" >
|
||||
<%= ut.time %>
|
||||
</li>
|
||||
</th>
|
||||
<th>
|
||||
<li class="homepageTabTime ml5" >
|
||||
<% if ut.end_time > Time.now %>
|
||||
<span class="c_red"><%= (ut.end_time.to_i - Time.now.to_i) / (24*60*60) %></span> 天
|
||||
<span class="c_red"><%= ((ut.end_time.to_i - Time.now.to_i) % (24*60*60)) / (60*60)%></span> 小时
|
||||
<span class="c_red"><%= (((ut.end_time.to_i - Time.now.to_i) % (24*60*60)) % (60*60)) / 60%></span> 分
|
||||
<% else %>
|
||||
<span class="c_red">已截止</span>
|
||||
<% end %>
|
||||
</li>
|
||||
</th>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<ul class="pages" style="width: auto;display: table;margin-left: auto;margin-right: auto; padding-top: 10px">
|
||||
<%#= pagination_links_full @unfinished_homework_pages, @unfinished_homeworks_count, :per_page_links => false, :remote => true, :flag => true, :is_new => true %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,11 @@
|
|||
<div class="homepageRightBanner">
|
||||
<div class="NewsBannerName">
|
||||
消息动态
|
||||
</div>
|
||||
<span class="fr" style="margin-top:5px;">
|
||||
共 <span style="color: red;"><%= @message_count %></span> 个消息
|
||||
</span>
|
||||
</div>
|
||||
<div class="resources">
|
||||
<%= render :partial => 'users/new_user_message', :locals => { :message_alls => @message_alls } %>
|
||||
</div>
|
|
@ -0,0 +1 @@
|
|||
$("#user_homepage_message_list").html("<%= escape_javascript( render :partial => 'users/anonymous_evaluation_list') %>");
|
|
@ -40,7 +40,7 @@
|
|||
<% end %>
|
||||
<% if @unfinished_homework_count > 0 %>
|
||||
<div class="flex-cell_homepage" id="user_homepage_tab_2" onclick="HoverLi(2);">
|
||||
<a href="javascript:void(0)">
|
||||
<a href="<%= unfinished_homework_list_user_path(@user) %>" data-remote = "true">
|
||||
<div class="homepage_tab_div" style="">
|
||||
<span style="margin: 5px auto; vertical-align: middle; display: inline-block;">
|
||||
<li class="homepage_work_tab mb5 fl"></li>
|
||||
|
@ -54,7 +54,7 @@
|
|||
<% end %>
|
||||
<% if @unfinished_test_count > 0 %>
|
||||
<div class="flex-cell_homepage" id="user_homepage_tab_3" onclick="HoverLi(3);">
|
||||
<a href="javascript:void(0)">
|
||||
<a href="<%= unfinished_test_list_user_path(@user) %>" data-remote = "true">
|
||||
<div class="homepage_tab_div" style="">
|
||||
<span style="margin: 5px auto; vertical-align: middle; display: inline-block;">
|
||||
<li class="homepage_test_tab mb5 fl"></li>
|
||||
|
@ -68,7 +68,7 @@
|
|||
<% end %>
|
||||
<% if @unfinished_poll_count > 0 %>
|
||||
<div class="flex-cell_homepage" id="user_homepage_tab_4" onclick="HoverLi(4);">
|
||||
<a href="javascript:void(0)">
|
||||
<a href="<%= unfinished_poll_list_user_path(@user) %>" data-remote = "true">
|
||||
<div class="homepage_tab_div" style="">
|
||||
<span style="margin: 5px auto; vertical-align: middle; display: inline-block;">
|
||||
<li class="homepage_poll_tab mb5 fl"></li>
|
||||
|
@ -82,7 +82,7 @@
|
|||
<% end %>
|
||||
<% if @anonymous_evaluation_count > 0 %>
|
||||
<div class="flex-cell_homepage" id="user_homepage_tab_5" onclick="HoverLi(5);">
|
||||
<a href="javascript:void(0)">
|
||||
<a href="<%= anonymous_evaluation_list_user_path(@user) %>" data-remote = "true">
|
||||
<div class="homepage_tab_div" id="user_homepage_tab_05" style="">
|
||||
<span style="margin: 5px auto; vertical-align: middle; display: inline-block;">
|
||||
<li class="homepage_anonymity_tab mb5 fl"></li>
|
||||
|
@ -106,7 +106,7 @@
|
|||
<!--</div>-->
|
||||
<% if @unapproval_homework > 0 %>
|
||||
<div class="flex-cell_homepage" id="user_homepage_tab_6" onclick="HoverLi(6);">
|
||||
<a href="javascript:void(0)">
|
||||
<a href="<%= unapproval_applied_list_user_path(@user) %>" data-remote="true">
|
||||
<div class="homepage_tab_div" style="">
|
||||
<span style="margin: 5px auto; vertical-align: middle; display: inline-block;">
|
||||
<li class="homepage_apply_tab mb5 fl"></li>
|
||||
|
@ -121,17 +121,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div id="user_homepage_message_list">
|
||||
<div class="homepageRightBanner">
|
||||
<div class="NewsBannerName">
|
||||
消息动态
|
||||
</div>
|
||||
<span class="fr" style="margin-top:5px;">
|
||||
共 <span style="color: red;"><%= @message_count %></span> 个消息
|
||||
</span>
|
||||
</div>
|
||||
<div class="resources">
|
||||
<%= render :partial => 'users/new_user_message', :locals => { :message_alls => @message_alls } %>
|
||||
</div>
|
||||
<%= render :partial => 'users/user_message_list'%>
|
||||
</div>
|
||||
<!-- <div class="resources" >
|
||||
<%#= render :partial => 'users/homepage_tab_list' %>
|
||||
|
|
|
@ -1,2 +1,5 @@
|
|||
<% if is_current_user %>
|
||||
$("#user_homepage_message_list").html("<%= escape_javascript( render :partial => 'users/user_message_list') %>");
|
||||
<% else %>
|
||||
$("#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)} )%>");
|
||||
|
||||
<% end %>
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
$("#user_homepage_message_list").html("<%= escape_javascript( render :partial => 'users/unapproval_applied_list') %>");
|
|
@ -0,0 +1 @@
|
|||
$("#user_homepage_message_list").html("<%= escape_javascript( render :partial => 'users/unfinished_homework_list') %>");
|
|
@ -0,0 +1 @@
|
|||
$("#user_homepage_message_list").html("<%= escape_javascript( render :partial => 'users/unfinished_poll_list') %>");
|
|
@ -0,0 +1 @@
|
|||
$("#user_homepage_message_list").html("<%= escape_javascript( render :partial => 'users/unfinished_test_list') %>");
|
|
@ -171,6 +171,15 @@
|
|||
$("#test").removeClass('issues_filter_active');
|
||||
remote_function();
|
||||
}
|
||||
$(function(){
|
||||
<% if @type %>
|
||||
<% if @type == "assigned" %>
|
||||
HoverLi(2);
|
||||
<% else %>
|
||||
HoverLi(3);
|
||||
<% end %>
|
||||
<% end %>
|
||||
});
|
||||
</script>
|
||||
|
||||
<!--缺陷列表开始-->
|
||||
|
|
|
@ -692,6 +692,11 @@ RedmineApp::Application.routes.draw do
|
|||
get 'cancel_or_collect'
|
||||
get 'homepage'
|
||||
get 'unsolved_issues_list'
|
||||
get 'unfinished_homework_list'
|
||||
get 'unfinished_poll_list'
|
||||
get 'unfinished_test_list'
|
||||
get 'anonymous_evaluation_list'
|
||||
get 'unapproval_applied_list'
|
||||
# end
|
||||
end
|
||||
#resources :blogs
|
||||
|
|
|
@ -174,3 +174,5 @@ a.user_navmorebox .user_icons_closeclass{display:block;position: absolute;top:5p
|
|||
.homepageTabTitle { max-width:330px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;}
|
||||
.homepageTabProjectName{ max-width:160px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis; }
|
||||
.homepageTabAuthor { max-width:80px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis; }
|
||||
.homepageTabTime { max-width:160px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis; }
|
||||
.homepageTabPollTitle { max-width:490px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;}
|
Loading…
Reference in New Issue