dev_SaaS
cxt 6 years ago
commit 39c6daf466

@ -321,9 +321,9 @@ class ShixunsController < ApplicationController
@search_name = "#{sub.name} / #{tag.name}"
end
shixun_id = ShixunTagRepertoire.where(:tag_repertoire_id => tag).map(&:shixun_id)
@shixuns = Shixun.select([:id, :name, :user_id, :challenges_count, :visits, :status, :myshixuns_count, :trainee, :use_scope, :identifier, :image_text]).where(:id => shixun_id, :hidden => 0).includes(:challenges, :schools, :shixun_members, :users).order("status = 2 desc, publish_time asc")
@shixuns = Shixun.select([:id, :name, :user_id, :challenges_count, :visits, :status, :myshixuns_count, :trainee, :use_scope, :identifier, :image_text, :averge_star]).where(:id => shixun_id, :hidden => 0).includes(:challenges, :schools, :shixun_members, :users).order("status = 2 desc, publish_time asc")
else
@shixuns = Shixun.select([:id, :name, :user_id, :challenges_count, :visits, :status, :myshixuns_count, :trainee, :use_scope, :identifier, :image_text]).where(:hidden => 0).includes(:challenges, :schools, :shixun_members, :users).order("status = 2 desc, publish_time asc")
@shixuns = Shixun.select([:id, :name, :user_id, :challenges_count, :visits, :status, :myshixuns_count, :trainee, :use_scope, :identifier, :image_text, :averge_star]).where(:hidden => 0).includes(:challenges, :schools, :shixun_members, :users).order("status = 2 desc, publish_time asc")
end
# # 依据tag和语言推荐实训如果tag不够则依据语言推荐语言不够则取系统的三个
# @recommend_shixuns = Shixun.find_by_sql("select challenge_id from challenge_tags where name like

@ -30,19 +30,30 @@ class WelcomeController < ApplicationController
require 'simple_xlsx_reader'
def index
@shixuns = Shixun.select([:id, :user_id, :homepage_show, :identifier, :status, :name, :challenges_count, :myshixuns_count, :use_scope,
:trainee]).where(:homepage_show => 1).includes(:users, :shixun_tag_repertoires, challenges: :challenge_chooses).order("myshixuns_count desc").limit(8)
@subjects = Subject.select([:id, :name, :homepage_show, :user_id, :visits, :stages_count, :score_count, :repertoire_id]).where(:homepage_show => 1).includes(:users, stages: :stage_shixuns)
@subjects.each do |subject|
subject[:myshixun_member_count] = Myshixun.where(:shixun_id=>subject.stage_shixuns.map(&:shixun_id)).count
images = PortalImage.where(status: true).order("position asc")
@images_url = []
images.each do |image|
@images_url << {path: image.link, image_url: "/images/avatars/PortalImage/#{image.id}"}
end
@subjects = @subjects.sort{|x,y| y[:myshixun_member_count] <=> x[:myshixun_member_count] }[0, 8]
@tea_users = User.where(:homepage_teacher => 1).includes(:user_extensions).limit(10).order("experience desc")
@eng_users = User.where(:homepage_engineer => 1).includes(:user_extensions).limit(10).order("experience desc")
@eng_users = User.find_by_sql("select u.* from users u join user_extensions ue on ue.user_id = u.id where ue.identity = 1 order by experience desc limit 10") if @eng_users.blank?
@repertoires = Repertoire.includes(sub_repertoires: [:tag_repertoires]).order("updated_at asc")
@images = PortalImage.where(:status => true).order("position asc")
logger.info("########images: #{@images.count}")
# 目录分级
repertoires = Repertoire.includes(sub_repertoires: :tag_repertoires).order("updated_at asc")
@rep_list = []
repertoires.each do |rep|
sub_rep_list = []
rep.sub_repertoires.each do |sub_rep|
tag_rep_list = []
sub_rep.tag_repertoires.each do |tag_rep|
tag_rep_list << {tag_id: tag_rep.id, tag_name: tag_rep.name}
end
sub_rep_list << {sub_rep_id: sub_rep.id, sub_rep_name: sub_rep.name, tag_rep_list: tag_rep_list}
end
@rep_list << {rep_id: rep.id, rep_name: rep.name, sub_rep_list: sub_rep_list}
end
@shixuns = Shixun.select([:id, :user_id, :homepage_show, :identifier, :status, :name, :challenges_count, :myshixuns_count, :use_scope,
:trainee, :averge_star]).where(homepage_show: 1).includes(:tag_repertoires).order("myshixuns_count desc").limit(8)
@subjects = Subject.where(homepage_show: 1).includes(:shixuns).limit(8)
@tea_users = User.where(homepage_teacher: 1).includes(:user_extensions).limit(10).order("experience desc")
@stu_users = User.includes(:user_extensions).where(user_extensions: {identity: 1}).limit(10).order("experience desc")
render :layout => 'educoder'
end

@ -240,7 +240,7 @@ module ApplicationHelper
container = []
mirror_repositories.each do |mr|
if mr.name.present?
container << {:image => mr.name, :cpuLimit => mr.cpu_limit, :memoryLimit => "#{mr.memory_limit}M"}
container << {:image => mr.name, :cpuLimit => mr.cpu_limit, :memoryLimit => "#{mr.memory_limit}M", :type => mr.try(:main_type) == "1" ? "main" : "sub"}
end
end
return container.to_json
@ -318,11 +318,15 @@ module ApplicationHelper
# TPM查看权限
# result一般为页面权限
def shixun_view_allow shixun, result = nil
if User.current.manager_of_shixun?(shixun)
if params[:openi].to_i == 1
result ? false : true
else
if shixun.status == 0 || (shixun.use_scope == 1 && !shixun.schools.map(&:name).include?(User.current.school_name))
result ? true : (render_403)
if User.current.manager_of_shixun?(shixun)
result ? false : true
else
if shixun.status == 0 || (shixun.use_scope == 1 && !shixun.schools.map(&:name).include?(User.current.school_name))
result ? true : (render_403)
end
end
end
end

@ -49,7 +49,7 @@ class Shixun < ActiveRecord::Base
has_many :schools, :through => :shixun_schools
has_many :exercise_shixun_challenges, :dependent => :destroy
has_many :exercise_bank_shixun_challenges, :dependent => :destroy
has_many :tag_repertoires, :through => :shixun_tag_repertoires, :order => "tag_repertoires.name ASC"
has_many :tag_repertoires, :through => :shixun_tag_repertoires
has_many :shixun_tag_repertoires, :dependent => :destroy

@ -39,6 +39,10 @@ class Subject < ActiveRecord::Base
count
end
def member_count
self.shixuns.map(&:myshixuns_count).sum
end
def subject_shixuns
count = 0
self.stage_shixuns.each do |stage_shixun|

@ -55,9 +55,10 @@
</li>
<li class="fl edu-admin-nav-li edu-position <%= 'active' if @menu_type == 4 %>" style="width: 100px"><a href="javascript:void(0);" class="edu-admin-nav-a" >实训课程+</a>
<ul class="edu-admin-nav-inner edu-absolute">
<li style="width: 100px"><%= link_to "实训课程列表", class_shixuns_managements_path %></li>
<li style="width: 100px"><%= link_to "实训课程配置", subject_setting_list_managements_path %></li>
<li style="width: 100px"><%= link_to "已发布实训课程", class_publish_shixuns_managements_path %></li>
<li style="width: 120px"><%= link_to "实训课程等级体系", class_shixuns_managements_path %></li>
<li style="width: 120px"><%= link_to "实训课程列表", class_shixuns_managements_path %></li>
<li style="width: 120px"><%= link_to "实训课程配置", subject_setting_list_managements_path %></li>
<li style="width: 120px"><%= link_to "已发布实训课程", class_publish_shixuns_managements_path %></li>
</ul>
</li>
<li class="fl edu-admin-nav-li edu-position <%= 'active' if @menu_type == 13 %>"><a href="<%= career_list_managements_path %>" class="edu-admin-nav-a">职业路径</a></li>

@ -0,0 +1,88 @@
<div class="mt20" id="levelSystem">
<table class="edu-pop-table edu-txt-center" cellpadding="0" cellspacing="0">
<thead>
<th width="10%">等级</th>
<th width="15%" class="edu-txt-left">名称</th>
<th width="45" class="edu-txt-left">实训课程数</th>
<th width="15%">创建时间</th>
<th width="15%">操作</th>
</thead>
<tbody>
<tr>
<td class="levelNo">1</td>
<td class="edu-txt-left levelName">初级课程</td>
<td class="edu-txt-left">500</td>
<td>2019-03-02 10:38</td>
<td>
<a href="javascript:void(0)" class="mr15">删除</a>
<a href="javascript:void(0)" class="mr15 renameLine">重命名</a>
</td>
</tr>
<tr>
<td class="levelNo">2</td>
<td class="edu-txt-left levelName">初级课程</td>
<td class="edu-txt-left">--</td>
<td>2019-03-02 10:38</td>
<td>
<a href="javascript:void(0)" class="mr15">删除</a>
<a href="javascript:void(0)" class="mr15 renameLine">重命名</a>
</td>
</tr>
<tr>
<td colspan="5">
<a href="javascript:void(0)" class="color-blue" onclick="createLevel();">+ 新建</a>
</td>
</tr>
</tbody>
</table>
</div>
<script type="text/html" id="template_newForm">
<div class="bor-grey-e mt20 clearfix padding10-20 edu-back-white" id="newForm">
<span class="fl mt3">名称</span>
<input type="text" class="winput-240-35 fl ml20"/>
<li class="fr mt3">
<a href="javascript:void(0)" class="mr15" onclick="cancelNew();">取消</a>
<a href="javascript:void(0)" class="mr15">保存</a>
</li>
</div>
</script>
<script>
//新建
function createLevel(){
if($("#newForm").length==0){
var bt = baidu.template;
bt.LEFT_DELIMITER = '<!';
bt.RIGHT_DELIMITER = '!>';
var html = bt('template_newForm', null);
$("#levelSystem").append(html);
}
}
//新建--取消
function cancelNew(){
$("#newForm").remove();
}
//重命名
var lastHtml="";
$("table").on("click",".renameLine",function(){
var tr=$(this).parents("tr");
lastHtml=$(tr).html();
var value=$(tr).find(".levelName").html();
var No=$(tr).find(".levelNo").html();
var html='<td>'+No+'</td>'+
'<td colspan="4" class="edu-txt-left">'+
'<input type="winput-240-35" name="rename" value="'+value+'"/>'+
'<a href="javascript:void(0)" class="mr15 ml20" onclick="cancelEdit(this);">取消</a>'+
'<a href="javascript:void(0)">保存</a>'+
'</td>';
$(tr).html(html);
})
//重命名--取消
function cancelEdit(item){
$(item).parents("tr").html(lastHtml);
}
</script>

@ -3,9 +3,10 @@
<thead>
<tr>
<th width="9%">ID</th>
<th width="30%" class="edu-txt-left">实训套件名称</th>
<th width="20%" class="edu-txt-left">实训套件名称</th>
<th width="6%">阶段</th>
<th width="10%">技术体系</th>
<th width="10%">等级体系</th>
<th width="13%">上传图片</th>
<th width="8%">创建者</th>
<th width="11%" class="eud-pointer">创建时间<i class="fa <%= @sx_order == "desc" ? "fa-long-arrow-down" : "fa-long-arrow-up" %> color-light-green ml5"></i></th>
@ -26,6 +27,11 @@
<% end %>
</select>
</td>
<td>
<select>
<option>请选择等级</option>
</select>
</td>
<td>
<%= file_field_tag 'avatar[image]',
:id => "upload_img_#{c_shixun.id}",

@ -1,25 +1,26 @@
<% result = User.current.is_certification_teacher || User.current.admin? %>
<% shixuns.each do |shixun| %>
<div class="square-Item">
<% if shixun.tag_repertoires.first.present? %>
<div class="tag-green"><span class="tag-name"><%= shixun.tag_repertoires.first.try(:name) %></span><img src="/images/educoder/tag2.png"></div>
<% end %>
<% if params[:controller] != "welcome" && shixun_view_allow(shixun, true) %>
<% unless result %>
<div class="closeSquare">
<img src="/images/educoder/icon/lockclose.svg" class="mt80 mb25">
<p class="font-14 color-white">非试用内容,需要授权</p>
<p class="font-14 color-white">暂未公开</p>
</div>
<% end %>
<a href="<%= shixun_path(shixun) %>" class="square-img" target="_blank">
<a href="<%= result ? shixun_path(shixun) : "javascript:void(0);" %>" class="square-img" target="_blank">
<%= image_tag(url_to_avatar(shixun)) %>
</a>
<div class="square-main">
<p class="task-hide">
<a href="<%= shixun_path(shixun) %>" class="justify color-grey-name" title="<%= shixun.name %>" target="_blank"><%= shixun.name %></a>
<a href="<%= result ? shixun_path(shixun) : "javascript:void(0);" %>" class="justify color-grey-name" title="<%= shixun.name %>" target="_blank"><%= shixun.name %></a>
</p>
<!--五星评分-->
<p class="clearfix mt3 mb3"><span class="rateYoStar fl" data-star="<%= shixun.shixun_preference %>" style="padding: 0px;width: 100%;height:20px;line-height:19px;width: 90px;"></span><span class="fl ml10 font-12 color-grey-9 lineh-12 mt3"><%= shixun.shixun_preference %>分</span></p>
<p class="clearfix mt3 mb3"><span class="rateYoStar fl" data-star="<%= shixun.averge_star %>" style="padding: 0px;width: 100%;height:20px;line-height:19px;width: 90px;">
</span><span class="fl ml10 font-12 color-grey-9 lineh-12 mt3"><%= shixun.averge_star %>分</span></p>
<p class="clearfix mt8 font-12 color-grey-B4">
<% if shixun.challenges_count > 0 %>
@ -27,14 +28,9 @@
<i class="iconfont icon-shixunguanqia fl mr3" data-tip-down="关卡"></i><%= shixun.challenges_count %>
</span>
<% end %>
<% if shixun.shixun_score > 0 %>
<span class="mr10 fl squareIconSpan">
<i class="iconfont icon-jingyan fl mr3" data-tip-down="经验值"></i><%= shixun.shixun_score %>
</span>
<% end %>
<% if shixun.myshixuns.count > 0 %>
<% if shixun.myshixuns_count > 0 %>
<span class="mr10 fl squareIconSpan">
<i class="iconfont icon-chengyuan fl mr3" data-tip-down="学习人数"></i><%= shixun.myshixuns.count %>
<i class="iconfont icon-chengyuan fl mr3" data-tip-down="学习人数"></i><%= shixun.myshixuns_count %>
</span>
<% end %>
<span class="fr color-grey-B3 squareIconSpan"><%= shixun.shixun_level %></span>
@ -44,24 +40,24 @@
<% end %>
<script>
$(function(){
$(".rateYoStar").raty({
hints: ['', '', '', '', ''],
readOnly: true,
path:"/images/educoder",
starOff: 'star-off.png',
starHalf:'star-half.png',
starOn: 'star-on.png',
size:'14',
score:function(){
var s=$(this).attr("data-star");
var yu=(s*10)%10;
if(yu>0){
return parseFloat(Math.floor((s*10)/10)+".5");
}else{
return $(this).attr("data-star");
$(function(){
$(".rateYoStar").raty({
hints: ['', '', '', '', ''],
readOnly: true,
path:"/images/educoder",
starOff: 'star-off.png',
starHalf:'star-half.png',
starOn: 'star-on.png',
size:'14',
score:function(){
var s=$(this).attr("data-star");
var yu=(s*10)%10;
if(yu>0){
return parseFloat(Math.floor((s*10)/10)+".5");
}else{
return $(this).attr("data-star");
}
}
}
});
})
});
})
</script>

@ -1,37 +1,27 @@
<% result = User.current.is_certification_teacher || User.current.admin? %>
<% subjects.each do |subject| %>
<div class="square-Item">
<% if subject.repertoire.present? %>
<div class="tag-green"><span class="tag-name"><%= subject.repertoire.name %></span><img src="/images/educoder/tag2.png"></div>
<% end %>
<% if params[:controller] != "welcome" && subject.status < 2 && !User.current.member_of_subject?(subject) %>
<% unless result %>
<div class="closeSquare">
<img src="/images/educoder/icon/lockclose.svg" class="mt80 mb25"/>
<p class="font-14 color-white">非试用内容,需要授权</p>
<p class="font-14 color-white">暂未开发</p>
</div>
<% end %>
<a href="<%= subject_path(subject) %>" class="square-img" target="_blank"><%= image_tag(url_to_avatar(subject)) %></a>
<a href="<%= result ? subject_path(subject) : "javascript:void(0);" %>" class="square-img" target="_blank"><%= image_tag(url_to_avatar(subject)) %></a>
<div class="square-main">
<p class="task-hide">
<%= link_to subject.name, subject_path(subject), :class => "justify color-grey-name", :target => "_blank" %>
<%= link_to subject.name, "#{result ? subject_path(subject) : "javascript:void(0);"}", :class => "justify color-grey-name", :target => "_blank" %>
</p>
<p class="clearfix mt8 font-12 color-grey-B4">
<% if subject.stages_count > 0 %>
<span class="mr10 fl squareIconSpan">
<i class="iconfont icon-shixun fl mr3" data-tip-down="章节"></i><%= subject.stages_count %></span>
<% end %>
<% if params[:controller] == "welcome" %>
<span class="mr10 fl squareIconSpan">
<i class="iconfont icon-jingyan fl mr3" data-tip-down="经验值"></i><%= subject.subject_shixun_score + subject.subject_shixun_choose_score %></span>
<% else %>
<% if (subject.subject_shixun_score + subject.subject_shixun_choose_score) > 0 %>
<span class="mr10 fl squareIconSpan">
<i class="iconfont icon-jingyan fl mr3" data-tip-down="经验值"></i><%= subject.subject_shixun_score + subject.subject_shixun_choose_score %></span>
<% end %>
<% end %>
<% myshixun_member_count = subject.respond_to?("myshixun_member_count") ? subject.myshixun_member_count : Myshixun.where(:shixun_id=>subject.stage_shixuns.map(&:shixun_id)).count %>
<%# REDO这块的关联关系有问题所以这个统计的N+1问题没法避免。可以考虑改关联关系或者写单字段 %>
<% if myshixun_member_count > 0 %>
<span class="mr10 fl squareIconSpan"><i class="iconfont icon-chengyuan fl mr3" data-tip-down="学习人数"></i><%= myshixun_member_count %></span>
<% if subject.try(:member_count).to_i > 0 %>
<span class="mr10 fl squareIconSpan"><i class="iconfont icon-chengyuan fl mr3" data-tip-down="学习人数"></i><%= subject.try(:member_count) %></span>
<% end %>
</p>
</div>

@ -7,17 +7,17 @@
<div class="banner">
<ul class="img">
<!--<li><a href="https://www.educoder.net/courses/1410" target="_blank"><img src="/images/educoder/recom_1.jpg" id="b-img-1"/></a></li>-->
<% if @images.present? %>
<% @images.each do |image| %>
<li><a href="<%= image.link %>" target="_blank"><img src="/images/avatars/PortalImage/<%= image.id %>" id="b-img-1"/></a></li>
<% end %>
<% if @images_url.present? %>
<% @images_url.each do |image| %>
<li><a href="<%= image[:path] %>" target="_blank"><img src="<%= image[:image_url] %>" id="b-img-1"/></a></li>
<% end %>
<% else %>
<li><a href="<%= competition_path(:id => "gcc-dev-2018") %>" target="_blank"><img src="/images/educoder/recom_1.jpg" id="b-img-1"/></a></li>
<li><a href="<%= competition_path(:id => "gcc-annotation-2018") %>" target="_blank"><img src="/images/educoder/recom_2.jpg" id="b-img-1"/></a></li>
<li><a href="<%= competition_path(:id => "ccf-se-2018") %>" target="_blank"><img src="/images/educoder/recom_3.jpg" id="b-img-1"/></a></li>
<li><a href="https://www.educoder.net/paths/54" target="_blank"><img src="/images/educoder/recom_4.jpg" id="b-img-1"/></a></li>
<li><a href="https://www.educoder.net/paths/11" target="_blank"><img src="/images/educoder/recom_5.jpg" id="b-img-2"/></a></li>
<li><a href="https://www.educoder.net/paths/29" target="_blank"><img src="/images/educoder/recom_6.jpg" id="b-img-3"/></a></li>
<li><a href="<%= competition_path(:id => "gcc-dev-2018") %>" target="_blank"><img src="/images/educoder/recom_1.jpg" id="b-img-1"/></a></li>
<li><a href="<%= competition_path(:id => "gcc-annotation-2018") %>" target="_blank"><img src="/images/educoder/recom_2.jpg" id="b-img-1"/></a></li>
<li><a href="<%= competition_path(:id => "ccf-se-2018") %>" target="_blank"><img src="/images/educoder/recom_3.jpg" id="b-img-1"/></a></li>
<li><a href="https://www.educoder.net/paths/54" target="_blank"><img src="/images/educoder/recom_4.jpg" id="b-img-1"/></a></li>
<li><a href="https://www.educoder.net/paths/11" target="_blank"><img src="/images/educoder/recom_5.jpg" id="b-img-2"/></a></li>
<li><a href="https://www.educoder.net/paths/29" target="_blank"><img src="/images/educoder/recom_6.jpg" id="b-img-3"/></a></li>
<% end %>
</ul>
<ul class="num"></ul>
@ -28,15 +28,17 @@
<div class="user_navlist">
<div class="user_navlist_black">
<ul class="black_nav_list">
<% @repertoires.each do |rep| %>
<li class="welcome_shixun_index" data-id="<%= rep.id %>" data-type="rep">
<span class="black_nav_span clearfix font-12"><%= rep.name %><img src="/images/educoder/icon/downarrowsmall-right.svg" class="fr mt15 transform-90"></span>
<% @rep_list.each do |rep| %>
<li class="welcome_shixun_index" data-id="<%= rep[:rep_id] %>" data-type="rep">
<span class="black_nav_span clearfix font-12"><%= rep[:rep_name] %><img src="/images/educoder/icon/downarrowsmall-right.svg" class="fr mt15 transform-90"></span>
<ul class="user_navlist_white">
<% rep.sub_repertoires.each do |sub| %>
<% rep[:sub_rep_list].each do |sub| %>
<div class="clearfix mt20 mb5 pb10 navlistpanel-line">
<p class="little-title clearfix welcome_shixun_index" data-id="<%= sub.id %>" data-rep-id="<%= rep.id %>" data-type="sub"><%= sub.name %></p>
<% sub.tag_repertoires.each do |tag| %>
<a href="javascript:void(0)" class="welcome_shixun_index" data-id="<%= tag.id %>" data-rep-id="<%= rep.id %>" data-sub-id="<%= sub.id %>" data-type="tag"><%= tag.name %></a>
<p class="little-title clearfix welcome_shixun_index" data-id="<%= sub[:sub_rep_id] %>"
data-rep-id="<%= rep[:id] %>" data-type="sub"><%= sub[:sub_rep_name] %></p>
<% sub[:tag_rep_list].each do |tag| %>
<a href="javascript:void(0)" class="welcome_shixun_index" data-id="<%= tag[:tag_id] %>"
data-rep-id="<%= rep[:id] %>" data-sub-id="<%= sub[:sub_rep_id] %>" data-type="tag"><%= tag[:tag_name] %></a>
<% end %>
</div>
<% end %>
@ -55,7 +57,7 @@
<p class="color-dark edu-txt-center font-24" style="line-height: 30px">精选实训</p>
<p class="color-grey-cd font-12">SELECTED TRAINING</p>
</div>
<a href="<%= shixuns_path() %>" class="moreitem">更多<i class="fa fa-angle-right ml5"></i></a>
<a href="<%= shixuns_path %>" class="moreitem">更多<i class="fa fa-angle-right ml5"></i></a>
<div class="square-list clearfix">
<%= render :partial => "shixuns/shixun_item", :locals => {:shixuns => @shixuns} %>
</div>
@ -85,40 +87,40 @@
<div class="ranking clearfix">
<ul class="grade color-dark">
<% if @tea_users[1] %>
<li class="mt35 pr">
<img src="/images/educoder/huangguan-two.png" class="huangguan"/>
<a href="/users/<%= (@tea_users[1].try(:login)) %>" class="color-dark"><%= image_tag(url_to_avatar(@tea_users[1])) %>
<span class="task-hide rankName"><%= @tea_users[1].try(:show_name) %></span>
</a>
</li>
<li class="mt35 pr">
<img src="/images/educoder/huangguan-two.png" class="huangguan"/>
<a href="/users/<%= (@tea_users[1].try(:login)) %>" class="color-dark"><%= image_tag(url_to_avatar(@tea_users[1])) %>
<span class="task-hide rankName"><%= @tea_users[1].try(:show_name) %></span>
</a>
</li>
<% end %>
<% if @tea_users[0] %>
<li class="pr">
<img src="/images/educoder/huangguan.png" class="huangguan"/>
<a href="/users/<%= (@tea_users[0].try(:login)) %>" class="color-dark"><%= image_tag(url_to_avatar(@tea_users[0])) %>
<span class="task-hide rankName"><%= @tea_users[0].try(:show_name) %></span>
</a>
</li>
<li class="pr">
<img src="/images/educoder/huangguan.png" class="huangguan"/>
<a href="/users/<%= (@tea_users[0].try(:login)) %>" class="color-dark"><%= image_tag(url_to_avatar(@tea_users[0])) %>
<span class="task-hide rankName"><%= @tea_users[0].try(:show_name) %></span>
</a>
</li>
<% end %>
<% if @tea_users[2] %>
<li class="mt35 pr">
<img src="/images/educoder/huangguan-three.png" class="huangguan"/>
<a href="/users/<%=(@tea_users[2].try(:login)) %>" class="color-dark"><%= image_tag(url_to_avatar(@tea_users[2])) %>
<span class="task-hide rankName"><%= @tea_users[2].try(:show_name) %></span>
</a>
</li>
<li class="mt35 pr">
<img src="/images/educoder/huangguan-three.png" class="huangguan"/>
<a href="/users/<%=(@tea_users[2].try(:login)) %>" class="color-dark"><%= image_tag(url_to_avatar(@tea_users[2])) %>
<span class="task-hide rankName"><%= @tea_users[2].try(:show_name) %></span>
</a>
</li>
<% end %>
</ul>
<br/>
<ul class="grade mt30">
<% if @tea_users.size > 3 %>
<% @tea_users[3..@tea_users.size].each do |t_u| %>
<li>
<a href="/users/<%= t_u.try(:login) %>" class="color-dark"><%= image_tag(url_to_avatar(t_u)) %>
<span class="task-hide rankName"><%= t_u.try(:show_name) %></span>
</a>
</li>
<% end %>
<% @tea_users[3..@tea_users.size].each do |t_u| %>
<li>
<a href="/users/<%= t_u.try(:login) %>" class="color-dark"><%= image_tag(url_to_avatar(t_u)) %>
<span class="task-hide rankName"><%= t_u.try(:show_name) %></span>
</a>
</li>
<% end %>
<% end %>
</ul>
</div>
@ -133,41 +135,41 @@
</div>
<div class="ranking clearfix">
<ul class="grade color-dark">
<% if @eng_users[1] %>
<li class="mt35 pr">
<img src="/images/educoder/huangguan-two.png" class="huangguan"/>
<a href="/users/<%= @eng_users[1].try(:login) %>" class="color-dark"><%= image_tag(url_to_avatar(@eng_users[1])) %>
<span class="task-hide rankName"><%= @eng_users[1].try(:show_name) %></span>
</a>
</li>
<% if @stu_users[1] %>
<li class="mt35 pr">
<img src="/images/educoder/huangguan-two.png" class="huangguan"/>
<a href="/users/<%= @stu_users[1].try(:login) %>" class="color-dark"><%= image_tag(url_to_avatar(@stu_users[1])) %>
<span class="task-hide rankName"><%= @stu_users[1].try(:show_name) %></span>
</a>
</li>
<% end %>
<% if @eng_users[0] %>
<li class="pr">
<img src="/images/educoder/huangguan.png" class="huangguan"/>
<a href="/users/<%= @eng_users[0].try(:login) %>" class="color-dark"><%= image_tag(url_to_avatar(@eng_users[0])) %>
<span class="task-hide rankName"><%= @eng_users[0].try(:show_name) %></span>
</a>
</li>
<% if @stu_users[0] %>
<li class="pr">
<img src="/images/educoder/huangguan.png" class="huangguan"/>
<a href="/users/<%= @stu_users[0].try(:login) %>" class="color-dark"><%= image_tag(url_to_avatar(@stu_users[0])) %>
<span class="task-hide rankName"><%= @stu_users[0].try(:show_name) %></span>
</a>
</li>
<% end %>
<% if @eng_users[2] %>
<li class="mt35 pr">
<img src="/images/educoder/huangguan-three.png" class="huangguan"/>
<a href="/users/<%= (@eng_users[2].try(:login)) %>" class="color-dark"><%= image_tag(url_to_avatar(@eng_users[2])) %>
<span class="task-hide rankName"><%= @eng_users[2].try(:show_name) %></span>
</a>
</li>
<% if @stu_users[2] %>
<li class="mt35 pr">
<img src="/images/educoder/huangguan-three.png" class="huangguan"/>
<a href="/users/<%= (@stu_users[2].try(:login)) %>" class="color-dark"><%= image_tag(url_to_avatar(@stu_users[2])) %>
<span class="task-hide rankName"><%= @stu_users[2].try(:show_name) %></span>
</a>
</li>
<% end %>
</ul>
<br/>
<ul class="grade mt30">
<% if @eng_users.size > 3 %>
<% @eng_users[3..@eng_users.size].each do |e_u| %>
<li>
<a href="/users/<%= e_u.try(:login) %>" class="color-dark"><%= image_tag(url_to_avatar(e_u)) %>
<span class="task-hide rankName"><%= e_u.try(:show_name) %></span>
</a>
</li>
<% end %>
<% if @stu_users.size > 3 %>
<% @stu_users[3..@stu_users.size].each do |e_u| %>
<li>
<a href="/users/<%= e_u.try(:login) %>" class="color-dark"><%= image_tag(url_to_avatar(e_u)) %>
<span class="task-hide rankName"><%= e_u.try(:show_name) %></span>
</a>
</li>
<% end %>
<% end %>
</ul>
</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

@ -1,5 +1,5 @@
html {overflow-y:auto;}
body { font-family:'微软雅黑', Verdana, sans-serif; font-size: 13px; color:#484848; margin: 0; padding: 0; min-width: 900px; } /*modified by linchun*/
body { font-family:'微软雅黑', Verdana, sans-serif; font-size: 13px; color:#05101A; margin: 0; padding: 0; min-width: 900px; } /*modified by linchun*/
h1, h2, h3, h4 {font-family: '微软雅黑', "Trebuchet MS", Verdana, sans-serif;padding: 2px 10px 1px 0px;margin: 0 0 10px 0;}
#content h1, h2, h3, h4 {color: #555;}

@ -105,7 +105,7 @@ a.decoration{text-decoration: underline}
.ml-3{ margin-left: -3px;}.ml1{margin-left: 1px;}.ml2{margin-left: 2px;}.ml3{margin-left: 3px;}.ml4{margin-left: 4px;}.ml5{ margin-left: 5px;}.ml6{ margin-left: 6px;}.ml10{ margin-left: 10px;}.ml12{ margin-left:12px!important;}.ml13{ margin-left:13px!important;}.ml15{ margin-left: 15px;}.ml18{ margin-left: 18px;}.ml20{ margin-left: 20px;}.ml22{ margin-left: 22px;}.ml25{ margin-left: 25px;}.ml30{ margin-left: 30px;}.ml33{ margin-left: 33px;}.ml35{ margin-left:35px;}.ml40{margin-left:40px;}.ml42{margin-left:42px;}.ml45{ margin-left: 45px;}.ml50{ margin-left: 50px;}.ml55{ margin-left: 55px;}.ml60{ margin-left: 60px;}.ml72{ margin-left: 72px;}.ml73{ margin-left: 73px;}.ml75{ margin-left: 75px;}.ml80{ margin-left: 80px;}.ml95{ margin-left: 95px;}.ml115{margin-left: 115px}.ml123{ margin-left: 123px;}.ml150{ margin-left: 150px;}.ml180{ margin-left: 180px;}.ml230{ margin-left: 230px;}
.mr3{margin-right: 3px}.mr4{margin-right: 4px}.mr5{ margin-right: 5px;}.mr8{ margin-right: 8px;}.mr10{ margin-right: 10px;}.mr12{ margin-right:12px!important;}.mr15{ margin-right: 15px;}.mr18{ margin-right: 18px;}.mr20{ margin-right: 20px;}.mr24{ margin-right: 24px;}.mr25{ margin-right: 25px;}.mr30{ margin-right:30px;}.mr35{margin-right:35px;}.mr40{margin-right:40px;}.mr45{margin-right:45px;}.mr50{ margin-right: 50px;}.mr60{ margin-right:60px;}.mr70{ margin-right: 70px;}.mr75{ margin-right: 75px;}.mr80{ margin-right:80px;}.mr90{ margin-right:90px;}.mr100{ margin-right: 100px;}.mr110{ margin-right:110px;}.mr350{ margin-right:350px;}
.pt1{ padding-top:1px;}.pt3{ padding-top:3px!important;}.pt5{ padding-top:5px!important;}.pt10{ padding-top:10px;}.pt15{ padding-top:15px;}.pt17{ padding-top:17px;}.pt20{ padding-top:20px!important;}.pt25{ padding-top:25px;}.pt30{ padding-top:30px;}.pt35{ padding-top:35px;}.pt37{ padding-top:37px;}.pt40{ padding-top:40px;}.pt47{ padding-top:47px;}.pt49{ padding-top:49px;}.pt50{ padding-top:50px;}.pt60{ padding-top:60px;}.pt70{ padding-top:70px;}.pt80{ padding-top:80px;}.pt90{ padding-top:90px;}.pt100{padding-top:100px;}.pt110{ padding-top:110px;}.pt120{ padding-top:120px;}.pt130{padding-top:130px;}
.pt1{ padding-top:1px;}.pt3{ padding-top:3px!important;}.pt5{ padding-top:5px!important;}.pt10{ padding-top:10px;}.pt15{ padding-top:15px;}.pt17{ padding-top:17px;}.pt20{ padding-top:20px!important;}.pt25{ padding-top:25px;}.pt30{ padding-top:30px;}.pt35{ padding-top:35px;}.pt37{ padding-top:37px;}.pt40{ padding-top:40px;}.pt47{ padding-top:47px;}.pt49{ padding-top:49px;}.pt50{ padding-top:50px;}.pt60{ padding-top:60px;}.pt70{ padding-top:70px;}.pt80{ padding-top:80px;}.pt90{ padding-top:90px;}.pt100{padding-top:100px;}.pt110{ padding-top:110px;}.pt120{ padding-top:120px;}.pt130{padding-top:130px;}.pt200{padding-top:200px;}
.pb3{ padding-bottom:3px!important;}.pb5{ padding-bottom:5px!important;}.pb10{ padding-bottom:10px;}.pb15{ padding-bottom:15px;}.pb20{ padding-bottom:20px;}.pb25{ padding-bottom:20px;}.pb25{ padding-bottom:20px;}.pb30{ padding-bottom:30px;}.pb35{ padding-bottom:35px;}.pb40{ padding-bottom:40px;}.pb47{ padding-bottom:47px;}.pb50{ padding-bottom:50px;}.pb60{ padding-bottom:60px;}.pb70{ padding-bottom:70px;}.pb80{ padding-bottom:80px;}.pb90{ padding-bottom:90px;}.pb100{ padding-bottom:100px;}.pb110{ padding-bottom:110px;}.pb155{ padding-bottom:155px;}
.pr2{ paddding-right:2px;}.pr5{ padding-right:5px;}.pr10{ padding-right:10px;}.pr15{ padding-right:15px;}.pr20{ padding-right:20px!important;}.pr30{ padding-right:30px!important;}.pr35{ padding-right:35px!important;}.pr42{ padding-right:42px;}.pr45{ padding-right:45px;}.pr48{ padding-right:48px;}.pr57{ padding-right:57px;}.pr60{ padding-right:60px;}.pr70{ padding-right:70px;}.pr72{ padding-right:72px;}.pr75{ padding-right:75px;}.pr88{ padding-right:88px;}
@ -233,6 +233,7 @@ a.color-green:hover{color: #28AC7F!important;}
.color-red{color: #FF0000!important;}
.color-red-dd{color: #DD1717!important;}
a.color-red-dd:hover{color: #C61616!important;}
.color-red-c8{color: #C8161D!important}
/*圆角*/
.radius{border-radius: 50%;}
.radius4{border-radius: 4px;}

@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Trustie 500 error</title>
<title>系统通知</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" rel="stylesheet" href="/stylesheets/educoder/edu-main.css" />
<link href="//at.alicdn.com/t/font_653600_rr8l5v2aaym.css" rel="stylesheet" type="text/css"/>
@ -44,7 +44,7 @@
});
</script>
</head>
<body>
<body style="background: #fff!important">
<!-- <h1>Internal error</h1>
<p>An error occurred on the page you were trying to access.<br />
If you continue to experience problems please contact your Trustie administrator for assistance.</p>
@ -52,11 +52,11 @@ If you continue to experience problems please contact your Trustie administrator
<div class="verticalCenter">
<div class="edu-txt-center">
<img src="/images/warn/update.jpeg" >
<p class="font-18 mt40">
温馨提示:为了给大家提供更优质的服务,平台拟于<span style="color: red">2018年11月7日00:00--9:00</span>进行全面升级。
<p class="font-18 mt20">
温馨提示:为了给大家提供更优质的服务
</p>
<p class="font-18 mt40">
带来不便,敬请谅解!
<p class="font-18">
平台拟于<span style="color: red">2019年3月7日00:00--8:00</span>进行全面升级,带来不便,敬请谅解!
</p>
</div>
</div>

Loading…
Cancel
Save