diff --git a/app/views/games/_game_results.html.erb b/app/views/games/_game_results.html.erb index 9fdf304f3..f5ff2f089 100644 --- a/app/views/games/_game_results.html.erb +++ b/app/views/games/_game_results.html.erb @@ -13,7 +13,7 @@
  • 评测信息
  • - +
    diff --git a/app/views/games/_repository.html.erb b/app/views/games/_repository.html.erb index 577c94fc6..836429f10 100644 --- a/app/views/games/_repository.html.erb +++ b/app/views/games/_repository.html.erb @@ -14,7 +14,7 @@ <% if @path == @game.challenge.path.try(:strip) %> <% end %> - +
    diff --git a/app/views/repositories/shixun_show.html.erb b/app/views/repositories/shixun_show.html.erb index f5a2e19b3..27ccaa746 100644 --- a/app/views/repositories/shixun_show.html.erb +++ b/app/views/repositories/shixun_show.html.erb @@ -1,9 +1,11 @@
    - <% end %> -
    - -<% if @subject.status == 0 && User.current.manager_of_subject?(@subject) %> -
    - <% if @stages.count == 0 %> - <%= form_for('', :url => {:controller => 'stages', :action => 'create', :subject => @subject.id}, :method => "post", :html => {:id => 'new_stage_form'}) do |f| %> -
    -
    -
  • 阶段1
  • -
  • - 删除 - 保存 -
  • -
    -
    -
  • - - -

    -
  • -
  • - - -
  • -
  • - <%= link_to '+选择实训', choose_subject_shixun_subject_path(@subject), :remote => true, :class => 'add-sx' %> -

    - 至少选择一个实训 - 选择实训后,在页面上通过拖拽进行排序调整 -

    -
  • -
    -
    - -
    + +
    + <% count = 0 %> + <% @stages.each_with_index do |stage, s_index| %> +
    +

    + + 第<%= s_index + 1 %>章  <%= stage.name %> + <% if @subject.status == 0 && User.current.manager_of_subject?(@subject) %> + + + <% else %> + + <% end %> +

    +
    +

    <%= stage.description %>

    + <% stage.stage_shixuns.each_with_index do |stage_shixun, index| %> + <% shixun = stage_shixun.shixun %> +
    1 ? "" : "onclick='shixun_link('#{shixun.identifier}')'" %>> +
  • + + <%= s_index + 1 %>-<%= index + 1 %>  <%= shixun.name %> +
  • +
  • + <% if @subject.status < 2 %> + <%= shixun.shixun_status %> + <% else %> + <% if shixun.status > 1 %> + <% case my_shixun_status(shixun, User.current) %> + <% when '已通关' %> + 已通关   + <% when '未通关' %> + 未通关   + <% when '未开启' %> + 未开启   + <% end %> + <% else %> + 等待审核   + <% end %> + <% end %> + <% if allow_shixun_exec(shixun) %> + <% if shixun.status > 1 %> + <% myshixun = Myshixun.where(:user_id => User.current.id, :shixun_id => shixun.id).first %> + <% if myshixun.blank? %> + <%= link_to "开始实战", operation_shixun_path(shixun, :myshixun_id => myshixun.try(:id)), :class => "task-btn task-btn-orange ", :style=>"display: none", :id => "shixun_operation", :remote => true %> + <% else %> + <%= link_to "继续实战", operation_shixun_path(shixun, :myshixun_id => myshixun.try(:id)), :class => "task-btn task-btn-orange", :style=>"display: none", :id => "shixun_operation", :remote => true %> + <% end %> + <% end %> + <% end %> +
  • +
    + <% end %>
    - <% end %> - <% end %> -
    -
    - +点击新建阶段(选择1至多个实训项目,组成一个阶段) -
    -<% end %> +
    + <% end %> +
    + + <% if @subject.status == 0 && User.current.manager_of_subject?(@subject) %> +
    + <% if @stages.count == 0 %> + <%= form_for('', :url => {:controller => 'stages', :action => 'create', :subject => @subject.id}, :method => "post", :html => {:id => 'new_stage_form'}) do |f| %> +
    +
    +
  • 阶段1
  • +
  • + 删除 + 保存 +
  • +
    +
    +
  • + + +

    +
  • +
  • + + +
  • +
  • + <%= link_to '+选择实训', choose_subject_shixun_subject_path(@subject), :remote => true, :class => 'add-sx' %> +

    + 至少选择一个实训 + 选择实训后,在页面上通过拖拽进行排序调整 +

    +
  • +
    +
    + +
    +
    + <% end %> + <% end %> +
    +
    + +点击新建阶段(选择1至多个实训项目,组成一个阶段) +
    + <% end %>
    @@ -119,7 +125,7 @@

    教学名师 <% if User.current == @subject.user %> - + <% end %>

    @@ -160,17 +166,19 @@ $(".paragraph").hover(function(){ if($(this).find(".status_li a").length>0){ $(this).find(".status_li a").show(); + $(this).find(".status_li i").hide(); $(this).find(".status_li span").hide(); } },function(){ $(this).find(".status_li a").hide(); + $(this).find(".status_li i").show(); $(this).find(".status_li span").show(); }) $("#user_produce_text").blur(function(){ if($(this).val() != $(this).siblings(".produce").html()){ $.post( - '/users/' + $("#current_user_id").val() + '/edit_brief_introduction', + '/users/' + $("#current_user_id").val() + '/edit_brief_introduction', { brief_introduction: $(this).val() }, function (data) { } @@ -279,8 +287,8 @@ } } - //缩放章节实训 - function for_paragraph(item){ - $(item).parent("p").siblings(".detail_for_paragraph").slideToggle(500); - } + //缩放章节实训 + function for_paragraph(item){ + $(item).parent("p").siblings(".detail_for_paragraph").slideToggle(500); + } \ No newline at end of file diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 793c37db9..f7d89f19a 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -42,54 +42,54 @@
      <% if @user.authentication %> - <% else %> <% apply_auth = ApplyUserAuthentication.where(:user_id => @user.id, :auth_type => 1).last %> <% if apply_auth && apply_auth.status == 0 %> - <% else %> - <% end %> <% end %> <% if @user.professional_certification %> - <% else %> <% apply_auth = ApplyUserAuthentication.where(:user_id => @user.id, :auth_type => 2).last %> <% if apply_auth && apply_auth.status == 0 %> - <% else %> - <% end %> <% end %> <% if @user.try(:phone).blank? %> - <% else %> - <% end %> <% if @user.try(:mail).blank? %> - <% else %> - <% end %> diff --git a/public/javascripts/edu/edu_tpi.js b/public/javascripts/edu/edu_tpi.js index 09625847d..8310d9244 100644 --- a/public/javascripts/edu/edu_tpi.js +++ b/public/javascripts/edu/edu_tpi.js @@ -222,14 +222,14 @@ function repository_extend_and_zoom(){ nGameRes.addClass("-flex-basic100"); nGameEva.addClass("-flex-basic0"); nRIcon.addClass("fa-compress"); - nRIcon.removeClass("fa-arrows-alt"); + nRIcon.removeClass("fa-expand"); nMove.hide(); control = 1; }else if(control == 1){ nGameRes.removeClass("-flex-basic100"); nGameEva.removeClass("-flex-basic0"); nRIcon.removeClass("fa-compress"); - nRIcon.addClass("fa-arrows-alt"); + nRIcon.addClass("fa-expand"); nMove.show(); control = 0; } @@ -248,14 +248,14 @@ function valuation_extend_and_zoom(){ if(control_1 == 0){ nGameRes.addClass("-flex-basic0"); nGameEva.addClass("-flex-basic100"); - nVIcon.removeClass("fa-expand"); + nVIcon.removeClass("fa-arrows-alt"); nVIcon.addClass("fa-compress"); nMove.hide(); control_1 = 1; }else if(control_1 == 1){ nGameRes.removeClass("-flex-basic0"); nGameEva.removeClass("-flex-basic100"); - nVIcon.addClass("fa-expand"); + nVIcon.addClass("fa-arrows-alt"); nVIcon.removeClass("fa-compress"); nMove.show(); control_1 = 0;