diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 09ca29178..a301a1e6c 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -388,7 +388,7 @@ class AttachmentsController < ApplicationController end rescue NoMethodError @save_flag = false - @save_message = [] << l(:label_course_empty_select) + @save_message = [] << l(:label_project_empty_select) respond_to do |format| format.js end diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 00d740ee7..9e06ea83c 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -298,7 +298,7 @@ class CoursesController < ApplicationController if params[:group_id] && params[:group_id] != "0" @group = CourseGroup.find(params[:group_id]) @results = student_homework_score(@group.id,0, 0,"desc") - @results = paginateHelper @results, 10 + # @results = paginateHelper @results, 10 else page_from = params[:page].nil? ? 0 : (params[:page].to_i - 1) @results = student_homework_score(0,page_from, 10,"desc") @@ -368,12 +368,12 @@ class CoursesController < ApplicationController page = params[:page].nil? ? 0 : (params['page'].to_i - 1) @results = searchmember_by_name(student_homework_score(0,0,0,@score_sort_by), @search_name) @result_count = @results.count - @results = paginateHelper @results, 10 + # @results = paginateHelper @results, 10 else @group = CourseGroup.find(group_id) @results = searchmember_by_name(student_homework_score(group_id, 0, 0,@score_sort_by),@search_name) @result_count = @results.count - @results = paginateHelper @results, 10 + # @results = paginateHelper @results, 10 end else if group_id == '0' diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb index 7808691cf..c0685ea0a 100644 --- a/app/controllers/homework_common_controller.rb +++ b/app/controllers/homework_common_controller.rb @@ -92,7 +92,7 @@ class HomeworkCommonController < ApplicationController @homework.publish_time = params[:homework_common][:publish_time] @homework.homework_type = params[:homework_common][:homework_type] unless @homework.late_penalty == params[:late_penalty] - @homework.student_works.where("created_at > #{@homework.end_time}").each do |student_work| + @homework.student_works.where("created_at > '#{@homework.end_time} 23:59:59'").each do |student_work| student_work.late_penalty = params[:late_penalty] student_work.save end diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 596d5ba51..cc858cc19 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -278,7 +278,7 @@ class StudentWorkController < ApplicationController work_ids = "(" + @homework.student_works.map(&:id).join(",") + ")" @stundet_works = StudentWork.find_by_sql("SELECT * FROM (SELECT *,(all_count - has_count) AS absence FROM( SELECT * , - (SELECT evaluation_num FROM homework_detail_manuals WHERE homework_detail_manuals.homework_common_id = #{@homework.id}) AS all_count, + (SELECT COUNT(*) FROM `student_works_evaluation_distributions` WHERE user_id = student_works.user_id AND student_work_id IN #{work_ids}) AS all_count, (SELECT COUNT(*) FROM `student_works_scores` WHERE user_id = student_works.user_id AND student_work_id IN #{work_ids}) AS has_count FROM `student_works` WHERE homework_common_id = #{@homework.id} @@ -365,7 +365,7 @@ class StudentWorkController < ApplicationController sheet1[count_row,6] = homework.teacher_score.nil? ? l(:label_without_score) : format("%.2f",homework.teacher_score) sheet1[count_row,7] = homework.teaching_asistant_score.nil? ? l(:label_without_score) : format("%.2f",homework.teaching_asistant_score) sheet1[count_row,8] = homework.student_score.nil? ? l(:label_without_score) : format("%.2f",homework.student_score) - sheet1[count_row,9] = homework.final_score.nil? ? l(:label_without_score) : format("%.2f",homework.final_score) + sheet1[count_row,9] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : format("%.2f",homework.score) : l(:label_without_score) sheet1[count_row,10] = format_time(homework.created_at) count_row += 1 end diff --git a/app/helpers/api_helper.rb b/app/helpers/api_helper.rb index 6c17f8566..d3dc441ae 100644 --- a/app/helpers/api_helper.rb +++ b/app/helpers/api_helper.rb @@ -93,7 +93,7 @@ module ApiHelper def homework_status_desc homework if homework.homework_type == 1 && homework.homework_detail_manual #匿评作业 if Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d") - link = "启动匿评".html_safe + link = "截止日期之前不可启动匿评" elsif homework.student_works.count >= 2 #作业份数大于2 case homework.homework_detail_manual.comment_status when 1 @@ -104,10 +104,10 @@ module ApiHelper link = " 匿评结束" end else - link = "学生提交作业数大于2时才可以启动匿评" + link = "提交作业数大于2才可启动匿评" end else - link = "未开启匿评作业不可以启动匿评" + link = "未开启匿评作业不可启动匿评" end link end diff --git a/app/helpers/homework_attach_helper.rb b/app/helpers/homework_attach_helper.rb index 72d381b28..bd2bec80c 100644 --- a/app/helpers/homework_attach_helper.rb +++ b/app/helpers/homework_attach_helper.rb @@ -1,149 +1,149 @@ module HomeworkAttachHelper - #判断是否具有删除的权限 - def attach_delete(project) - if User.current.logged? && (User.current.admin? || (!Member.where('user_id = ? and project_id = ?', User.current.id, project.bid.courses.first.id).first.nil? && (Member.where('user_id = ? and project_id = ?', User.current.id, project.bid.courses.first.id).first.roles&Role.where('id = ? or id = ?', 3, 7)).size >0) || project.user_id == User.current.id) - true - else - false - end - end - #作业添加、编辑界面的tab页 - def homework_settings_tabs f - @f = f - tabs = [{:name => 'info', :partial => 'homework_attach/edit_homework', :label => :label_information_plural}, - {:name => 'members', :partial => 'homework_attach/homework_member', :label => :label_member_plural} - ] - end - - #作业可选成员列表分页 - def render_new_members_for_homework members - #scope = Principal.active.sorted.not_member_of(project).like(params[:q]) - #scope = project.members - #principals = paginateHelper members,10 - #principals = members - #principal_count = members.count - #limit = 10 - #principal_pages = Redmine::Pagination::Paginator.new principal_count, limit, params['page'] #by young - #offset ||= principal_pages.offset - #principals = members[offset, limit] - users = members.map(&:user) - s = content_tag('div', member_check_box_tags_ex('membership[user_ids][]', users), :id => 'principals') - links = pagination_links_full(@obj_pages, @obj_count, :per_page_links => false) {|text, parameters, options| - link_to text, get_homework_member_list_homework_attach_index_path( parameters.merge(:q => params[:q], bid_id: params[:id]||@homework)), :remote => true } - return s + content_tag('div', content_tag('ul', links), :class => 'pagination_new') - end - - #扩展的checkbox生成 - def member_check_box_tags_ex(name, principals) - s = '' - principals.each do |member| - s << "
" - end - s.html_safe - end - - def paginateHelper obj, pre_size=20 - @obj_count = obj.count - @obj_pages = Redmine::Pagination::Paginator.new @obj_count, pre_size, params['page'] - if obj.kind_of? ActiveRecord::Base or obj.kind_of? ActiveRecord::Relation - obj.limit(@obj_pages.per_page).offset(@obj_pages.offset) - elsif obj.kind_of? Array - obj[@obj_pages.offset, @obj_pages.per_page] - else - logger.error "[ApplicationController] Error : application_controller#paginateHelper ===> unknow category: #{obj.class}" - raise RuntimeError, 'unknow type, Please input you type into this helper.' - end - end - - def user_projects_option - cond = Project.visible_condition(User.current) + " AND projects.project_type <> 1" - memberships = User.current.memberships.all(:conditions => cond) - projects = memberships.map(&:project) - not_have_project = [] - not_have_project << Setting.please_chose - not_have_project << 0 - type = [] - type << not_have_project - projects.each do |project| - if project != nil - option = [] - option << project.name - option << project.id - type << option - end - end - type - end - - #判断指定用户是不是已经赞过该作业 - def is_praise_homework user_id, obj_id - PraiseTread.where("user_id = #{user_id} AND praise_tread_object_id = #{obj_id} AND praise_tread_object_type = 'HomeworkAttach'").empty? - end - - #获取赞的总数 - def praise_homework_count obj_id - PraiseTread.where("praise_tread_object_id = #{obj_id} AND praise_tread_object_type = 'HomeworkAttach'").count - end - - #获取用户对作业的评分 - def get_homework_score user, homework - temp = HomeworkAttach.find_by_sql("SELECT stars FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = #{homework.id} AND rater_id = #{user.id}").first - @m_score = temp.nil? ? 0:temp.stars.to_i - end - - #获取评分对应的评论 - def get_homework_review homework,is_teacher,user - homework.journals_for_messages.where("is_comprehensive_evaluation = #{is_teacher ? 1 : 2} and user_id = #{user.id}").order("created_on DESC").first - end - - def convert_array array - ary = "(" - if array.nil? || array.count == 0 - return "()" - end - array.length.times do |i| - if i == array.length - 1 - ary += array[i].id.to_s + ")" - else - if !(array[i].nil? || array[i].id.nil? || array[i].id.to_s == "") - ary += array[i].id.to_s + "," - end - end - end - #array.each do |member| - # if member == array.last - # ary += member.id.to_s + ")" - # else - # ary += member.id.to_s + "," - # end - #end - ary - end - - def get_student_batch_homework_list bid,user - student_batch_homework_list = HomeworkAttach.eager_load(:attachments,:user,:rate_averages).find_by_sql("SELECT homework_attaches.*, - (SELECT stars FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND is_teacher_score = 1 AND stars IS NOT NULL ORDER BY updated_at DESC limit 0,1) AS t_score, - (SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND is_teacher_score = 0) AS s_score, - (SELECT stars FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id = #{User.current.id} AND is_teacher_score = 0) AS m_score - FROM homework_attaches - INNER JOIN homework_evaluations ON homework_evaluations.homework_attach_id = homework_attaches.id - WHERE homework_attaches.bid_id = #{bid.id} AND homework_evaluations.user_id = #{user.id} ORDER BY m_score DESC") - student_batch_homework_list - end - - ######################################################### - #sw - #获取学生未进行匿评的数量 - #param: bid => 作业 user => 用户 - #return 指定用户未进行匿评的作业的数量 - #user必须是学生用户 - ####################################################### - def get_student_not_batch_homework_list bid,user - HomeworkAttach.find_by_sql("SELECT * FROM(SELECT homework_attaches.*, - (SELECT stars FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id = #{user.id} AND is_teacher_score = 0) AS m_score - FROM homework_attaches - INNER JOIN homework_evaluations ON homework_evaluations.homework_attach_id = homework_attaches.id - WHERE homework_attaches.bid_id = #{bid.id} AND homework_evaluations.user_id = #{user.id}) AS table1 - WHERE table1.m_score IS NULL").count - end +# #判断是否具有删除的权限 +# def attach_delete(project) +# if User.current.logged? && (User.current.admin? || (!Member.where('user_id = ? and project_id = ?', User.current.id, project.bid.courses.first.id).first.nil? && (Member.where('user_id = ? and project_id = ?', User.current.id, project.bid.courses.first.id).first.roles&Role.where('id = ? or id = ?', 3, 7)).size >0) || project.user_id == User.current.id) +# true +# else +# false +# end +# end +# #作业添加、编辑界面的tab页 +# def homework_settings_tabs f +# @f = f +# tabs = [{:name => 'info', :partial => 'homework_attach/edit_homework', :label => :label_information_plural}, +# {:name => 'members', :partial => 'homework_attach/homework_member', :label => :label_member_plural} +# ] +# end +# +# #作业可选成员列表分页 +# def render_new_members_for_homework members +# #scope = Principal.active.sorted.not_member_of(project).like(params[:q]) +# #scope = project.members +# #principals = paginateHelper members,10 +# #principals = members +# #principal_count = members.count +# #limit = 10 +# #principal_pages = Redmine::Pagination::Paginator.new principal_count, limit, params['page'] #by young +# #offset ||= principal_pages.offset +# #principals = members[offset, limit] +# users = members.map(&:user) +# s = content_tag('div', member_check_box_tags_ex('membership[user_ids][]', users), :id => 'principals') +# links = pagination_links_full(@obj_pages, @obj_count, :per_page_links => false) {|text, parameters, options| +# link_to text, get_homework_member_list_homework_attach_index_path( parameters.merge(:q => params[:q], bid_id: params[:id]||@homework)), :remote => true } +# return s + content_tag('div', content_tag('ul', links), :class => 'pagination_new') +# end +# +# #扩展的checkbox生成 +# def member_check_box_tags_ex(name, principals) +# s = '' +# principals.each do |member| +# s << "
" +# end +# s.html_safe +# end +# +# def paginateHelper obj, pre_size=20 +# @obj_count = obj.count +# @obj_pages = Redmine::Pagination::Paginator.new @obj_count, pre_size, params['page'] +# if obj.kind_of? ActiveRecord::Base or obj.kind_of? ActiveRecord::Relation +# obj.limit(@obj_pages.per_page).offset(@obj_pages.offset) +# elsif obj.kind_of? Array +# obj[@obj_pages.offset, @obj_pages.per_page] +# else +# logger.error "[ApplicationController] Error : application_controller#paginateHelper ===> unknow category: #{obj.class}" +# raise RuntimeError, 'unknow type, Please input you type into this helper.' +# end +# end +# +# def user_projects_option +# cond = Project.visible_condition(User.current) + " AND projects.project_type <> 1" +# memberships = User.current.memberships.all(:conditions => cond) +# projects = memberships.map(&:project) +# not_have_project = [] +# not_have_project << Setting.please_chose +# not_have_project << 0 +# type = [] +# type << not_have_project +# projects.each do |project| +# if project != nil +# option = [] +# option << project.name +# option << project.id +# type << option +# end +# end +# type +# end +# +# #判断指定用户是不是已经赞过该作业 +# def is_praise_homework user_id, obj_id +# PraiseTread.where("user_id = #{user_id} AND praise_tread_object_id = #{obj_id} AND praise_tread_object_type = 'HomeworkAttach'").empty? +# end +# +# #获取赞的总数 +# def praise_homework_count obj_id +# PraiseTread.where("praise_tread_object_id = #{obj_id} AND praise_tread_object_type = 'HomeworkAttach'").count +# end +# +# #获取用户对作业的评分 +# def get_homework_score user, homework +# temp = HomeworkAttach.find_by_sql("SELECT stars FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = #{homework.id} AND rater_id = #{user.id}").first +# @m_score = temp.nil? ? 0:temp.stars.to_i +# end +# +# #获取评分对应的评论 +# def get_homework_review homework,is_teacher,user +# homework.journals_for_messages.where("is_comprehensive_evaluation = #{is_teacher ? 1 : 2} and user_id = #{user.id}").order("created_on DESC").first +# end +# +# def convert_array array +# ary = "(" +# if array.nil? || array.count == 0 +# return "()" +# end +# array.length.times do |i| +# if i == array.length - 1 +# ary += array[i].id.to_s + ")" +# else +# if !(array[i].nil? || array[i].id.nil? || array[i].id.to_s == "") +# ary += array[i].id.to_s + "," +# end +# end +# end +# #array.each do |member| +# # if member == array.last +# # ary += member.id.to_s + ")" +# # else +# # ary += member.id.to_s + "," +# # end +# #end +# ary +# end +# +# def get_student_batch_homework_list bid,user +# student_batch_homework_list = HomeworkAttach.eager_load(:attachments,:user,:rate_averages).find_by_sql("SELECT homework_attaches.*, +# (SELECT stars FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND is_teacher_score = 1 AND stars IS NOT NULL ORDER BY updated_at DESC limit 0,1) AS t_score, +# (SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND is_teacher_score = 0) AS s_score, +# (SELECT stars FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id = #{User.current.id} AND is_teacher_score = 0) AS m_score +# FROM homework_attaches +# INNER JOIN homework_evaluations ON homework_evaluations.homework_attach_id = homework_attaches.id +# WHERE homework_attaches.bid_id = #{bid.id} AND homework_evaluations.user_id = #{user.id} ORDER BY m_score DESC") +# student_batch_homework_list +# end +# +# ######################################################### +# #sw +# #获取学生未进行匿评的数量 +# #param: bid => 作业 user => 用户 +# #return 指定用户未进行匿评的作业的数量 +# #user必须是学生用户 +# ####################################################### +# def get_student_not_batch_homework_list bid,user +# HomeworkAttach.find_by_sql("SELECT * FROM(SELECT homework_attaches.*, +# (SELECT stars FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id = #{user.id} AND is_teacher_score = 0) AS m_score +# FROM homework_attaches +# INNER JOIN homework_evaluations ON homework_evaluations.homework_attach_id = homework_attaches.id +# WHERE homework_attaches.bid_id = #{bid.id} AND homework_evaluations.user_id = #{user.id}) AS table1 +# WHERE table1.m_score IS NULL").count +# end end \ No newline at end of file diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index aae150728..4f0821449 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -68,24 +68,36 @@ module IssuesHelper end #获取跟踪类型及样式 - #REDO:时间紧可以优化. def get_issue_type(value) issuetype = [] if value == "缺陷" || value == 1 - issuetype << "red_btn_cir ml10" - issuetype << "缺陷" + issuetype << "issues fl" elsif value == "功能" || value == 2 - issuetype << "blue_btn_cir ml10" - issuetype << "功能" + issuetype << "duty fl" elsif value == "支持" || value == 3 - issuetype << "green_btn_cir ml10" - issuetype << "支持" + issuetype << "support fl" elsif value == "任务" || value == 4 + issuetype << "function fl" + else + issuetype << "weekly fl" + end + end + + # 获取优先级样式 + def get_issue_priority(value) + issuetype = [] + if value == "紧急" || value == 1 + issuetype << "red_btn_cir ml10" + issuetype << "紧急" + elsif value == "正常" || value == 3 + issuetype << "green_btn_cir ml10" + issuetype << "正常" + elsif value == "高" || value == 4 issuetype << "orange_btn_cir ml10" - issuetype << "任务" + issuetype << "高" else issuetype << "bgreen_btn_cir ml10" - issuetype << "周报" + issuetype << "低" end end diff --git a/app/helpers/user_score_helper.rb b/app/helpers/user_score_helper.rb index c94763e31..41f76a792 100644 --- a/app/helpers/user_score_helper.rb +++ b/app/helpers/user_score_helper.rb @@ -433,7 +433,7 @@ module UserScoreHelper #协同得分 def collaboration(option_number) - option_number.memo * 2 + option_number.messages_for_issues + option_number.issues_status + option_number.replay_for_message + option_number.replay_for_memo + option_number.messages_for_issues + option_number.issues_status + option_number.replay_for_message + option_number.replay_for_memo end #影响力得分 def influence(option_number) @@ -445,7 +445,7 @@ module UserScoreHelper end #项目贡献得分 def active(option_number) - option_number.changeset * 4 + option_number.document * 4 + option_number.attachment * 4 + option_number.issue_done_ratio * 2 + option_number.post_issue * 4 + option_number.changeset * 4 + option_number.document * 4 + option_number.attachment * 4 + option_number.issue_done_ratio * 2 + option_number.post_issue * 4 + option_number.memo * 2 end #更新发帖数 diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 7aa793d82..5ae9df001 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -120,8 +120,8 @@ class Mailer < ActionMailer::Base count = courses.count count = count - 1 for i in 0..count do - bids = courses[i].homework_commons.where("homework_commons.created_at between '#{date_from}' and '#{date_to}'").order(" '#{courses[i].id}', homework_commons.created_at desc") - attachments = courses[i].attachments.where("attachments.created_on between '#{date_from}' and '#{date_to}'").order(" '#{courses[i].id}',attachments.created_on DESC' ") + bids = courses[i].homework_commons.where("homework_commons.created_at between '#{date_from}' and '#{date_to}'").order("homework_commons.created_at desc") + attachments = courses[i].attachments.where("attachments.created_on between '#{date_from}' and '#{date_to}'") @bids += bids if bids.count > 0 @attachments += attachments if attachments.count > 0 end diff --git a/app/models/option_number.rb b/app/models/option_number.rb index 0ddea1bff..b4a3caac4 100644 --- a/app/models/option_number.rb +++ b/app/models/option_number.rb @@ -1,5 +1,6 @@ class OptionNumber < ActiveRecord::Base - attr_accessible :attachment, :changeset, :document, :follow, :issue_done_ratio, :issues_status, :memo, :messages_for_issues, :post_issue, :praise_by_one, :praise_by_three, :praise_by_two, :replay_for_memo, :replay_for_message, :score_type, :total_score, :tread, :tread_by_one, :tread_by_three, :tread_by_two, :user_id + attr_accessible :attachment, :changeset, :document, :follow, :issue_done_ratio, :issues_status, :memo, :messages_for_issues, :post_issue, + :praise_by_one, :praise_by_three, :praise_by_two, :replay_for_memo, :replay_for_message, :score_type, :total_score, :tread, :tread_by_one, :tread_by_three, :tread_by_two, :user_id def self.get_user_option_number user_id result = nil diff --git a/app/views/contestnotifications/_form.html.erb b/app/views/contestnotifications/_form.html.erb index dc651501b..680ab93d1 100644 --- a/app/views/contestnotifications/_form.html.erb +++ b/app/views/contestnotifications/_form.html.erb @@ -50,9 +50,6 @@ } } -
- <%= l(:bale_news_notice) %> -

<%= f.text_field :title, diff --git a/app/views/homework_common/index.html.erb b/app/views/homework_common/index.html.erb index a1aa49c8c..870edbfe4 100644 --- a/app/views/homework_common/index.html.erb +++ b/app/views/homework_common/index.html.erb @@ -56,7 +56,23 @@

<% end%> +
+
+ 扣分标准: +
+ 迟交扣 + <%= homework.late_penalty%> + 分 + <% if homework.homework_type == 1%> + ,缺评一个作品扣 + <%= homework.homework_detail_manual.absence_penalty%> + 分 + <% else%> + 。 + <% end%> +
+
<%= l(:label_end_time)%>:<%= homework.end_time%> diff --git a/app/views/issues/_history.html.erb b/app/views/issues/_history.html.erb index a5b1661eb..2ad36875c 100644 --- a/app/views/issues/_history.html.erb +++ b/app/views/issues/_history.html.erb @@ -1,33 +1,31 @@ <% reply_links = authorize_for('issues', 'edit') -%> <% journals.reverse.each do |journal| %> - -
- -
- -
-
- <%= journal.user %><%= format_time journal.created_on %> + +
+ +
+ +
+
+ <%= journal.user %><%= format_time journal.created_on %> +
+

+ <% if journal.details.any? %> + <% details_to_strings(journal.details).each do |string| %> +

<%= string %>

+ <% end %> + <% end %> +

+
+ +
<%= render_links_easy(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %>
+ +

<%= render_notes_issue(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %>

+
+
-

- <% if journal.details.any? %> - <% details_to_strings(journal.details).each do |string| %> -

<%= string %>

- <% end %> - <% end %> -

- -
<%= render_links_easy(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %>
- -

- <%= render_notes_issue(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %> -

-
-
-
-
<%= call_hook(:view_issues_history_journal_bottom, { :journal => journal }) %> <% end %> diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb index 0fcb37021..4549b32e0 100644 --- a/app/views/issues/_list.html.erb +++ b/app/views/issues/_list.html.erb @@ -7,12 +7,12 @@
<% column_content = ( query.inline_columns.map {|column| "#{column_content_new(column, issue)}"}) %> <% unless issue.author.nil? || issue.author.name == "Anonymous" %> - +
<%= link_to issue.author.name, user_path(issue.author), :class => "problem_name c_orange fl" %> <%= l(:label_post_on_issue) %>(<%= "#{raw column_content[2]}" %>):
- <%=link_to "#{column_content[4]}#{get_issue_type(column_content[1])[1]}".html_safe, issue_path(issue.id), :class => "problem_tit_a break_word",:target => "_blank" %> + <%=link_to "#{column_content[4]}#{get_issue_priority(column_content[3])[1]}".html_safe, issue_path(issue.id), :class => "problem_tit_a break_word",:target => "_blank" %>

diff --git a/app/views/layouts/base_newcontest.html.erb b/app/views/layouts/base_newcontest.html.erb index 26015d536..cef5c0955 100644 --- a/app/views/layouts/base_newcontest.html.erb +++ b/app/views/layouts/base_newcontest.html.erb @@ -66,7 +66,8 @@ <%= text_field_tag 'name', params[:name], :size => 20, :onkeyup => 'regexName1();', :width => "125px", :style=>"float:left" %> <%= hidden_field_tag 'project_type', params[:project_type] %> <%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %> - + + <%= l(:label_search)%>
@@ -80,7 +81,7 @@ <%=link_to l(:field_homepage), home_path %> > <%=l(:label_contests_management_platform)%> - + > <%= link_to h(truncate(@contest.name, length: 20, omission: '...')), contest_contestnotifications_path(@contest) %> diff --git a/app/views/mailer/send_for_user_activities.html.erb b/app/views/mailer/send_for_user_activities.html.erb index 22eb23bf7..59dc1e674 100644 --- a/app/views/mailer/send_for_user_activities.html.erb +++ b/app/views/mailer/send_for_user_activities.html.erb @@ -5,7 +5,7 @@ <% if @attachments.first || @course_news.first || @course_news_comments.first || @bids.first || @course_journal_messages.first|| @course_messages.first || @attachments.first %>

-

<%= l(:label_course_overview)%>

+

<%= l(:label_course_overview)%>

<% unless @course_news.first.nil? || @course_news_comments.first.nil? %>
    @@ -189,7 +189,7 @@ <% if @issues.first || @project_messages.first || @issues_journals.first || @wiki_contents.first || @project_news.first || @project_news_comments.first || @project_journal_messages.first || @project_news_comments.first %>
    -

    <%= l(:label_project_overview_new)%>

    +

    <%= l(:label_project_overview_new)%>

    <% unless @issues.first.nil? || @issues_journals.first.nil? %>
      @@ -420,7 +420,7 @@ <% unless @user_journal_messages.first.nil? %>
      -

      <%= l(:label_activities) %>

      +

      <%= l(:label_activities) %>

        @@ -451,7 +451,7 @@ <% end %> <% if @forums.first || @memos.first %>
        -

        <%= l(:lable_bar_active) %>

        +

        <%= l(:lable_bar_active) %>

        <% unless @forums.first.nil? %>
          @@ -508,7 +508,7 @@
        <% end %>
        -<%= l(:label_mail_policy) %>: +<%= l(:label_mail_policy) %>: <% [:label_user_mail_option_all, :label_user_mail_option_day, :label_user_mail_option_none].each do |mail_option| %> <% if Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten][@user.mail_notification] == mail_option %> diff --git a/app/views/poll/poll_result.html.erb b/app/views/poll/poll_result.html.erb index 47f3b179d..4145ec1b2 100644 --- a/app/views/poll/poll_result.html.erb +++ b/app/views/poll/poll_result.html.erb @@ -1,5 +1,5 @@ <%= stylesheet_link_tag 'polls', :media => 'all' %> -
        +

        <%= @poll.polls_name.empty? ? l(:label_poll_new) : @poll.polls_name %> diff --git a/app/views/student_work/_evaluation_student_work.html.erb b/app/views/student_work/_evaluation_student_work.html.erb new file mode 100644 index 000000000..0f66452c7 --- /dev/null +++ b/app/views/student_work/_evaluation_student_work.html.erb @@ -0,0 +1,58 @@ + +
          " id="student_work_<%= student_work.id%>"> +
        • + + <%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%> + +
        • +
        • + <%= link_to student_work.user.show_name,user_path(student_work.user),:title => student_work.user.show_name, :class => "c_blue02"%> +
        • +
        • + <%= link_to student_work.name, student_work_path(student_work),:remote => true,:title => student_work.name, :class => "c_blue02"%> +
        • +
        • + <% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(student_work.created_at.to_s).strftime("%Y-%m-%d") %> + 迟交 + <% else%> + <%= student_work.created_at.strftime("%m-%d").to_s%> + <% end %> +
        • +
        • + <%= student_work.teacher_score.nil? ? "--" : format("%.1f",student_work.teacher_score)%> +
        • +
        • + <%= student_work.teaching_asistant_score.nil? ? "--" : format("%.1f",student_work.teaching_asistant_score)%> +
        • +
        • + <%= student_work.student_score.nil? ? "--" : format("%.1f",student_work.student_score)%> + <% unless student_work.student_score.nil?%> + + (<%= student_work.student_works_scores.where(:reviewer_role => 3).count%>) + +
          + 现共有 +  <%= student_work.student_works_scores.where(:reviewer_role => 3).count%>  + 名学生进行了匿评,平均分为 +  <%= format("%.1f",student_work.student_score)%> 分。 +
          + <% end%> +
        • + <% score = student_work.respond_to?("score") ? student_work.score : student_work.final_score - student_work.absence_penalty - student_work.late_penalty%> +
        • + <%= score.nil? ? "--" : format("%.1f",score)%> + <% unless score.nil?%> +
          + 作品最终评分为 +  <%= student_work.final_score%> 分。 + 迟交扣分 +  <%= student_work.late_penalty%> 分, + 缺评扣分 +  <%= student_work.absence_penalty%> 分, + 最终成绩为 +  <%= format("%.1f",score)%> 分。 +
          + <% end%> +
        • +
          +
        \ No newline at end of file diff --git a/app/views/student_work/_evaluation_student_work_title.html.erb b/app/views/student_work/_evaluation_student_work_title.html.erb new file mode 100644 index 000000000..0e4151065 --- /dev/null +++ b/app/views/student_work/_evaluation_student_work_title.html.erb @@ -0,0 +1,43 @@ +
      • + 学号 +
      • +
      • + <%= link_to "姓名",@show_all ? student_work_index_path(:homework => @homework.id,:order => "name", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> + <% if @show_all && @order == "name"%> + + <% end%> +
      • +
      • + 作品名称 +
      • +
      • + <%= link_to "时间",@show_all ? student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> + <% if @show_all && @order == "created_at"%> + <%= link_to "",student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%> + <% end%> +
      • +
      • + <%= link_to "教师",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> + <% if @show_all && @order == "teacher_score"%> + <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%> + <% end%> +
      • +
      • + <%= link_to "教辅",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> + <% if @show_all && @order == "teaching_asistant_score"%> + <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%> + + <% end%> +
      • +
      • + <%= link_to "匿评",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> + <% if @show_all && @order == "student_score"%> + <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%> + <% end%> +
      • +
      • + <%= link_to "成绩",@show_all ? student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> + <% if @show_all && @order == "score"%> + <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%> + <% end%> +
      • \ No newline at end of file diff --git a/app/views/student_work/_student_work.html.erb b/app/views/student_work/_student_work.html.erb index 6e4cc65f1..dd7ab7e2d 100644 --- a/app/views/student_work/_student_work.html.erb +++ b/app/views/student_work/_student_work.html.erb @@ -8,7 +8,7 @@
      • <%= link_to student_work.user.show_name,user_path(student_work.user),:title => student_work.user.show_name, :class => "c_blue02"%>
      • -
      • +
      • <%= link_to student_work.name, student_work_path(student_work),:remote => true,:title => student_work.name, :class => "c_blue02"%>
      • @@ -24,47 +24,19 @@
      • <%= student_work.teaching_asistant_score.nil? ? "--" : format("%.1f",student_work.teaching_asistant_score)%>
      • -
      • - <%= student_work.student_score.nil? ? "--" : format("%.1f",student_work.student_score)%> - <% unless student_work.student_score.nil?%> - - (<%= student_work.student_works_scores.where(:reviewer_role => 3).count%>) - -
        - 现共有 -  <%= student_work.student_works_scores.where(:reviewer_role => 3).count%>  - 名学生进行了匿评,平均分为 -  <%= format("%.1f",student_work.student_score)%> 分。 -
        - <% end%> -
      • <% score = student_work.respond_to?("score") ? student_work.score : student_work.final_score - student_work.absence_penalty - student_work.late_penalty%> -
      • +
      • <%= score.nil? ? "--" : format("%.1f",score)%> <% unless score.nil?%> - <% if @homework.homework_type == 1%> - -
        - 作品最终评分为 -  <%= student_work.final_score%> 分。 - 迟交扣分 -  <%= student_work.late_penalty%> 分, - 缺评扣分 -  <%= student_work.absence_penalty%> 分, - 最终成绩为 -  <%= score%> 分。 -
        - <% else%> - -
        - 作品最终评分为 -  <%= student_work.final_score%> 分。 - 迟交扣分 -  <%= student_work.late_penalty%> 分, - 最终成绩为 -  <%= score%> 分。 -
        - <% end%> + +
        + 作品最终评分为 +  <%= student_work.final_score%> 分。 + 迟交扣分 +  <%= student_work.late_penalty%> 分, + 最终成绩为 +  <%= format("%.1f",score)%> 分。 +
        <% end%>
      • diff --git a/app/views/student_work/_student_work_title.html.erb b/app/views/student_work/_student_work_title.html.erb index 0e4151065..c46f7dc79 100644 --- a/app/views/student_work/_student_work_title.html.erb +++ b/app/views/student_work/_student_work_title.html.erb @@ -7,7 +7,7 @@ <% end%> -
      • +
      • 作品名称
      • @@ -29,12 +29,6 @@ <% end%>
      • -
      • - <%= link_to "匿评",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> - <% if @show_all && @order == "student_score"%> - <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%> - <% end%> -
      • <%= link_to "成绩",@show_all ? student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> <% if @show_all && @order == "score"%> diff --git a/app/views/student_work/add_score.js.erb b/app/views/student_work/add_score.js.erb index 4474ab3b5..9298de8fc 100644 --- a/app/views/student_work/add_score.js.erb +++ b/app/views/student_work/add_score.js.erb @@ -2,40 +2,36 @@ $("#add_student_score_<%= @work.id%>").html("<%= escape_javascript(render :parti $('#score_<%= @work.id%>').peSlider({range: 'min'}); <% if @is_new%> - $("#score_list_<%= @work.id%>").prepend("
        <%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score}) %>
        "); +$("#score_list_<%= @work.id%>").prepend("
        <%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score}) %>
        "); <% else %> - $("#work_score_<%= @score.id%>").html("<%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score}) %>"); +$("#work_score_<%= @score.id%>").html("<%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score}) %>"); <% end%> $("#score_list_<%= @work.id%>").removeAttr("style"); <% if @is_teacher %> - $("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'student_work',:locals => {:student_work => @work}) %>"); +<% if @homework.homework_type == 1%> +$("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'evaluation_student_work',:locals => {:student_work => @work}) %>"); +<% else%> +$("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'student_work',:locals => {:student_work => @work}) %>"); +<% end%> <% else %> - $("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'evaluation_work',:locals => {:student_work => @work}) %>"); +$("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'evaluation_work',:locals => {:student_work => @work}) %>"); <% end%> $(function(){ //匿评评分提示 $(".student_score_info").bind("mouseover",function(e){ - //alert($(this).html()); $(this).find("div").show(); -// $(this).find("div").css("top",e.pageY); -// $(this).find("div").css("left",e.pageX); }); $(".student_score_info").bind("mouseout",function(e){ - //alert($(this).html()); $(this).find("div").hide(); }); //最终成绩提示 $(".student_final_scor_info").bind("mouseover",function(e){ - //alert($(this).html()); $(this).find("div").show(); -// $(this).find("div").css("top",e.pageY); -// $(this).find("div").css("left",e.pageX); }); $(".student_final_scor_info").bind("mouseout",function(e){ - //alert($(this).html()); $(this).find("div").hide(); }); }); diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb index c5bc5858d..76ae71459 100644 --- a/app/views/student_work/index.html.erb +++ b/app/views/student_work/index.html.erb @@ -60,7 +60,7 @@ <%= link_to "附件", zipdown_assort_path(obj_class: @homework.class, obj_id: @homework, format: :json), remote: true, class: "down_btn fr zip_download_alert", :id => "download_homework_attachments" %> <% end%> -
        +
        使用 winzip 工具进行解压可能会导致 @@ -69,28 +69,46 @@ winrar 工具进行解压
        - <%= link_to "匿评", evaluation_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'down_btn fr'%> - <%= link_to "缺评", absence_penalty_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'down_btn fr'%> + <%= link_to("匿评", evaluation_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'down_btn fr') if @homework.homework_type == 1%> + <%= link_to("缺评", absence_penalty_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'down_btn fr') if @homework.homework_type == 1%> <%= link_to l(:label_list), student_work_index_path(:homework => @homework.id,:order => @order, :sort => @b_sort, :name => @name, :format => 'xls'),:class=>'down_btn fr'%> 导出全部:
        <% end%>
      • -
          - <% if @is_evaluation.nil?%> - <%= render :partial => 'student_work_title'%> - <% else%> - <%= render :partial => 'evaluation_work_title'%> - <% end%> -
        - <% @stundet_works.each do |student_work|%> - <%= render :partial => (@is_evaluation ? 'evaluation_work' :'student_work'),:locals => {:student_work => student_work}%> -
        + <% if @is_evaluation%> +
          + <%= render :partial => 'evaluation_work_title'%> +
        +
        + <% @stundet_works.each do |student_work|%> + <%= render :partial => "evaluation_work",:locals => {:student_work => student_work}%> +
        + <% end%> + <% else %> + <% if @homework.homework_type == 1%> +
          + <%= render :partial => 'evaluation_student_work_title'%> +
        +
        + <% @stundet_works.each do |student_work|%> + <%= render :partial => "evaluation_student_work",:locals => {:student_work => student_work}%> +
        + <% end%> + <% else%> +
          + <%= render :partial => 'student_work_title'%> +
        +
        + <% @stundet_works.each do |student_work|%> + <%= render :partial => "student_work",:locals => {:student_work => student_work}%> +
        + <% end%> + <% end%> <% end%> -
        @@ -123,6 +141,23 @@
        <% end%>
        +
        + +
        + 扣分标准: +
        + 迟交扣 + <%= @homework.late_penalty%> + 分 + <% if @homework.homework_type == 1%> + ,缺评一个作品扣 + <%= @homework.homework_detail_manual.absence_penalty%> + 分 + <% else%> + 。 + <% end%> +
        +
        截止时间:<%= @homework.end_time%> diff --git a/app/views/users/_influence_new_score_index.html.erb b/app/views/users/_influence_new_score_index.html.erb index c0a89536a..505785351 100644 --- a/app/views/users/_influence_new_score_index.html.erb +++ b/app/views/users/_influence_new_score_index.html.erb @@ -4,4 +4,5 @@
            <%= l('userscore.active.commit.attachments')%> * 4 = <%= option_num.attachment %> * 4 = <%= option_num.attachment * 4 %>
            <%= l('userscore.active.update_issues')%> * 2 = <%= option_num.issue_done_ratio %> * 2 = <%= option_num.issue_done_ratio * 2 %>
            <%= l('userscore.active.release_issues')%> * 4 = <%= option_num.post_issue %> * 4 = <%= option_num.post_issue * 4 %>
        -
            <%= l(:label_user_score_of_active)%> = <%= option_num.changeset * 4 %> + <%= option_num.document * 4 %> + <%= option_num.attachment * 4 %> + <%= option_num.issue_done_ratio * 2 %> + <%= option_num.post_issue * 4 %> = <%= active(option_num) %>
        \ No newline at end of file +
            <%= l('userscore.active.release_messages')%> * 1 = <%= option_num.memo %> * 2 = <%= option_num.memo * 2 %>
        +
            <%= l(:label_user_score_of_active)%> = <%= option_num.changeset * 4 %> + <%= option_num.document * 4 %> + <%= option_num.attachment * 4 %> + <%= option_num.issue_done_ratio * 2 %> + <%= option_num.post_issue * 4 %> + <%= option_num.memo * 2 %> = <%= active(option_num) %>
        \ No newline at end of file diff --git a/app/views/users/_topic_new_score_index.html.erb b/app/views/users/_topic_new_score_index.html.erb index af2ff0da3..86dc1f80f 100644 --- a/app/views/users/_topic_new_score_index.html.erb +++ b/app/views/users/_topic_new_score_index.html.erb @@ -1,7 +1,5 @@ - -
            <%= l('userscore.collaboration.memos')%> * 2 = <%= option_num.memo %> * 2 = <%= option_num.memo * 2 %>
            <%= l('userscore.collaboration.message_for_issues')%> * 1 = <%= option_num.messages_for_issues %> * 1 = <%= option_num.messages_for_issues * 1 %>
            <%= l('userscore.collaboration.issue_status')%> * 1 = <%= option_num.issues_status %> * 1= <%= option_num.issues_status * 1 %>
            <%= l('userscore.collaboration.reply_for_messages')%> * 1 = <%= option_num.replay_for_message %> * 1 = <%= option_num.replay_for_message * 1 %>
            <%= l('userscore.collaboration.reply_for_memos')%> * 1 = <%= option_num.replay_for_memo %> * 1 = <%= option_num.replay_for_memo * 1 %>
        -
            <%= l(:label_user_score_of_collaboration)%> = <%= option_num.memo * 2 %> + <%= option_num.messages_for_issues * 1 %> + <%= option_num.issues_status * 1 %> + <%= option_num.replay_for_message * 1 %> + <%= option_num.replay_for_memo * 1 %> = <%= collaboration(option_num) %>  
        +
            <%= l(:label_user_score_of_collaboration)%> = <%= option_num.messages_for_issues * 1 %> + <%= option_num.issues_status * 1 %> + <%= option_num.replay_for_message * 1 %> + <%= option_num.replay_for_memo * 1 %> = <%= collaboration(option_num) %>  
        diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index fadffc9f6..496211e82 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -387,7 +387,7 @@ <%= l(:label_i_new_activity) %>
          - <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %> + <%= link_to format_activity_title(" #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %> <% else %> diff --git a/app/views/users/user_activities.html.erb b/app/views/users/user_activities.html.erb index 9165e6f2e..32915245f 100644 --- a/app/views/users/user_activities.html.erb +++ b/app/views/users/user_activities.html.erb @@ -28,7 +28,7 @@ -
        <%= content_tag('span', h(e.project), :class => 'project') %> <%= l(:label_new_activity) %> + <%= content_tag('span', h(e.project), :class => 'project') %> <% if e.event_type.eql?("message") || e.event_type.eql?("reply") %> <%= link_to format_activity_title(e.event_title), e.board.project ? project_boards_path(e.board.project,:topic_id => e.id):course_boards_path(e.board.course,:topic_id => e.id) %> <%else %> diff --git a/config/locales/commons/zh.yml b/config/locales/commons/zh.yml index 5dee0b505..457d56dad 100644 --- a/config/locales/commons/zh.yml +++ b/config/locales/commons/zh.yml @@ -337,7 +337,7 @@ zh: # # 贴吧动态栏 # - lable_bar_active: 问题和反馈动态 + lable_bar_active: 贴吧动态 label_my_question: 我要提问 label_my_feedback: 我要反馈 diff --git a/config/locales/users/zh.yml b/config/locales/users/zh.yml index 4c792ef82..d90d8c537 100644 --- a/config/locales/users/zh.yml +++ b/config/locales/users/zh.yml @@ -67,7 +67,8 @@ zh: documents: 提交文档次数 attachments: 提交附件次数 update_issues: 更新缺陷完成度次数 - release_issues: 发布缺陷数量 + release_issues: 发布缺陷数量 + release_messages: 发布帖子数量 label_score_less_than_zero: 得分小于0,修正为0 label_user_info: "个人简介" diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 4306b51c8..1b21a3672 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -737,7 +737,7 @@ zh: label_date_to: 到 label_language_based: 根据用户的语言 - label_mail_policy: 邮件策略 + label_mail_policy: 您可以修改邮件通知策略 label_send_test_email: 发送测试邮件 label_feeds_access_key: RSS存取键 label_missing_feeds_access_key: 缺少RSS存取键 @@ -1903,9 +1903,9 @@ zh: lable_teacher_evaluation: 作业综评 lable_course_teacher: 主讲老师 lable_course_end: 课程学期已结束 - label_no_contest_news_description: 竞赛描述不能为空 + label_no_contest_news_description: 竞赛通知描述不能为空 label_contest_news_condition: 竞赛描述超过5000个汉字 - label_no_contest_news_title: 竞赛标题不能为空 + label_no_contest_news_title: 竞赛通知标题不能为空 label_contest_news_title_condition: 竞赛标题超过255个汉字 label_course_organizers: 开设单位 @@ -1928,6 +1928,7 @@ zh: label_my_score: 我的评分 field_open_anonymous_evaluation: 是否使用匿评 label_course_empty_select: 尚未选择课程! + label_project_empty_select: 尚未选择项目! label_course_prompt: 课程: label_project_prompt: 项目: label_contain_resource: 已包含资源: diff --git a/public/images/public_icon.png b/public/images/public_icon.png index 1fa463e4e..b915af086 100644 Binary files a/public/images/public_icon.png and b/public/images/public_icon.png differ diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index 651436ec4..41514ab12 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -626,6 +626,8 @@ a:hover.icon_add{background:url(images/icons.png) -20px -310px no-repeat;} .hwork_tit{ width:210px; float:left; } .hwork_tit a{ width:205px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } +.hwork_tit_une{ width:270px; float:left; } +.hwork_tit_une a{ width:265px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } .hwork_code{ width:56px; text-align:center; } .hwork_code02{ width:60px; text-align:center; } .hwork_tit_e{ width:420px; float:left; } diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index 5574dc82a..28399462d 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -95,6 +95,12 @@ a.pro_mes_w_news{ height:20px; float:right;display:block; color:#999999;} .pro_info_box ul li{ height:24px;} .pro_info_p{color:#0781b4 !important; float:left; width:80px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } .edit_pro_box{overflow:hidden;display:none; margin-bottom:30px; border-bottom:1px dashed #CCC; padding-bottom:10px;} +/*问题状态图片*/ +.issues{ background:url(../images/public_icon.png) -66px 5px no-repeat; width:16px; height:21px;} +.duty{ background:url(../images/public_icon.png) -66px -18px no-repeat; width:16px; height:21px;} +.support{ background:url(../images/public_icon.png) -66px -45px no-repeat; width:16px; height:21px;} +.function{ background:url(../images/public_icon.png) -66px -70px no-repeat; width:16px; height:21px;} +.weekly{ background:url(../images/public_icon.png) -66px -95px no-repeat; width:16px; height:21px;} /****翻页***/ ul.wlist{ float:right; border-bottom:none; height:30px; margin-top:20px; } ul.wlist li{float: left;} diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index e015fbe57..27792347a 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -98,6 +98,8 @@ h4{ font-size:14px; color:#3b3b3b;} .w210{ width:210px;} .w150{ width:150px;} .w280{ width:280px;} +.w265{ width: 265px;} +.w270{ width: 270px;} .w430{ width:470px;} .w520{ width:520px;} .w543{ width:543px;} diff --git a/public/themes/redpenny-master/stylesheets/application.css b/public/themes/redpenny-master/stylesheets/application.css index 02626f440..4a23e59c5 100644 --- a/public/themes/redpenny-master/stylesheets/application.css +++ b/public/themes/redpenny-master/stylesheets/application.css @@ -1698,6 +1698,23 @@ div.project-search { } /*huang*/ +/*zhangshen*/ +a.enterprise { + float:left; + text-align: center; + width: 40px; + height: 18px; + font-family: '微软雅黑',Arial,Helvetica,sans-serif; + font-size: 12px; + color:#fff; + padding: 0px; + border-radius:4px; + border: 1px solid rgb(148, 148, 148); + box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2), 0px 0px 2px rgb(255, 255, 255) inset; + text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.1), 0px 0px 0px rgb(255, 255, 255); + cursor: pointer; +} + input.enterprise[type="button"] { padding-bottom: 5px; width: 55px;