diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index a0faf463a..8ed9cfc18 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -49,17 +49,17 @@ class CoursesController < ApplicationController @syllabuses_num = Course.where("is_end = #{@is_end} and is_delete = 0").count #@syllabus_count = all_syllabuses.count # 我创建的课堂 - create_syllabuses = Course.where(:tea_id => @user.id).where("is_end = #{@is_end} and is_delete = 0 and name like '%#{@search}%'") + create_syllabuses = Course.where(:tea_id => @user.id) # 我参与的课堂 - join_syllabuses = @user.courses.where("is_end = #{@is_end} and is_delete = 0 and tea_id != #{@user.id} and name like '%#{@search}%'") + join_syllabuses = @user.courses.where("is_delete = 0 and tea_id != #{@user.id}") @join_syllabuses_count = join_syllabuses.count @create_syllabuses_count = create_syllabuses.count # 页面筛选的课程 if @select == "create" - @syllabuses = create_syllabuses + @syllabuses = create_syllabuses.where("is_end = #{@is_end} and is_delete = 0 and name like '%#{@search}%'") elsif @select == "join" - @syllabuses = join_syllabuses + @syllabuses = join_syllabuses.where("is_end = #{@is_end} and is_delete = 0 and tea_id != #{@user.id} and name like '%#{@search}%'") elsif @select == "end" # 归档的课堂 end_syllabuses = Course.where("is_end = #{@is_end} and name like '%#{@search}%'") diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index d6b9d3c7f..453f6eae7 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -3,7 +3,7 @@ class GamesController < ApplicationController layout "base_myshixun" skip_before_filter :verify_authenticity_token, :only => [:file_update] before_filter :find_myshixun, :only => [:index] - before_filter :find_game, :only => [:show, :game_build, :entry,:next_step, :outputs_show, :file_edit, :file_update, + before_filter :find_game, :only => [:show, :game_build, :entry,:next_step, :outputs_show, :file_edit, :file_update, :get_waiting_time, :game_status, :change_status, :answer, :minus_score, :refresh_game_list, :reset_original_code, :reset_new_code, :evaluating_choice] before_filter :find_repository, :only => [:show, :entry, :file_edit, :file_update, :reset_original_code, :reset_new_code, :html_show] before_filter :allowd_manager @@ -147,6 +147,25 @@ class GamesController < ApplicationController end end + # 获取评测的等待的时间 + # res['waitNum'] 评测等待人数 + # res['waitingTime'] 评测等待时间 + # res['onRun'] 0 表示在等待中 1 表示可执行 + def get_waiting_time + shixun_tomcat = Redmine::Configuration['shixun_tomcat'] + uri = "#{shixun_tomcat}/bridge/game/getWaitingTime" + params = {:tpiID => "#{@myshixun.id}"} + res = uri_exec uri, params + if (res && res['code'] != 0) + @message = "实训云平台繁忙(繁忙等级:94)" + raise("实训云平台繁忙(繁忙等级:94)") + end + render :json => {:result => "success", :onRun => res['onRun'], :waitNum => res['waitNum'], :waitingTime => res['waitingTime'] } + #render :json => {:result => "success", :onRun => 1, :waitNum => 12, :waitingTime => 546 } + rescue Exception => e + render :json => {:result => "failed"} + end + # status 0: 未提交测评或者提交测评失败后报错;1:中间状态还没返回值;2:返回值并成功 # resubmit 唯一随机码,为了区分每一次重新评测结果 CODES = %W(1 2 3 4 5 6 7 8 9 A B C D E F G H J K L N M O P Q R S T U V W X Y Z) diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index b321cd469..4bdf16e72 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -185,7 +185,7 @@ class ManagementsController < ApplicationController end if params[:support_shixuns] - @major = @major.where(:support_shixuns => params[:support_shixuns].to_i, :major_level => 2) + @major = @major.where(:support_shixuns => params[:support_shixuns].to_i,:major_level=> 2) end @major = @major.order("created_at #{@sx_order}") @@ -652,6 +652,7 @@ end def class_shixuns @menu_type = 4 @sub_type = 1 + @sx_order = params[:sx_order].blank? ? "desc" : params[:sx_order] @edit_class_sx_num=Subject.where(:status => 0).count @audit_class_sx_num=Subject.where(:status => 1).count @publish_class_sx_num=Subject.where(:status => 2).count @@ -680,6 +681,8 @@ end user_exs = UserExtensions.where(:user_id => @c_shixuns.map(&:user_id)) @schools = School.where(:id => user_exs.map(&:school_id)) end + @c_shixuns = @c_shixuns.order("created_at #{@sx_order}") + @c_shixuns_count = @c_shixuns.count limit = 20 @c_shixuns_pages = Paginator.new @c_shixuns_count, limit, params['page'] || 1 @@ -700,6 +703,7 @@ end def class_publish_shixuns @menu_type = 4 @sub_type = 2 + @sx_order = params[:sx_order].blank? ? "desc" : params[:sx_order] search = params[:search] # 搜索字 keyword = params[:keyword].blank? ? "u_name" : params[:keyword] # 根据姓名/课程名搜索 if params[:school_id] && params[:school_id] != '0' @@ -719,7 +723,7 @@ end user_exs = UserExtensions.where(:user_id => @c_shixuns.map(&:user_id)) @schools = School.where(:id => user_exs.map(&:school_id)) end - @c_shixuns = @c_shixuns.order("created_at desc") + @c_shixuns = @c_shixuns.order("created_at #{@sx_order}") @c_shixuns_count = @c_shixuns.count limit = 20 @c_shixuns_pages = Paginator.new @c_shixuns_count, limit, params['page'] || 1 @@ -898,35 +902,56 @@ end =end if params[:member_ids] && params[:trial_whether] == "trial_agree" - params[:member_ids].each do |member| - aUser = ApplyAction.where(:user_id => member, :container_type => "TrialAuthorization") - if aUser.blank? - ApplyAction.create(:user_id => member, :container_type => "TrialAuthorization", :status => 1) - else - aUser.update_all(:status => 1) - end - end + aUser = User.where(:id => params[:member_ids]) + aUser.update_all(:certification => 1) + apply_user = ApplyAction.where(:user_id => params[:member_ids]) + apply_user.update_all(:status => 1) unless apply_user.blank? elsif params[:member_ids] && params[:trial_whether] == "trial_cancel" - ApplyAction.where(:user_id => params[:member_ids], :container_type => "TrialAuthorization").update_all(:status => 2) + User.where(:id => params[:member_ids]).update_all(:certification => 0) + apply_user = ApplyAction.where(:user_id => params[:member_ids]) + apply_user.update_all(:status => 2) unless apply_user.blank? end - if params[:member_ids] && (params[:occupation] == "occupation_agree" || params[:realname] == "realname_agree") + if params[:member_ids] && params[:occupation] == "occupation_agree" + User.where(:id => params[:member_ids]).update_all(:professional_certification => true) + apply_user = ApplyUserAuthentication.where(:user_id => params[:member_ids], :auth_type => 2) + unless apply_user.blank? + apply_user.update_all(:status => 1) + end + elsif params[:member_ids] && params[:realname] == "realname_agree" User.where(:id => params[:member_ids]).update_all(:authentication => true) - elsif params[:member_ids] && (params[:occupation] == "occupation_agree" || params[:realname] == "realname_cancel") + apply_user = ApplyUserAuthentication.where(:user_id => params[:member_ids], :auth_type => 1) + unless apply_user.blank? + apply_user.update_all(:status => 1) + end + elsif params[:member_ids] && params[:occupation] == "occupation_cancel" + User.where(:id => params[:member_ids]).update_all(:professional_certification => false) + apply_user = ApplyUserAuthentication.where(:user_id => params[:member_ids], :auth_type => 2) + unless apply_user.blank? + apply_user.update_all(:status => 2) + end + elsif params[:member_ids] && params[:realname] == "realname_cancel" User.where(:id => params[:member_ids]).update_all(:authentication => false) + apply_user = ApplyUserAuthentication.where(:user_id => params[:member_ids], :auth_type => 1) + unless apply_user.blank? + apply_user.update_all(:status => 2) + end end if params[:trial] == "-1" apply = ApplyAction.where(:container_type => "TrialAuthorization") apply_id = apply.blank? ? -1 : "(" + apply.map{|a| a.user_id}.join(",") + ")" - apply_user_id = User.where("id not in #{apply_id} and status = 1").all + apply_user_id = User.where("id not in #{apply_id} and status = 1 and certification = 0").all apply_user_id = apply_user_id.blank? ? [-1] : apply_user_id.map{|a| a.id}.split(",")[0] elsif params[:trial] == "-2" apply_user_id = User.where(:status => 1).all apply_user_id = apply_user_id.blank? ? [-1] : apply_user_id.map{|a| a.id}.split(",")[0] - else - apply = ApplyAction.where(:status => params[:trial]) + elsif params[:trial] == "0" + apply = ApplyAction.where(:status => 0) apply_user_id = apply.blank? ? [-1] : apply.map{|a| a.user_id}.split(",")[0] + else + apply_user_id = User.where(:status => 1, :certification => params[:trial]).all + apply_user_id = apply_user_id.blank? ? [-1] : apply_user_id.map{|a| a.id}.split(",")[0] end if params[:school] == "" @@ -1031,6 +1056,7 @@ end end end apply_action.update_attributes(:status => (params[:type] == "1" ? 2 : 1), :reason => params[:reject_reason], :dealer_id => User.current.id) + User.where(:id => apply_action.user_id).first.update_attributes(:certification => (params[:type] == "1" ? 2 : 1)) user_id = User.find_by_sql("select id from users where concat(lastname,firstname) like '%#{search}%'") @authorizations = ApplyAction.where(:container_type => "TrialAuthorization", :status => 0, :user_id => user_id).includes(:user) @autu_count = @authorizations.count @@ -1155,6 +1181,7 @@ end format.html end end + # 课程实训发布审批 def deal_subject_authorization apply_action = ApplyAction.find(params[:apply_id]) @@ -1180,6 +1207,7 @@ end format.js end end + # 项目实训发布审批 def deal_shixun_authorization apply_action = ApplyAction.find(params[:apply_id]) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index c0182bf42..4431c4767 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -668,7 +668,8 @@ class UsersController < ApplicationController @offset ||= @course_result_pages.offset @course_result = paginateHelper @course_result, @limit else - @shixuns_result = Shixun.where(:status => [2,3]).where("name like ?", "%#{@search}%").reorder("created_at desc") + # @shixuns_result = Shixun.where(:status => [2,3]).where("name like ?", "%#{@search}%").reorder("created_at desc") + @shixuns_result = Shixun.where("name like ?", "%#{@search}%").reorder("created_at desc") @shixuns_result_count = @shixuns_result.count @shixun_pages = Paginator.new @shixuns_result_count, @limit, params['page'] || 1 @offset ||= @shixun_pages.offset diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e0b2604cb..5cd13e5d8 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -142,7 +142,7 @@ module ApplicationHelper # if params[:action] == "on_search" || params[:action] == "apply_trail" # 之所以这样处理是为了避开account页面ajax加载 # return true # end - authentication = ApplyAction.where(:user_id => User.current.id, :status => 1).first + authentication = User.where(:id => User.current.id, :certification => 1).first user_identity = User.current.try(:user_extensions).try(:identity) if user_identity.blank? || authentication.blank? redirect_to my_account_path @@ -3026,12 +3026,15 @@ module ApplicationHelper end end - def identity_authentication_status status - case status - when nil - "未授权" + def identity_authentication_status user + authorization = ApplyAction.where(:user_id => user, :container_type => "TrialAuthorization").last + case user.try(:certification) when 0 - "处理中" + if authorization.try(:status) == 0 + "处理中" + else + "未授权" + end when 1 "已授权" when 2 diff --git a/app/models/shixun.rb b/app/models/shixun.rb index d7ae9ebc0..8fda9644d 100644 --- a/app/models/shixun.rb +++ b/app/models/shixun.rb @@ -5,6 +5,7 @@ # 85:challenge创建的时候Jenkins处理异常;86:实训评测失败,jenkins返回错误结果; 87:版本库删除异常;88:点击评测失败,没返回数据;89:重置链接jenkins返回失败 # 90: 更新公共测试用例失败,返回code非0;91:实训有改动,评测的时候初始化数据,返回数据code非0;92:webssh开启失败,接口getConnectInfo返回code值非0 # 93: 实训断开连接失败,接口deleteSSH返回code值非0 +# 94: 获取评测等待时间失败,接口getWaitingTime返回code值为非0 # 116:challenge创建关卡的时候返回结果错误 # class Shixun < ActiveRecord::Base diff --git a/app/views/challenges/_edit_skill.html.erb b/app/views/challenges/_edit_skill.html.erb index 599337fa2..27b3a53cf 100644 --- a/app/views/challenges/_edit_skill.html.erb +++ b/app/views/challenges/_edit_skill.html.erb @@ -1,28 +1,28 @@
-
"> -
-

- <% if User.current.manager_of_shixun?(@shixun) %> - 编辑 - <% end %> -

-
- -
-
diff --git a/app/views/challenges/_skill_form.html.erb b/app/views/challenges/_skill_form.html.erb index 21c558c78..c23177dac 100644 --- a/app/views/challenges/_skill_form.html.erb +++ b/app/views/challenges/_skill_form.html.erb @@ -31,7 +31,7 @@ - + @@ -63,6 +63,7 @@ // 获取父节点的id var obj = $(thisObj).parent(); $(obj).remove(); + $("#challenge_skill_update").submit(); } /* $(document).click(function(e){ if(e.target.id==$("#edit_skill").attr("id")||e.target.id==$("#add_knowledge").attr("id")||e.target.className==$(".knowledge_frame").attr("class")||e.target.className==$(".close").attr("class")||e.target.id==$("#shixun_skill_input").attr("id")){ diff --git a/app/views/courses/index.html.erb b/app/views/courses/index.html.erb index 2ea12ceb1..6a03017a2 100644 --- a/app/views/courses/index.html.erb +++ b/app/views/courses/index.html.erb @@ -1,5 +1,5 @@
-
+

在线课堂

@@ -27,15 +27,15 @@ --> -
-
-
+ +
+
- - + +
- +
@@ -49,6 +49,22 @@ <%= render :partial => 'layouts/public_left_info' %> \ No newline at end of file diff --git a/app/views/managements/_class_shixuns_list.html.erb b/app/views/managements/_class_shixuns_list.html.erb index de0d67b18..8d36b085e 100644 --- a/app/views/managements/_class_shixuns_list.html.erb +++ b/app/views/managements/_class_shixuns_list.html.erb @@ -51,17 +51,6 @@ diff --git a/app/views/managements/_classroom_list.html.erb b/app/views/managements/_classroom_list.html.erb index 5757d3a86..a77607945 100644 --- a/app/views/managements/_classroom_list.html.erb +++ b/app/views/managements/_classroom_list.html.erb @@ -22,7 +22,7 @@ <%= link_to syllabus.title,syllabus_path(syllabus.id) %> - <%= link_to syllabus.user.show_name, user_path(syllabus.user) %> + <%= link_to syllabus.user.show_real_name, user_path(syllabus.user) %> <%= format_time syllabus.created_at %> <% end %> diff --git a/app/views/managements/_close_shixun_list.html.erb b/app/views/managements/_close_shixun_list.html.erb index bbaae10a5..155fe70a7 100644 --- a/app/views/managements/_close_shixun_list.html.erb +++ b/app/views/managements/_close_shixun_list.html.erb @@ -1,7 +1,7 @@ - + @@ -14,7 +14,7 @@ <% @shixuns.each do |shixun| %> - + diff --git a/app/views/managements/_depart_list.html.erb b/app/views/managements/_depart_list.html.erb index 6473af2a5..2e0d468cc 100644 --- a/app/views/managements/_depart_list.html.erb +++ b/app/views/managements/_depart_list.html.erb @@ -1,3 +1,4 @@ +<% unless @apply_status.blank? %>
ID实训名称实训名称 未通关
<%= shixun.identifier %><%= link_to shixun.name, shixun_path(shixun), :target => "_blank", :title => shixun.name %><%= link_to shixun.name, shixun_path(shixun), :target => "_blank", :title => shixun.name %> <%= PraiseTread.where(:praise_tread_object_id => shixun.challenges, :praise_tread_object_type => "Challenge").count %>
@@ -24,6 +25,9 @@ <% end %>
+<% else %> + <%= render :partial => "welcome/no_data" %> +<% end %>
    diff --git a/app/views/managements/_departments_part_list.html.erb b/app/views/managements/_departments_part_list.html.erb index 49549a5af..52497055e 100644 --- a/app/views/managements/_departments_part_list.html.erb +++ b/app/views/managements/_departments_part_list.html.erb @@ -21,7 +21,7 @@ - <%= link_to schools.name,"http://#{Setting.host_name}/?schools_id=#{schools.id}" %> + <%= schools.name %> <%= schools.province %> diff --git a/app/views/managements/_publish_shixun_list.html.erb b/app/views/managements/_publish_shixun_list.html.erb index 3f65e7f56..8d3844909 100644 --- a/app/views/managements/_publish_shixun_list.html.erb +++ b/app/views/managements/_publish_shixun_list.html.erb @@ -1,7 +1,7 @@ - + @@ -15,7 +15,7 @@ <% @shixuns.each do |shixun| %> - + diff --git a/app/views/managements/_shixun_list.html.erb b/app/views/managements/_shixun_list.html.erb index 8b99c3603..d83b7801a 100644 --- a/app/views/managements/_shixun_list.html.erb +++ b/app/views/managements/_shixun_list.html.erb @@ -1,7 +1,7 @@
    ID实训名称实训名称 已通关
    <%= shixun.identifier %><%= link_to shixun.name, shixun_path(shixun), :target => "_blank", :title => shixun.name %><%= link_to shixun.name, shixun_path(shixun), :target => "_blank", :title => shixun.name %> <%= PraiseTread.where(:praise_tread_object_id => shixun.challenges, :praise_tread_object_type => "Challenge").count %>
    - + @@ -13,7 +13,7 @@ <% @shixuns.each do |shixun| %> - + @@ -22,7 +22,7 @@
    ID实训名称实训名称 技术平台 任务 状态
    <%= shixun.identifier %><%= link_to shixun.name, shixun_path(shixun), :target => "_blank", :title => shixun.name %><%= link_to shixun.name, shixun_path(shixun), :target => "_blank", :title => shixun.name %> <%= shixun.language %> <%= shixun.challenges.count %> <%= shixun_authentication_status shixun %> <% if shixun.status == 0 %> - <%= link_to(l(:button_delete), shixun_path(shixun), :method => :delete, :data => { confirm: "确认删除" } ) %> + <%= link_to(l(:button_delete), shixun_path(shixun), :method => :delete, :data => { confirm: "您确定要删除吗?" } ) %> <% end %> value="0" id="shixun_hidden_<%= shixun.id %>" name="hidden" class="ml-3 mr5 magic-checkbox"> diff --git a/app/views/managements/_subject_authorization_list.html.erb b/app/views/managements/_subject_authorization_list.html.erb index 403933b91..63671bc55 100644 --- a/app/views/managements/_subject_authorization_list.html.erb +++ b/app/views/managements/_subject_authorization_list.html.erb @@ -1,3 +1,4 @@ +<% unless @authorizations.blank? %> <% @authorizations.each do |authorization| %>
    <% user = authorization.user %> @@ -34,6 +35,9 @@
    <% end %> +<% else %> + <%= render :partial => "welcome/no_data" %> +<% end %> \ No newline at end of file + + + \ No newline at end of file diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index aef3e6a2d..4686854ee 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -103,7 +103,7 @@ -

    +

    <% update_visiti_count @user %> <%= @user.visits.to_i %> 次访问 diff --git a/app/views/users/user_fanslist.html.erb b/app/views/users/user_fanslist.html.erb index 3a70d0244..f04106015 100644 --- a/app/views/users/user_fanslist.html.erb +++ b/app/views/users/user_fanslist.html.erb @@ -1,10 +1,10 @@

    - <% str = current_user ? '我' : 'TA' %> + <% str = (current_user == @user) ? '我' : 'TA' %>
    • - <%= str %>的关注 <%= @user_watchlist_count %> + <%= str %>的关注 <%= @user_watchlist_count %>
    • <%= str %>的粉丝 <%= @user_fanlist_count %> @@ -29,4 +29,5 @@ $(this).html() == "关注" ? $(this).html("关注") : $(this).html("已关注"); } }); + \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 4d0da5f86..2f9340f04 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -138,6 +138,7 @@ RedmineApp::Application.routes.draw do resources :games, :path => "stages" do member do match 'game_build', :via => [:get, :post] + match 'get_waiting_time', :via => [:get, :post] match 'next_step', :via => [:get, :post] match 'reset_original_code', :via => [:get, :post] match 'reset_new_code', :via => [:get, :post] diff --git a/db/migrate/20170831015104_add_certification_to_user.rb b/db/migrate/20170831015104_add_certification_to_user.rb new file mode 100644 index 000000000..780f5a667 --- /dev/null +++ b/db/migrate/20170831015104_add_certification_to_user.rb @@ -0,0 +1,5 @@ +class AddCertificationToUser < ActiveRecord::Migration + def change + add_column :users, :certification, :boolean, :default => 0 + end +end diff --git a/db/migrate/20170831015613_update_apply_action_to_user.rb b/db/migrate/20170831015613_update_apply_action_to_user.rb new file mode 100644 index 000000000..a395d505a --- /dev/null +++ b/db/migrate/20170831015613_update_apply_action_to_user.rb @@ -0,0 +1,11 @@ +class UpdateApplyActionToUser < ActiveRecord::Migration + def up + apply_users = ApplyAction.where(:status => 1, :container_type => "TrialAuthorization") + apply_users.each do |apply| + User.where(:id => apply.user_id).first.update_column(:certification, 1) + end + end + + def down + end +end diff --git a/db/migrate/20170831022201_modify_certification_for_user.rb b/db/migrate/20170831022201_modify_certification_for_user.rb new file mode 100644 index 000000000..bb89c5eb8 --- /dev/null +++ b/db/migrate/20170831022201_modify_certification_for_user.rb @@ -0,0 +1,8 @@ +class ModifyCertificationForUser < ActiveRecord::Migration + def up + change_column :users, :certification, :integer, :default => 0 + end + + def down + end +end diff --git a/db/migrate/20170831022550_update_reject_certication_for_user.rb b/db/migrate/20170831022550_update_reject_certication_for_user.rb new file mode 100644 index 000000000..92706cdf2 --- /dev/null +++ b/db/migrate/20170831022550_update_reject_certication_for_user.rb @@ -0,0 +1,13 @@ +class UpdateRejectCerticationForUser < ActiveRecord::Migration + def up + apply_users = ApplyAction.where(:status => 2, :container_type => "TrialAuthorization") + unless apply_users.blank? + apply_users.each do |apply| + User.where(:id => apply.user_id).first.update_column(:certification, 2) + end + end + end + + def down + end +end diff --git a/public/stylesheets/css/edu-common.css b/public/stylesheets/css/edu-common.css index a2ae1d13f..a8b87d1be 100644 --- a/public/stylesheets/css/edu-common.css +++ b/public/stylesheets/css/edu-common.css @@ -97,7 +97,7 @@ a:hover.link-color-grey03{color:#3498db!important;} .mb5{ margin-bottom: 5px;}.mb10{ margin-bottom: 10px;}.mb15{ margin-bottom: 15px;}.mb20{ margin-bottom: 20px;}.mb25{ margin-bottom: 25px;}.mb30{ margin-bottom: 30px;}.mb40{ margin-bottom: 40px;}.mb50{ margin-bottom: 50px;} .ml-3{ margin-left: -3px;}.ml5{ margin-left: 5px;}.ml6{ margin-left: 6px;}.ml10{ margin-left: 10px;}.ml15{ margin-left: 15px;}.ml20{ margin-left: 20px;}.ml25{ margin-left: 25px;}.ml30{ margin-left: 30px;}.ml33{ margin-left: 33px;}.ml35{ margin-left:35px;}.ml40{margin-left:40px;}.ml42{margin-left:42px;}.ml50{ margin-left: 50px;}.ml75{ margin-left: 75px;}.ml95{ margin-left: 95px;}.ml115{margin-left: 115px}.ml230{ margin-left: 230px;} .mr3{margin-right: 3px}.mr5{ margin-right: 5px;}.mr10{ margin-right: 10px;}.mr15{ margin-right: 15px;}.mr18{ margin-right: 18px;}.mr20{ margin-right: 20px;}.mr25{ margin-right: 25px;}.mr30{ margin-right:30px;}.mr40{margin-right:40px;}.mr50{ margin-right: 50px;}.mr60{ margin-right:60px;} -.pt5{ padding-top:5px;}.pt10{ padding-top:10px;}.pt15{ padding-top:15px;}.pt20{ padding-top:20px;}.pt30{ padding-top:30px;} +.pt5{ padding-top:5px;}.pt10{ padding-top:10px;}.pt15{ padding-top:15px;}.pt20{ padding-top:20px;}.pt30{ padding-top:30px;}.pt40{ padding-top:40px;} .pb5{ padding-bottom:5px;}.pb10{ padding-bottom:10px;}.pb15{ padding-bottom:15px;}.pb20{ padding-bottom:20px;}.pb30{ padding-bottom:30px;} .pl5{ padding-left:5px;}.pl8{ padding-left:8px;}.pl10{ padding-left:10px;}.pl15{ padding-left:15px;}.pl20{ padding-left:20px;}.pl30{ padding-left:30px;}.pl50{ padding-left:50px;}.pl35{ padding-left:35px;} .pr5{ padding-right:5px;}.pr10{ padding-right:10px;}.pr15{ padding-right:15px;}.pr20{ padding-right:20px!important;}.pr30{ padding-right:30px!important;} @@ -445,7 +445,12 @@ input::-ms-clear{display:none;} .transform90{transform: rotate(90deg);} /*---------------------编辑器边框------------------------*/ .kindeditor{background: #F0F0EE;height:22px;border:1px solid #CCCCCC;border-bottom: none} +<<<<<<< HEAD /*两端对齐*/ -.justify{text-align: justify;} \ No newline at end of file +.justify{text-align: justify;} +======= +/**/ +#edu-tab-nav .edu-position-hidebox li a{font-size: 12px} +>>>>>>> dev_xucheng diff --git a/public/stylesheets/css/edu-subject.css b/public/stylesheets/css/edu-subject.css index e548de3bd..389da6b01 100644 --- a/public/stylesheets/css/edu-subject.css +++ b/public/stylesheets/css/edu-subject.css @@ -3,15 +3,15 @@ /*linear-gradient(to right, rgb(68, 190, 164) 0%, rgb(62, 158, 207) 100%)*/ .box_bg_shandow{box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);} -.active-class .content .pre_sub-con{width:23.87%;margin: 0 1.5% 2.55% 0px;height: 269px;} -.active-class .content .pre_sub-con:nth-child(4n+0){margin:0 0 2.55% 0;} +.active-class .content .pre_sub-con{width:23.87%;margin: 0 1.5% 40px 0px;height: 285px;} +.active-class .content .pre_sub-con:nth-child(4n+0){margin:0 0 40px 0;} .active-class .content .pre_sub-con:hover{cursor: pointer;-webkit-animation: bounce-down 1s linear 1;animation: bounce-down 1s linear 1;} .pre-book{height: 100%;position:absolute;} .subject-box{padding: 20px;background: #fff;text-align: center;position: relative;} -.unit-name{line-height: 17px;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;height: 32px; word-wrap: break-word;} +.unit-name{line-height: 17px;height: 17px;width:196px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;} -.active-class .content .sub-con{width:23.69%;border:1px solid #eee;background:#fff;margin: 0 1.5% 1.5% 0px;box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);} -.active-class .content .sub-con:nth-child(4n+0){margin:0 0 1.5% 0;} +.active-class .content .sub-con{width:23.69%;border:1px solid #eee;background:#fff;margin: 0 1.5% 30px 0px;box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);} +.active-class .content .sub-con:nth-child(4n+0){margin:0 0 30px 0;} .active-class .content .sub-con:hover{box-shadow: 0 5px 15px 0 rgba(0, 0, 0, 0.15);cursor: pointer;-webkit-animation: bounce-down 1s linear 1;animation: bounce-down 1s linear 1;} @-webkit-keyframes bounce-down { 25% {margin-top:-10px;} diff --git a/public/stylesheets/css/taskstyle.css b/public/stylesheets/css/taskstyle.css index 9fd8d0999..1d1f0f9dc 100644 --- a/public/stylesheets/css/taskstyle.css +++ b/public/stylesheets/css/taskstyle.css @@ -237,9 +237,9 @@ input.knowledge_frame{height:28px;line-height:28px;border:none;background:#f3f5f .task-index-list{ width: 1200px;} -.task-index-list-box{ width:23.69%;margin: 0 1.5% 1.5% 0px; border-radius:2px; border:1px solid #eee; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15); color:#666; position:relative; } +.task-index-list-box{ width:23.69%;margin: 0 1.5% 30px 0px; border-radius:2px; border:1px solid #eee; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15); color:#666; position:relative; } .task-index-list-box:hover{-webkit-animation: bounce-down 1s linear 1;animation: bounce-down 1s linear 1; } -.task-index-list-box:nth-child(4n+0) {margin: 0 0 1.5% 0;} +.task-index-list-box:nth-child(4n+0) {margin: 0 0 30px 0;} .task-mg8{ margin:0 15px 15px 0px; border-radius:2px; border:1px solid #eee; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15); color:#666; position:relative; } .task-index-list-box-top{padding:16px; padding-top:30px; background:#fff; text-align: center; position:relative; height: 160px;} .task-index-list-title{ max-width:80%; display: block; margin:10px auto 0px; font-size:14px; font-weight: bold;} @@ -318,7 +318,7 @@ a.shixun-task-ban-btn{background-color: #c2c4c6;display: inline-block;font-weigh /* 实训首页的搜索 */ .xy_box{padding:16px;height:180px} .task_yx_bo{margin: 0px auto 13px;} -.course-nav-box{padding:0px 10px;margin:20px 0px} +.course-nav-box{padding:0px 10px;margin:30px 0px} .xy_level{width: 80%;margin: 0px auto;border-top: 1px solid #eee;margin-top: 5px;line-height: 35px;} .course-nav-row{padding:7px 0px} .course-nav-row_item li{width:auto;height: 30px;line-height: 30px;margin: 5px;padding:0px 15px;}