diff --git a/app/controllers/competition_teams_controller.rb b/app/controllers/competition_teams_controller.rb
index f39c7708..14747821 100644
--- a/app/controllers/competition_teams_controller.rb
+++ b/app/controllers/competition_teams_controller.rb
@@ -12,6 +12,35 @@ class CompetitionTeamsController < ApplicationController
@team_user = User.current
end
+ def show
+ return render_404 if @competition.identifier != 'gcc-course-2019'
+
+ @team_user_ids = @team.team_members.pluck(:user_id)
+
+ shixuns = Shixun.where(user_id: @team_user_ids, status: 2).where('shixuns.created_at > ?', Time.parse('2018-06-01'))
+ shixuns = shixuns.joins('left join shixuns forked_shixuns on forked_shixuns.fork_from = shixuns.id and forked_shixuns.status = 2')
+ shixuns = shixuns.joins('left join myshixuns on myshixuns.shixun_id = shixuns.id and exists(select 1 from games where games.myshixun_id = myshixuns.id and games.status = 2)')
+ shixuns = shixuns.select('shixuns.id, shixuns.identifier, shixuns.user_id, shixuns.myshixuns_count, shixuns.name, shixuns.fork_from, sum(forked_shixuns.myshixuns_count) forked_myshixun_count')
+ @shixuns = shixuns.group('shixuns.id').order('shixuns.myshixuns_count desc').includes(:creator)
+ @myshixun_count_map = Myshixun.where(shixun_id: @shixuns.map(&:id))
+ .where('exists(select 1 from games where games.myshixun_id = myshixuns.id and games.status = 2)')
+ .group('shixun_id').count
+
+ # todo:使用新版course_members
+ course_ids = Course.where('courses.created_at > ?', Time.parse('2018-06-01'))
+ .joins('join members on members.course_id = courses.id')
+ .joins('join member_roles on member_roles.member_id = members.id and member_roles.role_id in (3,7,9)')
+ .where(members: { user_id: @team_user_ids }).pluck(:id)
+ courses = Course.where(id: course_ids).joins(:shixun_homework_commons).where('homework_commons.publish_time < now()')
+ @courses = courses.select('courses.id, courses.name, courses.members_count, count(*) shixun_homework_count')
+ .group('courses.id').order('shixun_homework_count desc').having('shixun_homework_count > 0')
+
+ @course_myshixun_map = Myshixun.joins(student_works: :homework_common)
+ .where(homework_commons: { course_id: @courses.map(&:id) })
+ .where('exists(select 1 from games where games.myshixun_id = myshixuns.id and games.status = 2)')
+ .group('homework_commons.course_id').count
+ end
+
def search_teacher
if params[:team] && params[:team] != ""
@team = @competition.competition_teams.where(:id => params[:team]).first
diff --git a/app/controllers/competitions_controller.rb b/app/controllers/competitions_controller.rb
index 0e9fb376..a868cbf0 100644
--- a/app/controllers/competitions_controller.rb
+++ b/app/controllers/competitions_controller.rb
@@ -4,7 +4,7 @@ class CompetitionsController < ApplicationController
:edit_md_content, :update_md_content,
:new_competition_stage, :new_stage_section, :update_competition_stage]
before_filter :find_inform, :only => [:edit_inform, :update_inform]
- before_filter :require_login, :only => [:enroll_portal]
+ before_filter :require_login, :only => [:enroll_portal, :publish]
skip_before_filter :verify_authenticity_token, :only => [:edit_rule]
layout 'base_competition'
@@ -25,7 +25,7 @@ class CompetitionsController < ApplicationController
end
def index
- @competitions = Competition.where(:status => 1).reorder("online_time desc")
+ @competitions = Competition.where('status = 1 or published_at is not null').reorder("published_at desc, online_time desc")
respond_to do |format|
format.html { render :layout => "base_edu"}
format.js
@@ -438,10 +438,10 @@ class CompetitionsController < ApplicationController
def online_switch
if @competition.present?
if @competition.status
- @competition.update_attributes(:status => 0)
+ @competition.update_attributes(status: false, published_at: nil)
@btn_html = "上架"
else
- @competition.update_attributes(:status => 1, :online_time => Time.now)
+ @competition.update_attributes(status: true, online_time: Time.now, published_at: nil)
@btn_html = "下架"
end
end
@@ -601,6 +601,12 @@ class CompetitionsController < ApplicationController
@competition.competition_stage_sections.where(:id => params[:section_id]).destroy_all
end
+ def publish
+ return render_403 unless admin_or_business?
+
+ @competition.update_column(:published_at, Time.now)
+ end
+
private
def chart_exp_score_mo myshixuns, s_time, e_time
diff --git a/app/models/competition.rb b/app/models/competition.rb
index 96747b0b..7ccf067b 100644
--- a/app/models/competition.rb
+++ b/app/models/competition.rb
@@ -2,7 +2,7 @@
class Competition < ActiveRecord::Base
# status 0:下架, 1:上架
attr_accessible :end_time, :identifier, :name, :online_time, :start_time, :status, :visits, :competition_lists_count,
- :min_num, :max_num, :enroll_end_time, :sub_title
+ :min_num, :max_num, :enroll_end_time, :sub_title, :published_at
has_many :competition_modules, :dependent => :destroy
has_many :competition_stages, :dependent => :destroy
diff --git a/app/models/shixun.rb b/app/models/shixun.rb
index fe9a00b1..0d201ed3 100644
--- a/app/models/shixun.rb
+++ b/app/models/shixun.rb
@@ -66,18 +66,6 @@ class Shixun < ActiveRecord::Base
#scope :visible, -> { where(status: -1) }
after_create :send_tiding
- def description
- self.has_attribute?(:description) ? self[:description] : ""
- end
-
- def propaedeutics
- self.has_attribute?(:propaedeutics) ? self[:propaedeutics] : ""
- end
-
- def evaluate_script
- self.has_attribute?(:evaluate_script) ? self[:evaluate_script] : ""
- end
-
def should_compile?
self.mirror_repositories.published_main_mirror.first.try(:should_compile)
end
diff --git a/app/views/attachments/_from_libraries.html.erb b/app/views/attachments/_from_libraries.html.erb
index a6fe347d..eb9126a0 100644
--- a/app/views/attachments/_from_libraries.html.erb
+++ b/app/views/attachments/_from_libraries.html.erb
@@ -1,6 +1,6 @@
-
+
- 上传附件
+ 上传附件
从我的电脑选择要上传的文档:按住CTRL可以上传多份文档
上传出现错误,请检查您的网络环境,并刷新页面重新上传。
diff --git a/app/views/competition_teams/_competition_team_form.html.erb b/app/views/competition_teams/_competition_team_form.html.erb
index fbba4618..c68cc3b2 100644
--- a/app/views/competition_teams/_competition_team_form.html.erb
+++ b/app/views/competition_teams/_competition_team_form.html.erb
@@ -24,13 +24,12 @@
导师:
-
autocomplete="off" placeholder="请您输入老师姓名进行搜索;可以后续再添加导师" id="teacher_search_input"
- value="<%= @team.try(:id).present? ? @team.teacher.try(:show_name) : (@team_user.user_extensions.identity == 0 ? @team_user.show_name : "") %>">
+
">
">
-
+
diff --git a/app/views/competition_teams/show.html.erb b/app/views/competition_teams/show.html.erb
new file mode 100644
index 00000000..129fa32a
--- /dev/null
+++ b/app/views/competition_teams/show.html.erb
@@ -0,0 +1,120 @@
+
+
+ 战队详情
+ <%= link_to '返回', enroll_competition_path(@competition), class: 'color-grey-9 fr' %>
+
+
+
实训项目
+
+
+
+ 创建者
+ 名称
+ 学习人数
+ fork版的学习人数
+ 有效作品数
+ 经验值
+
+
+
+ <%
+ total_myshixun_count = 0
+ total_forked_myshixun_count = 0
+ %>
+ <% @shixuns.each do |shixun| %>
+ <%
+ total_myshixun_count += shixun.myshixuns_count
+ total_forked_myshixun_count += shixun['forked_myshixun_count'].to_i
+ %>
+
+ <%= shixun.creator.show_real_name %>
+
+ <%= link_to shixun_path(shixun), target: '_blank' do %>
+ <%= shixun.name %>
+ <% end %>
+ <% if shixun.fork_from.blank? %>
+ 原创
+ <% end %>
+
+ <%= shixun.myshixuns_count.to_i.zero? ? '--' : shixun.myshixuns_count.to_i %>
+ <%= shixun['forked_myshixun_count'].to_i.zero? ? '--' : shixun['forked_myshixun_count'].to_i %>
+ <%= @myshixun_count_map.fetch(shixun.id, '--') %>
+ --
+
+ <% end %>
+
+
+
+
+
+
+
翻转课堂
+
+
+
+ 创建者
+ 名称
+ 学生数量
+ 发布的实训作业数量
+ 有效作品数
+ 经验值
+
+
+
+ <%
+ total_members_count = 0
+ total_shixun_homework_count = 0
+ %>
+ <% @courses.each do |course| %>
+ <%
+ total_members_count += course.members_count.to_i
+ total_shixun_homework_count += course['shixun_homework_count'].to_i
+ %>
+
+ <%= course.teachers.where(user_id: @team_user_ids).first.user.show_real_name %>
+
+ <%= link_to course_path(course), target: '_blank' do %>
+ <%= course.name %>
+ <% end %>
+
+ <%= course.members_count %>
+ <%= course['shixun_homework_count'].presence || '--' %>
+ <%= @course_myshixun_map.fetch(course.id, '--') %>
+ --
+
+ <% end %>
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/competitions/_competition_team_detail.html.erb b/app/views/competitions/_competition_team_detail.html.erb
deleted file mode 100644
index 9574db58..00000000
--- a/app/views/competitions/_competition_team_detail.html.erb
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
- 战队详情
- 返回
-
-
-
实训项目
-
-
- 创建者
- 名称
- 学习人数
- fork版的学习人数
- 有效作品数
- 制作应用经验值
-
-
-
- 胡莎莎
-
- 单链表的学习与应用(I)
-
- 2.5万
- 1456
- 2.5万
- 4545667
-
-
-
- 合计:
- 6
- 5.5万
- 7878
- 2.5万
- 245364
-
-
-
-
\ No newline at end of file
diff --git a/app/views/competitions/_header.html.erb b/app/views/competitions/_header.html.erb
index 6aa4c1a2..b6790839 100644
--- a/app/views/competitions/_header.html.erb
+++ b/app/views/competitions/_header.html.erb
@@ -46,7 +46,7 @@
排行榜
<% when '报名' %>
-
+
报名
<% else %>
diff --git a/app/views/competitions/_qg_second_competition.html.erb b/app/views/competitions/_qg_second_competition.html.erb
index aa45d32e..9a8c28f4 100644
--- a/app/views/competitions/_qg_second_competition.html.erb
+++ b/app/views/competitions/_qg_second_competition.html.erb
@@ -5,10 +5,10 @@
<% index += 1 %>
<% @competition.competition_stages.each_with_index do |stage, i| %>
-
+
" style="background: url(<%= named_attachment_path(@images[index], @images[index].try(:filename)) %>) no-repeat top center;">
<% stage.competition_stage_sections.each do |section| %>
-
+
<%= section.name %>
<%= format_time section.start_time %> ~ <%= com_end_time section.end_time %>
diff --git a/app/views/competitions/_qg_second_opensource.html.erb b/app/views/competitions/_qg_second_opensource.html.erb
new file mode 100644
index 00000000..b7e878e9
--- /dev/null
+++ b/app/views/competitions/_qg_second_opensource.html.erb
@@ -0,0 +1,71 @@
+<% index = 0 %>
+
+<% index += 1 %>
+
+<% index += 1 %>
+
+<% @competition.competition_stages.each_with_index do |stage, i| %>
+
+ <%
+ first_section = stage.competition_stage_sections[0]
+ second_section = stage.competition_stage_sections[1]
+ %>
+
+
+
+
+ <%= first_section.try(:name) %>
+ <%= first_section.start_time.try(:strftime, '%Y年%m月%d日') %>~<%= first_section.end_time.try(:strftime, '%Y年%m月%d日') %>
+
+
+ <%= second_section.try(:name) %>
+ <%= second_section.try(:start_time).try(:strftime, '%Y年%m月%d日') %>~<%= second_section.try(:end_time).try(:strftime, '%Y年%m月%d日') %>
+
+
+
+ <% is_start = Time.now > first_section.start_time %>
+ <% first_section.competition_entries.each_with_index do |entry, j| %>
+ <%
+ competition_url = User.current.logged? ? "#{entry.url}?eid=#{User.current.id}" : "#{entry.url}"
+ btn_url = is_start ? "#{competition_url}" : "javascript:void(0);"
+ %>
+ <%= entry.name %>
+ <% end %>
+
+
+
+
+<% index += 1 %>
+<% end %>
+
+
+<% index += 1 %>
+
+<% index += 1 %>
+
+
+
\ No newline at end of file
diff --git a/app/views/competitions/_team_list.html.erb b/app/views/competitions/_team_list.html.erb
index 5e75b3a4..ba445c7b 100644
--- a/app/views/competitions/_team_list.html.erb
+++ b/app/views/competitions/_team_list.html.erb
@@ -5,7 +5,15 @@
<% @teams.each do |team| %>
<%= link_to image_tag(url_to_avatar(team.user), :width => "40", :height => "40", :class => "radius fl mr10"), user_path(team.user), :title => team.user.show_name, :target => "_blank", :alt => "用户头像" %>
- <%= @maximum_staff > 1 ? team.name : team.user.show_name %>
+
+ <% if @competition.identifier == 'gcc-course-2019' %>
+ <%= link_to competition_team_path(id: team.id) do %>
+ <%= @maximum_staff > 1 ? team.name : team.user.show_name %>
+ <% end %>
+ <% else %>
+ <%= @maximum_staff > 1 ? team.name : team.user.show_name %>
+ <% end %>
+
<% if @maximum_staff > 1 %>
<% team.teachers.each do |teacher| %>
diff --git a/app/views/competitions/enroll.html.erb b/app/views/competitions/enroll.html.erb
index eca04c58..69bedd2f 100644
--- a/app/views/competitions/enroll.html.erb
+++ b/app/views/competitions/enroll.html.erb
@@ -1,5 +1,5 @@
-
+
<%= @competition.name %>
<% if @maximum_staff > 1 %>
@@ -67,7 +67,7 @@
<% @is_enroll.each do |team| %>
-
+
<%= link_to image_tag(url_to_avatar(team.user), :width => "48", :height => "48", :class => "radius fl mr10"), user_path(team.user), :title => team.user.show_name, :target => "_blank", :alt => "用户头像" %>
<%= team.name %>
@@ -84,22 +84,22 @@
<% end %>
- 邀请码:<%= team.invite_code %>
+ 邀请码:<%= team.invite_code %>
<% if @competition.enroll_end_time.present? && @competition.enroll_end_time < Time.now %>
<% if User.current.admin? || User.current == team.user %>
-
+
<% end %>
<% else %>
<% if User.current.admin? || User.current == team.user %>
-
+
<% else %>
退出
<% end %>
<% end %>
-
+ <%= link_to '进入大赛', competition_path(@competition), class: 'enrollOperation' %>
<% if @competition.identifier == 'gcc-course-2019' %>
- <%= link_to '战队详情', competition_team_path(id: @competition.id) %>
+ <%= link_to '战队详情', competition_team_path(id: team.id), class: 'enrollOperation' %>
<% end %>
<% end %>
diff --git a/app/views/competitions/index.html.erb b/app/views/competitions/index.html.erb
index 3f03f6ef..b95bec63 100644
--- a/app/views/competitions/index.html.erb
+++ b/app/views/competitions/index.html.erb
@@ -2,6 +2,7 @@
<% if @competitions.count > 0 %>
<% @competitions.each do |competition| %>
+ <% if competition.status? %>
+ <% elsif competition.published_at.present? %>
+ <% url = admin_or_business? ? competition_path(competition) : 'javascript:void(0)' %>
+
+ <% end %>
<% end %>
<% else %>
<%= render :partial => "welcome/no_data" %>
<% end %>
+
diff --git a/app/views/competitions/publish.js.erb b/app/views/competitions/publish.js.erb
new file mode 100644
index 00000000..4fd255a7
--- /dev/null
+++ b/app/views/competitions/publish.js.erb
@@ -0,0 +1 @@
+notice_box_redirect('<%= competition_managements_path %>', '发布成功')
\ No newline at end of file
diff --git a/app/views/competitions/show.html.erb b/app/views/competitions/show.html.erb
index 0df98a24..28200db3 100644
--- a/app/views/competitions/show.html.erb
+++ b/app/views/competitions/show.html.erb
@@ -13,5 +13,7 @@
<%= render :partial => "gq_second_code_competition" %>
<% elsif @competition.identifier == "gcc-course-2019" %>
<%= render :partial => "qg_second_course_competition" %>
+ <% elsif @competition.identifier == "gcc-project-2019" %>
+ <%= render :partial => "qg_second_opensource" %>
<% end %>
\ No newline at end of file
diff --git a/app/views/libraries/_form.html.erb b/app/views/libraries/_form.html.erb
index a813e4b7..2e584ab4 100644
--- a/app/views/libraries/_form.html.erb
+++ b/app/views/libraries/_form.html.erb
@@ -15,9 +15,9 @@
-
+
描述
-
+
<%= f.text_area :content %>
@@ -25,7 +25,7 @@
-
+
<%= render partial: 'attachments/from_libraries', locals: { container: @library } %>
请上传附件
diff --git a/app/views/libraries/index.html.erb b/app/views/libraries/index.html.erb
index cc34dc81..8e52e85b 100644
--- a/app/views/libraries/index.html.erb
+++ b/app/views/libraries/index.html.erb
@@ -5,8 +5,8 @@
教学案例
<%= link_to '新建', new_library_path, class: 'fr color-blue font-16 mt3' %>
-
-
+
+
<%= link_to '全部', libraries_path(search: params[:search]), remote: true %>
@@ -14,7 +14,7 @@
<%= link_to '我的', libraries_path(search: params[:search], type: 'mine'), remote: true %>
-
+
<%= hidden_field_tag(:type, params[:type]) %>
diff --git a/app/views/libraries/show.html.erb b/app/views/libraries/show.html.erb
index f857a8ec..6889e49d 100644
--- a/app/views/libraries/show.html.erb
+++ b/app/views/libraries/show.html.erb
@@ -50,7 +50,7 @@
<%= link_to '编辑', edit_library_path(id: @library.id), class: 'white-btn edu-blueline-btn fr' %>
<% end %>
-
+
<%= link_to image_tag(url_to_avatar(@library.user), width: 50, height: 50, class: 'radius mr15 mt3'), user_path(@library.user) %>
<%= @library.user.show_real_name %>
diff --git a/app/views/managements/_competionList.html.erb b/app/views/managements/_competionList.html.erb
index f2c4921f..ddc8b69b 100644
--- a/app/views/managements/_competionList.html.erb
+++ b/app/views/managements/_competionList.html.erb
@@ -65,6 +65,10 @@
取消
保存
<%= competition.status ? "下架" : "上架" %>
+
+ <% if !competition.status? && competition.published_at.blank? %>
+ <%= link_to '发布', publish_competition_path(competition), class: 'mr10', method: :post, remote: true %>
+ <% end %>
<% end %>
diff --git a/config/routes.rb b/config/routes.rb
index 2bc0038c..c9d01c3b 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -260,6 +260,7 @@ RedmineApp::Application.routes.draw do ## oauth相关
get 'send_message'
get 'export_chart_score'
post 'competition_images'
+ post 'publish'
end
collection do
post 'new_competition'
diff --git a/db/migrate/20190705021338_add_published_at_to_competitions.rb b/db/migrate/20190705021338_add_published_at_to_competitions.rb
new file mode 100644
index 00000000..a3420621
--- /dev/null
+++ b/db/migrate/20190705021338_add_published_at_to_competitions.rb
@@ -0,0 +1,5 @@
+class AddPublishedAtToCompetitions < ActiveRecord::Migration
+ def change
+ add_column :competitions, :published_at, :datetime
+ end
+end
diff --git a/public/images/educoder/competition/qg/qg_open_1.png b/public/images/educoder/competition/qg/qg_open_1.png
new file mode 100644
index 00000000..c4048d03
Binary files /dev/null and b/public/images/educoder/competition/qg/qg_open_1.png differ
diff --git a/public/images/educoder/competition/qg/qg_open_2.png b/public/images/educoder/competition/qg/qg_open_2.png
new file mode 100644
index 00000000..833f2af5
Binary files /dev/null and b/public/images/educoder/competition/qg/qg_open_2.png differ
diff --git a/public/images/educoder/competition/qg/qg_open_3.png b/public/images/educoder/competition/qg/qg_open_3.png
new file mode 100644
index 00000000..ed4ea26b
Binary files /dev/null and b/public/images/educoder/competition/qg/qg_open_3.png differ
diff --git a/public/images/educoder/competition/qg/qg_open_4.png b/public/images/educoder/competition/qg/qg_open_4.png
new file mode 100644
index 00000000..f1bf7308
Binary files /dev/null and b/public/images/educoder/competition/qg/qg_open_4.png differ
diff --git a/public/images/educoder/competition/qg/qg_open_5.png b/public/images/educoder/competition/qg/qg_open_5.png
new file mode 100644
index 00000000..a1bfd8f1
Binary files /dev/null and b/public/images/educoder/competition/qg/qg_open_5.png differ
diff --git a/public/images/educoder/competition/qg/qg_open_6.png b/public/images/educoder/competition/qg/qg_open_6.png
new file mode 100644
index 00000000..3d101c2a
Binary files /dev/null and b/public/images/educoder/competition/qg/qg_open_6.png differ
diff --git a/public/images/educoder/competition/qg/qg_open_7.png b/public/images/educoder/competition/qg/qg_open_7.png
new file mode 100644
index 00000000..0fe71207
Binary files /dev/null and b/public/images/educoder/competition/qg/qg_open_7.png differ
diff --git a/public/images/educoder/teach_ex.png b/public/images/educoder/teach_ex.png
index a3e65c73..e5ec5139 100644
Binary files a/public/images/educoder/teach_ex.png and b/public/images/educoder/teach_ex.png differ
diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css
index 60018b85..19ab3793 100644
--- a/public/stylesheets/educoder/edu-all.css
+++ b/public/stylesheets/educoder/edu-all.css
@@ -628,6 +628,7 @@ p .activity-item:first-child{border-top: 1px solid #eee;}
.enterTo span.f-cart{width: 246px;text-align: center;color: #29BD8B;font-size: 20px;line-height: 20px;float: left;display: block;font-weight: bold;margin-right: 20px;}
.enterTo span.d-cart{box-sizing:border-box;width: 246px;text-align: center;color: #989898;font-size: 16px;line-height: 22px;float: left;display: block;margin-right: 20px;}
.partGame.largepart .partborder .enterTo a:last-child,.enterTo span.f-cart:last-child,.enterTo span.d-cart:last-child{margin-right:0px;}
+
/*.partTime.active .time{color:#ff3232; }*/
.partTime.active .enterTo a{cursor: pointer;background-color: #29bd8b;box-shadow: 0px 10px 10px rgba(41,189,139,0.2)}
a.enterLink{cursor: pointer;color: #418CCD!important;background: none!important;box-shadow: none!important;font-size: 14px!important;text-align: left;line-height: 20px;height: 20px;padding-bottom: 1px;border-bottom: 1px solid #418ccd;width: auto!important;border-radius: 0px;}
@@ -643,7 +644,8 @@ a.enterLink{cursor: pointer;color: #418CCD!important;background: none!important;
/*第二次竞赛-全国*/
.second_1{min-height: 832px;}
.second_2{min-height: 446px;}
-.second_3{min-height: 595px;padding-top: 190px;box-sizing: border-box;position: relative}
+.second_3{min-height: 766px;padding-top: 190px;box-sizing: border-box;position: relative}
+.second_3_small{min-height: 595px;padding-top: 190px;box-sizing: border-box;position: relative}
.second_4{min-height: 610px;padding-top: 190px;box-sizing: border-box;position: relative}
.second_5{min-height: 617px;padding-top: 190px;box-sizing: border-box;position: relative}
.second_6{min-height: 1053px;}
@@ -659,6 +661,15 @@ a.enterLink{cursor: pointer;color: #418CCD!important;background: none!important;
.second_code_6{min-height: 1060px;}
.second_code_7{min-height: 1116px;}
.second_code_8{min-height: 711px;}
+/*开源创新竞赛*/
+.openSource_1{min-height: 803px;}
+.openSource_2{min-height: 427px;}
+.openSource_3{min-height: 524px;padding-top: 190px;box-sizing: border-box;position: relative}
+.openSource_4{min-height: 526px;padding-top: 190px;box-sizing: border-box;position: relative}
+.openSource_5{min-height: 1061px;}
+.openSource_6{min-height: 1090px;}
+.openSource_7{min-height: 683px;}
+
.challenge_title{
color: #41ABEF;font-size: 30px;font-weight: bold;text-align: center;letter-spacing: 1px;line-height: 60px;margin-bottom: 20px;
}
@@ -728,6 +739,47 @@ li.challenge_box:last-child{
width: 360px;height: 70px;background: #2CDAD4;color: #fff!important;font-size: 30px;line-height: 70px;text-align: center;
margin:0px auto;display: block;
}
+table.tBodyScroll tbody tr td{
+ padding:6px 5px;box-sizing: border-box;font-size: 16px;color: #05101A;font-weight: normal;
+}
+table.tBodyScroll tbody {
+ display:block;
+ max-height:420px;
+ overflow-y:auto;
+}
+.connectTag{
+ display: inline-block;background: #4CACFF;border-radius: 12px;height: 24px;line-height: 24px;color: #fff;
+ padding:0px 12px;font-size: 14px;
+}
+table.tBodyScroll thead,table.tBodyScroll tfoot,table.tBodyScroll tbody tr {
+ display:table;
+ width:100%;
+ table-layout:fixed;
+}
+
+table.tBodyScroll thead,table.tBodyScroll tfoot {
+ width:100%;
+}
+table.tBodyScroll tfoot tr th{
+ padding:10px 5px;box-sizing: border-box;border-top: 1px solid #eaeaea;font-weight: normal!important;
+}
+.lastPart,.tfootLastPart{
+ width: calc( 100% - 1em )!important;
+}
+.lastPart tr th:last-child,.tfootLastPart tr th:last-child{position: relative;}
+.tfootLastPart tr th:last-child:after{
+ content: '';width: 1em;height: 100%;position: absolute;right: -1em;top:0px;border-top: 1px solid #eaeaea;
+}
+.lastPart tr th:last-child:after{
+ content: '';background: #F5F5F5;width: 1em;height: 100%;position: absolute;right: -1em;top:0px
+}
+table.tBodyScroll thead th{
+ background: #F5F5F5;color: #656565;padding:10px 5px;box-sizing: border-box;
+}
+.modalTitle{display: block;padding: 0px 30px;position: relative;line-height: 20px}
+.modalTitle:before{
+ position: absolute;height: 100%;width: 2px;content: '';background: #4cacff;left: 0px;top: 0px;
+}
@@ -802,6 +854,18 @@ li.challenge_box:last-child{
.joinTeamInfo{background-image:url('/images/educoder/competition/enroll-item.png');height:202px;width: 934px;padding: 10px 35px;box-sizing: border-box;margin: 0px auto;padding-top: 60px;}
.joinTeamInfo span,.joinTeamInfo a{line-height: 30px;}
+.enrollOperation{
+ float: left;
+ padding: 0px 8px;
+ border-radius: 27px;
+ background: #459be5;
+ color: #fff!important;
+ font-size: 12px!important;
+ height: 20px;
+ line-height: 19px!important;
+ margin-top: 18px;
+ margin-left: 10px;
+}
/*弹框*/
.c-l-box{background: rgba(139,163,183,0.08);height: 226px;overflow-y: auto;width: 100%;padding: 20px 20px 0px 20px;box-sizing: border-box;}
.c-l-box li,.c-r-box li{margin-bottom: 15px;line-height: 25px;}
@@ -834,9 +898,14 @@ li.challenge_box:last-child{
.homePageBtn{position: absolute;width: 100%;top: 510px;}
.homeBtn{display: block;float: left;border-radius: 30px;width: 168px;height: 60px;line-height: 60px;background-color: #21B351;font-size: 30px;color: #fff!important;text-align: center}
-.competitionsList-item{width: 50%;float: left;box-sizing: border-box;}
+.competitionsList-item{width: 50%;float: left;box-sizing: border-box;position: relative}
.competitionsList-item:nth-of-type(odd){padding-right: 10px;}
.competitionsList-item:nth-of-type(even){padding-left: 10px;}
+.competitionsList-item-tip{
+ position: absolute;top: 0px;left: 0px;height: 100%;background: rgba(0,0,0,0.5);right: 10px;justify-content: center;
+ align-items: center;display: -webkit-flex;
+}
+.strongNone{display: none!important;}
.competition-Img{width: 100%;height: 340px;}
.competition-Img img{border-radius: 4px 4px 0px 0px;}
.status-tag {display: block;height: 30px;line-height: 30px;color: #fff;padding: 0px 20px;}
@@ -3399,10 +3468,10 @@ line-height: 16px;display: inline-block;color: rgba(65, 140, 205, 1) !important;
background: #fff;padding:30px;margin-bottom: 15px;display: flex;
}
.upload_Title{
- position: relative;margin-right: 30px;float: left;line-height: 35px;font-size: 16px;
+ position: relative;margin-right: 30px;float: left;line-height: 35px;font-size: 16px;width: 32px;
}
.upload_Title:before{
- position: absolute;left: -10px;top:2px;content: '*';color: #FE4F4C;
+ position: absolute;left: -10px;top:2px;content: '*';color: #FE4F4C;width: 32px;
}
.librariesField{
width: 100%;background: #F2F9FF;justify-content: center;align-items: center;display: -webkit-flex;text-align: center;
diff --git a/spec/factories/shixun_infos.rb b/spec/factories/shixun_infos.rb
new file mode 100644
index 00000000..35c80a06
--- /dev/null
+++ b/spec/factories/shixun_infos.rb
@@ -0,0 +1,5 @@
+FactoryGirl.define do
+ factory :shixun_info do
+
+ end
+end
diff --git a/spec/models/shixun_info_spec.rb b/spec/models/shixun_info_spec.rb
new file mode 100644
index 00000000..988bdeae
--- /dev/null
+++ b/spec/models/shixun_info_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe ShixunInfo, :type => :model do
+ pending "add some examples to (or delete) #{__FILE__}"
+end