diff --git a/app/controllers/exercise_controller.rb b/app/controllers/exercise_controller.rb index 6d68ff08c..1b6d944cd 100644 --- a/app/controllers/exercise_controller.rb +++ b/app/controllers/exercise_controller.rb @@ -525,6 +525,7 @@ class ExerciseController < ApplicationController @exercise_users_list = search_exercise_member @exercise_users_list, @name + @tab = params[:tab].nil? ? 1 : params[:tab].to_i @score = @b_sort == "desc" ? "asc" : "desc" @exercise_count = @exercise_users_list.count @has_commit_count = @exercise.exercise_users.where(:commit_status => 1).count diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index 6b962e35d..117217c1a 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -553,6 +553,51 @@ end end + # 修改单位名称 + def upload_logo + @menu_type = 6 + @sub_type = 1 + @school = School.find(params[:school]) + apply_schools = ApplyAddSchools.where("status = 0") + apply_school_ids = apply_schools.empty? ? "(-1)" : "(" + apply_schools.map{|sc| sc.school_id}.join(',') + ")" + if !params[:search].nil? + search = "%#{params[:search].to_s.strip.downcase}%" + @schools = School.where("id not in #{apply_school_ids} and #{School.table_name}.name like :p", :p => search) + else + @schools = School.where("id not in #{apply_school_ids}") + end + end + + # 修改单位名称为其他 + def school_upload_logo + school = School.where(:id => params[:applied_id]).first + UserExtensions.where(:school_id => params[:applied_id]).update_all(:school_id => params[:school_id]) + Department.where(:school_id => params[:applied_id]).update_all(:school_id => params[:school_id]) + ApplyAddSchools.where(:school_id => params[:applied_id]).destroy_all + ApplyAddDepartment.where(:school_id => params[:applied_id]).destroy_all + school.destroy + redirect_to departments_part_managements_path + end + + # 修改单位信息 + def school_message_update + school = School.where(:name =>params[:schoolname]).first + school_id = school.id + School.where(:id => school_id).update_all(:province => params[:province],:city =>params[:city],:address => params[:address]) + ApplyAddSchools.where(:school_id => school_id).update_all(:province => params[:province],:city =>params[:city],:address => params[:address]) + redirect_to departments_part_managements_path + end + + # 删除单位 + def delete_school + school = School.where(:id => params[:school]).first + UserExtensions.where(:school_id => params[:school]).update_all(:school_id => nil, :department_id => nil) + ApplyAddSchools.where(:school_id => params[:school]).destroy_all + ApplyAddDepartment.where(:school_id => params[:school]).destroy_all + school.destroy + redirect_to departments_part_managements_path + end + def save_school uploaded_io = params[:logo] sl = School.create(:name => params[:schoolname],:province => params[:province],:city => params[:city],:address => params[:address]) @@ -763,13 +808,12 @@ end if !params[:search].nil? search = "%#{params[:search].to_s.strip.downcase}%" @schools = School.where("id not in #{apply_school_ids} and #{School.table_name}.name like :p", :p => search) - #@schools = School.all else - #@course = @user.courses.where("is_delete = 0 and #{Course.table_name}.id != #{homework.course_id}").select { |course| @user.allowed_to?(:as_teacher,course)} @schools = School.where("id not in #{apply_school_ids}") end @edit_id = params[:school_id] @search = params[:search] + @upload = params[:upload] respond_to do |format| format.js end @@ -888,7 +932,9 @@ end @courses = @courses.joins("join users u on courses.tea_id = u.id").where("concat(u.lastname, u.firstname) like '%#{@search}%'") end else - @courses= @courses.where("name like '%#{@search}%'") + school = School.where("name like '%#{@search}%'").map(&:id) + @courses = @courses.where(:school_id => school) + # @courses= @courses.where("name like '%#{@search}%'") end @courses = @courses.select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS updatetime").reorder("updatetime #{@sx_order}") @export_courses = @courses @@ -1018,7 +1064,7 @@ end # 0 全部;1 活动的; 2 已注册; 3 锁定 def users - @menu_type + @menu_type = 7 @sub_type = 1 status = params[:user_status].nil? ? 0 : params[:user_status].to_i @us_order = params[:us_order].blank? ? "desc" : params[:us_order] # 排序 diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index bb25f1404..14deb6c65 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -725,6 +725,16 @@ class ShixunsController < ApplicationController end end + def fork_list + @shixuns = Shixun.where(:fork_from => @shixun.id) + @shixuns_count = @shixuns.count + @limit = 16 + @is_remote = true + @shixun_pages = Paginator.new @shixuns_count, @limit, params['page'] || 1 + @offset ||= @shixun_pages.offset + @shixuns = paginateHelper @shixuns, @limit + end + def show respond_to do |format| format.html{redirect_to shixun_challenges_path(@shixun)} diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 311530b80..b5b272889 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -4845,7 +4845,7 @@ def get_hw_index(hw,is_teacher,type=0) end end hw_ids = homeworks.map{|hw| hw.id} if !homeworks.blank? - index = hw_ids.index(hw.id) + index = hw_ids.length - 1 - hw_ids.index(hw.id) return index end diff --git a/app/models/memo.rb b/app/models/memo.rb index 1eb8f29aa..dc12fe367 100644 --- a/app/models/memo.rb +++ b/app/models/memo.rb @@ -11,7 +11,7 @@ class Memo < ActiveRecord::Base # 若是主题帖,则内容可以是空 #validates :content, presence: true, if: Proc.new{|o| !o.parent_id.nil? } validates_length_of :subject, maximum: 50 - validates_length_of :content, maximum: 30000 + validate :cannot_reply_to_locked_topic, :on => :create diff --git a/app/views/attachments/_activity_attach.html.erb b/app/views/attachments/_activity_attach.html.erb index fd6eb661f..162eb239b 100644 --- a/app/views/attachments/_activity_attach.html.erb +++ b/app/views/attachments/_activity_attach.html.erb @@ -1,15 +1,15 @@ <% if activity.attachments.any? %> <% activity.attachments.each do |attachment| %>
  • - + - <%= link_to_short_attachment attachment,:length=> 58, :class => 'link-color-grey', :download => true %> + <%= link_to_short_attachment attachment,:length=> 58, :class => 'color-grey', :download => true %> ( <%= number_to_human_size attachment.filesize %>) <% user_name = attachment.author.show_real_name.empty? ? attachment.author : attachment.author.show_real_name %> - <%= link_to h(truncate(user_name, length: 15, omission: '...')),user_path(attachment.author),:class => "link-color-grey" %>, + <%= link_to h(truncate(user_name, length: 15, omission: '...')),user_path(attachment.author),:class => "color-grey" %>, <%= format_time(attachment.created_on) %> diff --git a/app/views/courses/_course_activity_content.html.erb b/app/views/courses/_course_activity_content.html.erb index 87d5c9252..cc358ea3c 100644 --- a/app/views/courses/_course_activity_content.html.erb +++ b/app/views/courses/_course_activity_content.html.erb @@ -22,9 +22,9 @@ <% end %>
  • <% end %> -
    +
    新建 -
    -<% end%> \ No newline at end of file +<% end %> \ No newline at end of file diff --git a/app/views/exercise/_edit_MCQ.html.erb b/app/views/exercise/_edit_MCQ.html.erb index 3784bb800..13c81ec33 100644 --- a/app/views/exercise/_edit_MCQ.html.erb +++ b/app/views/exercise/_edit_MCQ.html.erb @@ -32,7 +32,7 @@ - + <% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %> diff --git a/app/views/exercise/_edit_multi.html.erb b/app/views/exercise/_edit_multi.html.erb index c5739c7a0..c8d0d913a 100644 --- a/app/views/exercise/_edit_multi.html.erb +++ b/app/views/exercise/_edit_multi.html.erb @@ -13,11 +13,11 @@
  • - +
  • - +
  • diff --git a/app/views/exercise/_edit_single.html.erb b/app/views/exercise/_edit_single.html.erb index 46e663ffe..212522326 100644 --- a/app/views/exercise/_edit_single.html.erb +++ b/app/views/exercise/_edit_single.html.erb @@ -26,7 +26,7 @@ - +
  • <% exercise_question.exercise_standard_answers.reorder("created_at").each_with_index do |exercise_choice,index| %>
  • diff --git a/app/views/exercise/_edu_edit_form.html.erb b/app/views/exercise/_edu_edit_form.html.erb index 13df8ea2a..7c041d2c1 100644 --- a/app/views/exercise/_edu_edit_form.html.erb +++ b/app/views/exercise/_edu_edit_form.html.erb @@ -1,6 +1,3 @@ -<% content_for :header_tags do %> - <%= import_ke(enable_at: false, prettify: false, init_activity: true) %> -<% end %>
    <%= render :partial => 'show_head', :locals => {:exercise => @exercise} %> diff --git a/app/views/exercise/_exercise_setting.html.erb b/app/views/exercise/_exercise_setting.html.erb new file mode 100644 index 000000000..bb06b5ddf --- /dev/null +++ b/app/views/exercise/_exercise_setting.html.erb @@ -0,0 +1,356 @@ +<% edit_mode = @is_new && @is_teacher %> +
    + +
    +
    +
    +
    +

    发布设置

    + <% if @is_teacher %> + 编辑 + <% end %> +
    +
    +
    +
      +
    • + + + +
    • +
    • + + +
      +
    • + + + + + + + + + +
    +
    +
    +
    + +
    +
    +

    答题设置

    +
    +
    +
    +
      + + + + + + + + + + + + +
    • + + > + + (选中则学生答题时,题目顺序按照题型随机显示) +
      + > + + (选中则学生答题时,选项顺序随机显示) +
    • +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + +
    +
    +

    公开设置

    +
    +
    +
    +
      +
    • + + > + + (选中则在截止时间之后对班级学生公开所有成员的成绩,否则不公开) +
    • +
    • + + > + + (选中则在截止时间之后对班级学生公开试卷题目的答案,否则不公开) +
    • +
    +
    +
    +
    +
    + + +
    + <%= form_tag(ex_setting_exercise_path(@exercise), :method => "post", :id => 'exercise_setting_form') do |f| %> +
    +
    +

    发布设置

    +
    +
    +
    +
      +
    • + + 1 ? 'disabled' : '' %> class="fl task-form-15 task-height-40 panel-box-sizing <%= @exercise.try(:exercise_status) > 1 ? 'disabled-bg' : '' %>" placeholder="请选择发布时间"> + + +
    • +
    • + + class="fl task-form-15 task-height-40 panel-box-sizing <%= @exercise.try(:exercise_status) == 3 ? 'disabled-bg' : '' %>" placeholder="请选择截止时间"> + + + + 不能早于发布时间 +
    • + + + + + + + + + + +
    +
    +
    +
    + +
    +
    +

    答题设置

    +
    +
    +
    +
      + + + + + + + + + + + + +
    • + + class="magic-checkbox fl mt5 magic-checkbox_show" id="dt_3" type="checkbox" <%= @exercise.question_random == 1 ? 'checked' : '' %>> + + (选中则学生答题时,题目顺序按照题型随机显示) +
      + class="magic-checkbox fl mt5 magic-checkbox_show" id="dt_4" type="checkbox" <%= @exercise.choice_random == 1 ? 'checked' : '' %>> + + (选中则学生答题时,选项顺序随机显示) +
    • +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + +
    +
    +

    公开设置

    +
    +
    +
    +
      +
    • + + > + + (选中则在截止时间之后对班级学生公开所有成员的成绩,否则不公开) +
    • +
    • + + > + + (选中则在截止时间之后对班级学生公开试卷题目的答案,否则不公开) +
    • +
    +
    +
    +
    + <% end %> +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + 保存 + 取消 +
    +
    \ No newline at end of file diff --git a/app/views/exercise/_exercise_student.html.erb b/app/views/exercise/_exercise_student.html.erb index 8b9ff2b83..493d808db 100644 --- a/app/views/exercise/_exercise_student.html.erb +++ b/app/views/exercise/_exercise_student.html.erb @@ -82,7 +82,7 @@
    <% question_list.each_with_index do |eq, index| %> - <%= index + 1 %> + <%= index + 1 %> <% end %>
    @@ -90,9 +90,9 @@ <% question_list.each_with_index do |exercise_question, i| %>
    -

    第<%= i + 1 %>题:[<%= exercise_question.question_type_name %>]<%= exercise_question.question_score %>

    +

    第<%= i + 1 %>题:[<%= exercise_question.question_type_name %>]<%= exercise_question.question_score %>

    -
    <%= exercise_question.question_title %>
    +
    <%= exercise_question.question_title.html_safe %>
    <% case exercise_question.question_type %> <% when 1 %>
    diff --git a/app/views/exercise/_exercise_student_result.html.erb b/app/views/exercise/_exercise_student_result.html.erb index 79ade0035..9839585be 100644 --- a/app/views/exercise/_exercise_student_result.html.erb +++ b/app/views/exercise/_exercise_student_result.html.erb @@ -46,7 +46,7 @@
    <% @exercise.exercise_questions.where(:question_type => [1, 2, 3]).each_with_index do |eq, index| %> <% is_correct = answer_is_correct(eq, user) %> - <%= eq.question_number %> + <%= eq.question_number %> <% end %>
    @@ -57,7 +57,7 @@
    <% @exercise.exercise_questions.where(:question_type => 4).each_with_index do |eq, index| %> <% ea = User.current.exercise_answer.where(:exercise_question_id => eq.id).first %> - <%= eq.question_number %> + <%= eq.question_number %> <% end %>
    @@ -66,7 +66,7 @@ <% @exercise.exercise_questions.each_with_index do |exercise_question, i| %>
    -

    第<%= exercise_question.question_number %>题:[<%= exercise_question.question_type_name %>]<%= exercise_question.question_score %>分<%= question_commit_status exercise_question, @exercise_user.user %>

    +

    第<%= exercise_question.question_number %>题:[<%= exercise_question.question_type_name %>]<%= exercise_question.question_score %>分<%= question_commit_status exercise_question, @exercise_user.user %>

    <% if exercise_question.question_type != 4 %> <% is_correct = answer_is_correct(exercise_question, user) %>

    <%= is_correct ? exercise_question.question_score : 0 %>

    @@ -75,7 +75,7 @@

    mr3"><%= answer.empty? ? 0 : (answer.first.score == -1 ? "未批" : answer.first.score) %><%= answer.empty? ? "分" : (answer.first.score == -1 ? "" : "分") %>

    <% end %>
    -
    <%= exercise_question.question_title %>
    +
    <%= exercise_question.question_title.html_safe %>
    <% case exercise_question.question_type %> <% when 1 %>
    diff --git a/app/views/exercise/_exercises_list.html.erb b/app/views/exercise/_exercises_list.html.erb index 3de19a9a3..05ca1c960 100644 --- a/app/views/exercise/_exercises_list.html.erb +++ b/app/views/exercise/_exercises_list.html.erb @@ -52,7 +52,7 @@
  • <%= link_to "编辑", edit_exercise_path(exercise) %>
  • <% end %> -
  • <%= link_to "设置", setting_exercise_path(exercise) %>
  • +
  • <%= link_to "设置", student_exercise_list_exercise_path(exercise, :tab => 3) %>
  • <%= link_to "导出成绩", student_exercise_list_exercise_path(exercise.id,:course_id => @course.id, :format => 'xls') %>
  • <% unless exercise.is_public %>
  • diff --git a/app/views/exercise/_new_MC.html.erb b/app/views/exercise/_new_MC.html.erb index c8f2d5db6..46f201dc7 100644 --- a/app/views/exercise/_new_MC.html.erb +++ b/app/views/exercise/_new_MC.html.erb @@ -1,5 +1,7 @@ <% if exercise.id %> - <%= form_for(ExerciseQuestion.new, +
    + <% eq = ExerciseQuestion.new %> + <%= form_for(eq, :html => {:multipart => true}, :url => create_exercise_question_exercise_path(exercise.id), :remote => true ) do |f| %> @@ -12,7 +14,9 @@
  • - + + +
  • @@ -58,6 +62,7 @@
  • <% end %> + <% end %> \ No newline at end of file diff --git a/app/views/exercise/update_question_num.js.erb b/app/views/exercise/update_question_num.js.erb index d1284e659..6f5f7bb5f 100644 --- a/app/views/exercise/update_question_num.js.erb +++ b/app/views/exercise/update_question_num.js.erb @@ -29,4 +29,6 @@ $("#show_poll_questions_<%= @exercise_question.id %>").html("<%= escape_javascript(render :partial => 'show_single', :locals => {:exercise_question => @exercise_question}) %>"); <% elsif @exercise_question.question_type == 4%> $("#show_poll_questions_<%= @exercise_question.id %>").html("<%= escape_javascript(render :partial => 'show_multi', :locals => {:exercise_question => @exercise_question}) %>"); -<% end%> \ No newline at end of file +<% end%> +$(".data-tip-down").html(""); +$(".data-tip-down").hide(); \ No newline at end of file diff --git a/app/views/files/_resource_detail.html.erb b/app/views/files/_resource_detail.html.erb index d11fa252a..cc48a8ca5 100644 --- a/app/views/files/_resource_detail.html.erb +++ b/app/views/files/_resource_detail.html.erb @@ -10,11 +10,11 @@ <% if file.attachment_histories.count == 0 %> <%= link_to truncate(file.filename,length: 40, omission: '...'), download_named_attachment_path(file.id, file.filename), - :title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "linkGrey3 f_14" %> + :title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "color-grey3 f_14" %> <% else %> <%= link_to truncate(file.filename,length: 40, omission: '...'), attachment_history_download_path(file.id), :title => file.filename+"\n"+file.description.to_s, - :class => "linkGrey3 f_14", + :class => "color-grey3 f_14", :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;", :remote=>true %> <% end %> <%#= file_preview_eye(file, class: 'preview') %> diff --git a/app/views/forums/index.html.erb b/app/views/forums/index.html.erb index a3cbaa03e..1908b49c5 100644 --- a/app/views/forums/index.html.erb +++ b/app/views/forums/index.html.erb @@ -1,7 +1,7 @@

    - <%= @user.show_name %> > 论坛 + <%= @user.show_name %> > 讨论区

    @@ -11,19 +11,19 @@
  • <%= @user.show_name %>
  • -
  • <%= @user.login %>
  • +
  • <%= @user.login %>
  • -

    问吧

    +

    帖子

    + 新话题
    @@ -38,7 +38,7 @@ <%= memo.subject %> <% if memo.sticky %> - + <% end %>

    <%= memo.content.html_safe %>
    @@ -47,10 +47,16 @@ <%= time_from_now memo.updated_at %>

    - <%= memo.viewed_count %> - <%= get_praise_num(memo) %> - <%= Memo.where(:root_id => memo.id).count %> - + <% if memo.viewed_count > 0%> + <%= memo.viewed_count %> + <% end %> + <% if get_praise_num(memo) > 0%> + <%= get_praise_num(memo) %> + <% end %> + <% if Memo.where(:root_id => memo.id).count > 0%> + <%= Memo.where(:root_id => memo.id).count %> + <% end %> +

    diff --git a/app/views/games/_code_actions.html.erb b/app/views/games/_code_actions.html.erb index 5dbeb1731..9d026ad1a 100644 --- a/app/views/games/_code_actions.html.erb +++ b/app/views/games/_code_actions.html.erb @@ -146,16 +146,16 @@ $.ajax({ url: '<%= game_build_myshixun_game_path(@game, :myshixun_id => @myshixun) %>', success: function (data){ - timeID = setInterval(function(){ + /* timeID = setInterval(function(){ $.ajax({ - url: '<%= get_waiting_time_myshixun_game_path(@game, :myshixun_id => @myshixun) %>', + url: '<%#= get_waiting_time_myshixun_game_path(@game, :myshixun_id => @myshixun) %>', data:{resubmit:data.resubmit}, async: false, success: function(data){ console.log(data); if(data.onRun == 1){ clearInterval(timeID); - $("#game_wating_time").html(""); + $("#game_wating_time").html("");*/ // 每2s匹配一次状态,成功2 评测中1 评测 0 var intId = setInterval(function(){ var ajaxTimeoutTest = $.ajax({ @@ -271,7 +271,7 @@ }} }); }, 2000); - }else if(data.onRun == 0){ + /*}else if(data.onRun == 0){ mintes = parseInt(data.waitingTime / 60); if(mintes > 1){ $("#game_wating_time").html("目前正有" + data.waitNum + "个任务正在等待,大约需要等待" + mintes + "分钟") @@ -281,7 +281,7 @@ } } }) - }, 2000); + }, 2000);*/ } }); diff --git a/app/views/games/_repository.html.erb b/app/views/games/_repository.html.erb index 2faefaefa..f735604cc 100644 --- a/app/views/games/_repository.html.erb +++ b/app/views/games/_repository.html.erb @@ -54,11 +54,6 @@
    <%= file_update_myshixun_game_path(@game, :myshixun_id => @myshixun, :path => @path) %>
    \ No newline at end of file diff --git a/app/views/managements/_class_publish_shixuns_list.html.erb b/app/views/managements/_class_publish_shixuns_list.html.erb index 2a57856d7..b70a76245 100644 --- a/app/views/managements/_class_publish_shixuns_list.html.erb +++ b/app/views/managements/_class_publish_shixuns_list.html.erb @@ -12,7 +12,7 @@ <% @c_shixuns.each_with_index do |c_shixun, index| %> <%= index + 1 %> - <%= link_to c_shixun.name, subject_path(c_shixun) %> + <%= link_to c_shixun.name, subject_path(c_shixun),target: '_blank' %> <%= c_shixun.user.try(:user_extensions).try(:school).try(:name).blank? ? "--" : c_shixun.user.try(:user_extensions).try(:school) %> <%= c_shixun.user.show_real_name %> <%= format_time c_shixun.created_at %> diff --git a/app/views/managements/_class_shixuns_list.html.erb b/app/views/managements/_class_shixuns_list.html.erb index 8d36b085e..802b19d75 100644 --- a/app/views/managements/_class_shixuns_list.html.erb +++ b/app/views/managements/_class_shixuns_list.html.erb @@ -16,7 +16,7 @@ <% @c_shixuns.each_with_index do |c_shixun, index| %> <%= index + 1 %> - <%= link_to c_shixun.name, subject_path(c_shixun) %> + <%= link_to c_shixun.name, subject_path(c_shixun),target: '_blank'%> <%= c_shixun.stages.count %> <%= c_shixun.stage_shixuns.count %> <%= c_shixun.status == 0 ? "编辑中" : (c_shixun.status == 1 ? "审核中" : "发布") %> diff --git a/app/views/managements/_classroom_list.html.erb b/app/views/managements/_classroom_list.html.erb index dc321ffa0..a00acbd22 100644 --- a/app/views/managements/_classroom_list.html.erb +++ b/app/views/managements/_classroom_list.html.erb @@ -32,7 +32,7 @@ <%= ShixunMajorCourse.where(:course_list_id => courselist.id).map(&:shixun_id).count %> - <%= courselist.user.try(:show_real_name) %> + <%= link_to courselist.user.try(:show_real_name),user_path(courselist.user_id), target: '_blank' %> <%= format_time courselist.created_at %> diff --git a/app/views/managements/_departments_part_list.html.erb b/app/views/managements/_departments_part_list.html.erb index c3d3a6421..3d74c33d7 100644 --- a/app/views/managements/_departments_part_list.html.erb +++ b/app/views/managements/_departments_part_list.html.erb @@ -32,8 +32,11 @@ <%= format_time schools.created_at %> <%= format_time schools.updated_at %> - - <%= link_to("修改", upload_logo_school_path(schools.id,:schools_name => @schools_name), :class => 'icon icon-copy') %> + 删除  + + <%#= link_to("修改", upload_logo_school_path(schools.id,:schools_name => @schools_name), :class => 'icon icon-copy') %> + <%= link_to('更改', upload_logo_managements_path(:school => schools.id), :class => 'icon icon-copy',:target => '_blank') %> + <% end %> diff --git a/app/views/managements/_publish_shixun_list.html.erb b/app/views/managements/_publish_shixun_list.html.erb index d5900bbbc..c870a7203 100644 --- a/app/views/managements/_publish_shixun_list.html.erb +++ b/app/views/managements/_publish_shixun_list.html.erb @@ -1,11 +1,12 @@ - + - - + + + @@ -25,6 +26,7 @@ + <% end %> diff --git a/app/views/managements/_shixun_authorization_list.html.erb b/app/views/managements/_shixun_authorization_list.html.erb index 756e8b4ae..059994224 100644 --- a/app/views/managements/_shixun_authorization_list.html.erb +++ b/app/views/managements/_shixun_authorization_list.html.erb @@ -32,7 +32,6 @@ <% end %> -
      diff --git a/app/views/managements/_update_school_form.html.erb b/app/views/managements/_update_school_form.html.erb index b436c35c1..4567ae88c 100644 --- a/app/views/managements/_update_school_form.html.erb +++ b/app/views/managements/_update_school_form.html.erb @@ -1,19 +1,39 @@ -<%= form_tag edit_applied_schools_managements_path(:applied_id =>edit_id), :id => 'schools_list_form' %> -
      - <%#= hidden_field_tag(:send_id, edit_id) %> -
      - <% if !schools.empty? && !@search.nil? %> - <% schools.each do |school| %> -
        -
      • - - -
      • -
      +<% if defined?(upload) %> + <%= form_tag school_upload_logo_managements_path(:applied_id => edit_id), :id => 'schools_list_form' %> +
      +
      + <% if !schools.empty? && !@search.nil? %> + <% schools.each do |school| %> +
        +
      • + + +
      • +
      + <% end %> <% end %> - <% end %> -
      -
      +
      +
      +<% else %> + <%= form_tag edit_applied_schools_managements_path(:applied_id => edit_id), :id => 'schools_list_form' %> +
      +
      + <% if !schools.empty? && !@search.nil? %> + <% schools.each do |school| %> +
        +
      • + + +
      • +
      + <% end %> + <% end %> +
      +
      +<% end %> + + +
      \ No newline at end of file diff --git a/app/views/memos/_common_reply_box.html.erb b/app/views/memos/_common_reply_box.html.erb index cec0cdcfc..e3f04a1e2 100644 --- a/app/views/memos/_common_reply_box.html.erb +++ b/app/views/memos/_common_reply_box.html.erb @@ -1,5 +1,9 @@
      -

      全部回复(<%= count %>)

      +

      全部回复 + <% unless count == 0 %> + (<%= count %>) + <% end %> +

      回复 @@ -69,8 +73,8 @@

      <% if comment.creator_user == User.current %> 删除 + | <% end %> - | <%= link_to( '回复'.html_safe, {:controller => 'users' ,:action => 'reply_to',:reply_id => comment.id, :type => memo.class.to_s, :user_activity_id => memo.id}, diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index addf53876..7a32dd01b 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -5,11 +5,11 @@

      - <%= @user.show_name %> > 讨论 + <%= @user.show_name %> > 讨论区

      - 讨论详情 + 帖子详情

      diff --git a/app/views/messages/_common_reply_box.html.erb b/app/views/messages/_common_reply_box.html.erb index afd027cea..7f1c4af5d 100644 --- a/app/views/messages/_common_reply_box.html.erb +++ b/app/views/messages/_common_reply_box.html.erb @@ -1,5 +1,9 @@
      -

      全部回复(<%= count %>)

      +

      全部回复 + <% unless count == 0 %> + (<%= count %>) + <% end %> +

      回复 @@ -38,29 +42,8 @@ <%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 50, :height => 50, :alt => "用户头像"), user_url_in_org(comment.creator_user), :target => '_blank' %>

      -
      -
      - <%= link_to comment.creator_user.show_real_name, user_url_in_org(comment.creator_user), :class => "content-username hide fl" %> - <%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %> -
      -

      - <% if is_teacher || comment.creator_user == User.current%> - 删除 - <% end %> - | - <%= link_to( - '回复'.html_safe, - {:controller => 'users' ,:action => 'reply_to',:reply_id => comment.id, :type => activity.class.to_s, :user_activity_id => activity.id}, - :remote => true, - :method => 'get', - :title => l(:button_reply),:class => "color-grey") %> - | - - <%=render :partial=> "praise_tread/edu_praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> - -

      -
      -
      + +
      <% if !comment.parent.nil? && !comment.parent.parent.nil? %> <% parents_rely = [] %> @@ -95,6 +78,29 @@
      <%= comment.content_detail.html_safe %>
      + +
      +
      + <%= link_to comment.creator_user.show_real_name, user_url_in_org(comment.creator_user), :class => "content-username hide fl" %> + <%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %> +
      +

      + <% if is_teacher || comment.creator_user == User.current%> + 删除 + <% end %> + | + <%= link_to( + '回复'.html_safe, + {:controller => 'users' ,:action => 'reply_to',:reply_id => comment.id, :type => activity.class.to_s, :user_activity_id => activity.id}, + :remote => true, + :method => 'get', + :title => l(:button_reply),:class => "color-grey") %> + | + + <%=render :partial=> "praise_tread/edu_praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> + +

      +
      diff --git a/app/views/praise_tread/_activity_praise.html.erb b/app/views/praise_tread/_activity_praise.html.erb index 8bbb6b6b8..ba0b379f0 100644 --- a/app/views/praise_tread/_activity_praise.html.erb +++ b/app/views/praise_tread/_activity_praise.html.erb @@ -2,19 +2,23 @@ + :type => type }) %>' data-remote="true" class="white-btn orange-btn" data-tip-down="点赞"> 赞 <%# num = activity.praise_tread_cache ? activity.praise_tread_cache.praise_num : 0 %> + <% unless get_praise_num(activity) == 0%> <%= get_praise_num(activity) %> + <% end %> <% else %> + :type => type }) %>' data-remote="true" class="white-btn orange-bg-btn" data-tip-down ="取消点赞" > 赞 - <%= get_praise_num(activity) %> + <% unless get_praise_num(activity) == 0%> + <%= get_praise_num(activity) %> + <% end %> <%# num = activity.praise_tread_cache ? activity.praise_tread_cache.praise_num : 0 %> diff --git a/app/views/praise_tread/_edu_praise.html.erb b/app/views/praise_tread/_edu_praise.html.erb index 0704eebad..26a8dc3be 100644 --- a/app/views/praise_tread/_edu_praise.html.erb +++ b/app/views/praise_tread/_edu_praise.html.erb @@ -2,19 +2,23 @@ + :type => type }) %>' data-remote="true" class="fr mr5 color-grey" data-tip-down="点赞"> 赞 <%# num = activity.praise_tread_cache ? activity.praise_tread_cache.praise_num : 0 %> - <%= get_praise_num(activity) %> + <% unless get_praise_num(activity)==0 %> + <%= get_praise_num(activity) %> + <% end %> <% else %> + :type => type }) %>' data-remote="true" class="fr mr5 color-orange03" data-tip-down="取消点赞" > 赞 - <%= get_praise_num(activity) %> + <% unless get_praise_num(activity)==0 %> + <%= get_praise_num(activity) %> + <% end %> <%# num = activity.praise_tread_cache ? activity.praise_tread_cache.praise_num : 0 %> diff --git a/app/views/repositories/shixun_show.html.erb b/app/views/repositories/shixun_show.html.erb index 6c07638a2..547fef0a3 100644 --- a/app/views/repositories/shixun_show.html.erb +++ b/app/views/repositories/shixun_show.html.erb @@ -63,4 +63,25 @@
      <% html_title(l(:label_repository)) -%> -
      \ No newline at end of file +
      + \ No newline at end of file diff --git a/app/views/shixuns/_monitor_tip.html.erb b/app/views/shixuns/_monitor_tip.html.erb index aceb016f1..537a6d91c 100644 --- a/app/views/shixuns/_monitor_tip.html.erb +++ b/app/views/shixuns/_monitor_tip.html.erb @@ -1,7 +1,7 @@

      提示

      - +

      diff --git a/app/views/shixuns/_shixun_top.html.erb b/app/views/shixuns/_shixun_top.html.erb index 6234c0673..9cf93f24a 100644 --- a/app/views/shixuns/_shixun_top.html.erb +++ b/app/views/shixuns/_shixun_top.html.erb @@ -1,10 +1,24 @@ <% update_visiti_count @shixun %>

      -

      - <%= @shixun.owner.try(:show_name) %> - /

      <%= @shixun.name %>

      -

      +
      +

      + <%= @shixun.owner.try(:show_name) %> + /

      <%= @shixun.name %>

      +

      + <% if @shixun.fork_from.present? %> + <% fork_shixun = Shixun.find(@shixun.fork_from) %> +
      + forked from <%= fork_shixun.owner.try(:show_name) %>/<%= fork_shixun.name %> + <% end %> + +
      + <% unless User.current.manager_of_shixun?(@shixun) %> + <%= @shixun.language %> + <%= @shixun.shixun_trainee %> + <%= @shixun.shixun_major_courses.blank? ? "" : CourseList.where(:id => @shixun.shixun_major_courses.map(&:course_list_id)).map(&:name).join("、") %> + <% end %> +
      <% myshixun = Myshixun.where(:user_id => User.current.id, :shixun_id => @shixun.id).first %> <% if allow_shixun_exec(@shixun) %> @@ -36,21 +50,19 @@ 已关闭 <% end %> <% if (@shixun.can_copy && User.current.user_extensions.try(:identity) == 0 && User.current.professional_certification) %> -
      - <%= Shixun.where(:fork_from => @shixun.id).count %> - - Fork - + - - <% end %> + <% end %> <% end %>
      - <% unless User.current.manager_of_shixun?(@shixun) %> - <%= @shixun.language %> - <%= @shixun.shixun_trainee %> - <%= @shixun.shixun_major_courses.blank? ? "" : CourseList.where(:id => @shixun.shixun_major_courses.map(&:course_list_id)).map(&:name).join("、") %> - <% end %>
    diff --git a/app/views/student_work/_common_reply_box.html.erb b/app/views/student_work/_common_reply_box.html.erb index 094ff93cd..75f1ee563 100644 --- a/app/views/student_work/_common_reply_box.html.erb +++ b/app/views/student_work/_common_reply_box.html.erb @@ -1,5 +1,9 @@
    -

    全部回复(<%= count %>)

    +

    全部回复 + <% unless count == 0 %> + (<%= count %>) + <% end %> +

    回复 diff --git a/app/views/student_work/_homework_reply_detail.html.erb b/app/views/student_work/_homework_reply_detail.html.erb index bc072c571..acb33b8ec 100644 --- a/app/views/student_work/_homework_reply_detail.html.erb +++ b/app/views/student_work/_homework_reply_detail.html.erb @@ -1,3 +1,5 @@ + +

    <%= link_to image_tag(url_to_avatar(comment.creator_user), :width => "32", :height => "32"), user_path(comment.creator_user), :target => "_blank", :alt => "用户头像" %>
    @@ -7,17 +9,17 @@ autoUrl('reply_content_<%= comment.id %>'); }); -
    -
    -
    +
    +
    +
    <%= comment.content_detail.html_safe %>
    <%= link_to comment.creator_user.show_real_name, user_path(comment.creator_user), :class => "content-username hide fl" %> <%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %> -
    +
    -
    +
    <%= link_to('回复'.html_safe, {:controller => 'users', :action => 'reply_to_comment', @@ -39,4 +41,5 @@
    -
    \ No newline at end of file +
    +
    \ No newline at end of file diff --git a/app/views/student_work/_programing_work_show.html.erb b/app/views/student_work/_programing_work_show.html.erb index 880d6b842..1f1a019ea 100644 --- a/app/views/student_work/_programing_work_show.html.erb +++ b/app/views/student_work/_programing_work_show.html.erb @@ -1,174 +1,174 @@ -
    -
    -
      -
    • - 上交时间: - <%=format_time work.commit_time %> - 收起 -
    • - - <% if work.user == User.current && @homework.end_time >= Time.now %> - -
    • - <%= link_to("", student_work_path(work),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "pic_del") %> -
    • -
    • - <%= link_to "",new_student_work_path(:homework => @homework.id),:class => "pic_edit"%> -
    • - <% end%> - <% if @homework.homework_detail_manual.comment_status == 3 && work.user != User.current%> - -
    • - <%= render :partial => 'student_work_praise',:locals => {:work => work} %> -
    • - <% end%> -
      - -
    • - 编程代码: -
      - -
      -
      -
      -
      -
    • - -
      -
    • - - 测试结果: - -
      - <% work.student_work_tests.each_with_index do |test, index| %> -
      -

      - 第<%= work.student_work_tests.count - index%>次测试 -

      - - <%= format_time(test.created_at).to_s %> - -
      -
      - <% if test.status.to_i == -2 %> -
      - <%= test.results.first %> -
      - <% else %> -
      -
      - <% test.results.reverse.each_with_index do |x, i| %> - <% unless x.nil? %> - <%= %> -
      - 测试<%=test.results.size-i%> - <% if x["status"].to_i != 0 %> - <% if x["status"].to_i == 2 %> - 超时! - <% else %> - 测试错误! - <% end %> - - 查看 - - - 耗时: -
      <%=x["time_used"]==0?1:x["time_used"]%>毫秒
      -
      - <% else %> - 测试正确! -   - 耗时: -
      <%=x["time_used"]==0?1:x["time_used"]%>毫秒
      -
      - <% end %> -
      - <% if x["status"].to_i != 0 %> -
      -
      -   - 您的输出: -
      <%=x["result"].force_encoding("UTF-8")%> 
      - 正确输出: -
      <%=x["output"].force_encoding("UTF-8")%>
      -
      -
      -

      - 收起 -

      -
      - <% end %> - <% end %> - <% end %> -
      -
      - <% end %> - <% end %> -
      -
      -
    • - -
    • - <% if @is_teacher || (@homework.homework_detail_manual.comment_status == 2 && work.user != User.current )%> - -
        - <%= render :partial => 'add_score',:locals => {:work => work, :score => score, :is_member_work => false}%> -
      - <% end%> -
      -
    • -
    - -
    - <%= render :partial => 'student_work/revise_attachment', :locals => {:work => work} %> -
    -
    - -
    - <%= render :partial => 'student_work_score_records', :locals => {:student_work_scores => student_work_scores, :is_member_work => false} %> -
    -
    - - 收起 -
    -
    - +
    +
    +
      +
    • + 上交时间: + <%=format_time work.commit_time %> + 收起 +
    • + + <% if work.user == User.current && @homework.end_time >= Time.now %> + +
    • + <%= link_to("", student_work_path(work),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "pic_del") %> +
    • +
    • + <%= link_to "",new_student_work_path(:homework => @homework.id),:class => "pic_edit"%> +
    • + <% end%> + <% if @homework.homework_detail_manual.comment_status == 3 && work.user != User.current%> + +
    • + <%= render :partial => 'student_work_praise',:locals => {:work => work} %> +
    • + <% end%> +
      + +
    • + 编程代码: +
      + +
      +
      +
      +
      +
    • + +
      +
    • + + 测试结果: + +
      + <% work.student_work_tests.each_with_index do |test, index| %> +
      +

      + 第<%= work.student_work_tests.count - index%>次测试 +

      + + <%= format_time(test.created_at).to_s %> + +
      +
      + <% if test.status.to_i == -2 %> +
      + <%= test.results.first %> +
      + <% else %> +
      +
      + <% test.results.reverse.each_with_index do |x, i| %> + <% unless x.nil? %> + <%= %> +
      + 测试<%=test.results.size-i%> + <% if x["status"].to_i != 0 %> + <% if x["status"].to_i == 2 %> + 超时! + <% else %> + 测试错误! + <% end %> + + 查看 + + + 耗时: +
      <%=x["time_used"]==0?1:x["time_used"]%>毫秒
      +
      + <% else %> + 测试正确! +   + 耗时: +
      <%=x["time_used"]==0?1:x["time_used"]%>毫秒
      +
      + <% end %> +
      + <% if x["status"].to_i != 0 %> +
      +
      +   + 您的输出: +
      <%=x["result"].force_encoding("UTF-8")%> 
      + 正确输出: +
      <%=x["output"].force_encoding("UTF-8")%>
      +
      +
      +

      + 收起 +

      +
      + <% end %> + <% end %> + <% end %> +
      +
      + <% end %> + <% end %> +
      +
      +
    • + +
    • + <% if @is_teacher || (@homework.homework_detail_manual.comment_status == 2 && work.user != User.current )%> + +
        + <%= render :partial => 'add_score',:locals => {:work => work, :score => score, :is_member_work => false}%> +
      + <% end%> +
      +
    • +
    + +
    + <%= render :partial => 'student_work/revise_attachment', :locals => {:work => work} %> +
    +
    + +
    + <%= render :partial => 'student_work_score_records', :locals => {:student_work_scores => student_work_scores, :is_member_work => false} %> +
    +
    + + 收起 +
    +
    + diff --git a/app/views/student_work/_shixun_work_show.html.erb b/app/views/student_work/_shixun_work_show.html.erb index 20d266e12..30bcecc83 100644 --- a/app/views/student_work/_shixun_work_show.html.erb +++ b/app/views/student_work/_shixun_work_show.html.erb @@ -10,7 +10,10 @@ / <%= link_to @shixun.name, shixun_path(@shixun), :class => "edu-info-dark fl", :target => "_blank" %>

    - 经验值:<%= @myshixun.total_score %> +
    + 经验值:<%= @myshixun.total_score %> +
    +
    <%= link_to image_tag(url_to_avatar(@work.user), :width =>"50", :height => "50", :alt=>"头像", :style => "width:50px; height:50px;"), user_path(@work.user), :class => "fl edu-work-user-img", :target => "_blank" %> diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb index 6f6e2511d..56721b607 100644 --- a/app/views/student_work/index.html.erb +++ b/app/views/student_work/index.html.erb @@ -111,97 +111,107 @@
    -
    +
    +
    +
    + <%= @homework.description.html_safe %> +
    +
    -
    -
    - <%= @homework.description.html_safe %> -
    -
    -
      - <%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @homework} %> -
    -<% if @homework.homework_type == 3 %> -
    -
    -

    分组要求

    -
    -
    -

    分组人数: <%= @homework.homework_detail_group.min_num %> - <%= @homework.homework_detail_group.max_num %> 人

    - 注:任一成员都可以提交作品,提交作品时需要关联同组成员,组内成员作品共享。 -
    -
    -<% end %> - -<% if @homework.homework_type == 2 %> - <% samples = @homework.homework_samples %> - <% unless samples.empty? %> -
    -
    -

    输入输出样例:<%= samples.count %> 组

    -
    -
    - <% samples.each_with_index do |sample, index| %> -
    -
      -
    • - - 样例<%= index + 1 %> -
    • -
    • - -
      -
      <%=sample.input.blank? ? " " : sample.input %>
      -
      -
    • -
    • - -
      -
      <%=sample.output.blank? ? " " : sample.output %>
      -
      -
    • -
    -
    - <% end %> -
    -
    + <% if false%> +
    +

    + 作业说明: + 编辑 + 保存 +

    +

    兴趣的信息,利用所学到的有关“协议与编码器”/解码器/转换器/处理器”的思维,为该类信息设计协议

    +

    +
    <% end %> - <% if @is_teacher %> -
    -
    -

    测试集:<%=@homework.homework_tests.count %> 组

    -
    -
    -
    ID实训名称实训名称 已通关已开启已通关已开启fork数 创建者 发布时间 color-light-green ml5" title="功能完善中,敬请期待"> 操作 <%= Myshixun.where(:shixun_id => shixun.id, :status => 1).count %> <%= Myshixun.where(:shixun_id => shixun.id).count %><%= Shixun.where(:fork_from =>shixun.id).count %> <%= shixun.owner.try(:show_real_name) %> <%= format_time shixun.created_at %> @@ -36,7 +38,7 @@ class="ml-3 mr5 magic-checkbox" id="join_course_role_<%= shixun.id %>"> - +
    - - - - - - - - - <% @homework.homework_tests.each_with_index do |test, i| %> + + <% if @homework.homework_type == 3 %> +
    +
    +

    分组要求

    +
    +
    +

    分组人数: <%= @homework.homework_detail_group.min_num %> - <%= @homework.homework_detail_group.max_num %> 人

    + 注:任一成员都可以提交作品,提交作品时需要关联同组成员,组内成员作品共享。 +
    +
    + <% end %> + <% if @homework.homework_type == 2 %> + <% samples = @homework.homework_samples %> + <% unless samples.empty? %> +
    +
    +

    输入输出样例:<%= samples.count %> 组

    +
    +
    + <% samples.each_with_index do |sample, index| %> +
    +
      +
    • + + 样例<%= index + 1 %> +
    • +
    • + +
      +
      <%=sample.input.blank? ? " " : sample.input %>
      +
      +
    • +
    • + +
      +
      <%=sample.output.blank? ? " " : sample.output %>
      +
      +
    • +
    +
    + <% end %> +
    +
    + <% end %> + <% if @is_teacher %> +
    +
    +

    测试集:<%=@homework.homework_tests.count %> 组

    +
    +
    +
    序号测试集输入测试集输出
    + - - - + + + - <% end %> - -
    <%=i+1 %> -
    <%=test.input.blank? ? " " : test.input %>
    -
    -
    <%=test.output.blank? ? " " : test.output %>
    -
    序号测试集输入测试集输出
    -
    - + + + <% @homework.homework_tests.each_with_index do |test, i| %> + + <%=i+1 %> + +
    <%=test.input.blank? ? " " : test.input %>
    + + +
    <%=test.output.blank? ? " " : test.output %>
    + + + <% end %> + + + + + <% end %> <% end %> -<% end %> -
    - <%= render :partial => 'student_work_replies' %> -
    +
    + <%= render :partial => 'student_work_replies' %> +
    @@ -376,5 +386,17 @@ return false; } }); + + + + //编辑、保存作业说明 + $(".edit-btn").live("click",function(){ + $(this).siblings(".save-btn").show(); + $(this).hide(); + }) + $(".save-btn").live("click",function(){ + $(this).siblings(".edit-btn").show(); + $(this).hide(); + }) }) \ No newline at end of file diff --git a/app/views/users/_comment_reply_detail.html.erb b/app/views/users/_comment_reply_detail.html.erb index 898058197..9553230c6 100644 --- a/app/views/users/_comment_reply_detail.html.erb +++ b/app/views/users/_comment_reply_detail.html.erb @@ -1,3 +1,4 @@ +
    <%= link_to image_tag(url_to_avatar(comment.creator_user), :width => "33", :height => "33",:class => "bor-radius-all"), user_path(comment.creator_user), :alt => "用户头像" %>
    @@ -7,9 +8,8 @@ autoUrl('reply_content_<%= comment.id %>'); }); -
    - <%= link_to comment.creator_user.show_real_name, user_path(comment.creator_user), :class => "content-username" %> - <%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %> +
    +
    <% if comment.class == Journal %> <% if comment.details.any? %> @@ -22,14 +22,17 @@ <%= comment.content_detail.html_safe %> <% end %>
    -
    -
    +
    + <%= link_to comment.creator_user.show_real_name, user_path(comment.creator_user), :class => "mr15 font-14 color-grey fl" %> + <%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %> +
    +
    <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>user_activity_id,:type=>"reply"}%> <% if type == 'Message' %> - <% topic = comment.root %> + <% topic = comment.root %> <% if !topic.locked? && authorize_for('messages', 'reply') %> <%= link_to(l(:button_reply), @@ -39,10 +42,10 @@ :type => type, :user_activity_id => user_activity_id, :parent_id => parent_id}, - :remote => true, - :method => 'get', - :title => l(:button_reply)) %> - + :remote => true, + :method => 'get', + :title => l(:button_reply)) %> + <% end %> <% else %> @@ -54,16 +57,20 @@ :type => type, :user_activity_id => user_activity_id, :parent_id => parent_id}, - :remote => true, - :method => 'get', - :title => l(:button_reply)) %> + :remote => true, + :method => 'get', + :title => l(:button_reply)) %> <% end %>
    -
    +
    +
    + +
    -
    \ No newline at end of file +
    +
    \ No newline at end of file diff --git a/app/views/users/_course_attachment.html.erb b/app/views/users/_course_attachment.html.erb index 3fcd856bb..33ac05126 100644 --- a/app/views/users/_course_attachment.html.erb +++ b/app/views/users/_course_attachment.html.erb @@ -6,7 +6,7 @@
    - <%= link_to activity.filename, course_files_path(activity.course), :class => "color-dark" %> + <%= link_to activity.filename, course_files_path(activity.course), :class => "color-grey3" %>
    <% if activity.try(:author).show_real_name == ' ' %> diff --git a/app/views/users/_message_contents.html.erb b/app/views/users/_message_contents.html.erb index 6512f31de..3d2adaf00 100644 --- a/app/views/users/_message_contents.html.erb +++ b/app/views/users/_message_contents.html.erb @@ -1,7 +1,4 @@ -
    - <%= link_to comment.creator_user.show_real_name, user_path(comment.creator_user), :class => "newsBlue mr10 f14" %> - <%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %> -
    + <% if !comment.parent.nil? && !comment.parent.parent.nil? %> <% parents_rely = [] %> <% parents_rely = get_reply_parents_no_root parents_rely, comment %> diff --git a/app/views/users/_message_replies.html.erb b/app/views/users/_message_replies.html.erb index 6f5f1da77..23f738ce6 100644 --- a/app/views/users/_message_replies.html.erb +++ b/app/views/users/_message_replies.html.erb @@ -14,94 +14,103 @@ <%= render :partial => 'users/message_contents', :locals => {:comment => comment, :type => type, :user_activity_id => user_activity_id}%> <% if !comment.content_detail.blank? %> -
    +
    <%= comment.content_detail.html_safe %>
    -
    -
    - - - <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>user_activity_id,:type=>"reply"}%> - - <% if type == 'Message' %> - <% topic = comment.root %> - <% if !topic.locked? && authorize_for('messages', 'reply') %> - - <%= link_to( - l(:button_reply), - {:controller => 'users' ,:action => 'reply_to', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id, :activity_id => activity_id}, - :remote => true, - :method => 'get', - :title => l(:button_reply)) %> - - - <% end %> - <% if comment.course_destroyable_by?(User.current) || comment.destroyable_by?(User.current) || comment.contest_destroyable_by?(User.current) %> - 删除 - <% end %> - <% elsif type == 'JournalsForMessage' %> - - <%= link_to( - l(:button_reply), - {:controller => 'users' ,:action => 'reply_to', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id, :activity_id => activity_id}, - :remote => true, - :method => 'get', - :title => l(:button_reply)) %> - - - <% if comment.creator_user == User.current || User.current.admin? %> - <%= link_to('删除', {:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user, :user_activity_id => user_activity_id, :activity_id => activity_id}, - :id => "delete_reply_#{activity_id}_#{comment.id}",:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "fr mr20 undis", :title => l(:button_delete)) %> - <% end %> - <% elsif type == 'OrgDocumentComment' %> - - <%= link_to( - l(:button_reply), - {:controller => 'users' ,:action => 'reply_to', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id, :activity_id => activity_id}, - :remote => true, - :method => 'get', - :title => l(:button_reply)) %> - - - <% if comment.creator_user == User.current %> - <%= link_to( - l(:button_delete), - {:controller => 'org_document_comments',:action => 'destroy', :id => comment.id, :user_activity_id => user_activity_id}, - :method => :delete, - :remote => true, - :id => "delete_reply_#{activity_id}_#{comment.id}", - :class => 'fr mr20 undis', - :data => {:confirm => l(:text_are_you_sure)}, - :title => l(:button_delete)) %> - <% end %> - <% elsif type == 'BlogComment' %> - - <%= link_to( - l(:button_reply), - {:controller => 'users' ,:action => 'reply_to', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id, :activity_id => activity_id}, - :remote => true, - :method => 'get', - :title => l(:button_reply)) if !comment.root.locked? %> - - - <% if comment.author == User.current %> - <%= link_to( - l(:button_delete), - {:controller => 'blog_comments',:action => 'destroy', :id => comment.id, :user_activity_id => user_activity_id}, - :method => :delete, - :remote => true, - :id => "delete_reply_#{activity_id}_#{comment.id}", - :class => 'fr mr20 undis', - :data => {:confirm => l(:text_are_you_sure)}, - :title => l(:button_delete)) %> - <% end %> - <% end %> - -
    -
    -
    -
    <% end %> +
    +
    + <%= link_to comment.creator_user.show_real_name, user_path(comment.creator_user), :class => "color-grey mr10 f14" %> + <%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %> +
    + <% if !comment.content_detail.blank? %> +
    +
    + + + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>user_activity_id,:type=>"reply"}%> + + <% if type == 'Message' %> + <% topic = comment.root %> + <% if !topic.locked? && authorize_for('messages', 'reply') %> + + <%= link_to( + l(:button_reply), + {:controller => 'users' ,:action => 'reply_to', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id, :activity_id => activity_id}, + :remote => true, + :method => 'get', + :title => l(:button_reply)) %> + + + <% end %> + <% if comment.course_destroyable_by?(User.current) || comment.destroyable_by?(User.current) || comment.contest_destroyable_by?(User.current) %> + 删除 + <% end %> + <% elsif type == 'JournalsForMessage' %> + + <%= link_to( + l(:button_reply), + {:controller => 'users' ,:action => 'reply_to', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id, :activity_id => activity_id}, + :remote => true, + :method => 'get', + :title => l(:button_reply)) %> + + + <% if comment.creator_user == User.current || User.current.admin? %> + <%= link_to('删除', {:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user, :user_activity_id => user_activity_id, :activity_id => activity_id}, + :id => "delete_reply_#{activity_id}_#{comment.id}",:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "fr mr20 undis", :title => l(:button_delete)) %> + <% end %> + <% elsif type == 'OrgDocumentComment' %> + + <%= link_to( + l(:button_reply), + {:controller => 'users' ,:action => 'reply_to', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id, :activity_id => activity_id}, + :remote => true, + :method => 'get', + :title => l(:button_reply)) %> + + + <% if comment.creator_user == User.current %> + <%= link_to( + l(:button_delete), + {:controller => 'org_document_comments',:action => 'destroy', :id => comment.id, :user_activity_id => user_activity_id}, + :method => :delete, + :remote => true, + :id => "delete_reply_#{activity_id}_#{comment.id}", + :class => 'fr mr20 undis', + :data => {:confirm => l(:text_are_you_sure)}, + :title => l(:button_delete)) %> + <% end %> + <% elsif type == 'BlogComment' %> + + <%= link_to( + l(:button_reply), + {:controller => 'users' ,:action => 'reply_to', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id, :activity_id => activity_id}, + :remote => true, + :method => 'get', + :title => l(:button_reply)) if !comment.root.locked? %> + + + <% if comment.author == User.current %> + <%= link_to( + l(:button_delete), + {:controller => 'blog_comments',:action => 'destroy', :id => comment.id, :user_activity_id => user_activity_id}, + :method => :delete, + :remote => true, + :id => "delete_reply_#{activity_id}_#{comment.id}", + :class => 'fr mr20 undis', + :data => {:confirm => l(:text_are_you_sure)}, + :title => l(:button_delete)) %> + <% end %> + <% end %> + +
    +
    +
    + <% end %> +
    + +
    diff --git a/app/views/users/_user_journalsformessage.html.erb b/app/views/users/_user_journalsformessage.html.erb index 448069e02..f0315ed8a 100644 --- a/app/views/users/_user_journalsformessage.html.erb +++ b/app/views/users/_user_journalsformessage.html.erb @@ -1,7 +1,7 @@
    - <%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user), :alt => "用户头像" %> + <%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50",:class => "bor-radius-all"), user_path(activity.user), :alt => "用户头像" %> <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
    diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index ab4313c78..c94bb062c 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -273,7 +273,7 @@
    diff --git a/config/routes.rb b/config/routes.rb index a648ddf6d..f772ec526 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -109,6 +109,7 @@ RedmineApp::Application.routes.draw do get 'statistics_students' get 'search_file_list' get 'achieve_ways' + get 'fork_list' end collection do get 'shixun_courses' @@ -255,8 +256,12 @@ RedmineApp::Application.routes.draw do post 'add_auto_users_trial' post 'create_auto_users_trial' match 'update_auto_users_trial', :via => [:get, :post] - match 'account', :via => [:get, :post] + match 'account',:via => [:get, :post] post 'shixun_can_copy' + match 'upload_logo', :via => [:get, :post] + post 'school_upload_logo' + post 'school_message_update' + match 'delete_school',:via => [:get, :post] end end # Enable Grack support diff --git a/db/migrate/20171012101648_migrate_exercise_question_num.rb b/db/migrate/20171012101648_migrate_exercise_question_num.rb new file mode 100644 index 000000000..7db6136f0 --- /dev/null +++ b/db/migrate/20171012101648_migrate_exercise_question_num.rb @@ -0,0 +1,17 @@ +class MigrateExerciseQuestionNum < ActiveRecord::Migration + def up + count = Exercise.all.count / 30 + 2 + transaction do + for i in 1 ... count do i + Exercise.page(i).per(30).each do |exercise| + exercise.exercise_questions.reorder("created_at asc").each_with_index do |question, j| + question.update_column('question_number', j + 1) + end + end + end + end + end + + def down + end +end diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 06d9639fb..b36bfec99 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -1556,7 +1556,6 @@ function elocalStorage(editor,mdu,id){ add_data("content",mdu,editor.html()); var id1 = "#e_tip_"+id; var id2 = "#e_tips_"+id; - console.log(id1 + h + ':' + m + ':' + s +" 保存 "); $(id1).html(" 数据已于 " + h + ':' + m + ':' + s +" 保存 "); $(id2).html(""); } @@ -2505,3 +2504,49 @@ function is_IE(){ } } + +function init_exercise_quetison_editor(params){ + var editor = params.kindutil.create(params.textarea, { + resizeType : 1,minWidth:"1px",width:"90%",minHeight:"74px",height:"74px", + items : ['code','emoticons','fontname', + 'forecolor', 'hilitecolor', 'bold', '|', 'justifyleft', 'justifycenter', 'insertorderedlist','insertunorderedlist', '|', + 'formatblock', 'fontsize', '|','indent', 'outdent', + '|','imagedirectupload','table', 'media', 'preview',"more" + ], + afterChange:function(){//按键事件 + var edit = this.edit; + var body = edit.doc.body; + edit.iframe.height(48); + //this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight+30 : (params.kindutil.GECKO ? body.offsetHeight+26:body.offsetHeight+30)), 48)); + this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight)+30, 48)); + }, + afterBlur:function(){ + params.textarea.blur(); + if(this.isEmpty() || /^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*[\,]*[\(]*[\u4e00-\u9fa5]*[\:]*[\u4e00-\u9fa5]*[\。]*[\)]*<\/\w*\>\s*$/.test(this.edit.html())) { + this.edit.html(""+params.placeholder+""); + this.resize("90%", null); + } + }, + afterFocus: function(){ + var edit = this.edit; + var body = edit.doc.body; + if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*[\,]*[\(]*[\u4e00-\u9fa5]*[\:]*[\u4e00-\u9fa5]*[\。]*[\)]*<\/\w*\>\s*$/.test(edit.html())){ + edit.html(""); + } + this.resize("90%", null); + }, + afterCreate:function(){ + //init + var edit = this.edit; + var body = edit.doc.body; + edit.iframe[0].scroll = 'no'; + body.style.overflowY = 'hidden'; + edit.html(params.textarea.innerHTML); + if(this.isEmpty()) { + edit.html(""+params.placeholder+""); + } + } + }).loadPlugin('paste'); + return editor; +} + diff --git a/public/javascripts/edu/application.js b/public/javascripts/edu/application.js index fb7f18587..0c0c8885f 100644 --- a/public/javascripts/edu/application.js +++ b/public/javascripts/edu/application.js @@ -192,7 +192,7 @@ function pop_box_new(value, Width, Height){ $(document.body).append(container); $("#popupWrap").html(value); $("#popupWrap").show(); - $('#popupWrap').css({"top": h+"px","left": w+"px","padding":"0","border":"none","position":"fixed","z-index":"99999","background-color":"#fff"}); + $('#popupWrap').css({"top": h+"px","left": w+"px","padding":"0","border":"none","position":"fixed","z-index":"999","background-color":"#fff"}); $('#popupWrap').find("a[class*='pop_close']").click(function(){ $("#popupWrap").hide(); }); @@ -319,16 +319,18 @@ function delete_confirm_box_4(url, str){ } //提示框:只有一个按钮,点击关闭弹框 +// function notice_sure_box(str){ - var htmlvalue = '

    提示

    '+ + var htmlvalue = '

    提示

    '+ '

    ' + str + '

    '; pop_box_new(htmlvalue, 480, 140); } //提示框:只有一个确定按钮,点击关闭弹框 +// function notice_box(str){ - var htmlvalue = '

    提示

    '+ + var htmlvalue = '

    提示

    '+ '

    ' + str + '

    '+ '确定
    '; pop_box_new(htmlvalue, 480, 140); @@ -336,48 +338,54 @@ function notice_box(str){ // 长提示框:只有一个确定按钮,点击关闭弹框 +// function long_notice_box(str){ - var htmlvalue = '

    提示

    '+ + var htmlvalue = '

    提示

    '+ '

    ' + str + '

    '+ '确定
    '; pop_box_new(htmlvalue, 575, 140); } // 长提示框:只有一个“知道啦”按钮,点击关闭弹框 +// function yes_notice_box(str){ - var htmlvalue = '

    提示

    '+ + var htmlvalue = '

    提示

    '+ '

    ' + str + '

    '; pop_box_new(htmlvalue, 575, 200); } //提示框:只有一个知道啦按钮,点击打开新窗口 +// function sure_box_redirect(url, str){ - var htmlvalue = '

    提示

    '+ + var htmlvalue = '

    提示

    '+ '

    ' + str + '

    '; pop_box_new(htmlvalue, 480, 140); } //提示框:只有一个知道啦按钮,点击打开新窗口 +// function sure_box_redirect_without_newtab(url, str){ - var htmlvalue = '

    提示

    '+ + var htmlvalue = '

    提示

    '+ '

    ' + str + '

    '; pop_box_new(htmlvalue, 480, 140); } //提示框:只有一个确定按钮,点击跳转 +// function notice_box_redirect(url, str){ - var htmlvalue = '

    提示

    '+ + var htmlvalue = '

    提示

    '+ '

    ' + str + '

    '+ '确定
    '; pop_box_new(htmlvalue, 480, 140); } //提示框:只有一个确定按钮,点击跳转(局部刷新) +// function notice_box_redirect_remote(url, str){ - var htmlvalue = '

    提示

    '+ + var htmlvalue = '

    提示

    '+ '

    ' + str + '

    '+ '确定
    '; pop_box_new(htmlvalue, 480, 140); diff --git a/public/javascripts/edu/course.js b/public/javascripts/edu/course.js index dd1f59d95..8199bd090 100644 --- a/public/javascripts/edu/course.js +++ b/public/javascripts/edu/course.js @@ -654,6 +654,7 @@ function ex_setting_form_submit(){ //添加标题时确定按钮 function add_ex_question(doc,quest_type) { + new_quetion_title_editor.sync(); var title = $.trim($("#poll_questions_title").val()); var score = $.trim($("#question_score").val()); var standard_ans = $.trim($("#exercise_choice_" + quest_type).val()); @@ -700,13 +701,33 @@ function exQuestionEdit(question_id){ $("#show_poll_questions_"+question_id).hide(); $("#edit_poll_questions_"+question_id).show(); $("#poll_questions_title_"+question_id).focus(); + KindEditor.ready(function(K){ + $("div#edit_poll_questions_"+question_id).each(function(){ + var params = {}; + params.kindutil = K; + params.div_form = $(this); + params.form = $("form",params.div_form); + if(params.form==undefined || params.form.length==0){ + return; + } + params.textarea = $("textarea[name='question_title']",params.div_form); + if(params.textarea.data('init') == undefined) { + params.editor = init_exercise_quetison_editor(params); + edit_quetion_title_editor = params.editor; + params.textarea.data('init', 1); + } + }); + }); } + } else{ + notice_box("请先保存正在编辑的题目再编辑。"); } } //修改标题时确定按钮 function edit_poll_question(doc,id,quest_type) { + edit_quetion_title_editor.sync(); var title = $.trim($("#poll_questions_title_" + id).val()); var score = $.trim($("#poll_question_score_"+ id).val()); var standard_ans = $.trim($("#exercise_choice_" + id).val()); @@ -736,4 +757,4 @@ function edit_poll_question(doc,id,quest_type) } }else{ doc.parent().parent().parent().submit();} -} \ No newline at end of file +} diff --git a/public/stylesheets/css/edu-admin.css b/public/stylesheets/css/edu-admin.css index 7936338e2..f154468c5 100644 --- a/public/stylesheets/css/edu-admin.css +++ b/public/stylesheets/css/edu-admin.css @@ -9,7 +9,6 @@ a:hover.link-name-dark{ color:#5faee3;} .mb50{ margin-bottom: 50px;} .mr50{ margin-right: 50px;} .ml35{ margin-left:35px;} -input,textarea,select{ border:1px solid #eee; background: #fff; color:#666;} .edu-name-dark{ max-width:100px; display: block; } .edu-info-dark{ max-width:345px; display: block; } .edu-color-grey{ color:#666;} diff --git a/public/stylesheets/css/edu-class.css b/public/stylesheets/css/edu-class.css index 95ef8614e..ec1fa7488 100644 --- a/public/stylesheets/css/edu-class.css +++ b/public/stylesheets/css/edu-class.css @@ -10,7 +10,6 @@ a:hover.link-name-dark{ color:#5faee3;} .mb50{ margin-bottom: 50px;} .mr50{ margin-right: 50px;} .ml35{ margin-left:35px;} -input,textarea,select{ border:1px solid #eee; background: #fff; color:#666;} .edu-name-dark{ max-width:150px; display: block; }/*添加学生时,列表里面显示姓名的部分宽度过小,由100px改为150px*/ .edu-info-dark{ max-width:345px; display: block; } .edu-color-grey{ color:#666;} @@ -327,7 +326,7 @@ img.ui-datepicker-trigger {display:block;background:url(../images/public_icon.pn .edu-class-innner-conbox{ background:#fff;} .edu-class-con-list{ padding:10px 0; border-bottom:1px solid #eee;} .edu-class-con-list .edu-bg-grey{ background:#f5f5f5;} -a.edu-class-inner-list{display: block; color:#333; font-size: 16px; max-width:89%; overflow:hidden;white-space: nowrap; text-overflow:ellipsis;} +a.edu-class-inner-list{display: block; color:#333; font-size: 16px; max-width:87%; overflow:hidden;white-space: nowrap; text-overflow:ellipsis;} a:hover.edu-class-inner-list{color:#FF7500!important;} .popup_tip_box {position: absolute; padding: 5px 15px; display: inline-block;white-space: nowrap; background-color: #FFFEF4;border: 1px solid #F3DDB3; color:#888; font-size:12px;} .popup_tip_box em { display: block; border-width: 9px; position: absolute; top: 5px; left: -18px; diff --git a/public/stylesheets/css/edu-common.css b/public/stylesheets/css/edu-common.css index 30b12ad56..fb481a197 100644 --- a/public/stylesheets/css/edu-common.css +++ b/public/stylesheets/css/edu-common.css @@ -13,7 +13,7 @@ table,tr,td{border:0;} ol,ul,li{ list-style-type:none} a:link,a:visited{text-decoration:none;color:#898989; } a:hover {color:#FF7500;} -input,textarea,select{ background: #fff; border:1px solid #eee; color:#666;} +input,textarea,select{ background: #fff; border:1px solid #eee;} textarea{resize: none;} /*侧滚动条*/ ::-webkit-scrollbar { width:10px; height:10px; background-color: #F5F5F5; } @@ -100,7 +100,7 @@ a:hover.link-color-grey03{color:#3498db!important;} .font-30{ font-size: 30px!important;} /*通用内外边距*/ .mt-10{ margin-top:-10px;}.mt2{ margin-top:2px;}.mt3{ margin-top:3px;}.mt5{ margin-top:5px;}.mt6{ margin-top:6px;}.mt7{ margin-top:7px;}.mt8{ margin-top:8px;}.mt10{ margin-top:10px;}.mt12{ margin-top:12px;}.mt15{ margin-top:15px;}.mt20{ margin-top:20px;}.mt25{ margin-top:25px;}.mt30{ margin-top:30px;}.mt50{ margin-top:50px;}.mt95{ margin-top:95px;}.mt100{ margin-top:100px;} -.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;} +.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;}.mb60{ margin-bottom: 60px;}.mb110{ margin-bottom: 110px;} .ml-3{ margin-left: -3px;}.ml5{ margin-left: 5px;}.ml6{ margin-left: 6px;}.ml10{ margin-left: 10px;}.ml15{ margin-left: 15px;}.ml18{ margin-left: 18px;}.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;}.ml80{ margin-left: 80px;}.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;}.pt40{ padding-top:40px;} diff --git a/public/stylesheets/css/edu-public.css b/public/stylesheets/css/edu-public.css index bcac54eb8..14f28e245 100644 --- a/public/stylesheets/css/edu-public.css +++ b/public/stylesheets/css/edu-public.css @@ -253,6 +253,7 @@ a.task-index-name{ display: inline-block; max-width:80px;} /*作业描述、帖子内容*/ .upload_img img{max-width: 100%;} +.table_maxWidth table {max-width: 642px;} .list_style ol li{list-style-type: decimal;margin-left: 40px;} .list_style ul li{list-style-type: disc;margin-left: 40px;} @@ -301,9 +302,15 @@ input::-moz-placeholder,textarea::-moz-placeholder { color:#cccccc;} input::-moz-placeholder,textarea::-moz-placeholder { color:#cccccc;} input::-ms-input-placeholder,textarea::-ms-input-placeholder {color:#cccccc;} /*班级讨论区置顶的样式*/ -.btn-cir-red {background: red; color: #fff; font-weight: normal;} .btn-cir {display: inline-block;padding: 0px 5px;border-radius: 25px;line-height: 20px;font-size: 12px;} +.btn-cir:hover{background:#fff;} +.btn-cir-grey{background: #e1e1e1;color: #333;} +.btn-cir-grey:hover{background: #c3c3c3;} +.btn-cir-red{background:red;color: #fff; font-weight: normal;} +.btn-cir-red:hover{background:red;} +.btn-cir-orange {background: #ff7500; color: #fff; font-weight: normal;} .btn-top{display: inline-block;padding: 0px 5px;line-height: 20px;font-size: 12px;border-radius: 3px;} +.btn-cir-big{ background: #999;color: #fff;display: inline-block; padding:0px 10px; border-radius:25px; line-height:25px; height: 25px; font-size:12px;} /*圆形绿色背景---------22*/ .panel-inner-icon{width: 22px;height: 22px;line-height: 22px;border-radius: 50%;background: #29bd8b;display: block;text-align: center} /*圆形绿色背景------------------18*/ @@ -393,5 +400,4 @@ input::-ms-input-placeholder,textarea::-ms-input-placeholder {color:#cccccc;} /*评阅状态*/ .checkstatus_box_small{width: 10px;height: 10px;display: block;float: left;margin-right: 3px;} .checkstatus_box_big{cursor: default;width: 30px;height: 30px;line-height: 30px;text-align: center;margin-right: 10px;border:1px solid #CCCCCC;display: block;float: left;} -.checkstatus_box_big i{position: absolute;top:18px;left: 10px;} - +.checkstatus_box_big i{position: absolute;top:18px;left: 10px;} \ No newline at end of file diff --git a/public/stylesheets/css/edu-user.css b/public/stylesheets/css/edu-user.css index c81647ded..d6494564c 100644 --- a/public/stylesheets/css/edu-user.css +++ b/public/stylesheets/css/edu-user.css @@ -9,9 +9,9 @@ .-task-con-per .photo .changephoto .subchange{width:100%;text-align:center;line-height:26px;color:#fff;background:black;opacity:0.4;filter: alpha(opacity=40);} .-task-con-data{width:89%;} .-task-con-data .top{width:100%;} -.-task-con-data .top .top-left{width:60%;} +.-task-con-data .top .top-left{width:55%;} .-task-con-data .top .top-left .p1{margin:5px 0;} -.-task-con-data .top .top-right{width:35%;text-align: right;} +.-task-con-data .top .top-right{width:40%;text-align: right;} .-task-con-data .top .top-right .mynew{display:block;width:100%;} .-task-con-data .top .top-right .mynew p a{color:#5789c8;} .-task-con-data .top .top-right .mynew .p2{color:#ccc;} diff --git a/public/stylesheets/css/project.css b/public/stylesheets/css/project.css index 1da9fe106..aac1d4638 100644 --- a/public/stylesheets/css/project.css +++ b/public/stylesheets/css/project.css @@ -413,9 +413,9 @@ a.pro_new_username { font-size: 20px; color: #3b94d6; line-height: 24px;} a.pro_new_username_fork { font-size: 12px; color: #3b94d6; line-height: 24px;} a.pro_new_proname{ overflow: hidden;white-space: nowrap;text-overflow:ellipsis;display: inline-block;} a.pro_new_project_name{ width: 250px; overflow: hidden;white-space: nowrap;text-overflow:ellipsis;display: inline-block;} -a.pro_new_topbtn{ padding: 4px 7px; font-size: 12px; line-height: 20px; color: #333;vertical-align: middle;background-color: #fff; border: 1px solid #ddd; border-left: 0; border-top-right-radius: 3px; border-bottom-right-radius: 3px; color: #333;} -a.pro_new_topbtn_left { padding: 4px 10px; font-size: 12px;line-height: 20px; background-image: linear-gradient(#fcfcfc, #eee); border: 1px solid #d5d5d5;border-radius: 3px;border-top-right-radius: 0;border-bottom-right-radius: 0; color: #333;} -a:hover.pro_new_topbtn_left{background-image: linear-gradient(#ededed, #dddddd);} +a.pro_new_topbtn{ padding: 4.5px 7px; font-size: 12px; line-height: 20px; color: #333;vertical-align: middle;background-color: #fff; border: 1px solid #ddd; border-left: 0; border-top-right-radius: 3px; border-bottom-right-radius: 3px; color: #333;} +a.pro_new_topbtn_left { padding: 4.5px 10px; font-size: 12px;line-height: 20px; background-image: linear-gradient(#fcfcfc, #eee); border: 1px solid #d5d5d5;border-radius: 3px;border-top-right-radius: 0;border-bottom-right-radius: 0; color: #333;} +a:hover.pro_new_topbtn_left,a:hover.pro_new_topbtn{background-image: linear-gradient(#ededed, #dddddd);} a.pro_new_grey_topbtn_left{padding: 3px 10px; font-size: 12px;line-height: 20px; background: #fff; border: 1px solid #d5d5d5;border-radius: 3px;border-top-right-radius: 0;border-bottom-right-radius: 0; color: #888888; cursor:default;} .pro_new_topnav ul{border-bottom: 3px solid #fff; height: 30px; line-height: 30px;} .pro_new_topnav ul li{ float: left;padding:0 15px; height: 30px; line-height: 30px;text-align: center; } diff --git a/public/stylesheets/css/public.css b/public/stylesheets/css/public.css index fed0563e5..dd51e81d7 100644 --- a/public/stylesheets/css/public.css +++ b/public/stylesheets/css/public.css @@ -848,7 +848,7 @@ a.winbox_btn_close{ color: #3b94d6; font-size: 18px; font-weight: bold;} .J_Comment_Face img{ width:40px; height:40px; } .t_content{ width:92%; margin-left:15px;} a.content-username { color:#3b94d6; font-size:14px; margin-right:15px;} -a.content-username:hover{ color:#297fb8;} +a.content-username:hover{ color:#ff7500;} .orig_user img{width:32px; height:32px;} .reply-right{ float:right; position:relative;} .reply_iconup02{ position:absolute; top:16px; left:4px; color:#d4d4d4; font-size:16px; background:#f1f1f1; line-height:13px;} diff --git a/public/stylesheets/css/taskstyle.css b/public/stylesheets/css/taskstyle.css index 566f9520a..51d6515dc 100644 --- a/public/stylesheets/css/taskstyle.css +++ b/public/stylesheets/css/taskstyle.css @@ -19,14 +19,9 @@ a.leftnav-box-inner{ display: block; width:77px; border-left:3px solid #292b3a; a:hover.leftnav-box-inner,a.leftnav-active{border-left:3px solid #3498db;color: #fff!important;} a.leftnav-box-reset-inner{ display: block; width:77px; border-left:3px solid #292b3a; background:#292b3a; text-align: center; color:#575f6c;} a:hover.leftnav-box-reset-inner{border-left:3px solid #3498db;color: #fff!important;} -.btn-cir{ background:#575f6c; color:#292b3a;display: inline-block; padding:0px 5px; border-radius:25px; border-radius:15px; line-height:20px; height: 20px; font-size:12px;} -.btn-cir:hover{background:#fff;} -.btn-cir-grey{background: #e1e1e1;color: #333;} -.btn-cir-grey:hover{background: #c3c3c3;} -.btn-cir-red{background:red;color: #fff; font-weight: normal;} -.btn-cir-red:hover{background:red;} -.btn-cir-orange{ background: #ee4a1f; color: #fff;} -.btn-cir-orange:hover{ background: #ee4a1f; color: #fff;} + + + /*右侧头部*/ .rightbar-header{width: 100%; background:#282c37; height:60px; min-width:1000px;} .rightbar-score{ margin-top: 17px; font-size: 14px; margin-right:20px;} @@ -197,7 +192,6 @@ input.knowledge_frame{height:28px;line-height:28px;border:none;background:#f3f5f .-task-ces-top{ padding:5px 15px; background:#515151; color:#bfbfbf;} .-task-ces-info-left{ display: inline-block; width:100px; text-align: right; } .-position-a-r15{ position: absolute; top:5px; right:15px;} -.btn-cir-big{ background: #999;color: #fff;display: inline-block; padding:0px 10px; border-radius:25px; line-height:25px; height: 25px; font-size:12px;} .-task-ml80{ margin-left: 80px;} .page--over { position: fixed;top: 0; left:80px; right: 0; z-index:8000; height:100%; color:#fff;} .-task-list-header{ border-bottom:1px solid #eee; padding:5px 15px; color:#898989; font-size: 14px; font-weight: normal;} @@ -444,7 +438,8 @@ html>body #ajax-indicator-base { position: fixed; } .question_item_con{font-weight: normal!important;border:1px solid #EEEEEE!important;color: #333!important;background: #FFFFff!important;position: relative} .exam_operator{cursor: pointer;position: absolute;right: 15px;top: 11px;} .question_item_con .write_answer{border-top:1px solid #EEEEEE;background:#EFF9FD;padding: 10px 15px;text-align:justify;} -.add_item_part{width: auto;padding: 2px 20px;border: 1px solid #CCCCCC;border-radius: 3px;margin-left: 15px;cursor: pointer;} +.add_item_part{width: auto;padding: 2px 20px;border: 1px solid #ff7500;border-radius: 3px;margin-left: 15px;cursor: pointer;color: #ff7500!important;} +.add_item_part:hover{color:#fff!important;background-color: #ff7500} /*更新提示*/ diff --git a/public/stylesheets/repository.css b/public/stylesheets/repository.css index ff48cae83..6b0bc82a4 100644 --- a/public/stylesheets/repository.css +++ b/public/stylesheets/repository.css @@ -215,7 +215,7 @@ .vl_copy {background:url(../images/vlicon/clone_url.png) 0px 0px no-repeat; padding-left:22px;} .vl_copy2 {background:url(../images/vlicon/clone_url.png) 0px 0px no-repeat; padding-left:22px;} .vl_zip {background:url(../images/vlicon/graph.png) 0px 2px no-repeat; padding-left:22px;} -.vl_fork {background:url(/images/vlicon/fork_icon.png) 0px -2px no-repeat; padding-left:22px;} +.vl_fork {background:url(/images/vlicon/fork_icon.png) 0px 0px no-repeat; padding-left:22px;} .vl_commit {background:url(../images/vlicon/commit_icon.png) 0px -2px no-repeat; padding-left:22px;weight:20px;height: 24px;} .vl_branch {background:url(../images/vlicon/branch_icon.png) 0px -2px no-repeat; padding-left:22px} .mt1 {margin-top:1px;}