diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb
index e12d4886a..7d26b2eca 100644
--- a/app/controllers/courses_controller.rb
+++ b/app/controllers/courses_controller.rb
@@ -615,6 +615,10 @@ class CoursesController < ApplicationController
end
def show
+ #更新创建课程消息状态
+ create_course_messages = @course.course_messages.where("user_id =? and course_message_type =? and course_id =? and viewed =?", User.current.id, 'Course', @course.id, 0)
+ create_course_messages.update_all(:viewed => true)
+
course_activities = @course.course_activities
@canShowRealName = User.current.member_of_course? @course
@page = params[:page] ? params[:page].to_i + 1 : 0
diff --git a/app/controllers/members_controller.rb b/app/controllers/members_controller.rb
index 6271a6832..6bb61e6a1 100644
--- a/app/controllers/members_controller.rb
+++ b/app/controllers/members_controller.rb
@@ -81,8 +81,12 @@ class MembersController < ApplicationController
user_ids.each do |user_id|
members << Member.new(:role_ids => params[:membership][:role_ids], :user_id => user_id)
user_grades << UserGrade.new(:user_id => user_id, :project_id => @project.id)
- ## added by nie
+ #给新成员发送加入项目的消息,发送者id放在ForgeMessage的forge_message_id字段中,
+ #forge_message_type设置为JoinProject
+ forge_join = ForgeMessage.new(:user_id =>user_id, :forge_message_id=>User.current.id,:project_id => @project.id,:forge_message_type=>"JoinProject", :viewed => false)
+ forge_join.save
+ ## added by nie
if (params[:membership][:role_ids])
role = Role.find(params[:membership][:role_ids][0])
project_info << ProjectInfo.new(:user_id => user_id, :project_id => @project.id) if role.allowed_to?(:is_manager)
@@ -301,6 +305,7 @@ class MembersController < ApplicationController
grade.destroy
end
end
+ ForgeMessage.create(:user_id => @member.user_id, :project_id => @project.id, :forge_message_type => "RemoveFromProject", :viewed => false, :forge_message_id => User.current.id)
end
respond_to do |format|
format.html { redirect_to_settings_in_projects }
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 90974b376..d26e465ba 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -534,6 +534,14 @@ class ProjectsController < ApplicationController
project_invite_messages.each do |project_invite_message|
project_invite_message.update_attribute(:viewed, true)
end
+ #更新被加入项目消息的viewed字段
+ join_project_messages = ForgeMessage.where("user_id =? and project_id =? and forge_message_type=?", user, project, "JoinProject")
+ join_project_messages.each do |join_project|
+ join_project.update_attribute(:viewed, true)
+ end
+ #更新被移出项目消息的viewed字段
+ remove_project_messages = ForgeMessage.where("user_id =? and project_id =? and forge_message_type=?", user, project, "RemoveFromProject")
+ remove_project_messages.update_all(:viewed => true)
end
def message_invite(message_id, key)
diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb
index 9d1284fde..24bd10186 100644
--- a/app/controllers/repositories_controller.rb
+++ b/app/controllers/repositories_controller.rb
@@ -29,7 +29,7 @@ class RepositoriesController < ApplicationController
menu_item :repository
menu_item :settings, :only => [:new, :create, :edit, :update, :destroy, :committers]
default_search_scope :changesets
-
+
before_filter :find_project_by_project_id, :only => [:new, :create, :newrepo]
before_filter :find_repository, :only => [:edit, :update, :destroy, :committers]
before_filter :find_project_repository, :except => [:new, :create, :newcreate, :edit, :update, :destroy, :committers, :newrepo,:to_gitlab]
@@ -42,7 +42,7 @@ class RepositoriesController < ApplicationController
include RepositoriesHelper
helper :project_score
#@root_path = RepositoriesHelper::ROOT_PATH
-
+
rescue_from Redmine::Scm::Adapters::CommandFailed, :with => :show_error_command_failed
def new
@@ -62,8 +62,8 @@ class RepositoriesController < ApplicationController
end
end
-
-
+
+
def newrepo
scm = params[:repository_scm] || (Redmine::Scm::Base.all & Setting.enabled_scm).first
@repository = Repository.factory(scm)
@@ -76,23 +76,23 @@ class RepositoriesController < ApplicationController
render :layout => 'base_projects'
end
end
-
+
def fork
@repository_url = params[:repository_url]
-
+
# @repository.url
# system "htpasswd -mb "+@root_path+"user.passwd "+params[:repository][:identifier]+" "+@upasswd
# system "echo -e '"+params[:project_id]+"-"+params[:repository][:identifier]+"-write:"+
- # " "+params[:repository][:identifier]+"' >> "+@root_path+"group.passwd"
- system "git clone --bare "+@repository_url
+ # " "+params[:repository][:identifier]+"' >> "+@root_path+"group.passwd"
+ system "git clone --bare "+@repository_url
# system "mv "+@project_path+"/hooks/post-update{.sample,}"
# system "chmod a+x "+@project_path+"/hooks/post-update"
# system "."+@project_path+"/hooks/post-update"
# system "echo -e 'Allow from all \n Order Deny,Allow \n "+
- # " \n"+
- # "Require group "+params[:project_id]+"-"+params[:repository][:identifier]+"-write \n "+
- # " \n ' >>"+
- # @project_path+"/.htaccess"
+ # " \n"+
+ # "Require group "+params[:project_id]+"-"+params[:repository][:identifier]+"-write \n "+
+ # " \n ' >>"+
+ # @project_path+"/.htaccess"
flash[:notice] = l(:label_notice_fork_successed)
@repositories = @project.repositories
render :action => 'show', :layout => 'base_projects'
@@ -139,13 +139,12 @@ update
)
@project.gpid = gproject.id
@project.save!
-
redirect_to settings_project_url(@project, :tab => 'repositories')
else
redirect_to settings_project_url(@project, :tab => 'repositories',:repository_error_message=>@repository.errors.full_messages)
end
end
-
+
def edit
end
@@ -190,11 +189,11 @@ update
flash[:notice] = l(:notice_successful_update)
redirect_to settings_project_url(@project, :tab => 'repositories')
elsif request.get?
- respond_to do |format|
- format.html{
- render :layout => "base_projects"
- }
- end
+ respond_to do |format|
+ format.html{
+ render :layout => "base_projects"
+ }
+ end
end
@@ -251,7 +250,7 @@ update
@entries ? render(:partial => 'dir_list_content') : render(:nothing => true)
else
#Modified by young
- # (show_error_not_found; return) unless @entries
+ # (show_error_not_found; return) unless @entries
@changesets = @repository.latest_changesets(@path, @rev)
@properties = @repository.properties(@path, @rev)
@repositories = @project.repositories
@@ -259,7 +258,7 @@ update
project_path_cut = RepositoriesHelper::PROJECT_PATH_CUT
ip = RepositoriesHelper::REPO_IP_ADDRESS
@repos_url = "http://"+@repository.login.to_s+"_"+@repository.identifier.to_s+"@"+ip.to_s+
- @repository.url.slice(project_path_cut, @repository.url.length).to_s
+ @repository.url.slice(project_path_cut, @repository.url.length).to_s
if @course_tag == 1
render :action => 'show', :layout => 'base_courses'
else
@@ -285,10 +284,10 @@ update
per_page_option,
params['page']
@changesets = @repository.changesets.
- limit(@changeset_pages.per_page).
- offset(@changeset_pages.offset).
- includes(:user, :repository, :parents).
- all
+ limit(@changeset_pages.per_page).
+ offset(@changeset_pages.offset).
+ includes(:user, :repository, :parents).
+ all
respond_to do |format|
format.html { render :layout => 'base_projects' }
@@ -314,8 +313,8 @@ update
@content = @repository.cat(@path, @rev)
(show_error_not_found; return) unless @content
if is_raw ||
- (@content.size && @content.size > Setting.file_max_size_displayed.to_i.kilobyte) ||
- ! is_entry_text_data?(@content, @path)
+ (@content.size && @content.size > Setting.file_max_size_displayed.to_i.kilobyte) ||
+ ! is_entry_text_data?(@content, @path)
# Force the download
send_opt = { :filename => filename_for_content_disposition(@path.split('/').last) }
send_type = Redmine::MimeType.of(@path)
@@ -398,8 +397,8 @@ update
filename = "changeset_r#{@rev}"
filename << "_r#{@rev_to}" if @rev_to
send_data @diff.join, :filename => "#{filename}.diff",
- :type => 'text/x-patch',
- :disposition => 'attachment'
+ :type => 'text/x-patch',
+ :disposition => 'attachment'
else
@diff_type = params[:type] || User.current.pref[:diff_type] || 'inline'
@diff_type = 'inline' unless %w(inline sbs).include?(@diff_type)
@@ -410,7 +409,7 @@ update
User.current.preference.save
end
@cache_key = "repositories/diff/#{@repository.id}/" +
- Digest::MD5.hexdigest("#{@path}-#{@rev}-#{@rev_to}-#{@diff_type}-#{current_language}")
+ Digest::MD5.hexdigest("#{@path}-#{@rev}-#{@rev_to}-#{@diff_type}-#{current_language}")
unless read_fragment(@cache_key)
@diff = @repository.diff(@path, @rev, @rev_to)
unless @diff
@@ -437,16 +436,16 @@ update
def graph
data = nil
case params[:graph]
- when "commits_per_month"
- data = graph_commits_per_month(@repository)
- when "commits_per_author"
- data = graph_commits_per_author(@repository)
- when "author_commits_per_month"
- data = graph_author_commits_per_month(@repository)
- when "author_commits_six_month"
- data = author_commits_six_month(@repository)
- when "author_code_six_months"
- data = author_code_six_month(@repository)
+ when "commits_per_month"
+ data = graph_commits_per_month(@repository)
+ when "commits_per_author"
+ data = graph_commits_per_author(@repository)
+ when "author_commits_per_month"
+ data = graph_author_commits_per_month(@repository)
+ when "author_commits_six_month"
+ data = author_commits_six_month(@repository)
+ when "author_code_six_months"
+ data = author_code_six_month(@repository)
end
if data
headers["Content-Type"] = "image/svg+xml"
@@ -526,14 +525,14 @@ update
@date_from = @date_to << 11
@date_from = Date.civil(@date_from.year, @date_from.month, 1)
commits_by_day = Changeset.count(
- :all, :group => :commit_date,
- :conditions => ["repository_id = ? AND commit_date BETWEEN ? AND ?", repository.id, @date_from, @date_to])
+ :all, :group => :commit_date,
+ :conditions => ["repository_id = ? AND commit_date BETWEEN ? AND ?", repository.id, @date_from, @date_to])
commits_by_month = [0] * 12
commits_by_day.each {|c| commits_by_month[(@date_to.month - c.first.to_date.month) % 12] += c.last }
changes_by_day = Change.count(
- :all, :group => :commit_date, :include => :changeset,
- :conditions => ["#{Changeset.table_name}.repository_id = ? AND #{Changeset.table_name}.commit_date BETWEEN ? AND ?", repository.id, @date_from, @date_to])
+ :all, :group => :commit_date, :include => :changeset,
+ :conditions => ["#{Changeset.table_name}.repository_id = ? AND #{Changeset.table_name}.commit_date BETWEEN ? AND ?", repository.id, @date_from, @date_to])
changes_by_month = [0] * 12
changes_by_day.each {|c| changes_by_month[(@date_to.month - c.first.to_date.month) % 12] += c.last }
@@ -541,26 +540,26 @@ update
12.times {|m| fields << month_name(((Date.today.month - 1 - m) % 12) + 1)}
graph = SVG::Graph::Bar.new(
- :height => 300,
- :width => 600,
- :fields => fields.reverse,
- :stack => :side,
- :scale_integers => true,
- :step_x_labels => 2,
- :show_data_values => true,
- :graph_title => l(:label_commits_per_month),
- :show_graph_title => true
+ :height => 300,
+ :width => 600,
+ :fields => fields.reverse,
+ :stack => :side,
+ :scale_integers => true,
+ :step_x_labels => 2,
+ :show_data_values => true,
+ :graph_title => l(:label_commits_per_month),
+ :show_graph_title => true
)
# 具状图
graph.add_data(
- :data => commits_by_month[0..11].reverse,
- :title => l(:label_revision_plural)
+ :data => commits_by_month[0..11].reverse,
+ :title => l(:label_revision_plural)
)
graph.add_data(
- :data => changes_by_month[0..11].reverse,
- :title => l(:label_change_plural)
+ :data => changes_by_month[0..11].reverse,
+ :title => l(:label_change_plural)
)
graph.burn
@@ -585,23 +584,23 @@ update
fields = fields.collect {|c| c.gsub(%r{<.+@.+>}, '') }
graph = SVG::Graph::BarHorizontal.new(
- :height => 400,
- :width => 600,
- :fields => fields,
- :stack => :side,
- :scale_integers => true,
- :show_data_values => true,
- :rotate_y_labels => false,
- :graph_title => l(:label_commits_per_author),
- :show_graph_title => true
+ :height => 400,
+ :width => 600,
+ :fields => fields,
+ :stack => :side,
+ :scale_integers => true,
+ :show_data_values => true,
+ :rotate_y_labels => false,
+ :graph_title => l(:label_commits_per_author),
+ :show_graph_title => true
)
graph.add_data(
- :data => commits_data,
- :title => l(:label_revision_plural)
+ :data => commits_data,
+ :title => l(:label_revision_plural)
)
graph.add_data(
- :data => changes_data,
- :title => l(:label_change_plural)
+ :data => changes_data,
+ :title => l(:label_change_plural)
)
graph.burn
end
@@ -612,7 +611,7 @@ update
@date_from = @date_to << 12
@date_from = Date.civil(@date_from.year, @date_from.month, @date_from.day)
commits_by_author = Changeset.count(:all, :group => :committer,
- :conditions => ["#{Changeset.table_name}.repository_id = ? AND #{Changeset.table_name}.commit_date BETWEEN ? AND ?", repository.id, @date_from, @date_to])
+ :conditions => ["#{Changeset.table_name}.repository_id = ? AND #{Changeset.table_name}.commit_date BETWEEN ? AND ?", repository.id, @date_from, @date_to])
commits_by_author = commits_by_author.to_a.sort! {|x, y| x.last <=> y.last}.last(25)
fields = commits_by_author.collect {|r| r.first}
diff --git a/app/controllers/school_controller.rb b/app/controllers/school_controller.rb
index 062b0fa34..d20a58b75 100644
--- a/app/controllers/school_controller.rb
+++ b/app/controllers/school_controller.rb
@@ -5,14 +5,18 @@ class SchoolController < ApplicationController
def upload
uploaded_io = params[:logo]
school_id ||= params[:id]
+ s1 = School.find(school_id)
unless uploaded_io.nil?
File.open(Rails.root.join('public', 'images', 'school', school_id.to_s+'.png'), 'wb') do |file|
file.write(uploaded_io.read)
end
- s1 = School.find(school_id)
+
s1.logo_link = '/images/school/'+school_id.to_s+'.png'
- s1.save
+
end
+ s1.name = params[:name] unless params[:name].blank?
+ s1.province = params[:province] unless params[:province].blank?
+ s1.save
redirect_to admin_schools_url(:school_name => params[:school_name])
end
@@ -121,16 +125,18 @@ class SchoolController < ApplicationController
end
end
if(condition == '')
- @school = School.all
+ @school = School.page((params[:page].to_i || 1) - 1).per(100)
+ @school_count = School.count
else
- @school = School.where("name like '%#{chinese.join("")}%' and pinyin like '%#{pinyin.join("")}%'").all
+ @school = School.where("name like '%#{chinese.join("")}%' and pinyin like '%#{pinyin.join("")}%'").page((params[:page].to_i || 1) - 1).per(100)
+ @school_count = School.where("name like '%#{chinese.join("")}%' and pinyin like '%#{pinyin.join("")}%'").count
end
result = []
# @school.each do |sc|
# result << {:value=>sc.name,:data=>sc.id}
# end
- render :json => @school.to_json
+ render :json =>{ :schools => @school,:count=>@school_count}.to_json
end
#添加学校
diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb
index 85c01bcbd..9393339a8 100644
--- a/app/controllers/student_work_controller.rb
+++ b/app/controllers/student_work_controller.rb
@@ -62,6 +62,9 @@ class StudentWorkController < ApplicationController
journals_for_teacher.each do |journal_for_teacher|
journal_for_teacher.update_attributes(:viewed => true)
end
+ #不能参与作业匿评消息状态更新
+ no_evaluation = CourseMessage.where("user_id =? and course_id =? and course_message_type =? and viewed =?", User.current.id, @homework.course, "NoEvaluation", 0)
+ no_evaluation.update_all(:viewed => true)
# 作品留言
# 消息end
#设置作业对应的forge_messages表的viewed字段
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 90fdbe837..ef3210719 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -128,12 +128,12 @@ class UsersController < ApplicationController
#课程相关消息
when 'homework'
- @message_alls = CourseMessage.where("course_message_type in ('HomeworkCommon','StudentWorksScore','JournalsForMessage') and user_id =?", @user).order("created_at desc")
+ @message_alls = CourseMessage.where("course_message_type in ('HomeworkCommon','StudentWorksScore','JournalsForMessage','NoEvaluation') and user_id =?", @user).order("created_at desc")
when 'course_message'
@message_alls = CourseMessage.where("course_message_type =? and user_id =?", "Message", @user).order("created_at desc")
when 'course_news'
# 课程通知包含发布的通知和回复的通知
- @message_alls = CourseMessage.where("course_message_type =? or course_message_type =?", "News", "Comment").where("user_id =?", @user).order("created_at desc")
+ @message_alls = CourseMessage.where("course_message_type in (?, ? ,?)", "News", "Comment", "Course").where("user_id =?", @user).order("created_at desc")
when 'poll'
@message_alls = CourseMessage.where("course_message_type =? and user_id =?", "Poll", @user).order("created_at desc")
@@ -145,7 +145,7 @@ class UsersController < ApplicationController
when 'forge_news'
@message_alls = ForgeMessage.where("forge_message_type in (?,?) and user_id =?", "News", "Comment", @user).order("created_at desc")
when 'apply'
- @message_alls = ForgeMessage.where("forge_message_type in ('ProjectInvite', 'AppliedProject') and user_id =?", @user).order("created_at desc")
+ @message_alls = ForgeMessage.where("forge_message_type in ('ProjectInvite', 'AppliedProject', 'JoinProject', 'RemoveFromProject') and user_id =?", @user).order("created_at desc")
#贴吧消息
when 'forum'
@@ -881,8 +881,8 @@ class UsersController < ApplicationController
@page = params[:page] ? params[:page].to_i + 1 : 0
user_project_ids = @user.projects.visible.empty? ? "(-1)" : "(" + @user.projects.visible.map{|project| project.id}.join(",") + ")"
user_course_ids = @user.courses.visible.empty? ? "(-1)" : "(" + @user.courses.visible.map{|course| course.id}.join(",") + ")"
- course_types = "('Message','News','HomeworkCommon','Poll')"
- project_types = "('Message','Issue')"
+ course_types = "('Message','News','HomeworkCommon','Poll','Course')"
+ project_types = "('Message','Issue','ProjectCreateInfo')"
principal_types = "JournalsForMessage"
if params[:type].present?
case params[:type]
diff --git a/app/models/course.rb b/app/models/course.rb
index 501d958e4..7288c3b3b 100644
--- a/app/models/course.rb
+++ b/app/models/course.rb
@@ -50,7 +50,9 @@ class Course < ActiveRecord::Base
validates_format_of :name,:with =>/^[^ ]+[a-zA-Z0-9_\u4e00-\u9fa5\s\S]+$/
validates_length_of :description, :maximum => 10000
before_save :self_validate
- after_create :create_board_sync, :act_as_course_activity
+ # 公开课程变成私有课程,所有资源都变成私有
+ after_update :update_files_public
+ after_create :create_board_sync, :act_as_course_activity, :act_as_course_message
before_destroy :delete_all_members
safe_attributes 'extra',
@@ -212,6 +214,14 @@ class Course < ActiveRecord::Base
def self_validate
end
+
+ def update_files_public
+ unless self.is_public?
+ self.attachments.each do |a|
+ a.update_attributes(:is_public => false)
+ end
+ end
+ end
# 创建课程讨论区
def create_board_sync
@@ -321,6 +331,10 @@ class Course < ActiveRecord::Base
self.course_acts << CourseActivity.new(:user_id => self.tea_id,:course_id => self.id)
end
+ #创建课程后,给该用户发送消息
+ def act_as_course_message
+ self.course_messages << CourseMessage.new(:user_id => self.tea_id, :course_id => self.id, :viewed => false)
+ end
#项目与课程分离后,很多课程的名称等信息为空,这些数据信息存储在项目表中!!就是数据兼容的问题
#def name
# read_attribute('name') || Project.find_by_identifier(self.extra).try(:name)
diff --git a/app/models/student_work.rb b/app/models/student_work.rb
index cd4d81a32..700613792 100644
--- a/app/models/student_work.rb
+++ b/app/models/student_work.rb
@@ -12,6 +12,7 @@ class StudentWork < ActiveRecord::Base
before_destroy :delete_praise
before_save :set_program_score, :set_src
+ after_create :act_as_message
acts_as_attachable
def delete_praise
@@ -136,4 +137,11 @@ class StudentWork < ActiveRecord::Base
end
end
end
+
+ def act_as_message
+ if self.created_at > self.homework_common.end_time + 1
+ CourseMessage.create(:user_id => self.user_id, :course_id => self.homework_common.course_id,
+ :course_message_id => self.id, :course_message_type => 'NoEvaluation',:viewed => false)
+ end
+ end
end
diff --git a/app/views/boards/_course_new.html.erb b/app/views/boards/_course_new.html.erb
index a5cbc1c1e..61bbb85d2 100644
--- a/app/views/boards/_course_new.html.erb
+++ b/app/views/boards/_course_new.html.erb
@@ -4,17 +4,19 @@
-
+ <%if User.current.member_of_course?(course)%>
+
<%= f.check_box :sticky, :value => topic.sticky%>
<%= label_tag 'message_sticky', l(:label_board_sticky) %>
<%= f.check_box :locked, :value => topic.locked%>
<%= label_tag 'message_locked', l(:label_board_locked) %>
+ <% end %>
<%= text_area :quote,:quote,:style => 'display:none' %>
diff --git a/app/views/boards/_course_show.html.erb b/app/views/boards/_course_show.html.erb
index 5c0120f11..3fb97bd9d 100644
--- a/app/views/boards/_course_show.html.erb
+++ b/app/views/boards/_course_show.html.erb
@@ -41,7 +41,7 @@
<% if User.current.logged? %>
<%= labelled_form_for @message, :url =>{:controller=>'messages',:action => 'new', :board_id => @board.id, :is_board => 'true'},
:html => {:nhname=>'form',:multipart => true, :id => 'message-form'} do |f| %>
- <%= render :partial => 'course_new', :locals => {:f => f, :topic => @message, :edit_mode => false} %>
+ <%= render :partial => 'course_new', :locals => {:f => f, :topic => @message, :edit_mode => false, :course => course} %>
<% end %>
<% end %>
diff --git a/app/views/courses/_join_private_course.html.erb b/app/views/courses/_join_private_course.html.erb
index 8e1e1c421..01e04dcfd 100644
--- a/app/views/courses/_join_private_course.html.erb
+++ b/app/views/courses/_join_private_course.html.erb
@@ -71,7 +71,7 @@
密 码:
-
+
身 份:
教师
diff --git a/app/views/files/_attachement_list.html.erb b/app/views/files/_attachement_list.html.erb
index 50d14b7ee..4c631d22f 100644
--- a/app/views/files/_attachement_list.html.erb
+++ b/app/views/files/_attachement_list.html.erb
@@ -21,25 +21,46 @@
<% end %>
-
+<% checkBox = (@course.present? && @course.is_public?) ? 'public' : 'private'%>
<%= l(:label_browse) %>
-<%= file_field_tag 'attachments[dummy][file]',
- :id => '_file',
- :class => ie8? ? '':'file_selector',
- :multiple => true,
- :onchange => 'addInputFiles(this);',
- :style => ie8? ? '': 'display:none',
- :data => {
- :max_file_size => Setting.attachment_max_size.to_i.kilobytes,
- :max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
- :max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
- :upload_path => uploads_path(:format => 'js'),
- :description_placeholder => l(:label_optional_description),
- :field_is_public => l(:field_is_public),
- :are_you_sure => l(:text_are_you_sure),
- :file_count => l(:label_file_count),
- :delete_all_files => l(:text_are_you_sure_all)
- } %>
+<% if @course %>
+ <%= file_field_tag 'attachments[dummy][file]',
+ :id => '_file',
+ :class => ie8? ? '':'file_selector',
+ :multiple => true,
+ :onchange => 'addInputFilesCourseSource(this,"'+ checkBox.to_s+'");',
+ :style => ie8? ? '': 'display:none',
+ :data => {
+ :max_file_size => Setting.attachment_max_size.to_i.kilobytes,
+ :max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
+ :max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
+ :upload_path => uploads_path(:format => 'js'),
+ :description_placeholder => l(:label_optional_description),
+ :field_is_public => l(:field_is_public),
+ :are_you_sure => l(:text_are_you_sure),
+ :file_count => l(:label_file_count),
+ :delete_all_files => l(:text_are_you_sure_all)
+ } %>
+<% else %>
+ <%= file_field_tag 'attachments[dummy][file]',
+ :id => '_file',
+ :class => ie8? ? '':'file_selector',
+ :multiple => true,
+ :onchange => 'addInputFiles(this);',
+ :style => ie8? ? '': 'display:none',
+ :data => {
+ :max_file_size => Setting.attachment_max_size.to_i.kilobytes,
+ :max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
+ :max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
+ :upload_path => uploads_path(:format => 'js'),
+ :description_placeholder => l(:label_optional_description),
+ :field_is_public => l(:field_is_public),
+ :are_you_sure => l(:text_are_you_sure),
+ :file_count => l(:label_file_count),
+ :delete_all_files => l(:text_are_you_sure_all)
+ } %>
+<% end %>
+
diff --git a/app/views/files/_course_list.html.erb b/app/views/files/_course_list.html.erb
index 9e88cb2fd..4cc249c20 100644
--- a/app/views/files/_course_list.html.erb
+++ b/app/views/files/_course_list.html.erb
@@ -33,9 +33,16 @@
<%= link_to("选入我的其他课程",quote_resource_show_course_file_path(@course,file),:class => "f_l re_select c_lorange",:remote => true) if has_course?(User.current,file) %>
<% if delete_allowed && file.container_id == @course.id && file.container_type == "Course" %>
-
- <%= link_to (file.is_public? ? "公开":"私有"), update_file_dense_attachments_path(:attachmentid=>file.id,:newtype=>(file.is_public? ? 0:1)),:remote=>true,:class=>"f_l re_open c_blue",:method => :post %>
-
+ <% if @course.is_public? %>
+
+ <%= link_to (file.is_public? ? "公开":"私有"), update_file_dense_attachments_path(:attachmentid=>file.id,:newtype=>(file.is_public? ? 0:1)),:remote=>true,:class=>"f_l re_open c_blue",:method => :post %>
+
+ <% else %>
+
+ 私有
+
+ <% end %>
+
<% else %>
<% end %>
diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb
index d0125cd3b..0531ea9e7 100644
--- a/app/views/my/account.html.erb
+++ b/app/views/my/account.html.erb
@@ -527,7 +527,7 @@
}
function changeValue(value,data){
//console.log(value+","+data)
- $("input[name='province']").val(value);
+ $("input[name='province']").val(value);
$("input[name='occupation']").val(data);
$("#search_school_result_list").hide();
$("#hint").hide();
@@ -542,35 +542,73 @@
});
}
var lastSearchCondition = '';
+ var page = 1; //唯一控制页码 变量
+ var count = 0; //查询结果的总量
+ var maxPage = 0 ;//最大页面值
$(function() {
-// $("input[name='province']").keydown(function(e){
-// if(e.keyCode == 13 && $("#search_school_result_list").css('display') == 'block'){
-// str = $("#search_school_result_list").children().eq(0).attr('onclick').match(/\(.*\)/)[0]
-//
-// str = str.replace(/\(/,'').replace(/\)/,'');
-// arr = str.split(',');
-// id = arr[1].replace(/\'/,'')
-// name = arr.replace(/\'/,'')
-// changeValue(name,id);
-// return false;
-// }
-// });
+ $("#search_school_result_list").scroll(function(e){
+ nScrollHight = $(this)[0].scrollHeight;
+ nScrollTop = $(this)[0].scrollTop;
+ var nDivHight = $(this).height();
+ if(nScrollTop + nDivHight >= nScrollHight) //到底部了,
+ {
+ //判断页码是否是最大值,如果是的,就不去请求了
+ if(page >= maxPage){
+ return;
+ }else{ //如果不是,那就请求下一页,请求数据处理
+ page ++;
+ $.ajax({
+ url: '<%= url_for(:controller => 'school',:action => 'on_search') %>' + '?name=' + $("input[name='province']").val() + '&page=' + page,
+ type: 'post',
+ success: function (data) {
+ schoolsResult = data.schools;
+ if (schoolsResult.length != undefined && schoolsResult.length != 0) {
+ var i = 0;
+ for (; i < schoolsResult.length; i++) {
+ link = '' + schoolsResult[i].school.name + ' ';
+ $("#search_school_result_list").append(link);
+ }
+ } else {
+
+ }
+ }
+ });
+ }
+
+ }
+ });
//查询学校
$("input[name='province']").on('input', function (e) {
- $("input[name='occupation']").val(''); //一旦有输入就清空id。
- if($(e.target).val().trim() == lastSearchCondition && $(e.target).val().trim() != ''){
+ throttle(shcool_search_fn,window,e);
+ });
+
+ function throttle(method,context,e){
+ clearTimeout(method.tId);
+ method.tId=setTimeout(function(){
+ method.call(context,e);
+ },500);
+ }
+
+ function shcool_search_fn(e){
+
+ if($(e.target).val().trim() == lastSearchCondition && $(e.target).val().trim() != ''){//如果输入框没有改变或者输入框为空就返回
return;
}
+ $("input[name='occupation']").val(''); //一旦有输入就清空id。
lastSearchCondition = $(e.target).val().trim();
+ page = 1; //有新的搜索,页面重置为1
$.ajax({
- url: '<%= url_for(:controller => 'school',:action => 'on_search') %>' + '?name=' + e.target.value,
+ url: '<%= url_for(:controller => 'school',:action => 'on_search') %>' + '?name=' + e.target.value+'&page='+page,
type: 'post',
success: function (data) {
- if(data.length != undefined && data.length != 0) {
+ schoolsResult = data.schools;
+ count = data.count;
+ maxPage = count % 100 + 1; //最大页码值
+ if(schoolsResult.length != undefined && schoolsResult.length != 0) {
var i = 0;
$("#search_school_result_list").html('');
- for (; i < data.length; i++) {
- link = '' + data[i].school.name + ' ';
+ for (; i < schoolsResult.length; i++) {
+ link = '' + schoolsResult[i].school.name + ' ';
$("#search_school_result_list").append(link);
}
$("#search_school_result_list").css('left', $(e.target).offset().left);
@@ -579,7 +617,7 @@
$("#search_school_result_list").show();
if($(e.target).val().trim() != '') {
str = e.target.value.length > 8 ? e.target.value.substr(0, 6)+"..." : e.target.value;
- $("#hint").html('找到了' + data.length + '个包含"' + str + '"的高校');
+ $("#hint").html('找到了' + count + '个包含"' + str + '"的高校');
$("#hint").show();
}else{
$("#hint").hide();
@@ -592,49 +630,53 @@
}
}
});
- });
+ }
$(document.body).click(function(e){
if($(e.target).attr("id") != 'search_school_result_list' && $(e.target).attr("id") != 'province')
{
$("#search_school_result_list").hide();
$("#hint").hide();
}
- })
- $("input[name='province']").on('focus', function (e) {
- if($(e.target).val() == ''){
- return;
- }
- $.ajax({
- url: '<%= url_for(:controller => 'school',:action => 'on_search') %>' + '?name=' + e.target.value,
- type: 'post',
- success: function (data) {
- if(data.length != undefined && data.length != 0) {
- var i = 0;
- $("#search_school_result_list").html('');
- for (; i < data.length; i++) {
- link = '' + data[i].school.name + ' ';
- $("#search_school_result_list").append(link);
- }
- $("#search_school_result_list").css('left', $(e.target).offset().left);
- $("#search_school_result_list").css('top', $(e.target).offset().top + 28);
- $("#search_school_result_list").css("position", "absolute");
- $("#search_school_result_list").show();
- if ($(e.target).val().trim() != '') {
- str = e.target.value.length > 8 ? e.target.value.substr(0, 6) + "..." : e.target.value;
- $("#hint").html('找到了' + data.length + '个包含"' + str + '"的高校');
- $("#hint").show();
- } else {
- $("#hint").hide();
- }
- }else {
- $("#search_school_result_list").html('');
- str = e.target.value.length > 4 ? e.target.value.substr(0, 4)+"..." : e.target.value;
- $("#hint").html('没有找到包含"'+str+'"的高校,创建高校 ');
- $("#hint").show();
- }
- }
- });
});
+// $("input[name='province']").on('focus', function (e) {
+// if($(e.target).val() == ''){ //
+// return;
+// }
+// if( $("input[name='occupation']").val() != ''){ //如果已经有id了。肯定存在,不用去找了。
+// return;
+// }
+//
+// $.ajax({
+// url: '<%#= url_for(:controller => 'school',:action => 'on_search') %>' + '?name=' + e.target.value,
+// type: 'post',
+// success: function (data) {
+// if(data.length != undefined && data.length != 0) {
+// var i = 0;
+// $("#search_school_result_list").html('');
+// for (; i < data.length; i++) {
+// link = '' + data[i].school.name + ' ';
+// $("#search_school_result_list").append(link);
+// }
+// $("#search_school_result_list").css('left', $(e.target).offset().left);
+// $("#search_school_result_list").css('top', $(e.target).offset().top + 28);
+// $("#search_school_result_list").css("position", "absolute");
+// $("#search_school_result_list").show();
+// if ($(e.target).val().trim() != '') {
+// str = e.target.value.length > 8 ? e.target.value.substr(0, 6) + "..." : e.target.value;
+// $("#hint").html('找到了' + data.length + '个包含"' + str + '"的高校');
+// $("#hint").show();
+// } else {
+// $("#hint").hide();
+// }
+// }else {
+// $("#search_school_result_list").html('');
+// str = e.target.value.length > 4 ? e.target.value.substr(0, 4)+"..." : e.target.value;
+// $("#hint").html('没有找到包含"'+str+'"的高校,创建高校 ');
+// $("#hint").show();
+// }
+// }
+// });
+// });
// $("#province").leanModal({top: 100, closeButton: ".modal_close"});
@@ -658,8 +700,10 @@
<% if( !@act.nil? && @act == 'password') %>
$("#users_tb_2").click();
<% end %>
- $('#my_account_form_link').click(function(){
+ $('#my_account_form_link').click(function(e){
if( $("input[name='province']").val().trim() != '' && $("input[name='occupation']").val().trim() == ''){ //学校名字和id不对的话
+ $("#hint").html('学校必须是从下拉列表中选择的,不能手动修改 ').show();
+ e.stopImmediatePropagation();
return;
}
$('#my_account_form_btn').click();
diff --git a/app/views/school/upload_logo.html.erb b/app/views/school/upload_logo.html.erb
index 26da7e081..01071fb81 100644
--- a/app/views/school/upload_logo.html.erb
+++ b/app/views/school/upload_logo.html.erb
@@ -11,18 +11,66 @@ function showPreview(source) {
}
-<%= form_tag(upload_school_path(@school.id),method: "post", multipart: true) do %>
+<%= form_tag(upload_school_path(@school.id),method: "post", multipart: true,:id => "school_form") do %>
<%#= text_field_tag 'school'%>
-
+
<%= image_tag(@school.logo_link, id: "avatar_image", :class=>"school_avatar")%>
-
上传图片
+
上传图片
<%= file_field_tag 'logo',:style => "display:none;", :id => "file", :onchange => "showPreview(this)"%>
+
学校名称:
+
学校省份:
+
+ --请选择省份--
+ >北京
+ >上海
+ >广东
+ >江苏
+ >浙江
+ >重庆
+ >安徽
+ >福建
+ >甘肃
+ >广西
+ >贵州
+ >海南
+ >河北
+ >黑龙江
+ >河南
+ >湖北
+ >湖南
+ >江西
+ >吉林
+ >辽宁
+ >内蒙古
+ >宁夏
+ >青海
+ >山东
+ >山西
+ >陕西
+ >四川
+ >天津
+ >新疆
+ >西藏
+ >云南
+ >香港特别行政区
+ >澳门特别行政区
+ >台湾
+ >海外
+
+
- <%= submit_tag('上传') %>
- <%= submit_tag('取消') %>
+
+
+ <%#= submit_tag('提交',:class=>'mr5') %>
+ <%#= submit_tag('取消') %>
<% end %>
+
diff --git a/app/views/student_work/_show.html.erb b/app/views/student_work/_show.html.erb
index 2aa14be71..cfc4129a8 100644
--- a/app/views/student_work/_show.html.erb
+++ b/app/views/student_work/_show.html.erb
@@ -45,7 +45,7 @@
尚未提交附件
<% else%>
- <%= render :partial => 'work_attachments', :locals => {:attachments => @work.attachments} %>
+ <%= render :partial => 'work_attachments_status', :locals => {:attachments => @work.attachments, :status => @homework.homework_detail_manual.comment_status} %>
<% end%>
diff --git a/app/views/student_work/_work_attachments_status.html.erb b/app/views/student_work/_work_attachments_status.html.erb
new file mode 100644
index 000000000..e8d4f144b
--- /dev/null
+++ b/app/views/student_work/_work_attachments_status.html.erb
@@ -0,0 +1,8 @@
+<% attachments.each_with_index do |attachment,i| %>
+
+ <%= link_to_short_attachment attachment, :class => 'link_file_a fl', :download => true -%>
+ <%= link_to(' '.html_safe, attachment_path(attachment, :format => 'js'), :method => 'delete', :remote => true, :title => '删除', :class => 'remove-upload fl', :confirm => l(:text_are_you_sure)) if attachment.id && User.current == attachment.author && status != 2 %>
+
(<%= number_to_human_size attachment.filesize %>)
+
+
+<% end -%>
\ No newline at end of file
diff --git a/app/views/users/_project_create.html.erb b/app/views/users/_project_create.html.erb
index d07cb4a2d..8e3b5a5dc 100644
--- a/app/views/users/_project_create.html.erb
+++ b/app/views/users/_project_create.html.erb
@@ -1,18 +1,27 @@
+<% project = Project.find(activity.act_id) %>
+<% user = User.find(project.user_id)%>
-
+
-
+ <%= link_to image_tag(url_to_avatar(user), :width => "50", :height => "50"), user_path(user), :alt => "用户头像" %>
+
-
-
-
-
-
截止时间:2015-08-20
+
+ <% if user.try(:realname) == ' ' %>
+ <%= link_to user, user_path(user), :class => "newsBlue mr15" %>
+ <% else %>
+ <%= link_to user.try(:realname), user_path(user), :class => "newsBlue mr15" %>
+ <% end %>
+ TO
+ <%= link_to project.to_s+" | 项目", project_path(project.id,:host=>Setting.host_course), :class => "newsBlue ml15" %>
-
(作业描述)系统中有多个ckeditor,且每个ckeditor的id未知,怎么样做到当光标聚焦某个ckeditor的文本框中,该编辑器的默认值应自动消失的处理;网络拓扑图开发;
-
+
+ <%= link_to project.name, project_path(project.id,:host=>Setting.host_course), :class => "postGrey" %>
+
+
+ 创建时间:<%= format_time(project.created_on) %>
+
+
diff --git a/app/views/users/_selector_for_messages.html.erb b/app/views/users/_selector_for_messages.html.erb
index e7884fc60..66f9ec7a3 100644
--- a/app/views/users/_selector_for_messages.html.erb
+++ b/app/views/users/_selector_for_messages.html.erb
@@ -19,7 +19,7 @@
<%= link_to "项目任务", user_message_path(User.current, :type => 'issue'), :class => "homepageTypePTask postTypeGrey" %>
<%= link_to "项目讨论", user_message_path(User.current, :type => 'forge_message'), :class => "homepagePostTypeForum postTypeGrey" %>
<%= link_to "项目新闻", user_message_path(User.current, :type => 'forge_news'), :class => "homepageTypePNews postTypeGrey" %>
- <%= link_to "用户申请", user_message_path(User.current, :type => 'apply'), :class => "homepageTypeUApply postTypeGrey" %>
+ <%= link_to "加入项目", user_message_path(User.current, :type => 'apply'), :class => "homepageTypeUApply postTypeGrey" %>
@@ -27,9 +27,9 @@
更多
- <%= link_to "全部",user_message_path(User.current), :class => "resourcesTypeAll postTypeGrey" %>
+ <%= link_to "所有消息",user_message_path(User.current), :class => "resourcesTypeAll postTypeGrey" %>
<%= link_to "未读消息", user_message_path(User.current, :type => 'unviewed'), :class => "homepageTypeUnread postTypeGrey" %>
- <%= link_to "系统消息", user_system_messages_path(User.current), :class => "homepageTypeSystem postTypeGrey" %>
+ <%= link_to "系统消息", user_system_messages_path(User.current, :type => 'system_messages'), :class => "homepageTypeSystem postTypeGrey" %>
<%= link_to "贴吧帖子", user_message_path(User.current, :type => 'forum'), :class => "homepageTypePost postTypeGrey" %>
<%= link_to "用户留言",user_message_path(User.current, :type => 'user_feedback'), :class => "homepageTypeUMessage postTypeGrey" %>
diff --git a/app/views/users/_user_activities.html.erb b/app/views/users/_user_activities.html.erb
index 042a62ae2..cc8a6c0f2 100644
--- a/app/views/users/_user_activities.html.erb
+++ b/app/views/users/_user_activities.html.erb
@@ -41,7 +41,8 @@
showNormalImage('activity_description_<%= user_activity.id %>');
});
- <% act= user_activity.act unless user_activity.act_type == "ProjectCreateInfo" %>
+ <% unless user_activity.act_type == "ProjectCreateInfo" %>
+ <% act= user_activity.act %>
<% case user_activity.container_type.to_s %>
<% when 'Course' %>
<% if act %>
@@ -54,6 +55,8 @@
<%= render :partial => 'course_message', :locals => {:activity => act,:user_activity_id =>user_activity.id,:first_user_activity =>first_user_activity,:page => page} %>
<% when 'Poll' %>
<%= render :partial => 'course_poll', :locals => {:activity => act, :user_activity_id => user_activity.id,:first_user_activity =>first_user_activity,:page => page} %>
+ <% when 'Course'%>
+ <%= render :partial => 'users/course_create', :locals => {:activity => act, :user_activity_id => act.id} %>
<% end %>
<% end %>
<% when 'Project' %>
@@ -63,6 +66,8 @@
<%= render :partial => 'project_issue', :locals => {:activity => act,:user_activity_id =>user_activity.id,:first_user_activity =>first_user_activity,:page => page} %>
<% when 'Message' %>
<%= render :partial => 'project_message', :locals => {:activity => act,:user_activity_id =>user_activity.id,:first_user_activity =>first_user_activity,:page => page} %>
+ <% when 'ProjectCreateInfo'%>
+ <%= render :partial => 'project_create', :locals => {:activity => act,:user_activity_id =>user_activity.id,:first_user_activity =>first_user_activity,:page => page} %>
<% end %>
<% end %>
<% when 'Principal' %>
@@ -73,6 +78,9 @@
<% end %>
<% end %>
<% end %>
+ <% else %>
+ <%= render :partial => 'project_create', :locals => {:activity => user_activity,:user_activity_id =>user_activity.id,:first_user_activity =>first_user_activity,:page => page} %>
+ <% end %>
<% end %>
<% end %>
diff --git a/app/views/users/_user_message_course.html.erb b/app/views/users/_user_message_course.html.erb
index d4b61e966..6c22976fd 100644
--- a/app/views/users/_user_message_course.html.erb
+++ b/app/views/users/_user_message_course.html.erb
@@ -37,25 +37,33 @@
<%= time_tag(ma.created_at).html_safe %>
<% end %>
- <% if ma.course_message_type == "HomeworkCommon" && ma.status.nil? %>
+ <% if ma.course_message_type == "HomeworkCommon" && ma.status.nil? && !ma.course_message.nil? %>
<%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
<%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
">发布了课程作业:
- <%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
- :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :onmouseover =>"message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
+ <% if !User.current.allowed_to?(:as_teacher, ma.course_message.course) && cur_user_works_for_homework(ma.course_message).nil? %>
+ <%= link_to ma.course_message.name, new_student_work_path(:homework => ma.course_message.id),
+ :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover =>"message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+ <% else %>
+ <%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
+ :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover => "message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+ <% end %>
+
<% if User.current.allowed_to?(:as_teacher,ma.course_message.course) %>
<%= User.current.lastname + User.current.firstname %>老师您好!
- <%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业:
+ <%= User.current.eql?(ma.course_message.user)?"您":(ma.course_message.user.show_name + "老师")%>刚刚发布了一个作业:
课程名称:<%= ma.course_message.course.name %>
- (<%= ma.course_message.course.term %>)
+ (<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)
作业标题:<%= ma.course_message.name %>
提交截止:<%= ma.course_message.end_time %> 24点
匿评开始:<%= ma.course_message.homework_detail_manual.evaluation_start %> 24点
@@ -66,9 +74,9 @@
您可以修改作业内容、评分规则、匿评过程等,谢谢!
<% else %>
-
<%= User.current.lastname + User.current.firstname %>同学你好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业:
+
<%= User.current.lastname + User.current.firstname %>同学您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业:
课程名称:<%= ma.course_message.course.name %>
- (<%= ma.course_message.course.term %>)
+ (<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)
作业标题:<%= ma.course_message.name %>
提交截止:<%= ma.course_message.end_time %> 24点
匿评关闭:<%= ma.course_message.homework_detail_manual.evaluation_end %> 24点
@@ -99,15 +107,15 @@
<%= User.current.lastname + User.current.firstname %>同学您好!
<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师发布的作业截止日期快到了:
-
课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)
+
课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)
作业标题:<%= ma.course_message.name %>
提交截止:<%= ma.course_message.end_time %> 24点
-
匿评关闭:<%= ma.course_message.homework_detail_manual.evaluation_end %> @ 24点
+
匿评关闭:<%= ma.course_message.homework_detail_manual.evaluation_end %> 24点
迟交扣分:<%= ma.course_message.late_penalty %>分
请同学们抓紧时间提交自己的作品,谢谢!
<% else %>
<%= User.current.lastname + User.current.firstname %>老师您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师发布的作业截止日期快到了:
-
课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)
+
课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)
作业标题:<%= ma.course_message.name %>
提交截止:<%= ma.course_message.end_time %> 24点
匿评开始:<%= ma.course_message.homework_detail_manual.evaluation_start %> 24点
@@ -142,7 +150,7 @@
<%= User.current.lastname + User.current.firstname %><%= User.current.allowed_to?(:as_teacher,ma.course_message.course) ? '老师' : '同学' %>您好!
<%= User.current.eql?(ma.course_message.user)?"您":(ma.course_message.user.lastname + ma.course_message.user.firstname+"老师") %>开启了匿评,作业详情如下:
-
课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)
+
课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)
作业标题:<%= ma.course_message.name %>
缺评扣分:<%= ma.course_message.homework_detail_manual.absence_penalty %>分
@@ -172,7 +180,7 @@
<%= User.current.lastname + User.current.firstname %><%= User.current.allowed_to?(:as_teacher,ma.course_message.course) ? '老师':'同学'%>您好!
<%= User.current.eql?(ma.course_message.user)?"您":(ma.course_message.user.lastname + ma.course_message.user.firstname+"老师") %>关闭了匿评,作业详情如下:
-
课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)
+
课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年'+ ma.course_message.course.term %>)
作业标题:<%= ma.course_message.name %>
<%= time_tag(ma.created_at).html_safe %>
@@ -201,7 +209,7 @@
失败原因:提交作品的人数低于2人
作业详情如下:
- 课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)
+ 课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.time.to_s + '年' + ma.course_message.course.term %>)
作业标题:<%= ma.course_message.name %>
提交截止:<%= ma.course_message.end_time%> 24点
@@ -288,7 +296,11 @@
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %>
-
课程名称:<%= ma.course.name %>(<%= ma.course.term %>)
+
+ <%= User.current.show_name %>同学您好!
+ <%= ma.course_message.reviewer_role == 3? "匿名用户" : (ma.course_message.user.show_name + "老师")%><%= ma.status == 0? "评阅了您的作品":"重新评阅了您的作品"%>。详情如下:
+
+
课程名称:<%= ma.course.name %>(<%= ma.course.time.to_s + '年'+ ma.course.term %>)
作业标题:<%=ma.course_message.student_work.homework_common.name %>
<% content = ma.content.gsub("作业评分:","").split(" 评语:")%>
@@ -302,7 +314,7 @@
本次作业将在<%= ma.course_message.student_work.homework_common.homework_detail_manual.evaluation_end %> 24点结束匿评,到时您将可以看到所有其他同学的作品啦!大家可以进一步互相学习。
- 期待你取得更大的进步!
+ 期待您取得更大的进步!
<% end %>
@@ -348,15 +360,72 @@
:onmouseout => "message_titile_hide($(this))" %>
+
+ <%= User.current.show_name %>老师您好!
+ <%= ma.course_message.user.show_name%><%= ma.course_message.user.allowed_to?(:as_teacher, ma.course)?"老师":"学生"%>回复了您的作品评论。详情如下:
+
回复内容:
<%= ma.course_message.notes %>
您的评论:
<%= ma.course_message.jour.comment %>
-
课程名称:<%= ma.course.name %>(<%= ma.course.term %>)
+
课程名称:<%= ma.course.name %>(<%= ma.course.time.to_s + '年'+ ma.course.term %>)
作业标题:<%=ma.course_message.jour.student_work.homework_common.name %>
<%= time_tag(ma.created_at).html_safe %>
<% end %>
<% end %>
+
+ <% if ma.course_message_type == "NoEvaluation" %>
+
+
+
+ ">迟交作业,不能参与作业匿评!
+
+ <% student_work = StudentWork.find(ma.course_message_id)%>
+
+ <%= link_to "由于迟交作业,您及您的作品都不能参与作业的匿评", student_work_index_path(:homework => student_work.homework_common_id),
+ :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover => "message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
+ <%= User.current.lastname + User.current.firstname %>
+ <%= User.current.allowed_to?(:as_teacher,student_work.homework_common.course) ? '老师':'同学'%>您好!由于迟交作业,您及您的作品都不能参与以下作业的匿评。作业详情如下:
+
+
课程名称:<%= student_work.homework_common.course.name %>(<%= student_work.homework_common.course.time.to_s + '年' + student_work.homework_common.course.term %>)
+
作业标题:<%=student_work.homework_common.name %>
+
提交截止:<%=student_work.homework_common.end_time %> 24:00
+
提交时间:<%=format_time(student_work.created_at) %>
+
+ <%= time_tag(ma.created_at).html_safe %>
+
+ <% end %>
+
+ <% if ma.course_message_type == "Course" %>
+
+
+
+ 系统提示
+ ">您成功创建了课程:
+
+
+ <%= link_to "课程名称:" + ma.course_message.name, course_path(ma.course_message),
+ :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover => "message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
+ <%= User.current.lastname + User.current.firstname %>老师您好!您成功创建了一个课程,详情如下:
+
+
课程名称:<%= ma.course_message.name %>
+
开课学期:<%= ma.course_message.time.to_s + '年' + ma.course_message.term %>
+
课程描述:
+
<%= ma.course_message.description.html_safe %>
+
学时总数:<%= ma.course_message.class_period%>
+
创建时间:<%= format_time(ma.course_message.created_at) %>
+
+ <%= time_tag(ma.created_at).html_safe %>
+
+ <% end %>
<% end %>
\ No newline at end of file
diff --git a/app/views/users/_user_message_forge.html.erb b/app/views/users/_user_message_forge.html.erb
index b93122bd2..9a9bec10d 100644
--- a/app/views/users/_user_message_forge.html.erb
+++ b/app/views/users/_user_message_forge.html.erb
@@ -20,6 +20,72 @@
<%= time_tag(ma.created_at).html_safe %>
<% end %>
+
+ <% if ma.forge_message_type == "JoinProject" %>
+
+
+ <%=link_to image_tag(url_to_avatar(User.find(ma.forge_message_id)), :width => "30", :height => "30"), user_path(ma.forge_message_id) %>
+
+
+ <%=link_to User.find(ma.forge_message_id), user_path(User.find(ma.forge_message_id)), :class => "newsBlue homepageNewsPublisher" %>
+ ">将您加入了项目:
+
+
+ <%= link_to ma.project, project_member_path(ma.project), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover => "message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
+ <% if ma.project.is_public? || User.current.member_of?(ma.project) %>
+
+ 项目名称:<%= ma.project.name %>
+
+
+
+ 项目描述:<%= ma.project.description %>
+
+ <% else %>
+
+ 您已经被移出该私有项目,非项目成员没有权限访问私有项目
+
+ <% end %>
+
+ <%= time_tag(ma.created_at).html_safe %>
+
+ <% end %>
+
+ <% if ma.forge_message_type == "RemoveFromProject" %>
+
+
+ <%=link_to image_tag(url_to_avatar(User.find(ma.forge_message_id)), :width => "30", :height => "30"), user_path(ma.forge_message_id) %>
+
+
+ <%=link_to User.find(ma.forge_message_id), user_path(User.find(ma.forge_message_id)), :class => "newsBlue homepageNewsPublisher" %>
+ ">将您移出了项目:
+
+
+ <%= link_to ma.project, member_project_path(ma.project), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover => "message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
+ <% if ma.project.is_public? || User.current.member_of?(ma.project) %>
+
+ 项目名称:<%= ma.project.name %>
+
+
+
+ 项目描述:<%= ma.project.description %>
+
+ <% else %>
+
+ 您已经被移出该私有项目,非项目成员没有权限访问私有项目
+
+ <% end %>
+
+ <%= time_tag(ma.created_at).html_safe %>
+
+ <% end %>
<% if ma.forge_message_type == "ProjectInvite" %>
<% inviter = User.find(ma.forge_message_id) %>
@@ -29,7 +95,7 @@
<%=link_to inviter, user_path(inviter), :class => "newsBlue homepageNewsPublisher" %>
- '>邀请你加入项目
+ '>邀请你加入项目:
<% if ma.user.member_of?(ma.project) %>
diff --git a/db/migrate/20151020013352_update_attachment.rb b/db/migrate/20151020013352_update_attachment.rb
new file mode 100644
index 000000000..3e1161c09
--- /dev/null
+++ b/db/migrate/20151020013352_update_attachment.rb
@@ -0,0 +1,23 @@
+class UpdateAttachment < ActiveRecord::Migration
+ def up
+ count = Attachment.all.count / 30 + 2
+ transaction do
+ for i in 1 ... count do i
+ Attachment.page(i).per(30).each do |attachment|
+ if attachment.container_type == 'Course'
+ course = attachment.course
+ if course
+ if course.is_public == 0
+ attachment.is_public = 0
+ attachment.save
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+
+ def down
+ end
+end
diff --git a/db/migrate/20151020014759_delete_null_course_activity.rb b/db/migrate/20151020014759_delete_null_course_activity.rb
new file mode 100644
index 000000000..0d7b11693
--- /dev/null
+++ b/db/migrate/20151020014759_delete_null_course_activity.rb
@@ -0,0 +1,17 @@
+class DeleteNullCourseActivity < ActiveRecord::Migration
+ def up
+ count = CourseActivity.all.count / 30 + 2
+ transaction do
+ for i in 1 ... count do i
+ CourseActivity.page(i).per(30).each do |activity|
+ unless activity.course_act
+ activity.destroy
+ end
+ end
+ end
+ end
+ end
+
+ def down
+ end
+end
diff --git a/db/migrate/20151020021234_update_course_activity.rb b/db/migrate/20151020021234_update_course_activity.rb
new file mode 100644
index 000000000..595b0d333
--- /dev/null
+++ b/db/migrate/20151020021234_update_course_activity.rb
@@ -0,0 +1,23 @@
+class UpdateCourseActivity < ActiveRecord::Migration
+ def up
+ count = CourseActivity.all.count / 30 + 2
+ transaction do
+ for i in 1 ... count do i
+ CourseActivity.page(i).per(30).each do |activity|
+ if activity.course_act
+ if activity.course_act_type == 'Poll'
+ if activity.course_act.polls_status == 1
+ activity.destroy
+ end
+ end
+ else
+ activity.destroy
+ end
+ end
+ end
+ end
+ end
+
+ def down
+ end
+end
diff --git a/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb b/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb
index 377f2b112..682714b9b 100644
--- a/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb
+++ b/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb
@@ -140,6 +140,7 @@ module Redmine
end
end
end
+
if a && !attachment['is_public_checkbox']
a.is_public = false
elsif a && attachment['is_public_checkbox']
diff --git a/public/javascripts/attachments.js b/public/javascripts/attachments.js
index 9c32e41dc..329d0db5a 100644
--- a/public/javascripts/attachments.js
+++ b/public/javascripts/attachments.js
@@ -173,9 +173,9 @@ function ajaxUpload(file, attachmentId, fileSpan, inputEl) {
ajaxUpload.uploading++;
uploadBlob(file, $(inputEl).data('upload-path'), attachmentId, {
- loadstartEventHandler: onLoadstart.bind(progressSpan),
- progressEventHandler: onProgress.bind(progressSpan)
- })
+ loadstartEventHandler: onLoadstart.bind(progressSpan),
+ progressEventHandler: onProgress.bind(progressSpan)
+ })
.done(function(result) {
progressSpan.progressbar('value', 100).remove();
fileSpan.find('input.description, a').css('display', 'inline-block');
@@ -198,7 +198,7 @@ function ajaxUpload(file, attachmentId, fileSpan, inputEl) {
//gcm files count and add delete_all link
- //modify by yutao 2015-5-14 1ҳڶϴؼʱ˿bug ʸ֮ start
+ //modify by yutao 2015-5-14 ��1��ҳ����ڶ���ϴ��ؼ�ʱ�˿�������bug �ʸ�֮ start
var containerid = $(inputEl).data('containerid');
if (containerid == undefined) {
var count = $('#attachments_fields>span').length;
@@ -233,7 +233,7 @@ function ajaxUpload(file, attachmentId, fileSpan, inputEl) {
}));
}
}
- //modify by yutao 2015-5-14 1ҳڶϴؼʱ˿bug ʸ֮ end
+ //modify by yutao 2015-5-14 ��1��ҳ����ڶ���ϴ��ؼ�ʱ�˿�������bug �ʸ�֮ end
}
//gcm
@@ -260,24 +260,24 @@ function removeFile() {
}
//gcm delete all file
-//modify by yutao 2015-5-14 1ҳڶϴؼʱ˿bug ʸ֮ start
+//modify by yutao 2015-5-14 ��1��ҳ����ڶ���ϴ��ؼ�ʱ�˿�������bug �ʸ�֮ start
function removeAll(containerid) {
- if (confirm(deleteallfiles)) {
- if (containerid == undefined) {
- $(".remove-upload").removeAttr("data-confirm");
- $(".remove-upload").click();
- } else {
- var arr = $(".remove-upload").filter(function() {
- return $(this).data('containerid') == containerid;
- });
- arr.removeAttr("data-confirm");
- arr.click();
- }
+ if (confirm(deleteallfiles)) {
+ if (containerid == undefined) {
+ $(".remove-upload").removeAttr("data-confirm");
+ $(".remove-upload").click();
+ } else {
+ var arr = $(".remove-upload").filter(function() {
+ return $(this).data('containerid') == containerid;
+ });
+ arr.removeAttr("data-confirm");
+ arr.click();
}
- // return false;
}
- //modify by yutao 2015-5-14 1ҳڶϴؼʱ˿bug ʸ֮ end
- //gcm
+ // return false;
+}
+//modify by yutao 2015-5-14 ��1��ҳ����ڶ���ϴ��ؼ�ʱ�˿�������bug �ʸ�֮ end
+//gcm
function uploadBlob(blob, uploadUrl, attachmentId, options) {
@@ -467,3 +467,139 @@ $(function() {
}
});
});
+
+//课程课件
+function addInputFilesCourseSource(inputEl) {
+ checkBox = arguments[1] == 'public' ? false : true;
+ // var clearedFileInput = $(inputEl).clone().val('');
+ if (inputEl.files) {
+ // upload files using ajax
+ uploadAndAttachFilesCourseSource(inputEl.files, inputEl,checkBox);
+ // $(inputEl).remove();
+ } else {
+ // browser not supporting the file API, upload on form submission
+ var attachmentId;
+ var aFilename = inputEl.value.split(/\/|\\/);
+ var count = $('#attachments_fields>span').length;
+ attachmentId = addFile(inputEl, {
+ name: aFilename[aFilename.length - 1]
+ }, false);
+ if (attachmentId) {
+ $(inputEl).attr({
+ name: 'attachments[' + attachmentId + '][file]'
+ }).hide();
+ if (count <= 0) count = 1;
+ $('#upload_file_count').html("" + count + " " + $(inputEl).data('fileCount'));
+ }
+ }
+
+ //clearedFileInput.insertAfter('#attachments_fields');
+}
+
+function uploadAndAttachFilesCourseSource(files, inputEl,checkBox) {
+
+ var maxFileSize = $(inputEl).data('max-file-size');
+ var maxFileSizeExceeded = $(inputEl).data('max-file-size-message');
+
+ var sizeExceeded = false;
+ $.each(files, function() {
+ if (this.size && maxFileSize != null && this.size > parseInt(maxFileSize)) {
+ sizeExceeded = true;
+ }
+ });
+ if (sizeExceeded) {
+ window.alert(maxFileSizeExceeded);
+ } else {
+ $.each(files, function() {
+ addFileCourseSource(inputEl, this, true,checkBox);
+ });
+ }
+}
+
+function addFileCourseSource(inputEl, file, eagerUpload,checkBox) {
+
+ var attachments_frame = '#attachments_fields';
+ if ($(attachments_frame).children().length < 30) {
+ deleteallfiles = $(inputEl).data('deleteAllFiles');
+ var attachmentId = addFile.nextAttachmentId++;
+
+ var fileSpan = $('', {
+ 'id': 'attachments_' + attachmentId,
+ 'class': 'attachment'
+ });
+ //alert(checkBox);
+ if(checkBox){
+ fileSpan.append(
+ $(' ', {
+ 'type': 'text',
+ 'class': 'filename readonly',
+ 'name': 'attachments[' + attachmentId + '][filename]',
+ 'readonly': 'readonly'
+ }).val(file.name),
+ $(' ', {
+ 'type': 'text',
+ 'class': 'description',
+ 'name': 'attachments[' + attachmentId + '][description]',
+ 'maxlength': 254,
+ 'placeholder': $(inputEl).data('descriptionPlaceholder')
+ }).toggle(!eagerUpload),
+ $('', {
+ 'class': 'div_attachments',
+ 'name': 'div_' + 'attachments_' + attachmentId
+ })
+ ).appendTo('#attachments_fields');
+ }else {
+ fileSpan.append(
+ $('
', {
+ 'type': 'text',
+ 'class': 'filename readonly',
+ 'name': 'attachments[' + attachmentId + '][filename]',
+ 'readonly': 'readonly'
+ }).val(file.name),
+ $('
', {
+ 'type': 'text',
+ 'class': 'description',
+ 'name': 'attachments[' + attachmentId + '][description]',
+ 'maxlength': 254,
+ 'placeholder': $(inputEl).data('descriptionPlaceholder')
+ }).toggle(!eagerUpload),
+ $('
' + $(inputEl).data('fieldIsPublic') + ': ').attr({
+ 'class': 'ispublic-label'
+ }),
+ $('
', {
+ 'type': 'checkbox',
+ 'class': 'is_public_checkbox',
+ 'value': 1,
+ 'name': 'attachments[' + attachmentId + '][is_public_checkbox]',
+ checked: 'checked'
+ }).toggle(!eagerUpload),
+ $('
  ').attr({
+ 'href': "#",
+ 'class': 'remove-upload'
+ }).click(function () {
+ if (confirm($(inputEl).data('areYouSure'))) {
+ removeFile();
+ if (!eagerUpload) {
+ (function (e) {
+ reload(e);
+ })(fileSpan);
+ }
+ }
+
+ }).toggle(!eagerUpload),
+ $('
', {
+ 'class': 'div_attachments',
+ 'name': 'div_' + 'attachments_' + attachmentId
+ })
+ ).appendTo('#attachments_fields');
+ }
+
+ if (eagerUpload) {
+ ajaxUpload(file, attachmentId, fileSpan, inputEl);
+
+ }
+ return attachmentId;
+ }
+ return null;
+}
+addFileCourseSource.nextAttachmentId = 1;
\ No newline at end of file
diff --git a/public/javascripts/feedback.js b/public/javascripts/feedback.js
index fb3b35ca7..b30c8f91d 100644
--- a/public/javascripts/feedback.js
+++ b/public/javascripts/feedback.js
@@ -19,12 +19,12 @@
if(options.minStatue == "true"){
show_btn.css("float", options.float);
sideContent.css('width', 0);
- show_btn.css('width', 25);
+ show_btn.css('width', 28);
}
//close
closeBtn.bind("click",function(){
sideContent.animate({width: '0px'},"fast");
- show_btn.stop(true, true).delay(300).animate({ width: '25px'},"fast");
+ show_btn.stop(true, true).delay(300).animate({ width: '28px'},"fast");
cookiesave('minStatue','true','','','');
});
//show
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index a08c7760b..dbc91353b 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -8,6 +8,14 @@ h3, .wiki h2 {font-size: 15px; padding-left: 5px}
h4, .wiki h3 {font-size: 13px;}
h4 {border-bottom: 1px dotted #bbb;}
li{list-style-type:none;}
+
+/*Tim 151019*/
+.schoolName {border:1px solid #dddddd; outline: none; width: 180px; height: 22px;}
+.provinceSelect {border: 1px solid #dddddd; outline: none; color: #888888;}
+.submit_btn_s {background-color: #269ac9; color: #ffffff; padding: 2px 5px; border: none; border-radius: 3px; cursor: pointer;}
+.submit_btn_s:hover {background-color:#297fb8;}
+.cancel_btn {background-color: #c1c1c1; color: #ffffff; padding: 2px 5px; border: none; border-radius: 3px; cursor: pointer;}
+.cancel_btn:hover {background-color:#656565; }
/*huang*/
.hwork_input_news{ border:1px solid #64bdd9; height:22px; width:594px; background:#fff; margin-bottom:10px; padding:5px;}
@@ -2805,7 +2813,7 @@ img,embed{max-width: 100%;}
img.school_avatar {
background: rgb(245, 245, 245);
padding: 4px;
- border: 1px solid #e5dfc7;
+ border: 1px solid #eaeaea;
float: left;
display: block;
width: 100px;
diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css
index 8e41df7af..db02a0292 100644
--- a/public/stylesheets/courses.css
+++ b/public/stylesheets/courses.css
@@ -292,6 +292,7 @@ a.re_open{display:block; width:46px; border:1px solid #64bdd9; color:#64bdd9;
a:hover.re_open{ background:#64bdd9; color:#fff; text-decoration:none;}
a.re_de{ color:#6883b6; margin-left:15px;}
.re_con_box{ border-bottom:1px dashed #dadada; padding-bottom:10px; margin-bottom:10px;}
+span.re_open{display:block; width:46px; border:1px solid #64bdd9; color:#64bdd9; margin-left:10px;padding:1px 5px;text-align: center}
/* 作业列表 */
@@ -902,7 +903,7 @@ a:hover.BlueCirBtn{ background:#269ac9; color:#fff;}
.w720{width:721px;}
.w709{width: 709px;}
.w701{width: 701px;}
-.w704{width: 704px;}
+.w713{width: 713px;}
a.AnnexBtn{ background: url(images/homepage_icon2.png) 0px -343px no-repeat !important; height:20px; display:block; padding-left:20px; color:#888888;}
a:hover.AnnexBtn{background: url(images/homepage_icon2.png) -90px -343px no-repeat !important; color:#3598db;}
a.FilesBtn{ background: url(../images/homepage_icon2.png) 0px -373px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;}
diff --git a/public/stylesheets/images/post_image_list.png b/public/stylesheets/images/post_image_list.png
index 07636288d..001fd5df0 100644
Binary files a/public/stylesheets/images/post_image_list.png and b/public/stylesheets/images/post_image_list.png differ
diff --git a/public/themes/redpenny-master/stylesheets/application.css b/public/themes/redpenny-master/stylesheets/application.css
index 5a9ea3830..05c9ca244 100644
--- a/public/themes/redpenny-master/stylesheets/application.css
+++ b/public/themes/redpenny-master/stylesheets/application.css
@@ -1874,9 +1874,9 @@ div.tableline{
font-size: 12px;
color: #fff;
padding: 3px 9px;
- background: #15bccf;
+ background: #269ac9;
border-radius: 4px;
- border: 1px solid #15bccf;
+ border: 1px solid #269ac9;
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.2), 0px 1px 0px rgb(255, 255, 255);
cursor: pointer;