个人主页(翻页问题未解决)
This commit is contained in:
parent
8a01439774
commit
baa0809549
|
|
@ -48,7 +48,7 @@
|
|||
</div>
|
||||
</ul>
|
||||
<ul class="fr innner-nav">
|
||||
<li style="margin: 0;"><%= link_to "我的首页", user_path(User.current), :class => "new-nav-a font-16", :target => "_blank" %></li>
|
||||
<li style="margin: 0;"><%= link_to "我的主页", user_path(User.current), :class => "new-nav-a font-16", :target => "_blank" %></li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<!-- <a href="javascript:void(0);" class="fr inner-nav-mes" style="color:#fff;">
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<% str = current_user ? '我' : 'TA' %>
|
||||
|
||||
<ul id="edu-tab-nav">
|
||||
<li id="edu-tab-nav-1" class="font-16 edu-new-tab-hover new-tab-nav" onclick="HoverLi(1);">
|
||||
<a href="javascript:void(0);" class="tab_type"><%= str %>的关注 <em id="follow"><%= @user_watchlist_count %></em></a>
|
||||
<ul id="edu-user-tab-nav">
|
||||
<li id="edu-tab-nav-1" class="font-16 edu-user-tab-hover new-tab-nav" onclick="HoverLi(1);">
|
||||
<a href="javascript:void(0);" class="tab_type"><%= str %>的关注 <%= @user_watchlist_count %></a>
|
||||
</li>
|
||||
<li id="edu-tab-nav-2" class="font-16 new-tab-nav" onclick="HoverLi(2);">
|
||||
<a href="javascript:void(0);" class="tab_type"><%= str %>的粉丝 <em id="follow"><%= @user_fanlist_count %></em></a>
|
||||
<li id="edu-tab-nav-2" class="font-16 new-tab-nav" onclick="HoverLi(2);">
|
||||
<a href="javascript:void(0);" class="tab_type"><%= str %>的粉丝 <%= @user_fanlist_count %></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div id="edu-tab-con-1">
|
||||
<div id="edu-tab-con-1" class="user_bg_shadow">
|
||||
<% if @user_watchlist_count == 0 %>
|
||||
<p class="p2 font-16">
|
||||
<% if current_user %>
|
||||
|
|
|
|||
|
|
@ -1,24 +1,27 @@
|
|||
<% if @courses.blank? %>
|
||||
<%= render :partial => "welcome/no_data" %>
|
||||
<% else %>
|
||||
<% @courses.each do |course| %>
|
||||
<p class="clearfix pl10">
|
||||
<a href="<%= course_path(course) %>" target="_blank" class="font-16 first link-color-grey03"><i class="fa fa-circle-o color-orange02 font-12 ml5 mr5" aria-hidden="true"></i><%= course.name %></a>
|
||||
<span class="font-14 hasmargin"><a href="<%= syllabus_path(course.syllabus) %>" target="_blank" class="link-color-grey03"><%= course.syllabus.title %></a></span>
|
||||
<span class="font-14 mr25 color-grey fr"><%= format_time course.updatetime %></span>
|
||||
<span class="font-14 last cl" style="display: none;">分享 <i class="fa fa-weixin font-14 blue" aria-hidden="true"></i></span>
|
||||
</p>
|
||||
<% end %>
|
||||
<div class="user_bg_shadow">
|
||||
<% @courses.each do |course| %>
|
||||
<p class="clearfix pl10">
|
||||
<a href="<%= course_path(course) %>" target="_blank" class="font-16 first link-color-grey03"><i class="fa fa-circle-o color-orange02 font-12 ml5 mr5" aria-hidden="true"></i><%= course.name %></a>
|
||||
<span class="font-14 hasmargin"><a href="<%= syllabus_path(course.syllabus) %>" target="_blank" class="link-color-grey03"><%= course.syllabus.title %></a></span>
|
||||
<span class="font-14 hasmargin"><a href="javascript:void(0)" target="_blank" class="link-color-grey03"><%= User.where(:id => course.syllabus.user_id).first.show_name %></a></span>
|
||||
<span class="font-14 mr25 color-grey fr"><%= format_time course.updatetime %></span>
|
||||
<span class="font-14 last cl" style="display: none;">分享 <i class="fa fa-weixin font-14 blue" aria-hidden="true"></i></span>
|
||||
</p>
|
||||
<% end %>
|
||||
<%# if @courses_count > 8 %>
|
||||
<!--<a href="<%#= courses_path %>" target="_blank" class="font-16 new_expand">点击查看全部</a>-->
|
||||
<!--<a href="<%#= courses_path %>" target="_blank" class="font-16 new_expand">点击查看全部</a>-->
|
||||
<%# end %>
|
||||
<div class="cl"></div>
|
||||
<div style="text-align:center;" class="new_expand">
|
||||
<div class="pages_right_min" style="width:auto; display:inline-block;margin: 18px 0;">
|
||||
<ul id="homework_pository_ref_pages">
|
||||
<%= pagination_links_full @courses_pages, @courses_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
<div class="cl"></div>
|
||||
<div style="text-align:center;" class="new_expand">
|
||||
<div class="pages_user_show" style="width:auto; display:inline-block;margin: 18px 0;">
|
||||
<ul id="homework_pository_ref_pages">
|
||||
<%= pagination_links_full @courses_pages, @courses_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -1,22 +1,36 @@
|
|||
<% if @shixuns.blank? %>
|
||||
<%= render :partial => "welcome/no_data" %>
|
||||
<% else %>
|
||||
<% @shixuns.each do |shixun| %>
|
||||
<p class="clearfix pl10">
|
||||
<a href="<%= shixun_path(shixun) %>" target="_blank" class="font-16 first"><i class="fa fa-circle-o color-orange02 font-12 ml5 mr5" aria-hidden="true"></i><%= shixun.name %></a>
|
||||
<span class="font-14 hasmargin"><a href="javascript:void(0);" target="_blank">已解锁第<i><%= had_passed_changllenge_count(shixun) %></i>关/共<i><%= shixun.challenges.count %></i>关</a></span>
|
||||
<span class="font-14 fr mr25 color-grey"><%= format_time shixun.created_at %></span>
|
||||
<span class="font-14 last cl" style="display: none;">分享 <i class="fa fa-weixin font-14 blue" aria-hidden="true"></i></span>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
<div style="text-align:center;" class="new_expand">
|
||||
<div class="pages_right_min" style="width:auto; display:inline-block;margin: 18px 0;">
|
||||
<ul id="homework_pository_ref_pages">
|
||||
<%= pagination_links_full @shixuns_pages, @shixuns_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
<div class="user_bg_shadow">
|
||||
<% @shixuns.each do |shixun| %>
|
||||
<p class="clearfix pl10">
|
||||
<a href="<%= shixun_path(shixun) %>" target="_blank" class="font-16 first"><i class="fa fa-circle-o color-orange02 font-12 ml5 mr5" aria-hidden="true"></i><%= shixun.name %></a>
|
||||
<span class="font-14 hasmargin"><a href="javascript:void(0);" target="_blank">已解锁第<i><%= had_passed_changllenge_count(shixun) %></i>关/共<i><%= shixun.challenges.count %></i>关</a></span>
|
||||
<span class="font-14 hasmargin"><a href="javascript:void(0);" target="_blank"><%= User.where(:id => shixun.user_id).first.show_name %></a></span>
|
||||
<span class="font-14 fr mr25 color-grey"><%= format_time shixun.created_at %></span>
|
||||
<span class="font-14 last cl" style="display: none;">分享 <i class="fa fa-weixin font-14 blue" aria-hidden="true"></i></span>
|
||||
</p>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<div style="text-align:center;" class="new_expand">
|
||||
<div class="pages_user_show" style="width:auto; display:inline-block;margin: 18px 0;">
|
||||
<ul id="homework_pository_ref_pages">
|
||||
<%= pagination_links_full @shixuns_pages, @shixuns_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<script>
|
||||
/* $(function(){
|
||||
$("#homework_pository_ref_pages li a").each(function(){
|
||||
var url = $(this).attr('href');
|
||||
if(url != undefined){
|
||||
$(this).attr('href', url + '&shixuns_page=' + 1);
|
||||
}
|
||||
console.log(typeof(url));
|
||||
console.log($(this).attr('href'));
|
||||
});
|
||||
})*/
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -163,9 +163,7 @@
|
|||
<!--</div>-->
|
||||
<!--<%# end %>-->
|
||||
<!--</div>-->
|
||||
<div class="favour" id="watcher_fan_list">
|
||||
<%= render :partial => 'edu_user_watch_fan_list', :locals => {:current_user => current_user} %>
|
||||
</div>
|
||||
|
||||
<div class="passageway mt15">
|
||||
<!-- <div class="hint">
|
||||
<div class="pr10 color-blue play font-14">
|
||||
|
|
@ -195,24 +193,50 @@
|
|||
<% else %>
|
||||
<div class="hascon">
|
||||
<% str = current_user ? '' : 'TA的' %>
|
||||
<ul id="edu-tab-nav">
|
||||
<li id="my_courses_span" class="font-16 edu-new-tab-hover new-tab-nav">
|
||||
<a href="javascript:void(0);" class="tab_type">课堂 <em id="follow"><%= @courses_count %></em></a>
|
||||
<ul id="edu-user-tab-nav">
|
||||
<li id="my_courses_span" class="font-16 edu-user-tab-hover new-tab-nav">
|
||||
<a href="javascript:void(0);" class="tab_type">我的实训 <%= @shixuns_count %></a>
|
||||
</li>
|
||||
<li id="my_shixuns_span" class="font-16 new-tab-nav bold">
|
||||
<a href="javascript:void(0);" class="tab_type">实训 <em id="follow"><%= @shixuns_count %></em></a>
|
||||
</ul>
|
||||
|
||||
<div class="lesson clearfix" id="my_shixuns_list">
|
||||
<%= render :partial => "my_homepage_shixuns_list" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="passageway mt15">
|
||||
<% if @courses_count == 0 && @shixuns_count == 0 %>
|
||||
<div class="font-16 grey cl title_type">
|
||||
<span class="fl">快速入口</span>
|
||||
</div>
|
||||
<div class="kong">
|
||||
<div class="p2 font-14 color-grey">
|
||||
<img src="../images/edu_user/edu-nodata.png"/>
|
||||
<p>显示你常用的课堂社区、实训社区列表</p>
|
||||
<p class="pb20 font-14">你还没有参与任何社区</p>
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="hascon">
|
||||
<% str = current_user ? '' : 'TA的' %>
|
||||
<ul id="edu-user-tab-nav">
|
||||
<li id="my_courses_span" class="font-16 edu-user-tab-hover new-tab-nav">
|
||||
<a href="javascript:void(0);" class="tab_type">我的课堂 <%= @courses_count %></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="lesson clearfix" id="my_courses_list">
|
||||
<%= render :partial => "my_homepage_courses_list" %>
|
||||
</div>
|
||||
<div class="<%= @courses.count > 0 ? 'lesson undis' : 'lesson' %>" id="my_shixuns_list">
|
||||
<%#= render :partial => "my_homepage_shixuns_list" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="favour" id="watcher_fan_list">
|
||||
<%= render :partial => 'edu_user_watch_fan_list', :locals => {:current_user => current_user} %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!----------------------左侧导航栏 ------------------------->
|
||||
|
|
@ -236,11 +260,11 @@
|
|||
<script type="text/javascript">
|
||||
function HoverLi(n){
|
||||
for(var i=1;i<=2;i++){
|
||||
$('#edu-tab-nav-'+i).removeClass('edu-new-tab-hover');
|
||||
$('#edu-tab-nav-'+i).removeClass('edu-user-tab-hover');
|
||||
$('#edu-tab-con-'+i).addClass('undis');
|
||||
}
|
||||
$('#edu-tab-con-'+n).removeClass('undis');
|
||||
$('#edu-tab-nav-'+n).addClass('edu-new-tab-hover');
|
||||
$('#edu-tab-nav-'+n).addClass('edu-user-tab-hover');
|
||||
}
|
||||
|
||||
function HoverLi2(n){
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ function HoverLi(n){
|
|||
g('edu-tab-con-'+i).className='undis';
|
||||
}
|
||||
g('edu-tab-con-'+n).className='dis';
|
||||
g('edu-tab-nav-'+n).className='edu-new-tab-hover';
|
||||
g('edu-tab-nav-'+n).className='edu-user-tab-hover';
|
||||
}
|
||||
|
||||
// 课程首页
|
||||
|
|
|
|||
|
|
@ -272,3 +272,4 @@ html>body #ajax-indicator { position: fixed; }
|
|||
.latex{position:relative;top: 4px;}
|
||||
|
||||
.white_bg {background: #fff}
|
||||
.user_tab_type {background: #FF6610}
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
.task-popup-sure{ margin:0px auto 15px; width: 54px;}
|
||||
.task-popup-OK{ margin:15px auto; width: 70px;}
|
||||
.task-popup-bggrey{ background:#fff; color:#333;}
|
||||
.bg_shadow{-webkit-box-shadow: 0 0 10px #ccc;-moz-box-shadow: 0 0 10px #ccc;box-shadow: 0 0 10px #ccc;}
|
||||
.user_bg_shadow{-webkit-box-shadow: 0 0 10px #ccc;-moz-box-shadow: 0 0 10px #ccc;box-shadow: 0 0 10px #ccc;}
|
||||
/************实训弹窗****************/
|
||||
.task-popup-warp{ width: 100%; height:100%; background:black; position:fixed;}
|
||||
.task-popup-box{ position: relative; margin:150px auto; }
|
||||
|
|
|
|||
|
|
@ -165,6 +165,10 @@ a.panel-table-title{display:block; max-width:240px;text-align:center;}
|
|||
.pages_right_min a.pages-border-right{border-right:1px solid #ccc; }
|
||||
.pages_right_min a:hover,.pages_right_min a.active{ background-color:#ccc; color:#fff;}
|
||||
.pages_right_min li{float: left;}
|
||||
/* 个人主页翻页 */
|
||||
.pages_user_show a:hover,.pages_user_show a.active{ background-color:#FF6610;; color:#fff;}
|
||||
.pages_user_show a{ display: inline-block;border:1px solid #d1d1d1; color:#888; float:left;text-align:center; padding:3px 10px; line-height:1.9; margin: 0 5px;}
|
||||
.pages_user_show li{float: left;}
|
||||
/* 搜索*/
|
||||
.panel-search{ position: relative;}
|
||||
input.panel-search-input{ height: 30px; width:300px; color: #666;}
|
||||
|
|
@ -237,14 +241,19 @@ a.task-index-name{ display: inline-block; max-width:80px;}
|
|||
|
||||
/*数据为空公共页面*/
|
||||
img.edu-nodata-img{ width:200px; margin:50px auto 20px; display: block;}
|
||||
.edu-nodata-p{ font-size: 16px; text-align: center; color:#888;}
|
||||
.edu-nodata-p{ font-size: 16px; text-align: center; color:#888;border-bottom:none!important;}
|
||||
|
||||
/* new tab */
|
||||
.edu-tab{ width: 100%; background:#fff;}
|
||||
#edu-tab-nav{height:47px;background: #fff; border-bottom:2px solid #5faee3;}
|
||||
#edu-tab-nav li.new-tab-nav {float:left; width: 150px; text-align:center;height:48px;line-height:48px; }
|
||||
#edu-tab-nav li a{font-size:14px; }
|
||||
#edu-user-tab-nav{height:47px;background: #f5f5f5; border-bottom:2px solid #FF6610;}
|
||||
#edu-user-tab-nav li.new-tab-nav {float:left; width: 150px; text-align:center;height:48px;line-height:48px; }
|
||||
#edu-user-tab-nav li a{font-size:14px; }
|
||||
.edu-new-tab-hover { background:#5faee3; }
|
||||
.edu-user-tab-hover{background:#FF6610;}
|
||||
.edu-user-tab-hover a{color:#fff!important;}
|
||||
.edu-new-tab-hover a{color:#fff!important;}
|
||||
.edu-class-con-list:hover{ background:#fbfbfb;}
|
||||
.edu-bg-shadow{ box-shadow: 0px 0px 5px rgba(146, 153, 169, 0.2);}
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@
|
|||
.-task-con-int .passageway .hascon .train p:nth-child(odd){background:#eee;}
|
||||
.-task-con-int .passageway .hascon .train p{height:70px;line-height:70px;border-bottom:1px dotted #eee;}
|
||||
.-task-con-int .passageway .hascon .lesson p .first{width:35%;display:inline-block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
|
||||
.-task-con-int .passageway .hascon .lesson p .hasmargin{width:26.7%;display:inline-block;margin:0 10%;color:#888;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
|
||||
.-task-con-int .passageway .hascon .lesson p .hasmargin{width:23%;display:inline-block;text-align: center;color:#888;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
|
||||
.-task-con-int .passageway .hascon .lesson p .haspadding{width:16.7%;display:inline-block;margin-right:12%;color:#888;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
|
||||
.-task-con-int .passageway .hascon .lesson p .last{width:8.33%;display:inline-block;color:#888;cursor: pointer; display: none;}
|
||||
.-task-con-int .passageway .hascon .lesson p .last:hover{color:#5faee3;}
|
||||
|
|
@ -100,6 +100,7 @@
|
|||
|
||||
.-task-con-int .passageway .hascon .expand{display:block;;height:70px;line-height:70px;text-align:center;color:#5faee3;}
|
||||
.-task-con-int .passageway .hascon .expand:hover{ color:#5faee3;}
|
||||
.bg_shadow{-webkit-box-shadow: 0 0 10px #ccc;-moz-box-shadow: 0 0 10px #ccc;box-shadow: 0 0 10px #ccc;}
|
||||
.new_expand{display:block;;height:70px;line-height:70px;text-align:center;color:#5faee3; background: #fafbfb}
|
||||
.new_expand:hover{ color:#5faee3;}
|
||||
/*--------------------------------------箭头动画效果-----------------------------------*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue