个人首页的7个tab
This commit is contained in:
parent
1875b6ecf7
commit
92bc7aa813
|
@ -1826,6 +1826,21 @@ class UsersController < ApplicationController
|
|||
end
|
||||
@message_count = @message_alls.count
|
||||
@message_alls = paginateHelper @message_alls, 20
|
||||
# 用户待解决的issue
|
||||
@unsolved_issues = Issue.where(:assigned_to_id => @user.id, :status_id => [1, 2, 4, 6])
|
||||
# 用户待完成的作业
|
||||
@my_course = StudentsForCourse.where(:student_id => @user.id)
|
||||
@unfinished_homework = 1
|
||||
# 用户待完成的测验
|
||||
@unfinished_test = 1
|
||||
# 用户待完成的问卷
|
||||
@unfinished_poll = 1
|
||||
# 用户待匿评的作业
|
||||
@anonymous_evaluation = 1
|
||||
# 待评阅的作业
|
||||
@unreview_homework = 1
|
||||
# 待审批的作业
|
||||
@unapproval_homework = 1
|
||||
else
|
||||
# 看别人的主页显示动态
|
||||
#更新用户申请成为课程老师或教辅消息的状态
|
||||
|
|
|
@ -135,19 +135,19 @@
|
|||
</div>
|
||||
<ul class="user_atten clear">
|
||||
<li>
|
||||
<a href="<%=user_blogs_path(:user_id => @user) %>">
|
||||
<a href="<%= user_blogs_path(:user_id => @user) %>">
|
||||
<strong>博客</strong><br />
|
||||
<span class="sy_cgrey"><%=@user.blog.blog_comments.where("#{BlogComment.table_name}.parent_id is null").count %></span>
|
||||
<span class="sy_cgrey"><%= @user.blog.blog_comments.where("#{BlogComment.table_name}.parent_id is null").count %></span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<%=user_watchlist_user_path(@user) %>">
|
||||
<a href="<%= user_watchlist_user_path(@user) %>">
|
||||
<strong>关注</strong><br />
|
||||
<span class="sy_cgrey"><%=User.watched_by(@user).count %></span>
|
||||
<span class="sy_cgrey"><%= User.watched_by(@user).count %></span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<%=user_fanslist_user_path(@user) %>">
|
||||
<a href="<%= user_fanslist_user_path(@user) %>">
|
||||
<strong>粉丝</strong><br />
|
||||
<span id="user_fans_number" class="sy_cgrey"><%= @user.watcher_users.count %></span>
|
||||
</a>
|
||||
|
@ -328,61 +328,4 @@
|
|||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
<div class="user_leftnav ">
|
||||
<% if hidden_unproject_infos %>
|
||||
<ul class="users_accordion mb10">
|
||||
<li id="user_01" class="user_icons_course">
|
||||
<%= link_to '班级',{:controller => "users", :action => "user_courselist", :id => @user}, :id => "user_course_list" %>
|
||||
<font class="show-all-sub"><%= link_to '全部',{:controller => "users", :action => "user_courselist", :id => @user}, :style => "color:#aaa;" %></font>
|
||||
<% courses = @user.favorite_courses.visible.where("is_delete =?", 0).select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a").order("a desc").limit(10) %>
|
||||
<div class="<%= courses.empty? ? 'none' : ''%>" id="homepage_left_course_list">
|
||||
<%=render :partial => 'layouts/homepage_left_course_list', :locals => {:courses => courses} %>
|
||||
</div>
|
||||
</li>
|
||||
<% if is_current_user %>
|
||||
<li id="user_02" class="user_icons_new">
|
||||
<%= link_to "新建课程", new_syllabus_path(:host=> Setting.host_course), :target => "_blank", :style => "font-size:14px;" %>
|
||||
</li>
|
||||
<li id="user_03" class="user_icons_new">
|
||||
<%= link_to "新建班级", new_course_path(:host=> Setting.host_course), :target => "_blank", :style => "font-size:14px;" %>
|
||||
</li>
|
||||
<li id="user_04" class="user_icons_addclass">
|
||||
<%= link_to "加入班级",join_private_courses_courses_path,:remote => true, :method => "post", :style => "font-size:14px;" %>
|
||||
</li>
|
||||
<% if @user == User.current %>
|
||||
<li id="user_05" class="user_icons_myhw">
|
||||
<%=link_to '我的作业', my_homeworks_user_path(@user), :target => "_blank", :style => "font-size:14px;" %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
||||
<ul class="users_accordion mb10">
|
||||
<li id="user_06" class="user_icons_project">
|
||||
<%= link_to '项目',{:controller => "users", :action => "user_projectlist", :id => @user}, :id => 'user_project_list'%>
|
||||
<font class="show-all-sub"><%= link_to '全部',{:controller => "users", :action => "user_projectlist", :id => @user}, :style => "color:#aaa;" %></font>
|
||||
<% projects = @user.favorite_projects.visible.select("projects.*, (SELECT MAX(updated_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS a").order("a desc").limit(10)%>
|
||||
<div class="<%= projects.empty? ? 'none' : ''%>" id="homepage_left_project_list">
|
||||
<%=render :partial => 'layouts/homepage_left_project_list', :locals => {:projects => projects} %>
|
||||
</div>
|
||||
</li>
|
||||
<% if is_current_user %>
|
||||
<li id="user_07" class="user_icons_new">
|
||||
<%= link_to "新建项目", new_project_path(:host=> Setting.host_name), :target => "_blank", :style => "font-size:14px;" %>
|
||||
</li>
|
||||
<li id="user_08" class="user_icons_addproject">
|
||||
<%= link_to "加入项目", applied_join_project_path, :remote => true, :method => "post", :style => "font-size:14px;" %>
|
||||
</li>
|
||||
<li id="user_09" class="user_icons_myissues">
|
||||
<%= link_to "我的Issue", user_issues_user_path(@user), :style => "font-size:14px;" %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<ul class="users_accordion mb10">
|
||||
<li id="user_10" class="user_icons_mes">
|
||||
<%= link_to '留言', feedback_path(@user, :host=> Setting.host_user)%>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!--sy_class_leftnav end-->
|
||||
</html>
|
|
@ -1,6 +1,38 @@
|
|||
<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">
|
||||
<input type="hidden" value="<%= @type %>" name="type" id="user_activities_type">
|
||||
<% if is_current_user %>
|
||||
<div class="homepagetopBanner mb10">
|
||||
<div class="flex-container_homepage" style="width:750px;">
|
||||
<div class="flex-cell_homepage" id="user_homepage_tab_01" style="padding-top: 10px">
|
||||
<li class="homepage_issue_tab ml20 mb5"><span class="ml35" style="font-size: 20px;">248</span></li>
|
||||
待解决Issue<br />
|
||||
</div>
|
||||
<div class="flex-cell_homepage" id="user_homepage_tab_02" style="padding-top: 10px">
|
||||
<li class="homepage_work_tab ml20 mb5"><span class="ml35" style="font-size: 20px;">21</span></li>
|
||||
待完成作业<br />
|
||||
</div>
|
||||
<div class="flex-cell_homepage" id="user_homepage_tab_03" style="padding-top: 10px">
|
||||
<li class="homepage_test_tab ml20 mb5"><span class="ml35" style="font-size: 20px;">18</span></li>
|
||||
待完成测验<br />
|
||||
</div>
|
||||
<div class="flex-cell_homepage" id="user_homepage_tab_04" style="padding-top: 10px">
|
||||
<li class="homepage_poll_tab ml20 mb5"><span class="ml35" style="font-size: 20px;">11</span></li>
|
||||
待完成问卷<br />
|
||||
</div>
|
||||
<div class="flex-cell_homepage" id="user_homepage_tab_05" style="padding-top: 10px">
|
||||
<li class="homepage_anonymity_tab ml20 mb5"><span class="ml35" style="font-size: 20px;">16</span></li>
|
||||
待匿评作业<br />
|
||||
</div>
|
||||
<div class="flex-cell_homepage" id="user_homepage_tab_06" style="padding-top: 10px">
|
||||
<li class="homepage_review_tab ml20 mb5"><span class="ml35" style="font-size: 20px;">13</span></li>
|
||||
待评阅作业<br />
|
||||
</div>
|
||||
<div class="flex-cell_homepage" id="user_homepage_tab_07" style="padding-top: 10px">
|
||||
<li class="homepage_apply_tab ml20 mb5"><span class="ml35" style="font-size: 20px;">16</span></li>
|
||||
待审批申请<br />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="homepageRightBanner">
|
||||
<div class="NewsBannerName">
|
||||
消息动态
|
||||
|
@ -9,7 +41,7 @@
|
|||
共 <span style="color: red;"><%= @message_count %></span> 个消息
|
||||
</span>
|
||||
</div>
|
||||
<div class="resources" id="users_setting">
|
||||
<div class="resources">
|
||||
<div>
|
||||
<%= render :partial => 'users/new_user_message', :locals => { :message_alls => @message_alls } %>
|
||||
</div>
|
||||
|
@ -18,7 +50,7 @@
|
|||
<% else %>
|
||||
<div class="homepageRightBanner">
|
||||
<div class="NewsBannerName">Ta的动态</div>
|
||||
<!-- <ul class="resourcesSelect">
|
||||
<!-- <ul class="resourcesSelect">
|
||||
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
|
||||
<ul class="homepagePostType">
|
||||
<li>
|
||||
|
@ -68,7 +100,7 @@
|
|||
<%= render :partial => 'users/user_activities', :locals => {:user_activities => @user_activities, :page => 0, :type => @type, :user_id => (@user.type == "AnonymousUser" ? User.current.id : @user.id)} %>
|
||||
<% else %>
|
||||
<div class="mb10">
|
||||
<%= render :partial => 'users/no_data' %>
|
||||
<%= render :partial => 'users/no_data' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
Binary file not shown.
After Width: | Height: | Size: 106 KiB |
Binary file not shown.
After Width: | Height: | Size: 108 KiB |
|
@ -94,7 +94,7 @@ div#menu ul ul ul li a{ width:185px; overflow:hidden; white-space: nowrap; text-
|
|||
.newsReadSetting {width:700px; background-color:#f6f6f6; border-bottom:1px solid #eeeeee; margin:10px auto; height:39px; line-height:39px; vertical-align:middle; font-size:14px; color:#7a7a7a; padding-left:10px;}
|
||||
.homepageNewsList {width:710px; height:49px; line-height:49px; vertical-align:middle; border-bottom:1px dashed #eaeaea;}
|
||||
.homepageNewsPortrait {width:40px; display:block; margin-top:7px;}
|
||||
.homepageNewsPublisher { max-width:100px; font-size:12px; color:#269ac9; display:block; padding-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; }
|
||||
.homepageNewsPublisher { max-width:100px; font-size:12px; color:#269ac9; display:block; /*padding-left:5px;*/ overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; }
|
||||
.homepageNewsType {padding-left: 5px; font-size:12px; color:#888888; display:block;}
|
||||
.homepageNewsTypeHomework {width:160px; padding-left: 5px; font-size:12px; color:#888888; display:block; overflow:hidden; height:49px;word-break:break-all; word-wrap:break-word; text-overflow:ellipsis;}
|
||||
.homepageNewsPubType {auto-width:230px; font-size:12px; color:#888888; display: block;}
|
||||
|
@ -342,6 +342,7 @@ a.homepageMenuControl {float:left; width:180px;}
|
|||
.homepageLeftLabelContainer {width:238px; border:1px solid #dddddd; background-color:#ffffff; margin-top:10px;}
|
||||
.homepageLabelText {color:#484848; font-size:16px; margin-left:10px; margin-bottom:12px; display:block;}
|
||||
.homepageRightBanner {width:718px; margin:0px auto; float:right; background-color: #ffffff; padding:10px 15px; border:1px solid #dddddd;}
|
||||
.homepagetopBanner {width:750px; height: 100px; margin:0px auto; float:right; background-color: #90C5EC; border:1px solid #dddddd;}
|
||||
.homepageRightBannerImg{width:1000px; margin:0px auto; height: 60px; margin-top: 10px; background:url(/images/TeachersDay.jpg)}
|
||||
a.homepageWhite {color:#ffffff;}
|
||||
a.homepageWhite:hover {color:#a1ebff}
|
||||
|
@ -498,6 +499,19 @@ a.user_leftinfo_img { display:block; width:80px; height:80px; margin:15px auto;}
|
|||
.user_atten li a{ color:#333;}
|
||||
.user_atten li a:hover{ color:#3b94d6;}
|
||||
|
||||
.flex-container_homepage {display:flex;}
|
||||
.flex-container_homepage div{ width:68px; float:left; border-right:1px solid #62ACE2; text-align:center; font-size:14px; height: 70px; margin:10px 0px; color: #ffffff;}
|
||||
.flex-container_homepage div:last-child { border:none; }
|
||||
.flex-cell_homepage {flex:1; text-align: center}
|
||||
.homepage_review_tab{ display:block; background:url(/images/user/homepage_tab.png) -16px -185px no-repeat; width:30px; height:30px; }
|
||||
.homepage_issue_tab { display:block; background:url(/images/user/homepage_tab.png) -16px -13px no-repeat; width:30px; height:30px; }
|
||||
.homepage_work_tab { display:block; background:url(/images/user/homepage_tab.png) -16px -56px no-repeat; width:30px; height:30px; }
|
||||
.homepage_test_tab { display:block; background:url(/images/user/homepage_tab.png) -16px -99px no-repeat; width:30px; height:30px; }
|
||||
.homepage_poll_tab { display:block; background:url(/images/user/homepage_tab.png) -16px -142px no-repeat; width:30px; height:30px; }
|
||||
.homepage_anonymity_tab { display:block; background:url(/images/user/homepage_tab.png) -16px -228px no-repeat; width:30px; height:30px; }
|
||||
.homepage_apply_tab { display:block; background:url(/images/user/apply_tab.png) -11px -13px no-repeat; width:30px; height:30px; }
|
||||
|
||||
|
||||
/* 个人主页左侧导航 */
|
||||
.user_leftnav{ width:240px;}
|
||||
.users_accordion li > a {
|
||||
|
|
Loading…
Reference in New Issue