2016-01-14 15:59:50 +08:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title><%= h html_title %></title>
<meta name="description" content="<%= Redmine::Info.app_name %>" />
<meta name="keywords" content="issue,bug,tracker" />
<%= csrf_meta_tag %>
<%= favicon %>
2016-07-14 17:00:38 +08:00
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common', 'css/structure','css/public', 'prettify','css/project','css/courses','css/popup','syllabus',:media => 'all' %>
2016-01-14 15:59:50 +08:00
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
<%= javascript_heads %>
<%= javascript_include_tag "bootstrap","avatars","new_user",'attachments','prettify'%>
<%= heads_for_theme %>
<%= call_hook :view_layouts_base_html_head %>
<%= yield :header_tags -%>
<!-- MathJax的配置 -->
<script type="text/javascript"
src="/javascripts/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- 配置 : 在生成的公式图片上去掉Math定义的右键菜单, $$ $$ \( \) \[ \] 中的公式给予显示-->
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
showMathMenu: false,
showMathMenuMSIE: false,
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
});
</script>
<script>
2016-03-18 10:05:31 +08:00
var onUserCard = false;
var onImage = false;
2016-01-14 15:59:50 +08:00
$(document).ready(function(){
$("#relateProject,.relatePInfo").mouseover(function(){
$(".relatePInfo").css("display","block");
2016-08-31 14:08:19 +08:00
});
2016-01-14 15:59:50 +08:00
$("#relateProject,.relatePInfo").mouseout(function(){
$(".relatePInfo").css("display","none");
2016-08-31 14:08:19 +08:00
});
// $(".homepagePostPortrait").mouseover(function(){
// onImage = true;
// $(this).children(".userCard").css("display","block");
// });
// $(".homepagePostPortrait").mouseout(function(){
// var cur = $(this);
// onImage = false;
// setTimeout(function(){
// if (onUserCard == false && onImage == false) {
// $(cur).children(".userCard").css("display","none");
// }
// },500);
// });
// $(".userCard").mouseover(function(){
// onUserCard = true;
// $(this).css("display","block");
// });
// $(".userCard").mouseout(function(){
// onUserCard = false;
// $(this).css("display","none");
// });
2016-01-14 15:59:50 +08:00
$(".coursesLineGrey").mouseover(function(){
$(this).css("color","#ffffff");
})
$(".coursesLineGrey").mouseout(function(){
$(this).css("color","#808080");
});
//侧导航栏配置设置
$(".homepageLeftMenuCoursesLine").mouseover(function(){
$(this).children(".shild").css("background","url(/images/hwork_icon.png) -82px -399px no-repeat");
$(this).children().css("color","#ffffff");
});
$(".homepageLeftMenuCoursesLine").mouseout(function(){
$(this).children(".shild").css("background","url(/images/hwork_icon.png) -6px -354px no-repeat");
$(this).children().css("color","#808080");
});
$(".subNavRow").mouseover(function(){
$(this).css("background-color","#269ac9");
$(this).children().css("color","#ffffff");
});
$(".subNavRow").mouseout(function(){
$(this).css("background-color","#ffffff");
$(this).children().css("color","#888888");
});
})
</script>
</head>
<body onload="prettyPrint();">
<div class="navContainer">
<% is_current_user = User.current.logged? && User.current == @user%>
<% if User.current.logged? %>
<%= render :partial => 'layouts/logined_header' %>
<% else%>
<%= render :partial => 'layouts/unlogin_header' %>
<% end%>
</div>
<div class="cl"></div>
<div class="homepageContentContainer">
<!--div class="homepageRightBannerImg"></div-->
<div class="cl"></div>
<div class="homepageContent">
2016-08-04 11:05:34 +08:00
<div class="homepageLeft mt10" id="LSide">
<div class="user_leftinfo mb10">
2016-08-24 09:30:57 +08:00
<% if User.current.logged? && User.current == @user%>
2016-08-26 11:31:54 +08:00
<div class="pr" style="width: 80px; margin:0 auto;">
2016-08-26 14:44:32 +08:00
<%=link_to image_tag(url_to_avatar(@user),width:"74", height: "74", :id=>'nh_source_tx'), my_clear_user_avatar_temp_path, :class => "user_leftinfo_img", :remote => true%>
<div class="homepageEditProfile undis">
<%=link_to '', my_clear_user_avatar_temp_path, :class => 'homepageEditProfileIcon', :remote => true, :title => '点击编辑Logo' %>
</div>
2016-08-26 11:31:54 +08:00
</div>
2016-08-04 11:05:34 +08:00
<% else %>
2016-08-29 15:35:04 +08:00
<a href="javascript:void(0)" class="user_leftinfo_img" style="cursor: default">
2016-08-29 14:41:01 +08:00
<%=image_tag(url_to_avatar(@user),width:"74", height: "74", :id=>'nh_source_tx') %>
2016-08-29 15:38:58 +08:00
</a>
<% end %>
2016-08-04 11:05:34 +08:00
<% if (@user.user_extensions && (@user.user_extensions.identity != 2) ) %>
<span class="<%= @user.user_extensions.gender == 1 ? 'user_leftinfo_female' : 'user_leftinfo_male' %> "></span>
<% end %>
<div class="user_info_inner">
<div class=" user_leftinfo_namebox" >
<a href="javascript:void(0);" class="user_leftinfo_name"><%=@user.show_name %></a>
<% if @user.user_extensions && @user.user_extensions.identity %>
<span class="user_cirbtn_yellow" ><%= get_user_roll @user %></span>
<% end%>
2016-01-14 15:59:50 +08:00
</div>
2016-08-04 11:05:34 +08:00
<div>
<div class="user_info_intro">
<div id="user_brief_introduction_show">
2016-06-13 15:29:15 +08:00
<%= render :partial => 'layouts/user_brief_introduction', :locals => {:user => @user} %>
2016-08-04 11:05:34 +08:00
</div>
2016-06-13 15:29:15 +08:00
</div>
2016-08-04 11:05:34 +08:00
<textarea class="homepageSignatureTextarea none" placeholder="请编辑签名" id="user_brief_introduction_edit" onblur="edit_user_introduction('<%= edit_brief_introduction_user_path(@user.id)%>');"><%= @user.user_extensions.brief_introduction %></textarea>
2016-01-14 15:59:50 +08:00
</div>
2016-08-04 11:05:34 +08:00
<ul class="user_atten clear">
<li>
<a href="<%=user_blogs_path(:user_id => @user.id) %>">
<strong>博客</strong><br />
<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.id) %>">
<strong>关注</strong><br />
<span class="sy_cgrey"><%=User.watched_by(@user.id).count %></span>
</a>
</li>
<li>
<a href="<%=user_fanslist_user_path(@user.id) %>">
<strong>粉丝</strong><br />
<span class="sy_cgrey"><%= @user.watcher_users.count %></span>
</a>
</li>
</ul>
2016-01-14 15:59:50 +08:00
</div>
2016-08-04 11:05:34 +08:00
<div id="watch_user_btn_div">
<%= render :partial => 'layouts/user_watch_btn', :locals => {:target => @user} %>
2016-01-14 15:59:50 +08:00
</div>
</div>
2016-08-04 11:05:34 +08:00
<div class="user_leftnav ">
2016-08-31 10:30:23 +08:00
<% if hidden_unproject_infos %>
2016-08-04 11:05:34 +08:00
<ul class="users_accordion mb10">
<li id="user_01" class="user_icons_course">
2016-08-24 10:28:09 +08:00
<%= link_to '班级',{:controller => "users", :action => "user_courselist", :id => @user.id}, :id => "user_course_list" %>
2016-09-23 16:47:12 +08:00
<font class="show-all-sub"><%= link_to '全部',{:controller => "users", :action => "user_courselist", :id => @user.id}, :style => "color:#aaa;" %></font>
2016-08-24 17:30:30 +08:00
<% 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) %>
2016-08-25 11:30:47 +08:00
<div class="<%= courses.empty? ? 'none' : ''%>" id="homepage_left_course_list">
<%=render :partial => 'layouts/homepage_left_course_list', :locals => {:courses => courses} %>
2016-04-24 14:23:08 +08:00
</div>
2016-08-04 11:05:34 +08:00
</li>
<% if is_current_user %>
<li id="user_02" class="user_icons_new">
2016-08-10 17:19:32 +08:00
<%= link_to "新建课程", new_syllabus_path(:host=> Setting.host_course), :target => "_blank", :style => "font-size:14px;" %>
2016-08-04 11:05:34 +08:00
</li>
<li id="user_03" class="user_icons_new">
2016-08-10 17:19:32 +08:00
<%= link_to "新建班级", new_course_path(:host=> Setting.host_course), :target => "_blank", :style => "font-size:14px;" %>
2016-08-04 11:05:34 +08:00
</li>
<li id="user_04" class="user_icons_addclass">
2016-08-10 17:19:32 +08:00
<%= link_to "加入班级",join_private_courses_courses_path,:remote => true, :method => "post", :style => "font-size:14px;" %>
2016-08-04 11:05:34 +08:00
</li>
2016-08-04 16:33:51 +08:00
<% if @user == User.current %>
2016-08-05 16:12:53 +08:00
<li id="user_05" class="user_icons_myhw">
2016-08-10 17:19:32 +08:00
<%=link_to '我的作业', my_homeworks_user_path(@user.id), :target => "_blank", :style => "font-size:14px;" %>
2016-08-05 16:12:53 +08:00
</li>
2016-08-04 16:33:51 +08:00
<% end %>
2016-08-04 11:05:34 +08:00
<% end %>
</ul>
2016-04-24 14:23:08 +08:00
<% end %>
2016-03-25 17:07:30 +08:00
2016-08-04 11:05:34 +08:00
<ul class="users_accordion mb10">
<li id="user_06" class="user_icons_project">
<%= link_to '项目',{:controller => "users", :action => "user_projectlist", :id => @user.id}, :id => 'user_project_list'%>
2016-09-23 16:47:12 +08:00
<font class="show-all-sub"><%= link_to '全部',{:controller => "users", :action => "user_projectlist", :id => @user.id}, :style => "color:#aaa;" %></font>
2016-08-24 17:30:30 +08:00
<% 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)%>
2016-08-25 11:30:47 +08:00
<div class="<%= projects.empty? ? 'none' : ''%>" id="homepage_left_project_list">
<%=render :partial => 'layouts/homepage_left_project_list', :locals => {:projects => projects} %>
2016-08-04 11:05:34 +08:00
</div>
</li>
<% if is_current_user %>
<li id="user_07" class="user_icons_new">
2016-08-10 17:19:32 +08:00
<%= link_to "新建项目", new_project_path(:host=> Setting.host_name), :target => "_blank", :style => "font-size:14px;" %>
2016-08-04 11:05:34 +08:00
</li>
<li id="user_08" class="user_icons_addproject">
2016-08-10 17:19:32 +08:00
<%= link_to "加入项目", applied_join_project_path, :remote => true, :method => "post", :style => "font-size:14px;" %>
2016-08-04 11:05:34 +08:00
</li>
<!--<li id="user_09" class="user_icons_myissues">-->
<!--<a href="#user_09" >我的任务</a>-->
<!--</li>-->
2016-04-27 14:12:56 +08:00
<% end %>
2016-08-04 11:05:34 +08:00
</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-->
2016-08-29 14:01:40 +08:00
<%# 更新访问数,刷新的时候更新访问次数 %>
<% update_visiti_count @user %>
2016-06-17 14:31:42 +08:00
<div class="fontGrey5 mt10 ml20">访问计数 <%= @user.visits.to_i %> ( 自2016年5月) </div>
2016-01-14 15:59:50 +08:00
</div>
<div class="homepageRight">
<%= yield %>
</div>
</div>
2016-08-31 10:30:23 +08:00
<% if hidden_unproject_infos %>
<%= render :partial => 'layouts/new_feedback' %>
<% end %>
2016-01-14 15:59:50 +08:00
</div>
<div class="cl"></div>
<%= render :partial => 'layouts/footer' %>
<div class="cl"></div>
<div id="ajax-modal" style="display:none;"></div>
<div id="ajax-indicator" style="display:none;">
<span><%= l(:label_loading) %></span>
</div>
<div id="nh_tx_dialog_html" class="white_content" style="display:none;">
2016-08-26 14:31:14 +08:00
<%=render :partial => 'layouts/upload_avatar', :locals => {:source => @user} %>
2016-01-14 15:59:50 +08:00
</div>
<script type="text/javascript">
2016-05-04 11:03:08 +08:00
$(function(){
$('#user_hide_project').hide();
2016-06-13 15:29:15 +08:00
autoUrl("user_brief_introduction_show");
2016-08-04 11:05:34 +08:00
if(<%= @is_course == 1 %>) {
$("#user_course_list").addClass('active');
} else if(<%= @is_project == 1 %>) {
$("#user_project_list").addClass('active');
}
2016-05-04 11:03:08 +08:00
});
2016-01-14 15:59:50 +08:00
$("#courseMenu").mouseenter(function(){
$("#topnav_course_menu").show();
});
$("#courseMenu").mouseleave(function(){
$("#topnav_course_menu").hide();
});
2016-07-29 20:31:24 +08:00
$("#projectMenu").mouseenter(function(){
$("#topnav_project_menu").show();
});
$("#projectMenu").mouseleave(function(){
$("#topnav_project_menu").hide();
});
2016-04-27 14:12:56 +08:00
function leftCourseslistChange(){
2016-08-04 16:33:51 +08:00
var target = $('#user_courses_li>li');
for(var i = 10; i < target.length; i++){
target.eq(i).slideToggle();
}
$('#hide_show_courseicon').toggleClass("user_icons_closeclass");
$('#hide_show_courseicon').toggleClass("user_icons_moreclass");
2016-04-27 14:12:56 +08:00
}
function leftProjectslistChange(){
2016-08-04 16:33:51 +08:00
var target = $('#user_projects_li>li');
for(var i = 10; i < target.length; i++){
target.eq(i).slideToggle();
}
$('#hide_show_projecticon').toggleClass("user_icons_closeclass");
$('#hide_show_projecticon').toggleClass("user_icons_moreclass");
2016-04-27 14:12:56 +08:00
}
2016-01-14 15:59:50 +08:00
</script>
</body>
</html>