This commit is contained in:
moon 2014-11-21 17:00:14 +08:00
commit 600afdc6e0
86 changed files with 1018 additions and 273 deletions

View File

@ -141,6 +141,23 @@ class AttachmentsController < ApplicationController
end end
end end
def update_file_dense
@attachment = Attachment.find(params[:attachmentid])
if @attachment != nil
filedense = params[:newtype].to_s
if filedense == "1"
@attachment.is_public = 1
else
@attachment.is_public = 0
end
@attachment.save
@newfiledense = filedense
end
respond_to do |format|
format.js
end
end
def thumbnail def thumbnail
if @attachment.thumbnailable? && thumbnail = @attachment.thumbnail(:size => params[:size]) if @attachment.thumbnailable? && thumbnail = @attachment.thumbnail(:size => params[:size])
if stale?(:etag => thumbnail) if stale?(:etag => thumbnail)
@ -326,6 +343,35 @@ class AttachmentsController < ApplicationController
end end
end end
def add_exist_file_to_courses
file = Attachment.find(params[:file_id])
courses = params[:courses][:course]
courses.each do |course|
c = Course.find(course);
attach_copied_obj = file.copy
attach_copied_obj.tag_list.add(file.tag_list) # tag关联
attach_copied_obj.container = c
attach_copied_obj.created_on = Time.now
attach_copied_obj.author_id = User.current.id
attach_copied_obj.copy_from = file.copy_from.nil? ? file.id : file.copy_from
if attach_copied_obj.attachtype == nil
attach_copied_obj.attachtype = 4
end
@obj = c
@save_flag = attach_copied_obj.save
@save_message = attach_copied_obj.errors.full_messages
end
respond_to do |format|
format.js
end
rescue NoMethodError
@save_flag = false
@save_message = [] << l(:error_attachment_empty)
respond_to do |format|
format.js
end
end
private private
def find_project def find_project
@attachment = Attachment.find(params[:id]) @attachment = Attachment.find(params[:id])

View File

@ -807,6 +807,7 @@ class BidsController < ApplicationController
@bid.is_evaluation = params[:bid][:is_evaluation] @bid.is_evaluation = params[:bid][:is_evaluation]
@bid.proportion = params[:bid][:proportion] @bid.proportion = params[:bid][:proportion]
@bid.evaluation_num = params[:bid][:evaluation_num] @bid.evaluation_num = params[:bid][:evaluation_num]
@bid.open_anonymous_evaluation = params[:bid][:open_anonymous_evaluation]
@bid.reward_type = 3 @bid.reward_type = 3
# @bid.budget = params[:bid][:budget] # @bid.budget = params[:bid][:budget]
@bid.deadline = params[:bid][:deadline] @bid.deadline = params[:bid][:deadline]
@ -863,6 +864,7 @@ class BidsController < ApplicationController
@bid.is_evaluation = params[:bid][:is_evaluation] @bid.is_evaluation = params[:bid][:is_evaluation]
@bid.proportion = params[:bid][:proportion] @bid.proportion = params[:bid][:proportion]
@bid.evaluation_num = params[:bid][:evaluation_num] @bid.evaluation_num = params[:bid][:evaluation_num]
@bid.open_anonymous_evaluation = params[:bid][:open_anonymous_evaluation]
@bid.reward_type = 3 @bid.reward_type = 3
@bid.deadline = params[:bid][:deadline] @bid.deadline = params[:bid][:deadline]
@bid.budget = 0 @bid.budget = 0

View File

@ -512,6 +512,7 @@ class CoursesController < ApplicationController
def new_homework def new_homework
@homework = Bid.new @homework = Bid.new
@homework.safe_attributes = params[:bid] @homework.safe_attributes = params[:bid]
@homework.open_anonymous_evaluation = 1
if (User.current.logged? && User.current.member_of_course?(Course.find params[:id] )) if (User.current.logged? && User.current.member_of_course?(Course.find params[:id] ))
render :layout => 'base_courses' render :layout => 'base_courses'
else else

View File

@ -22,22 +22,55 @@ class FilesController < ApplicationController
menu_item :files menu_item :files
before_filter :find_project_by_project_id#, :except => [:getattachtype] before_filter :find_project_by_project_id#, :except => [:getattachtype]
before_filter :authorize, :except => [:getattachtype] before_filter :authorize, :except => [:getattachtype,:quote_resource_show,:search]
helper :sort helper :sort
include SortHelper include SortHelper
helper :project_score helper :project_score
def show_attachments obj def show_attachments obj
all_attachments = [] @all_attachments = []
obj.each do |container| obj.each do |container|
all_attachments += container.attachments @all_attachments += container.attachments
end end
@limit = 10 @limit = 10
@feedback_count = all_attachments.count @feedback_count = @all_attachments.count
@feedback_pages = Paginator.new @feedback_count, @limit, params['page'] @feedback_pages = Paginator.new @feedback_count, @limit, params['page']
@offset ||= @feedback_pages.offset @offset ||= @feedback_pages.offset
@curse_attachments = all_attachments[@offset, @limit] @curse_attachments_all = @all_attachments[@offset, @limit]
@curse_attachments = paginateHelper @all_attachments,10
end
def search
begin
@is_remote = true
q = "%#{params[:name].strip}%"
#(redirect_to stores_url, :notice => l(:label_sumbit_empty);return) if params[:name].blank?
if params[:insite]
@result = find_public_attache q
@searched_attach = paginateHelper @result,10
else
@result = find_course_attache q,@course
@searched_attach = paginateHelper @result,10
end
rescue Exception => e
#render 'stores'
redirect_to stores_url
end
end
def find_course_attache keywords,course
resultSet = Attachment.where("attachments.container_type = 'Course' And attachments.container_id = '#{course.id}' AND filename LIKE :like ", like: "%#{keywords}%").
reorder("created_on DESC")
end
def find_public_attache keywords
# StoresController#search 将每条文件都查出来,再次进行判断过滤。---> resultSet.to_a.map
# 此时内容不多速度还可但文件增长每条判断多则进行3-4次表连接。
# 现在还木有思路 药丸
resultSet = Attachment.where("attachments.container_type IS NOT NULL AND (is_public = 1 OR author_id = #{User.current.id}) AND filename LIKE :like ", like: "%#{keywords}%").
reorder("created_on DESC")
end end
def index def index
@ -48,7 +81,9 @@ class FilesController < ApplicationController
'size' => "#{Attachment.table_name}.filesize", 'size' => "#{Attachment.table_name}.filesize",
'downloads' => "#{Attachment.table_name}.downloads" 'downloads' => "#{Attachment.table_name}.downloads"
sort = "" sort = ""
@sort = ""
@order = ""
@is_remote = false
if params[:project_id] if params[:project_id]
@isproject = true @isproject = true
@ -113,7 +148,8 @@ class FilesController < ApplicationController
when "created_on" when "created_on"
attribute = "created_on" attribute = "created_on"
end end
@sort = order_by[0]
@order = order_by[1]
if order_by.count == 1 if order_by.count == 1
sort += "#{Attachment.table_name}.#{attribute} asc " sort += "#{Attachment.table_name}.#{attribute} asc "
elsif order_by.count == 2 elsif order_by.count == 2
@ -134,6 +170,10 @@ class FilesController < ApplicationController
end end
def quote_resource_show
@file = Attachment.find(params[:id])
end
def new def new
@versions = @project.versions.sort @versions = @project.versions.sort
@course_tag = @project.project_type @course_tag = @project.project_type

View File

@ -17,7 +17,6 @@
class IssuesController < ApplicationController class IssuesController < ApplicationController
layout 'base_projects'#Added by young layout 'base_projects'#Added by young
menu_item :new_issue, :only => [:new, :create]
default_search_scope :issues default_search_scope :issues
before_filter :find_issue, :only => [:show, :edit, :update] before_filter :find_issue, :only => [:show, :edit, :update]
@ -60,7 +59,7 @@ class IssuesController < ApplicationController
sort_update(@query.sortable_columns) sort_update(@query.sortable_columns)
@query.sort_criteria = sort_criteria.to_a @query.sort_criteria = sort_criteria.to_a
@project_base_tag = (params[:project_id] || @issue.project) ? 'base_projects':'base'#by young @project_base_tag = (params[:project_id] || @issue.project) ? 'base_projects':'base'
if @query.valid? if @query.valid?
case params[:format] case params[:format]

View File

@ -19,7 +19,7 @@ class MemosController < ApplicationController
@content = "#{ll(Setting.default_language, :text_user_wrote, @memo.author)} <br/> &nbsp; " @content = "#{ll(Setting.default_language, :text_user_wrote, @memo.author)} <br/> &nbsp; "
@content << @memo.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n") + "</blockquote>\n\n<br/>" @content << @memo.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n") + "</blockquote>\n\n<br/>"
@content = "<blockquote>" << @content @content = "<blockquote style='word-break: break-all;word-wrap: break-word;'>" << @content
#@content = "> #{ll(Setting.default_language, :text_user_wrote, @memo.author)}\n> " #@content = "> #{ll(Setting.default_language, :text_user_wrote, @memo.author)}\n> "
#@content << @memo.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n" #@content << @memo.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
#@content_html = textilizable(@content) #@content_html = textilizable(@content)

View File

@ -14,12 +14,14 @@ class TagsController < ApplicationController
include AttachmentsHelper include AttachmentsHelper
include ContestsHelper include ContestsHelper
include ActsAsTaggableOn::TagsHelper include ActsAsTaggableOn::TagsHelper
include TagsHelper
helper :projects helper :projects
helper :courses helper :courses
helper :tags helper :tags
include OpenSourceProjectsHelper include OpenSourceProjectsHelper
before_filter :require_admin,:only => [:delete,:show_all] before_filter :require_admin,:only => [:delete,:show_all]
before_filter :require_login,:only => [:tag_save]
# $selected_tags = Array.new # $selected_tags = Array.new
# $related_tags = Array.new # $related_tags = Array.new
@ -188,6 +190,83 @@ class TagsController < ApplicationController
end end
end end
# 只删除某个对象的该tag
def remove_tag_new
@obj = nil
@object_flag = nil
if request.get?
# 获取传过来的tag_id taggable_id 和 taggable_type,通过2者确定要删除tag的对象
@tag_name = params[:tag_name]
@tag_id = (ActsAsTaggableOn::Tag.find_by_name(@tag_name)).id
@taggable_id = params[:taggable_id] # 当做参数传时对象会变成字符串
@taggable_type = numbers_to_object_type(params[:taggable_type])
@obj = get_object(@taggable_id,params[:taggable_type])
@object_flag = params[:taggable_type]
# if can_remove_tag?(User.current,@taggable_id,@taggable_type)
@taggings = ActsAsTaggableOn::Tagging.find_by_tag_id_and_taggable_id_and_taggable_type(@tag_id,@taggable_id,@taggable_type)
unless @taggings.nil?
@taggings.delete
end
# 是否还有其他记录 引用了 tag_id
@tagging = ActsAsTaggableOn::Tagging.find_by_tag_id(@tag_id)
# 如果taggings表中记录已经不存在 那么检查tags表 作删除动作
if @tagging.nil?
@tag = ActsAsTaggableOn::Tag.find_by_id(@tag_id)
@tag.delete unless @tag.nil?
end
# end
end
end
def tag_save
@tags = params[:tag_for_save][:name]
@obj_id = params[:tag_for_save][:object_id]
@obj_flag = params[:tag_for_save][:object_flag]
case @obj_flag
when '1' then
@obj = User.find_by_id(@obj_id)
when '2' then
@obj = Project.find_by_id(@obj_id)
when '3' then
@obj = Issue.find_by_id(@obj_id)
when '4' then
@obj = Bid.find_by_id(@obj_id)
when '5' then
@obj = Forum.find_by_id(@obj_id)
when '6'
@obj = Attachment.find_by_id(@obj_id)
when '7' then
@obj = Contest.find_by_id(@obj_id)
when '8'
@obj = OpenSourceProject.find_by_id(@obj_id)
when '9'
@obj = Course.find_by_id(@obj_id)
else
@obj = nil
end
unless @obj.nil?
@obj.tag_list.add(@tags.split(","))
else
return
end
if @obj.save
logger.debug "#{__FILE__}:#{__LINE__} ===> #{@obj.to_json}"
else
logger.error "#{__FILE__}:#{__LINE__} ===> #{@obj.errors.try(:full_messages)}"
end
respond_to do |format|
format.js
format.html
end
end
private private
# 这里用来刷新搜索结果的区域 # 这里用来刷新搜索结果的区域
# 函数的返回值 前2字段用来处理获取其他tag和分页 另外4个返回值为过滤结果 # 函数的返回值 前2字段用来处理获取其他tag和分页 另外4个返回值为过滤结果
@ -308,4 +387,6 @@ class TagsController < ApplicationController
end end
end end
end end

View File

@ -177,6 +177,8 @@ module AttachmentsHelper
s.html_safe s.html_safe
end end
# Modified by Longjun # Modified by Longjun
# 有参数的方法要加() # 有参数的方法要加()
def private_filter(resultSet) def private_filter(resultSet)

View File

@ -328,7 +328,7 @@ module CoursesHelper
#当前用户是不是指定课程的学生 #当前用户是不是指定课程的学生
def is_cur_course_student course def is_cur_course_student course
#course.members.joins(:member_roles).where("member_roles.role_id IN (:role_id) and members.user_id = #{User.current.id}", {:role_id => StudentRoles}).count != 0 #course.members.joins(:member_roles).where("member_roles.role_id IN (:role_id) and members.user_id = #{User.current.id}", {:role_id => StudentRoles}).count != 0
!(User.current.allowed_to?(:as_teacher,course)) User.current.logged? && User.current.member_of_course?(course) && !(User.current.allowed_to?(:as_teacher,course))
#修改:能新建占位且不能新建任务的角色判定为学生 #修改:能新建占位且不能新建任务的角色判定为学生
#is_student = false #is_student = false
#@membership = User.current.memberships.all(:conditions => Project.visible_condition(User.current)) #@membership = User.current.memberships.all(:conditions => Project.visible_condition(User.current))

View File

@ -44,6 +44,16 @@ module FilesHelper
File.new(zipfile_name,'w+') File.new(zipfile_name,'w+')
end end
def courses_check_box_tags(name,courses,current_course,attachment)
s = ''
courses.each do |course|
if !(attachment.container_type && attachment.container_id == course.id) && is_course_teacher(User.current,course)
s << "<label>#{ check_box_tag name, course.id, false, :id => nil } #{h course.name}</label><br/>"
end
end
s.html_safe
end
# 判断指定的资源时候符合类型 # 判断指定的资源时候符合类型
def isTypeOk(attachment, type, contentType) def isTypeOk(attachment, type, contentType)
result = false result = false

View File

@ -30,7 +30,7 @@ class Forum < ActiveRecord::Base
def destroyable_by? user def destroyable_by? user
# user && user.logged? && Forum.find(self.forum_id).creator_id == user.id || user.admin? # user && user.logged? && Forum.find(self.forum_id).creator_id == user.id || user.admin?
user.admin? self.creator == user || user.admin?
end end
# Updates topic_count, memo_count and last_memo_id attributes for +board_id+ # Updates topic_count, memo_count and last_memo_id attributes for +board_id+

View File

@ -88,11 +88,11 @@ class Memo < ActiveRecord::Base
def editable_by? user def editable_by? user
# user && user.logged? || (self.author == usr && usr.allowed_to?(:edit_own_messages, project)) # user && user.logged? || (self.author == usr && usr.allowed_to?(:edit_own_messages, project))
user.admin? user.admin? || self.author == user
end end
def destroyable_by? user def destroyable_by? user
(user && user.logged? && (Forum.find(self.forum_id).creator_id == user.id) ) || user.admin? (user && self.author == user) || user.admin?
#self.author == user || user.admin? #self.author == user || user.admin?
end end

View File

@ -11,7 +11,7 @@
<body> <body>
<% email = @user.mail.split("@")[1] %> <% email = @user.mail.split("@")[1] %>
<div style="border: 1px solid #c0c0c0 ; width:850px;" > <div style="border: 1px solid #c0c0c0 ; width:850px; margin-top: 10px" >
<h3 style=" padding-bottom: 8px; margin-top:5px; border-bottom: 1px solid #c0c0c0;color:black; "> <h3 style=" padding-bottom: 8px; margin-top:5px; border-bottom: 1px solid #c0c0c0;color:black; ">
<span id = "jihuo" style=" margin-left: 4%;"></span>邮箱激活</h3> <span id = "jihuo" style=" margin-left: 4%;"></span>邮箱激活</h3>
@ -19,9 +19,10 @@
<div style="margin-left:auto; margin-right:auto"> <div style="margin-left:auto; margin-right:auto">
<center> <center>
<div > <div >
<h4 style="font-size: 18px;margin-top: 10px; margin-bottom: 10px;">请在24小时内点击邮件中的链接继续完成注册</h4> <h4 style="font-size: 18px;margin-top: 10px; padding-bottom: 10px;">请在24小时内点击邮件中的链接继续完成注册</h4>
<div class="to-email"> <div class="to-email" style="padding-bottom: 8px; font-size: 14px">
<span class="summary">邮件已发送到邮箱</span> <div class="to-email" style="padding-bottom: 8px; font-size: 14px">
<span >邮件已发送到邮箱</span>
<a href="#" class="f-blue"><%= @user.mail %></a> <a href="#" class="f-blue"><%= @user.mail %></a>
</div> </div>
<p> <p>
@ -33,12 +34,7 @@
padding: 10px 16px; padding: 10px 16px;
line-height: 1.33;" target="_blank">立即查收邮件</a></p> line-height: 1.33;" target="_blank">立即查收邮件</a></p>
<span class="tracking-ad" >
<a href="javascript:void(0);" >没收到邮件?</a>
</span>
<div style = "margin-top: 10px; margin-bottom:10px;">
<span style="font-size: 16px">请先检查是否在垃圾邮件中</span>
</div> </div>

View File

@ -19,15 +19,15 @@
<p><%= f.text_field :login, :size => 25, :required => true %><span id="valid_user_login"></span> <p><%= f.text_field :login, :size => 25, :required => true %><span id="valid_user_login"></span>
<em class="info" style="color: #acaeb1"><%= l(:label_max_number) %></em> <em class="info" style="color: #acaeb1"><%= l(:label_max_number) %></em>
</p> </p>
<p><%= f.password_field :password, :size => 25, :required => true %> <p><%= f.password_field :password, :size => 25, :required => true %><span id="valid_user_password"></span>
<em class="info" style="color: #acaeb1"><%= l(:text_caracters_minimum, :count => Setting.password_min_length) %></em> <em class="info" style="color: #acaeb1"><%= l(:text_caracters_minimum, :count => Setting.password_min_length) %></em>
</p> </p>
<p><%= f.password_field :password_confirmation, :size => 25, :required => true %><span id="valid_password"></span></p> <p><%= f.password_field :password_confirmation, :size => 25, :required => true %><span id="valid_password" style="padding-left: 10px;"></span></p>
<% end %> <% end %>
<p> <p>
<%= f.text_field :mail,:size => 25, :required => true %> <%= f.text_field :mail,:size => 25, :required => true %>
<span id="valid_user_mail"></span> <span id="valid_user_mail" ></span>
</p> </p>
<p> <p>
<em class="info" style="color: #acaeb1"> <em class="info" style="color: #acaeb1">
@ -56,10 +56,12 @@
<p><%= custom_field_tag_with_label :user, value %></p> <p><%= custom_field_tag_with_label :user, value %></p>
<% end %> <% end %>
</div> </div>
<% password_min_length = Setting.password_min_length %>
<script type="text/javascript"> <script type="text/javascript">
jQuery(document).ready(function () { jQuery(document).ready(function () {
var $login = $('#user_login') var $login = $('#user_login')
var $mail = $('#user_mail') var $mail = $('#user_mail')
var $password = $('#user_password')
var $password_confirmation = $('#user_password_confirmation') var $password_confirmation = $('#user_password_confirmation')
$login.blur(function (event) { $login.blur(function (event) {
if ($(this).is('#user_login')) { if ($(this).is('#user_login')) {
@ -92,11 +94,26 @@
}); });
} }
; ;
});
$password.blur(function () {
var pas1 = document.getElementById("user_password").value;
var password_min_length = <%= password_min_length %>
if (pas1.length >= password_min_length) {
$('#valid_user_password').html('<span class="green">'+ "</span>");
}
else {
$('#valid_user_password').html('<span class="red">' + "<%= l(:setting_password_min_length_limit, :count => password_min_length) %>" + "</span>");
}
}); });
$password_confirmation.blur(function () { $password_confirmation.blur(function () {
var password_min_length = <%= password_min_length %>
var pas1 = document.getElementById("user_password").value; var pas1 = document.getElementById("user_password").value;
var pas2 = document.getElementById("user_password_confirmation").value; var pas2 = document.getElementById("user_password_confirmation").value;
if (pas1 == pas2) { if (pas1.length >= password_min_length && pas1 == pas2 ) {
$('#valid_password').html('<span class="green">' + "<%= l(:setting_password_success) %>"+ "</span>"); $('#valid_password').html('<span class="green">' + "<%= l(:setting_password_success) %>"+ "</span>");
} }
else { else {

View File

@ -54,7 +54,7 @@
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="created_on" align="center" title='<%=format_time(user.created_on)%>'><%= format_time(user.created_on) %></td> <td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="created_on" align="center" title='<%=format_time(user.created_on)%>'><%= format_time(user.created_on) %></td>
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="last_login_on" align="center" title='<%= format_time(user.last_login_on)%>'><%= format_time(user.last_login_on) unless user.last_login_on.nil? %></td> <td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="last_login_on" align="center" title='<%= format_time(user.last_login_on)%>'><%= format_time(user.last_login_on) unless user.last_login_on.nil? %></td>
<td class="buttons"> <%= change_status_link(user) %> <td class="buttons"> <%= change_status_link(user) %>
<%= delete_link user_path(user, :back_url => admin_users_path(params)) unless User.current == user %> </td> <%= delete_link user_path(user, :back_url => admin_search_path(params)) unless User.current == user %> </td>
</tr> </tr>
<% end -%> <% end -%>
</tbody> </tbody>

View File

@ -0,0 +1,5 @@
<% if !@save_flag%>
$("#error_show").html("<%= @save_message.join(', ') %>");
<% else %>
closeModal();
<% end %>

View File

@ -0,0 +1,2 @@
$("#is_public_<%= @attachment.id %>").html("<%= escape_javascript(link_to (@attachment.is_public? ? "公开":"私有"), update_file_dense_attachments_path(:attachmentid=>@attachment.id,:newtype=>(@attachment.is_public? ? 0:1)),
:remote=>true,:class=>"f_l re_open",:method => :post) %>");

View File

@ -14,7 +14,7 @@
/* 匿名评分弹框 */ /* 匿名评分弹框 */
.anonymos{width:480px;height:180px;position:absolute;z-index:100;left:50%;top:50%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;} .anonymos{width:480px;height:180px;position:fixed;z-index:100;left:50%;top:50%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}
.ni_con { width:425px; margin:25px 30px;} .ni_con { width:425px; margin:25px 30px;}
.ni_con h2{ display:block; height:40px; width:425px; text-align:center; color:#3a3a3a;} .ni_con h2{ display:block; height:40px; width:425px; text-align:center; color:#3a3a3a;}
.ni_con p{ color:#808181; } .ni_con p{ color:#808181; }

View File

@ -1,4 +1,38 @@
<!--modified by huang--> <!--modified by huang-->
<script type="text/javascript">
function ShowCountDown(year,month,day,divname)
{
var now = new Date();
var endDate = new Date(year, month-1, day);
var leftTime=endDate.getTime()-now.getTime();
var leftsecond = parseInt(leftTime/1000);
var day1=Math.floor(leftsecond/(60*60*24));
var hour=Math.floor((leftsecond-day1*24*60*60)/3600);
var minute=Math.floor((leftsecond-day1*24*60*60-hour*3600)/60);
var second=Math.floor(leftsecond-day1*24*60*60-hour*3600-minute*60);
$("#"+divname).html("<span style='color: #acaeb1;'>作业提交还剩&nbsp;:</span>&nbsp;<span style='color: red;'>"
+day1+"&nbsp;</span><span style='color: #acaeb1;'>天</span><span style='color: red;'>&nbsp;"
+hour+"&nbsp;</span><span style='color: #acaeb1;'>时</span><span style='color: red;'>&nbsp;"
+minute+"&nbsp;</span><span style='color: #acaeb1;'>分</span><span style='color: red;'>&nbsp;"
+second+"&nbsp;</span><span style='color: #acaeb1;'>秒</span>");
}
</script>
<style>
.span_wping{}
.span_wping a{
margin-top: 18px;
margin-bottom: 3px;
width: 43px;
height: 23px;
background: #15bccf;
color: #fff;
text-align: center;
padding-top: 3px;
padding-left: 3px;
}
.span_wping a:hover{ background-color:#03a1b3;}
</style>
<% if bids.blank? %> <% if bids.blank? %>
<%#= l(:label_uncommit_homework) %> <%#= l(:label_uncommit_homework) %>
暂无作业! 暂无作业!
@ -26,7 +60,15 @@
<% if User.current.logged? && is_cur_course_student(@course) %> <% if User.current.logged? && is_cur_course_student(@course) %>
<% cur_user_homework = cur_user_homework_for_bid(bid) %> <% cur_user_homework = cur_user_homework_for_bid(bid) %>
<% if cur_user_homework!= nil && cur_user_homework.empty? %> <% if cur_user_homework!= nil && cur_user_homework.empty? %>
<% if bid.comment_status == 0 || bid.comment_status == 2%>
<span class="span_wping">
<%= link_to l(:label_commit_homework),new_exercise_book_path(bid) %> <%= link_to l(:label_commit_homework),new_exercise_book_path(bid) %>
</span>
<% else %>
<span title="匿评阶段不可提交作业!" class="span_wping">
<a style="width:80px; margin:20px 0 0 350px;background:#8e8e8e;">提交作业</a>
</span>
<% end %>
<% else %> <% else %>
<span style="color: green; float: right"> <span style="color: green; float: right">
<%= l(:lable_has_commit_homework)%> <%= l(:lable_has_commit_homework)%>
@ -34,7 +76,8 @@
<% end %> <% end %>
<% end %> <% end %>
<% if (User.current.admin?||User.current.id==bid.author_id) %> <% if (User.current.admin?||User.current.id==bid.author_id) %>
<span id="<%=bid.id %>_anonymous_comment"> <% if bid.open_anonymous_evaluation == 1%>
<span id="<%=bid.id %>_anonymous_comment" class="span_wping">
<% case bid.comment_status %> <% case bid.comment_status %>
<% when 0 %> <% when 0 %>
<%= link_to '启动匿评', alert_anonymous_comment_bid_path(bid), id: "#{bid.id}_start_anonymous_comment", remote: true, disable_with: '加载中...' %> <%= link_to '启动匿评', alert_anonymous_comment_bid_path(bid), id: "#{bid.id}_start_anonymous_comment", remote: true, disable_with: '加载中...' %>
@ -44,11 +87,13 @@
匿评结束 匿评结束
<% end %> <% end %>
</span> </span>
<%end%>
<span class="span_wping">
<%= link_to( <%= link_to(
l(:button_edit), l(:button_edit),
{:action => 'edit', :controller=>'bids', :course_id =>@course.id, :bid_id => bid.id}, {:action => 'edit', :controller=>'bids', :course_id =>@course.id, :bid_id => bid.id}
:class => 'icon icon-edit'
) %> ) %>
</span>
<%#= link_to( <%#= link_to(
l(:button_delete), l(:button_delete),
{:action => 'homework_destroy', :controller=>'bids', :course_id => bid.id}, {:action => 'homework_destroy', :controller=>'bids', :course_id => bid.id},
@ -94,19 +139,6 @@
</strong> </strong>
) )
</span> </span>
<span style="float: right">
<% if betweentime(bid.deadline) < 0 %>
<span style="color: red; float: right">
<%= l(:label_commit_limit)%>
</span>
<% else %>
<% if betweentime(bid.deadline) < 3 %>
<span style="color: red">
<%= l(:label_commit_ar) %>
</span>
<% end %>
<% end %>
</span>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -146,9 +178,17 @@
<%=format_time bid.created_on %> <%=format_time bid.created_on %>
</span> </span>
<span style="float: right"> <span style="float: right">
<%= l(:field_deadline) %> <% if betweentime(bid.deadline) < 0 %>
:&nbsp; <span style="color: red; float: right">
<%=bid.deadline %> <%= l(:label_commit_limit)%>
</span>
<% else %>
<script type="text/javascript">
window.setInterval(function(){ShowCountDown(<%= bid.deadline.year%>,<%= bid.deadline.month%>,<%= bid.deadline.day + 1%>,"show_deadtime_span_<%= bid.id%>");},1000)
</script>
<span id="show_deadtime_span_<%= bid.id%>" style="float: right">
</span>
<% end %>
</span> </span>
</td> </td>
<td></td> <td></td>

View File

@ -43,9 +43,9 @@
<% end %> <% end %>
<% unless @is_teacher%> <% unless @is_teacher%>
<% if @bid.comment_status == 0%> <% if @bid.comment_status == 0 && @bid.open_anonymous_evaluation == 1%>
$("#my_homework").click(); $("#my_homework").click();
<% elsif @bid.comment_status == 2%> <% elsif @bid.comment_status == 2 || @bid.open_anonymous_evaluation == 0%>
$("#all_homeworks").click(); $("#all_homeworks").click();
<% end %> <% end %>
<% end %> <% end %>

View File

@ -44,6 +44,10 @@
<%= f.select :proportion, proportion_option %> <%= f.select :proportion, proportion_option %>
</p> </p>
<p> <p>
<%= f.check_box :open_anonymous_evaluation, :style => "margin-left:10px;" %>
<span>未开启匿评作业将直接进入众评点赞阶段</span>
</p>
<p id="evaluation_num_p">
<%= f.text_field :evaluation_num, :required => true, :size => 60, :style => "width:150px;", :onblur => "regexEvaluationNum();" , :maxlength => 4%> <%= f.text_field :evaluation_num, :required => true, :size => 60, :style => "width:150px;", :onblur => "regexEvaluationNum();" , :maxlength => 4%>
<span id="bid_evaluation_num_span">匿评分配数量不宜太大,否则会影响开启匿评速度</span> <span id="bid_evaluation_num_span">匿评分配数量不宜太大,否则会影响开启匿评速度</span>
</p> </p>

View File

@ -28,14 +28,17 @@
</ul> </ul>
<% else %> <% else %>
<ul> <ul>
<% if @bid.open_anonymous_evaluation == 1%>
<li id="tb_5" class="hovertab"> <li id="tb_5" class="hovertab">
<!-- 开启了匿评才能看到匿评列表 -->
<%= link_to @bid.comment_status == 2 ? "已评作品" : "待评作品", get_student_batch_homework_homework_attach_index_path(:bid_id => @bid.id), {id: 'student_batch_homework',:remote => true}%> <%= link_to @bid.comment_status == 2 ? "已评作品" : "待评作品", get_student_batch_homework_homework_attach_index_path(:bid_id => @bid.id), {id: 'student_batch_homework',:remote => true}%>
</li> </li>
<% end %>
<li id="tb_6" class="normaltab"> <li id="tb_6" class="normaltab">
<%= link_to "我的作品", get_my_homework_homework_attach_index_path(:bid_id => @bid.id), {id: 'my_homework',:remote => true}%> <%= link_to "我的作品", get_my_homework_homework_attach_index_path(:bid_id => @bid.id), {id: 'my_homework',:remote => true}%>
</li> </li>
<% if @bid.comment_status == 2 %> <% if @bid.comment_status == 2 || @bid.open_anonymous_evaluation == 0%>
<!-- 匿评结束后才能看到全部作业列表 --> <!-- 匿评结束后或者未开启匿评才能看到全部作业列表 -->
<li id="tb_7" class="normaltab"> <li id="tb_7" class="normaltab">
<%= link_to "所有作品", get_homeworks_homework_attach_index_path(:bid_id => @bid.id), {id: 'all_homeworks',:remote => true}%> <%= link_to "所有作品", get_homeworks_homework_attach_index_path(:bid_id => @bid.id), {id: 'all_homeworks',:remote => true}%>
</li> </li>

View File

@ -43,6 +43,8 @@
{ {
var evaluation_num = $.trim($("#bid_evaluation_num").val()); var evaluation_num = $.trim($("#bid_evaluation_num").val());
var regex = /^\d+$/; var regex = /^\d+$/;
if($("#bid_open_anonymous_evaluation").attr("checked") == "checked")
{
if(evaluation_num=="") if(evaluation_num=="")
{ {
$("#bid_evaluation_num_span").text("匿评分配数量不能为空"); $("#bid_evaluation_num_span").text("匿评分配数量不能为空");
@ -71,6 +73,35 @@
return false; return false;
} }
} }
else
{
return true;
}
}
$(function(){
$("#bid_open_anonymous_evaluation").click(function(){
if($("#bid_open_anonymous_evaluation").attr("checked") == "checked")
{
$("#evaluation_num_p").slideDown();
}
else
{
$("#evaluation_num_p").slideUp();
}
});
});
$(function(){
if($("#bid_open_anonymous_evaluation").attr("checked") == "checked")
{
$("#evaluation_num_p").show();
}
else
{
$("#evaluation_num_p").hide();
}
});
function submitHomework(id) function submitHomework(id)
{ {

View File

@ -19,8 +19,9 @@
<%= form_for @message, :url => new_board_message_path(@board), :html => {:multipart => false, :id => 'message-form'} do |f| %> <%= form_for @message, :url => new_board_message_path(@board), :html => {:multipart => false, :id => 'message-form'} do |f| %>
<%= render :partial => 'messages/form', :locals => {:f => f} %> <%= render :partial => 'messages/form', :locals => {:f => f} %>
<p> <p>
<input type="button" onclick="submitCoursesBoard();" class = "whiteButton m3p10 h30" value="<%= l(:button_submit)%>"> <!--<input type="button" onclick="submitCoursesBoard();" class = "ButtonColor m3p10 h30" value="<%= l(:button_submit)%>">-->
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-message").hide(); return false;' ,:class => 'whiteButton m3p10' %> <a href="#" onclick="$('#message-form').submit();"class="ButtonColor m3p10"><%= l(:button_submit)%></a>
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-message").hide(); return false;' ,:class => 'ButtonColor m3p10' %>
</p> </p>
<% end %> <% end %>
<div id="preview" class="wiki"></div> <div id="preview" class="wiki"></div>

View File

@ -33,12 +33,11 @@
var xstep=1; // 移动步长此参数越小移动越平滑最小值为1 var xstep=1; // 移动步长此参数越小移动越平滑最小值为1
var delay_time=60; // 每步的时间间隔,此参数越小,移动速度越快 var delay_time=60; // 每步的时间间隔,此参数越小,移动速度越快
var YY=0; var YY=0;
var screen_height = $(window).height(); //浏览器当前窗口文档的高度
var screen_width = $(window).width(); //浏览器当前窗口文档的宽度
window.setInterval(function(){move();},delay_time); window.setInterval(function(){move();},delay_time);
function move() function move()
{ {
var screen_height = $(window).height(); //浏览器当前窗口文档的高度
var floatpoint_height = $("#floatpoint").height(); var floatpoint_height = $("#floatpoint").height();
YY += xstep; YY += xstep;
if(YY <= 0){xstep = 1; YY = 0;} //如果浮动层超出了上界,则设定移动方向为向下;并设定层的位置为正好在上界处 if(YY <= 0){xstep = 1; YY = 0;} //如果浮动层超出了上界,则设定移动方向为向下;并设定层的位置为正好在上界处
@ -47,9 +46,9 @@
xstep = -1; xstep = -1;
YY=(screen_height-floatpoint_height); YY=(screen_height-floatpoint_height);
} }
$("#floatpoint").css("top",YY); $("#floatpoint").css("margin-top",YY);
} }
function change_size(){var body_width = $("#top-menu").width(); $("#floatpoint").css("left",screen_width/2+body_width/2+10);} function change_size(){var screen_width = $(window).width();var body_width = $("#top-menu").width(); $("#floatpoint").css("left",screen_width/2+body_width/2+10).css("position", "fixed");}
$(document).ready(function(){change_size();}); $(document).ready(function(){change_size();});
$(window).resize(function(){screen_width = $(window).width();change_size();}); $(window).resize(function(){change_size();});
</script> </script>

View File

@ -49,6 +49,10 @@
<%= f.select :proportion, proportion_option %> <%= f.select :proportion, proportion_option %>
</p> </p>
<p> <p>
<%= f.check_box :open_anonymous_evaluation, :style => "margin-left:10px;" %>
<span>未开启匿评作业将直接进入众评点赞阶段</span>
</p>
<p id="evaluation_num_p">
<%= f.text_field :evaluation_num, :required => true, :size => 60, :style => "width:150px;", :onblur => "regexEvaluationNum();" , :maxlength => 4%> <%= f.text_field :evaluation_num, :required => true, :size => 60, :style => "width:150px;", :onblur => "regexEvaluationNum();" , :maxlength => 4%>
<span id="bid_evaluation_num_span">匿评分配数量不宜太大,否则会影响开启匿评速度</span> <span id="bid_evaluation_num_span">匿评分配数量不宜太大,否则会影响开启匿评速度</span>
</p> </p>

View File

@ -43,6 +43,8 @@
{ {
var evaluation_num = $.trim($("#bid_evaluation_num").val()); var evaluation_num = $.trim($("#bid_evaluation_num").val());
var regex = /^\d+$/; var regex = /^\d+$/;
if($("#bid_open_anonymous_evaluation").attr("checked") == "checked")
{
if(evaluation_num=="") if(evaluation_num=="")
{ {
$("#bid_evaluation_num_span").text("匿评分配数量不能为空"); $("#bid_evaluation_num_span").text("匿评分配数量不能为空");
@ -71,6 +73,24 @@
return false; return false;
} }
} }
else
{
return true;
}
}
$(function(){
$("#bid_open_anonymous_evaluation").click(function(){
if($("#bid_open_anonymous_evaluation").attr("checked") == "checked")
{
$("#evaluation_num_p").slideDown();
}
else
{
$("#evaluation_num_p").slideUp();
}
});
});
function submitHomework() function submitHomework()
{ {

View File

@ -0,0 +1,10 @@
<!-- sort: @sort,order:@order,current:"created_on" -->
<% if sort == current %>
<% if order =="asc" %>
<% elsif order == "desc" %>
<% else %>
<% end %>
<% end %>

View File

@ -0,0 +1,46 @@
<div>
<span id="attachments_fields" xmlns="http://www.w3.org/1999/html">
<% if defined?(container) && container && container.saved_attachments %>
<% container.attachments.each_with_index do |attachment, i| %>
<span id="attachments_p<%= i %>" class="attachment">
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%>
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %>
<span class="ispublic-label"><%= l(:field_is_public)%>:</span>
<%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%>
<%= if attachment.id.nil?
#待补充代码
else
link_to('&nbsp;'.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload')
end
%>
<%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %>
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
</span>
<% end %>
<% end %>
</span>
</div>
<button name="button" class="f_l ml10" onclick="_file.click()" onmouseover="this.focus()" type="button" style="width:80px; height:26px;">上传文件</button>
<%= file_field_tag 'attachments[dummy][file]',
:id => '_file',
:class => 'file_selector',
:multiple => true,
:onchange => 'addInputFiles(this);',
:style => '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)
} %>
<!--<input type="submit" name="" value="上传文件" class="f_l ml10" style="width:80px; height:26px;">-->
<label class="f_l ml10 c_grey">
<span id="upload_file_count">
<%= l(:label_no_file_uploaded)%>
</span>
(<%= l(:label_max_size) %>:
<%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
</label>

View File

@ -2,84 +2,43 @@
<% sufixtypes = @course.contenttypes %> <% sufixtypes = @course.contenttypes %>
<span class="borad-title"><%= t(:label_user_course) %>资源共享区</span> <%= stylesheet_link_tag 'resource', :media => 'all' %>
<script>
function show_upload()
{
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'upload_show',:locals => {:course => @course}) %>');
showModal('ajax-modal', '513px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;padding-left: 513px;'><a href='javascript:void(0)' onclick='closeModal()'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","5").css("left","511");
}
<div class="content-title-top"> function closeModal()
{
hideModal($("#popbox_upload"));
}
<%#= link_to(l(:label_attachment_new), 'javascript:void(0);', :onclick=>"$('#file_buttons').slideToggle();", :class => 'icon icon-add') if User.current.allowed_to?(:manage_files, @course) %> </script>
<div class="clearfix"></div>
<div id="file_buttons" class="nhidden">
<%= link_to(l(:label_upload_files), 'javascript:void(0);', :class => 'icon m5p5 button_submit', :onclick => "$('#relation_file_div').slideUp();$('#upload_file_div').slideToggle('slow');") if User.current.allowed_to?(:manage_files, @course) %> <div class="container">
<%= link_to(l(:label_relation_files), 'javascript:void(0);', :onclick => "$('#upload_file_div').slideUp();$('#relation_file_div').slideToggle();", :class => 'icon m5p5 button_submit') if User.current.allowed_to?(:manage_files, @course) %> <div class="resource"><!--资源库内容开始--->
<p></p> <div class="re_top">
<div id="upload_file_div" class="relation_file_div hidden"> <%= form_tag( search_course_files_path(@course), method: 'get',:class => "re_search f_l",:remote=>true) do %>
<%= render :partial => 'course_new', locals: {course: @course} %> <%= text_field_tag 'name', params[:name], name: "name", :class => 're_schbox',:style=>"padding: 0px"%>
</div> <%= submit_tag "课内搜索", :class => "re_schbtn b_dblue",:name => "incourse"%>
<%= submit_tag "全站搜索", :class => "re_schbtn b_lblue",:name => "insite" %>
<div id="relation_file_div" class="relation_file_div hidden">
<fieldset>
<legend>搜索</legend>
<%= form_tag(
attachments_autocomplete_path(:format => 'js'),
:remote => true,
:method => :post) do %>
<%= label_tag(:attach_search, "按关键字搜索:") %>
<%= text_field_tag(:attach_search) %>
<%#= submit_tag("Search") %>
<% end -%>
<%= form_tag course_attach_relation_path(:format => 'js'),
method: :post,
remote: true,
id: "relation_file_form",
:class => 'hidden' do %>
<%= hidden_field_tag(:class_name, 'course') %>
<%= hidden_field_tag(:class_id, params[:course_id]) %>
<div id="relation_file">
</div>
<div class="kclearfix" style='margin-top: 10px;'>
<%= submit_tag(l(:button_add)) -%>
</div>
<% end -%>
</fieldset>
<div class="line_under" style="margin:20px 0px;"></div>
</div>
</div>
<div class="box" id="files-box">
<label for="files-box" style="font-weight:bold;">&nbsp;&nbsp;<%= l(:label_files_filter) %></label>
<% if attachmenttypes.any? %>
&nbsp; &nbsp; &nbsp;
<label for="attachment_browse_label"><%= l(:attachment_browse) %></label>
<%= select_tag "attachment_browse", content_tag(:option, l(:attachment_all), :value => '0' ) +options_from_collection_for_select(attachmenttypes, "id", "typeName", params[:type]),
:onchange => "course_attachmenttypes_searchex(this.value)" %>
<% end %> <% end %>
<% if sufixtypes.any? %> <% if is_course_teacher(User.current,@course) %>
&nbsp; <a href="javascript:void(0)" class="re_fabu f_r b_lblue" onclick="show_upload()">上传资源</a>
<label for="attach_sufix_browse_label"><%= l(:attachment_sufix_browse) %></label>
<%= select_tag "attach_sufix_browse", content_tag(:option, l(:attachment_all), :value => '0') +options_for_select(sufixtypes),
:onchange => "course_attachment_contenttypes_searchex(this.value)" %>
<% end %> <% end %>
</div> </div><!---re_top end-->
<div class="cl"></div>
<div class="re_con" id="course_list">
<%= render :partial => 'course_list',:locals => {course: @course,all_attachments: @all_attachments,sort:@sort,order:@order,curse_attachments:@curse_attachments} %>
</div><!---re_con end-->
</div> </div>
<%= javascript_tag "observeSearchfield('attach_search', null, '#{ escape_javascript attachments_autocomplete_path(:course_id => @course.id, :format => 'js') }')" %>
<% delete_allowed = User.current.allowed_to?(:manage_files, @course) %>
<div id="all_browse_div" class="all_browse_div">
<%#= render :partial => 'course_show_all_attachment' %>
<% if (@attachtype==0 && @contenttype=='0') || (@attachtype.nil? && @contenttype.nil?) %>
<%= render partial: "course_show_all_attachment"%>
<%else%>
<%= render partial: "course_sort_by_attachtypel"%>
<%end%>
</div> </div>
<% html_title(l(:label_attachment_plural)) -%> <% html_title(l(:label_attachment_plural)) -%>

View File

@ -0,0 +1,56 @@
<% delete_allowed = User.current.allowed_to?(:manage_files, course) %>
<div class="re_con_top">
<p class="f_l c_blue f_b f_14">共有&nbsp;<%= User.current.member_of_course?(course) ? all_attachments.count : 0 %>&nbsp;个资源</p>
<!-- <p class="f_r">
<#% if @order == "asc" %>
按&nbsp;<#%= link_to "时间",course_files_path(course,:sort=>"created_on:desc"),:class => "f_b c_grey" %><#%= render partial: 'arrow_show',locals: { sort: sort,order:order,current:"created_on"} %>&nbsp;/&nbsp;
<#%= link_to "下载次数",course_files_path(course,:sort=>"downloads:desc"),:class => "f_b c_grey" %><#%= render partial: 'arrow_show',locals: { sort: sort,order:order,current:"downloads"} %>&nbsp;/&nbsp;
<a href="#" class="f_b c_grey">引用次数</a>&nbsp;排序
<#%else%>
按&nbsp;<#%= link_to "时间",course_files_path(course,:sort=>"created_on:asc"),:class => "f_b c_grey" %><#%= render partial: 'arrow_show',locals: { sort: sort,order:order,current:"created_on"} %>&nbsp;/&nbsp;
<#%= link_to "下载次数",course_files_path(course,:sort=>"downloads:asc"),:class => "f_b c_grey" %><#%= render partial: 'arrow_show',locals: { sort: sort,order:order,current:"downloads"} %>&nbsp;/&nbsp;
<a href="#" class="f_b c_grey">引用次数</a>&nbsp;排序
<#% end %>
</p>-->
</div>
<div class="cl"></div>
<% curse_attachments.each do |file| %>
<%if file.is_public == 0 && !User.current.member_of_course?(@course)%>
<%next%>
<%end%>
<div class="re_con_box">
<div class=" ">
<%= link_to_attachment file, :download => true,:text => truncate(file.filename,length: 35, omission: '...'), :title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "c_dblue f_14 f_b f_l" %>
<% if is_course_teacher(User.current,@course) %>
<%= link_to "选入我的课程",quote_resource_show_course_file_path(@course,file),:class => "f_l re_select",:remote => true %>
<% if delete_allowed && file.container_id == @course.id && file.container_type == "Course" %>
<span id="is_public_<%= file.id %>">
<%= 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",:method => :post %>
</span>
<% else %>
<%= link_to (file.is_public? ? "公开":"私有"),"javascript:void(0)",:class=>"f_l re_open" %>
<% end %>
<% else %>
<%= link_to (file.is_public? ? "公开":"私有"),"javascript:void(0)",:class=>"f_l re_open" %>
<% end %>
</div>
<div class="cl"></div>
<div class="">
<p class="f_l c_grey02">文件大小:<%= number_to_human_size(file.filesize) %></p>
<%= link_to( l(:button_delete), attachment_path(file),
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete,:class => "f_r re_de") if delete_allowed && file.container_id == @course.id && file.container_type == "Course"%>
<p class="f_r c_grey02" ><%= time_tag(file.created_on).html_safe %><%= l(:label_bids_published_ago) %>&nbsp;&nbsp;|&nbsp;&nbsp;下载<%= file.downloads %>&nbsp;&nbsp;|&nbsp;&nbsp;引用0 </p>
</div>
<div class="cl"></div>
<div class="tag_h">
<%= render :partial => 'tags/tag_new', :locals => {:obj => file, :object_flag => "6"} %>
<%= render :partial => 'tags/tag_add', :locals => {:obj => file, :object_flag => "6"} %>
</div>
<div class="cl"></div>
</div><!---re_con_box end-->
<% end %>
<ul class="wlist">
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => @is_remote, :flag => true%>
</ul>
<div class="cl"></div>

View File

@ -0,0 +1,24 @@
<div id="popbox_upload" style="margin-top: -30px;margin-left: -20px;margin-right: -10px;">
<div class="upload_con">
<div id="error_show"></div>
<h2>将此课件引入我的课程资源库</h2>
<div class="upload_box">
<%= form_tag course_attach_relations_path,
method: :post,
remote: true,
id: "relation_file_form" do %>
<%= hidden_field_tag(:file_id, file.id) %>
<%= content_tag('div', courses_check_box_tags('courses[course][]', User.current.courses,course,file), :id => 'courses')%>
<a id="submit_quote" href="javascript:void(0)" class="upload_btn" onclick="submit_quote();">引&nbsp;&nbsp;用</a><a href="javascript:void(0)" class="upload_btn upload_btn_grey" onclick="closeModal();">取&nbsp;&nbsp;消</a>
<% end -%>
</div>
</div>
</div>
<script>
function submit_quote()
{
$('#submit_quote').parent().submit();
}
</script>

View File

@ -0,0 +1,26 @@
<div id="popbox_upload" style="margin-top: -30px;margin-left: -20px;margin-right: -10px;">
<div class="upload_con">
<h2>上传资源</h2>
<div class="upload_box">
<%= error_messages_for 'attachment' %>
<div id="network_issue" style="color: red; display: none;">上传出现错误,请您检查您的网络环境,并刷新页面重新上传。</div>
<%= form_tag(course_files_path(course), :multipart => true,:remote => true,:method => :post,:name=>"upload_form") do %>
<label style="margin-top:3px;">文件浏览:</label>
<%= render :partial => 'attachement_list',:locals => {:course => course} %>
<div class="cl"></div>
<a id="submit_resource" href="javascript:void(0);" class="upload_btn" onclick="submit_resource();">上传资源</a><a href="javascript:void(0);" class="upload_btn upload_btn_grey" onclick="closeModal();">取&nbsp;&nbsp;消</a>
<% end %>
</div>
</div>
<% content_for :header_tags do %>
<%= javascript_include_tag 'attachments' %>
<% end %>
</div>
<script>
function submit_resource()
{
$('#submit_resource').parent().submit();
}
</script>

View File

@ -27,6 +27,8 @@ $('#upload_file_div').slideToggle('slow');
$("#all_browse_div").html('<%= j(render partial: "show_all_attachment")%>'); $("#all_browse_div").html('<%= j(render partial: "show_all_attachment")%>');
<%elsif @course%> <%elsif @course%>
$("#all_browse_div").html('<%= j(render partial: "course_show_all_attachment")%>'); $("#all_browse_div").html('<%= j(render partial: "course_show_all_attachment")%>');
closeModal();
$("#resource_list").html('<%= j(render partial: "course_file" ,locals: {course: @course}) %>');
<%end%> <%end%>
<% end %> <% end %>

View File

@ -1,10 +1,11 @@
<!-- <h3> --><!-- %=l(:label_attachment_plural)%></h3 --> <!-- <h3> --><!-- %=l(:label_attachment_plural)%></h3 -->
<div id="resource_list">
<% if @isproject %> <% if @isproject %>
<%= render :partial => 'project_file', locals: {project: @project} %> <%= render :partial => 'project_file', locals: {project: @project} %>
<% else %> <% else %>
<%= render :partial => 'course_file', locals: {course: @course} %> <%= render :partial => 'course_file', locals: {course: @course} %>
<% end %> <% end %>
</div>
<script type='text/javascript'> <script type='text/javascript'>
var slideHeight = 29; var slideHeight = 29;

View File

@ -0,0 +1,5 @@
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'show_quote_resource',:locals => {:course => @course,:file => @file}) %>');
showModal('ajax-modal', '513px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;padding-left: 513px;'><a href='javascript:void(0)' onclick='closeModal()'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","5").css("left","511");

View File

@ -0,0 +1 @@
$("#course_list").html("<%= escape_javascript(render :partial => 'course_list',:locals => {course: @course,all_attachments: @result,sort:"create_on",order:"",curse_attachments:@searched_attach})%>");

View File

@ -0,0 +1,10 @@
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'upload_show',:locals => {}) %>');
showModal('ajax-modal', '513px');
$('#ajax-modal').css('height','569px');
$('#ajax-modal').siblings().remove();
//$('#ajax-modal').before("<span style='float: right;cursor:pointer;padding-left: 513px;'>" +
// "<a href='#' onclick='hidden_homework_atert_form("+
// <#%= @cur_page%> + "," + <#%= @cur_type%> +
// ");'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().addClass("alert_box");

View File

@ -15,7 +15,7 @@
<% end %> <% end %>
<div style="width: 120%;"> <div style="width: 120%;">
<div class="field"> <div class="field">
<%= f.text_field :name, :required => true, :style => 'width: 100%;', :class => 'create-share' %> <%= f.text_field :name, :required => true, :style => 'width: 100%;', :class => 'create-share', :maxlength => 50%>
</div> </div>
<div> <div>
<% if User.current.logged? && User.current.admin? %> <% if User.current.logged? && User.current.admin? %>
@ -36,7 +36,9 @@
</p> </p>
<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor01');</script> <script type="text/javascript">var ckeditor=CKEDITOR.replace('editor01');</script>
<p style="color: #ff0000">(<%= l(:label_forums_max_length) %>)</p> <p style="color: #ff0000">
(<%= l(:label_forums_max_length) %>)
</p>
</div> </div>
<div class="actions" style=" padding-top: 10px; float:right"> <div class="actions" style=" padding-top: 10px; float:right">
<%= submit_tag l(:button_submit) %> <%= submit_tag l(:button_submit) %>

View File

@ -7,20 +7,51 @@
<%= forum.creator.nil? ? (link_to image_tag(url_to_avatar(forum.creator), :class => "avatar")) : (link_to image_tag(url_to_avatar(forum.creator), :class => "avatar"), user_path(forum.creator)) %> <%= forum.creator.nil? ? (link_to image_tag(url_to_avatar(forum.creator), :class => "avatar")) : (link_to image_tag(url_to_avatar(forum.creator), :class => "avatar"), user_path(forum.creator)) %>
</div> </div>
<div class="forums-index-content"> <div class="forums-index-content">
<table class="content-text-list"> <table class="content-text-list" style="table-layout: fixed;">
<tr><td valign="top" width="500px" class=" <%= forum.sticky? ? 'sticky' : '' %> <tr>
<%= forum.locked? ? 'locked' : '' %>"> <td valign="top" width="500px" class=" <%= forum.sticky? ? 'sticky' : '' %><%= forum.locked? ? 'locked' : '' %>" style="word-break: break-all;word-wrap: break-word;">
<p ><%= link_to h(forum.name), forum_path(forum) %></p></td></tr> <p >
<tr><td><p ><%= textAreailizable forum.description%></p></td></tr> <%= link_to h(forum.name), forum_path(forum) %>
<tr><td><p ><%= authoring forum.created_at, forum.creator %></p></td></tr> </p>
</td>
</tr>
<tr>
<td style="word-break: break-all;word-wrap: break-word;">
<p>
<%= textAreailizable forum.description%>
</p>
</td>
</tr>
<tr>
<td style="word-break: break-all;word-wrap: break-word;">
<p >
<%= authoring forum.created_at, forum.creator %>
</p>
</td>
</tr>
</table> </table>
</div> </div>
<div class="forums-index-count"> <div class="forums-index-count">
<table class="forums-count-color"><tr class="forums-count-color" align="center"><td><%= link_to (forum.memo_count), forum_path(forum) %></td><td><%= link_to (forum.topic_count), forum_path(forum) %></td></tr> <table class="forums-count-color">
<tr align="center"><td>回答</td><td>帖子</td></tr></table></div> <tr class="forums-count-color" align="center">
<td>
<%= link_to (forum.memo_count), forum_path(forum) %>
</td>
<td>
<%= link_to (forum.topic_count), forum_path(forum) %>
</td>
</tr>
<tr align="center">
<td>回答</td>
<td>帖子</td>
</tr>
</table>
</div>
</div> </div>
<% end %> <% end %>
<div class="pagination"><%= pagination_links_full @forums_pages, @forums_count %></div> <div class="pagination">
<%= pagination_links_full @forums_pages, @forums_count %>
</div>
<% else %> <% else %>
<% end %> <% end %>
</div> </div>

View File

@ -7,12 +7,15 @@
<table width="940px"> <table width="940px">
<tr> <tr>
<td class="info_font" style="width: 220px; color: #15bccf">公共贴吧 </td> <td class="info_font" style="width: 220px; color: #15bccf">公共贴吧 </td>
<td class="location-list"><strong><%= l(:label_user_location) %> :</strong></td> <td class="location-list">
<strong>
<%= l(:label_user_location) %> :
</strong>
</td>
<td rowspan="2"> <td rowspan="2">
<% if User.current.logged? %> <% if User.current.logged? %>
<%= link_to( l(:label_forum_new), new_forum_path, :class => 'icon icon-add') %> <%= link_to( l(:label_forum_new), new_forum_path, :class => 'icon icon-add') %>
<% end %> <% end %>
</td> </td>
<td rowspan="2" width="250px" > <td rowspan="2" width="250px" >
<div class="top-content-search"> <div class="top-content-search">
@ -24,8 +27,15 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="padding-left: 8px"><a><%= link_to request.host()+"/forums", forums_path %> </a></td> <td style="padding-left: 8px">
<td ><%= link_to l(:field_homepage), home_path %> > <%= link_to "公共贴吧", forums_path %></td> <a>
<%= link_to request.host()+"/forums", forums_path %>
</a>
</td>
<td >
<%= link_to l(:field_homepage), home_path %> >
<%= link_to "公共贴吧", forums_path %>
</td>
</tr> </tr>
</table> </table>
</div> </div>

View File

@ -1,15 +1,24 @@
<!-- added by fq --> <!-- added by fq -->
<div id="add-memo" class='lz' style="<% unless @memo.errors.any?%>display: none;<% end %> padding: 20px;"> <div id="add-memo" class='lz' style="<% unless @memo.errors.any?%>display: none;<% end %> padding: 20px;">
<h3><%=l(:label_memo_new)%></h3> <h3>
<%=l(:label_memo_new)%>
</h3>
<% if User.current.logged? %> <% if User.current.logged? %>
<%= labelled_form_for(@memo, :url => create_memo_forum_path(@forum), :html => {:multipart => true} ) do |f| %> <%= labelled_form_for(@memo, :url => create_memo_forum_path(@forum), :html => {:multipart => true} ) do |f| %>
<div class="actions" style="max-width:680px"> <div class="actions" style="max-width:680px">
<p><%= f.text_field :subject, :required => true%></p>
<p style="max-width:680px"><%= f.text_area :content, :required => true, :id => 'editor02' %></p>
<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor02');</script>
<p style="color: #ff0000">(<%= l(:label_memos_max_length) %>)</p>
<p> <p>
<%= l(:label_attachment_plural) %><br /> <%= f.text_field :subject, :required => true, :maxlength => 50%>
</p>
<p style="max-width:680px">
<%= f.text_area :content, :required => true, :id => 'editor02' %>
</p>
<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor02');</script>
<p style="color: #ff0000">
(<%= l(:label_memos_max_length) %>)
</p>
<p>
<%= l(:label_attachment_plural) %>
<br />
<%= render :partial => 'attachments/form', :locals => {:container => @memo} %> <%= render :partial => 'attachments/form', :locals => {:container => @memo} %>
</p> </p>
<%= f.submit :value => l(:label_memo_create) %> <%= f.submit :value => l(:label_memo_create) %>

View File

@ -35,13 +35,13 @@
</span> </span>
</li> </li>
<li class="c_red" style="margin:25px 0 0 20px;"> 您还没交作业,请创建作业!</li> <li class="c_red" style="margin:25px 0 0 20px;"> 您还没交作业,请创建作业!</li>
<% if @bid.comment_status == 0 %> <% if @bid.comment_status == 0 || @bid.comment_status == 1%>
<!-- 老师布置的作业在创建和开启匿评这段时间才允许创建作品 --> <!-- 老师布置的作业在创建和开启匿评这段时间才允许创建作品 -->
<li class="wping"> <li class="wping">
<%= link_to "提交作业", new_exercise_book_path(@bid), :style => "width:80px; margin:20px 0 0 350px;" %> <%= link_to "提交作业", new_exercise_book_path(@bid), :style => "width:80px; margin:20px 0 0 350px;" %>
</li> </li>
<% else %> <% else %>
<li class="wping" title="只有开启匿评之前才能创建作业哦"> <li class="wping" title="匿评阶段不可提交作业">
<a style="width:80px; margin:20px 0 0 350px;background:#8e8e8e;">提交作业</a> <a style="width:80px; margin:20px 0 0 350px;background:#8e8e8e;">提交作业</a>
</li> </li>
<% end %> <% end %>

View File

@ -41,9 +41,9 @@
<% end %> <% end %>
</div> </div>
<%= submit_tag l(:button_create) %> <%= submit_tag l(:button_create), :class => "ButtonAddTags"%>
<%= submit_tag l(:button_create_and_continue), :name => 'continue' %> <%= submit_tag l(:button_create_and_continue), :class => 'ButtonAddTags' %>
<%= preview_link preview_new_issue_path(:project_id => @project), 'issue-form' %> <%= preview_link preview_new_issue_path(:project_id => @project), 'issue-form','preview',{:class => "ButtonColor"}%>
<%= javascript_tag "$('#issue_subject').focus();" %> <%= javascript_tag "$('#issue_subject').focus();" %>
<% end %> <% end %>

View File

@ -1,6 +1,6 @@
<% if hasCourse %> <% if hasCourse %>
<li id="course_loggedas_li" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"> <li id="course_loggedas_li" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
<%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id} %> <%=link_to l(:label_my_course), user_courses_user_path(User.current.id) %>
<ul class="course_sub_menu"> <ul class="course_sub_menu">
<% course_index = 0 %> <% course_index = 0 %>
<% User.current.courses.each do |course| %> <% User.current.courses.each do |course| %>

View File

@ -1,10 +1,10 @@
<% if course %> <% if course %>
<li id="homework_loggedas_li" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="<%=course.name%>" onmouseover="homeworkSlipMenuOver(<%= course.id%>);" onmouseout="homeworkSlipMenuOut(<%= course.id%>);"> <li id="homework_loggedas_li" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="<%=course.name%>" onmouseover="homeworkSlipMenuOver(<%= course.id%>);" onmouseout="homeworkSlipMenuOut(<%= course.id%>);">
<%= link_to course.name, {:controller => 'courses',:action => 'show',id:course.id} %> <%= link_to course.name, course_path(course.id, host: Setting.host_course) %>
<ul class="homework_sub_menu" id="homework_loggedas_ul_<%= course.id%>" style="top:<%= course_index * 28.1%>px;"> <ul class="homework_sub_menu" id="homework_loggedas_ul_<%= course.id%>" style="top:<%= course_index * 28.1%>px;">
<% course.homework_for_courses.map(&:bid).each do |bid| %> <% course.homework_for_courses.map(&:bid).each do |bid| %>
<li style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title="<%=bid.name%>"> <li style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title="<%=bid.name%>">
<%= link_to bid.name, course_for_bid_path(bid), :target => "_blank" %> <%= link_to bid.name, course_for_bid_path(bid, host: Setting.host_course), :target => "_blank" %>
</li> </li>
<% end %> <% end %>
</ul> </ul>

View File

@ -24,7 +24,7 @@
</head> </head>
<!--add by huang--> <!--add by huang-->
<body class="<%= h body_css_classes %>"> <body class="<%= h body_css_classes %>">
<%= render :partial => 'courses/course_ad' %> <!-- <#%= render :partial => 'courses/course_ad' %> -->
<div id="wrapper"> <div id="wrapper">
<div id="wrapper2"> <div id="wrapper2">
<div id="wrapper3"> <div id="wrapper3">

View File

@ -106,6 +106,7 @@
<% if (User.current.admin?||User.current.id==@bid.author_id) %> <% if (User.current.admin?||User.current.id==@bid.author_id) %>
<tr> <tr>
<td valign="top" style="padding-left: 8px; font-size: 15px" colspan="2"> <td valign="top" style="padding-left: 8px; font-size: 15px" colspan="2">
<% if @bid.open_anonymous_evaluation == 1%>
<span id="<%=@bid.id %>_anonymous_comment"> <span id="<%=@bid.id %>_anonymous_comment">
<% case @bid.comment_status %> <% case @bid.comment_status %>
<% when 0 %> <% when 0 %>
@ -116,6 +117,7 @@
匿评结束 匿评结束
<% end %> <% end %>
</span> </span>
<%end%>
</td> </td>
</tr> </tr>
<% end %> <% end %>

View File

@ -1,5 +1,5 @@
<%= form_for(@memo_new, url: forum_memos_path, :html => {:multipart => true}) do |f| %> <%= form_for(@memo_new, url: forum_memos_path, :html => {:multipart => true}) do |f| %>
<%= f.hidden_field :subject, :required => true, value: "RE: "+@memo.subject %> <%= f.hidden_field :subject, :required => true, value: @memo.subject %>
<%= f.hidden_field :forum_id, :required => true, value: @memo.forum_id %> <%= f.hidden_field :forum_id, :required => true, value: @memo.forum_id %>
<%= f.hidden_field :parent_id, :required => true, value: @memo.id %> <%= f.hidden_field :parent_id, :required => true, value: @memo.id %>
<div id="message_quote" class="wiki"></div> <div id="message_quote" class="wiki"></div>
@ -7,10 +7,11 @@
<%= hidden_field_tag :quote,"",:required => false,:style => 'display:none' %> <%= hidden_field_tag :quote,"",:required => false,:style => 'display:none' %>
<%= label_tag(l(:label_reply_plural)) %>: <%= label_tag(l(:label_reply_plural)) %>:
<!-- <p> < %= f.text_area :content, :required => true, :size => "75%", :resize => "none", id: 'editor01' %> </p> --> <!-- <p> < %= f.text_area :content, :required => true, :size => "75%", :resize => "none", id: 'editor01' %> </p> -->
<%= f.text_area :content, :cols => 80, :rows => 15, :class => 'wiki-edit', :id => 'editor01', :value => @content %></p> <%= f.text_area :content, :cols => 80, :rows => 15, :class => 'wiki-edit', :id => 'editor01', :value => @content %>
<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor01');</script> <script type="text/javascript">var ckeditor=CKEDITOR.replace('editor01');</script>
<p><%= l(:label_attachment_plural) %><br /> <p>
<%= l(:label_attachment_plural) %>
<br />
<%= render :partial => 'attachments/form' %> <%= render :partial => 'attachments/form' %>
</p> </p>
<%= f.submit value: l(:label_reply_plural), class: "replies" %> <%= f.submit value: l(:label_reply_plural), class: "replies" %>

View File

@ -4,30 +4,43 @@
<%= labelled_form_for(@memo, :url => forum_memo_path(@memo.forum_id, @memo)) do |f| %> <%= labelled_form_for(@memo, :url => forum_memo_path(@memo.forum_id, @memo)) do |f| %>
<% if @memo.errors.any? %> <% if @memo.errors.any? %>
<div id="error_explanation"> <div id="error_explanation">
<h2><%= pluralize(@memo.errors.count, "error") %> prohibited this memo from being saved:</h2> <h2>
<%= pluralize(@memo.errors.count, "error") %>
prohibited this memo from being saved:
</h2>
<ul> <ul>
<% @memo.errors.full_messages.each do |msg| %> <% @memo.errors.full_messages.each do |msg| %>
<li><%= msg %></li> <li>
<%= msg %>
</li>
<% end %> <% end %>
</ul> </ul>
</div> </div>
<% end %> <% end %>
<div class="actions"> <div class="actions">
<p><%= f.text_field :subject, :required => true, :size => 96 ,:readonly => @replying%></p> <p>
<%= f.text_field :subject, :required => true, :size => 96 ,:readonly => @replying, :maxlength => 50%>
</p>
<% if User.current.admin?%>
<p> <p>
<% unless @replying %> <% unless @replying %>
<% if @memo.safe_attribute? 'sticky' %> <% if @memo.safe_attribute? 'sticky' %>
<%= f.check_box :sticky %> <%= label_tag 'memo_sticky', l(:label_board_sticky) %> <%= f.check_box :sticky %>
<%= label_tag 'memo_sticky', l(:label_board_sticky) %>
<% end %> <% end %>
<% if @memo.safe_attribute? 'lock' %> <% if @memo.safe_attribute? 'lock' %>
<%= f.check_box :lock %> <%= label_tag 'memo_locked', l(:label_board_locked) %> <%= f.check_box :lock %> <%= label_tag 'memo_locked', l(:label_board_locked) %>
<% end %> <% end %>
<% end %> <% end %>
</p> </p>
<p><%= f.text_area :content, :required => true, :size => 80, id: 'editor01' %></p> <% end %>
<p>
<%= f.text_area :content, :required => true, :size => 80, id: 'editor01' %>
</p>
<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor01');</script> <script type="text/javascript">var ckeditor=CKEDITOR.replace('editor01');</script>
<p> <p>
<%= l(:label_attachment_plural) %><br /> <%= l(:label_attachment_plural) %>
<br />
<%= render :partial => 'attachments/form', :locals => {:container => @memo} %> <%= render :partial => 'attachments/form', :locals => {:container => @memo} %>
</p> </p>
<br/> <br/>

View File

@ -117,13 +117,15 @@
</div> </div>
<br/> <br/>
<table class="borad-text-list"> <table class="borad-text-list" style="table-layout: fixed;">
<tr> <tr>
<td rowspan="3" valign="top" width="60px"> <td rowspan="3" valign="top" width="60px">
<%= link_to image_tag(url_to_avatar(reply.author), :class => "avatar"), user_path(reply.author) %> <%= link_to image_tag(url_to_avatar(reply.author), :class => "avatar"), user_path(reply.author) %>
</td> </td>
<td class="comments"> <td class="comments" style="word-wrap: break-word;word-break: break-all;">
<div class="reply_content" ><%=h sanitize(reply.content.html_safe) %></div> <div class="reply_content" >
<%=h sanitize(reply.content.html_safe) %>
</div>
<p> <p>
<% if reply.attachments.any?%> <% if reply.attachments.any?%>
<% options = {:author => true, :deletable => reply.deleted_attach_able_by?(User.current) } %> <% options = {:author => true, :deletable => reply.deleted_attach_able_by?(User.current) } %>
@ -133,12 +135,16 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="font_lighter" style="float:right"><%= authoring reply.created_at, reply.author %></td> <td class="font_lighter" style="float:right">
<%= authoring reply.created_at, reply.author %>
</td>
</tr> </tr>
</table> </table>
</div> </div>
<% end %> <% end %>
<div class="pagination"><%= pagination_links_full @reply_pages, @reply_count, :per_page_links => false %></div> <div class="pagination">
<%= pagination_links_full @reply_pages, @reply_count, :per_page_links => false %>
</div>
</div> </div>
<% if User.current.login? %> <% if User.current.login? %>

View File

@ -106,7 +106,7 @@
<div> <div>
<!-- 昵称 --> <!-- 昵称 -->
<p style="width:630px;padding-left: 40px;"> <p style="width:630px;padding-left: 40px;">
<%= f.text_field :login, :required => true, :size => 25, :name => "login", :readonly => true %> <%= f.text_field :login, :required => true, :size => 25, :name => "login", :readonly => true, :style => 'border:1px solid #d3d3d3;'%>
<span class='font_lighter'><%= l(:label_max_number) %></span> <span class='font_lighter'><%= l(:label_max_number) %></span>
<br/> <br/>
</p> </p>

View File

@ -11,11 +11,13 @@
</ul> </ul>
</div> </div>
--> -->
<p class="small"><%= link_to l(:label_issue_view_all), :controller => 'issues', <p class="small">
<%#= link_to l(:label_issue_view_all), :controller => 'issues',
:action => 'index', :action => 'index',
:set_filter => 1, :set_filter => 1,
:assigned_to_id => 'me', :assigned_to_id => 'me',
:sort => 'priority:desc,updated_on:desc' %></p> :sort => 'priority:desc,updated_on:desc' %>
</p>
<% end %> <% end %>
<% content_for :header_tags do %> <% content_for :header_tags do %>
<%= auto_discovery_link_tag(:atom, <%= auto_discovery_link_tag(:atom,

View File

@ -3,7 +3,7 @@
<% reported_issues = issuesreportedbyme_items %> <% reported_issues = issuesreportedbyme_items %>
<%= render :partial => 'issues/list_simple', :locals => { :issues => reported_issues } %> <%= render :partial => 'issues/list_simple', :locals => { :issues => reported_issues } %>
<% if reported_issues.length > 0 %> <% if reported_issues.length > 0 %>
<p class="small"><%= link_to l(:label_issue_view_all), :controller => 'issues', <p class="small"><%#= link_to l(:label_issue_view_all), :controller => 'issues',
:action => 'index', :action => 'index',
:set_filter => 1, :set_filter => 1,
:status_id => '*', :status_id => '*',

View File

@ -3,7 +3,7 @@
<%= render :partial => 'issues/list_simple', :locals => { :issues => watched_issues } %> <%= render :partial => 'issues/list_simple', :locals => { :issues => watched_issues } %>
<% if watched_issues.length > 0 %> <% if watched_issues.length > 0 %>
<p class="small"><%= link_to l(:label_issue_view_all), :controller => 'issues', <p class="small"><%#= link_to l(:label_issue_view_all), :controller => 'issues',
:action => 'index', :action => 'index',
:set_filter => 1, :set_filter => 1,
:watcher_id => 'me', :watcher_id => 'me',

View File

@ -76,8 +76,9 @@
<%= f.text_field :name ,:id => "tags_name",:size=>"28",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length %> <%= f.text_field :name ,:id => "tags_name",:size=>"28",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length %>
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%> <%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%> <%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
<%= f.submit l(:button_project_tags_add),:class => "small" %> <%= f.submit l(:button_project_tags_add),:class => "ButtonAddTags" %>
<%= link_to_function l(:button_cancel), '$("#put-tag-form").hide();'%> <%= link_to_function l(:button_cancel), '$("#put-tag-form").hide();',:class=>'ButtonColor'%>
<% end %> <% end %>
</div> </div>
<% end %> <% end %>

View File

@ -0,0 +1,13 @@
<%= link_to '+ 添加标签', 'javascript:void(0);',
:class => "yellowBtn f_l",
:onclick=>"$('#add_tag_#{obj.id}').slideToggle();" if User.current.logged? %> <!-- $('#put-tag-form-#{obj.class}-#{obj.id}').toggle(); readmore(this); -->
<span id="add_tag_<%= obj.id %>" style="display:none; vertical-align: middle;" class="ml10 f_l">
<%= form_for "tag_for_save",:remote=>true,:url => save_tag_path,
:update => "tags_show",
:complete => '$("#put-tag-form").hide();' do |f| %>
<%= f.text_field :name ,:id => "tags_name_#{obj.id}",:size=>"28",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length,:class => "isTxt w90 f_l" %>
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
<%= f.submit "",:class => "submit f_l" %>
<% end %>
</span>

View File

@ -0,0 +1,20 @@
<% @tags = obj.reload.tag_list %>
<% if @tags.size > 0 %>
<% @tags.each do |tag| %>
<span class="re_tag f_l"> <%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %>
<!-- 对用户主页 是本人 ,对项目,需求,问题是管理员 -->
<% case object_flag %>
<% when '6' %>
<% if obj.author_id == User.current.id || User.current.admin?%>
<span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag_new", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %> </span>
<% end %>
<% end %>
</span>
<% end %>
<% else %>
<span style="color:#8c8a8a" class="f_l">
&nbsp;&nbsp;&nbsp;<%= l(:label_tags_no) %>
</span>
<% end %>

View File

@ -0,0 +1,24 @@
<%#begin
1 代表是user类型
2 代表是project类型
3 代表是issue类型
4 代表是bid类型
5 代表是forum类型
6 代表是Attachment类型
7 代表是contest类型
8 代表是OpenSourceProject类型
9 代表是RelativeMemo类型
#end%>
<!-- 3 代表的是issue 当是issue是 处理方式与前2个对象不同 -->
<% if object_flag == '3' %>
<% elsif object_flag == '6' %>
<div id="tags_show-<%=obj.class%>-<%=obj.id%>" style="display:inline; ">
<%= render :partial => "tags/tag_list",:locals => {:obj => obj,:object_flag => object_flag} %>
</div>
<div id="put-tag-form-<%=obj.class%>-<%=obj.id%>" style="display: none;height: 100px;">
<%= render :partial => "courses/course_resources_html", :locals => {:obj => obj ,:object_flag => object_flag } %>
</div>
<% else %>
<% end %>

View File

@ -0,0 +1,6 @@
//本js使用的新的tag显示方法
<% if @object_flag == "6"%>
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_list',
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @object_flag}) %>');
<% end %>

View File

@ -0,0 +1,9 @@
//本js使用的新的tag显示方法
<% if @obj_flag == '6'%>
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_list',
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
//$("#put-tag-form-<%#=@obj.class%>-<%#=@obj.id%>").hide();
$("#tags_name_<%= @obj.id%>").val("");
//$('#put-tag-form').hide();
<% end %>

View File

@ -107,7 +107,7 @@
<span class="font_lighter"> <span class="font_lighter">
<%= l(:label_i_new_activity) %> <%= l(:label_i_new_activity) %>
</span> </span>
<%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), course_for_bid_path(e.act_id) %>
</td> </td>
<% else %> <% else %>
<td colspan="2" valign="top"> <td colspan="2" valign="top">
@ -117,7 +117,7 @@
<span class="font_lighter"> <span class="font_lighter">
<%= l(:label_new_activity) %> <%= l(:label_new_activity) %>
</span>&nbsp; </span>&nbsp;
<%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), course_for_bid_path(e.act_id) %>
</td> </td>
<% end %> <% end %>
<% else %> <% else %>

View File

@ -1,5 +1,5 @@
<% course_list.map do |course| %> <% course_list.map do |course| %>
<li class='<%= cycle("odd", "even") %>' title=<%= course.description.to_s.gsub(/<\/?.*?>/,"") %>> <li class='<%= cycle("odd", "even") %>' title="<%= course.description.to_s.gsub(/<\/?.*?>/,'') %>" style="min-height: 69px;">
<div class='avatar'> <div class='avatar'>
<%= image_tag(get_course_avatar(course), :class => "avatar-4") %> <%= image_tag(get_course_avatar(course), :class => "avatar-4") %>
</div> </div>
@ -9,11 +9,11 @@
<% unless course.is_public == 1 %> <% unless course.is_public == 1 %>
<span class="private_project"><%= l(:label_private) %></span> <span class="private_project"><%= l(:label_private) %></span>
<% end %> <% end %>
<%= link_to(course.name.truncate(30, omission: '...')+":", course_path(course.id), :class => "d-g-blue d-p-project-name", :title => "#{course.name}") %> <%= link_to(course.name.truncate(25, omission: '...')+":", course_path(course.id), :class => "d-g-blue d-p-project-name", :title => "#{course.name}") %>
</span> </span>
<span class='font_bolder'> <span class='font_bolder'>
<%= link_to(course.try(:teacher).try(:realname), user_path(course.teacher)) %> <%= link_to(course.try(:teacher).try(:realname).truncate(6, omission: '...'), user_path(course.teacher)) %>
<%#=course.try(:teacher).try(:name)%> <%#=course.try(:teacher).try(:name)%>
</span> </span>
</div> </div>

View File

@ -396,7 +396,8 @@ zh:
setting_repository_log_display_limit: 在文件变更记录页面上显示的最大修订版本数量 setting_repository_log_display_limit: 在文件变更记录页面上显示的最大修订版本数量
setting_openid: 允许使用OpenID登录和注册 setting_openid: 允许使用OpenID登录和注册
setting_password_min_length: 最短密码长度 setting_password_min_length: 最短密码长度
setting_password_error: 密码不一致 setting_password_min_length_limit: "密码长度至少大于 %{count} 个字符。"
setting_password_error: 密码长度不够或密码不一致
setting_password_success: 密码设置成功 setting_password_success: 密码设置成功
setting_new_project_user_role_id: 非管理员用户新建项目时将被赋予的(在该项目中的)角色 setting_new_project_user_role_id: 非管理员用户新建项目时将被赋予的(在该项目中的)角色
setting_default_projects_modules: 新建项目默认启用的模块 setting_default_projects_modules: 新建项目默认启用的模块
@ -1598,7 +1599,7 @@ zh:
label_tags_user_mail: 用户邮箱: label_tags_user_mail: 用户邮箱:
label_tags_user_name: 用户名: label_tags_user_name: 用户名:
label_tags_numbers: Tag统计 label_tags_numbers: Tag统计
label_max_number: 登录名是在网站中显示的您的公开标识,只能为英文 label_max_number: 登录名是在网站中显示的您的公开标识,只能为英文和数字
label_mail_attention: qq邮箱可能收不到此邮件其他邮箱如果没有收到可能在垃圾邮件中 label_mail_attention: qq邮箱可能收不到此邮件其他邮箱如果没有收到可能在垃圾邮件中
label_mail_attention1: 其中gmail与教育网邮箱的激活邮件有时比较慢请耐心等待。 label_mail_attention1: 其中gmail与教育网邮箱的激活邮件有时比较慢请耐心等待。
label_your_course: 您的课程《 label_your_course: 您的课程《
@ -2202,3 +2203,4 @@ zh:
label_submit_comments: 提交评论 label_submit_comments: 提交评论
field_evaluation_num: 匿评分配数量 field_evaluation_num: 匿评分配数量
label_my_score: 我的评分 label_my_score: 我的评分
field_open_anonymous_evaluation: 是否开启匿评

View File

@ -558,11 +558,13 @@ RedmineApp::Application.routes.draw do
match 'attachments/autocomplete', :to => 'attachments#autocomplete', :via => [:post] match 'attachments/autocomplete', :to => 'attachments#autocomplete', :via => [:post]
post 'attachments/relationfile', to: 'attachments#add_exist_file_to_project', as: 'attach_relation' post 'attachments/relationfile', to: 'attachments#add_exist_file_to_project', as: 'attach_relation'
post 'attachments/courserelationfile', to: 'attachments#add_exist_file_to_course', as: 'course_attach_relation' post 'attachments/courserelationfile', to: 'attachments#add_exist_file_to_course', as: 'course_attach_relation'
post 'attachments/courserelationfiles', to: 'attachments#add_exist_file_to_courses', as: 'course_attach_relations'
get 'attachments/renderTag/:attchmentId', :to => 'attachments#renderTag', :attchmentId => /\d+/ get 'attachments/renderTag/:attchmentId', :to => 'attachments#renderTag', :attchmentId => /\d+/
resources :attachments, :only => [:show, :destroy] do resources :attachments, :only => [:show, :destroy] do
collection do collection do
match "updateType" , :via => [:get, :post] match "updateType" , :via => [:get, :post]
match "updateFileDense" , :via => [:get, :post] match "updateFileDense" , :via => [:get, :post]
match "update_file_dense", :via => [:post]
match "renderTag" , :via => [:get, :post] match "renderTag" , :via => [:get, :post]
match 'delete_softapplications', :via => [:get, :post] match 'delete_softapplications', :via => [:get, :post]
end end
@ -652,6 +654,10 @@ RedmineApp::Application.routes.draw do
resources :files, :only => [:index, :new, :create] do resources :files, :only => [:index, :new, :create] do
collection do collection do
match "getattachtype", :via => [:get, :post] match "getattachtype", :via => [:get, :post]
match "search",:via => [:post,:get]
end
member do
match "quote_resource_show", :via => [:get]
end end
end end
resources :memberships, :shallow => true, :controller => 'members', :only => [:index, :show, :new, :create, :update, :destroy] do resources :memberships, :shallow => true, :controller => 'members', :only => [:index, :show, :new, :create, :update, :destroy] do
@ -792,6 +798,8 @@ RedmineApp::Application.routes.draw do
match 'parise_tread/tread_plus', :as=>"tread" match 'parise_tread/tread_plus', :as=>"tread"
match 'tags/delete' match 'tags/delete'
match 'tags/remove_tag', :as=>"remove_tag" match 'tags/remove_tag', :as=>"remove_tag"
match 'tags/remove_tag_new', :as=>"remove_tag_new"
match 'tags/tag_save', :as => "save_tag"
match 'words/add_brief_introdution' match 'words/add_brief_introdution'

View File

@ -0,0 +1,9 @@
class AddOpenAnonymousEvaluation < ActiveRecord::Migration
def up
add_column :bids, :open_anonymous_evaluation, :integer, default: 1
end
def down
remove_column :bids, :open_anonymous_evaluation
end
end

View File

@ -0,0 +1,5 @@
class AddColumnCopyfromToAttachment < ActiveRecord::Migration
def change
add_column("attachments","copy_from",:integer)
end
end

View File

@ -11,7 +11,7 @@
# #
# It's strongly recommended to check this file into your version control system. # It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20141105012624) do ActiveRecord::Schema.define(:version => 20141119011439) do
create_table "activities", :force => true do |t| create_table "activities", :force => true do |t|
t.integer "act_id", :null => false t.integer "act_id", :null => false
@ -110,6 +110,7 @@ ActiveRecord::Schema.define(:version => 20141105012624) do
t.integer "proportion", :default => 60 t.integer "proportion", :default => 60
t.integer "comment_status", :default => 0 t.integer "comment_status", :default => 0
t.integer "evaluation_num", :default => 3 t.integer "evaluation_num", :default => 3
t.integer "open_anonymous_evaluation", :default => 1
end end
create_table "boards", :force => true do |t| create_table "boards", :force => true do |t|

BIN
public/images/files/btn.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 958 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

View File

@ -1277,7 +1277,7 @@ input#openid_url { background: url(../images/openid-bg.gif) no-repeat; backgroun
.clear:after{ content: "."; display: block; height: 0; clear: both; visibility: hidden; } .clear:after{ content: "."; display: block; height: 0; clear: both; visibility: hidden; }
/***** Links *****/ /***** Links *****/
a, a:link, a:visited{ color: #169; text-decoration: none; } a, a:link, a:visited{ color: #169 ; text-decoration: none; }
a:hover, a:active{ color: #c61a1a; text-decoration: underline;} a:hover, a:active{ color: #c61a1a; text-decoration: underline;}
a img{ border: 0; } a img{ border: 0; }
@ -1580,13 +1580,15 @@ form {display: inline;}
/*added by bai*/ /*added by bai*/
input[type="submit"].bid_btn { input[type="submit"].bid_btn {
padding-bottom: 5px; padding-bottom: 5px;
width: 55px; width: 50px;
height: 25px; height: 25px;
text-align: center;
font-family: '微软雅黑', Arial, Helvetica, sans-serif; font-family: '微软雅黑', Arial, Helvetica, sans-serif;
font-size: 12px; font-size: 12px;
color: #fff; color: #fff;
padding: 0px; padding: 8px;
background: #15bccf; background: #15bccf;
text-align: center;
border-radius: 4px; border-radius: 4px;
border: 1px solid #15bccf; border: 1px solid #15bccf;
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2), 0px 0px 2px rgb(255, 255, 255) inset; box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2), 0px 0px 2px rgb(255, 255, 255) inset;
@ -1594,6 +1596,25 @@ input[type="submit"].bid_btn {
cursor: pointer; cursor: pointer;
} }
input[type="submit"].ButtonAddTags {
color: #fffbff ;
padding-bottom:5px ;
width:auto ;
height: 25px ;
font-family: '微软雅黑',Arial,Helvetica,sans-serif ;
font-size: 15px ;
font-weight: normal;
text-align: center ;
margin:0 auto;
border-radius: 0px !important;
background: #15bccf;
border: 0px solid #15bccf !important;
position: relative;
top:3px;
}
input[type="button"].bid_btn { input[type="button"].bid_btn {
/*padding-bottom: 5px;*/ /*padding-bottom: 5px;*/
width: 55px; width: 55px;
@ -1603,6 +1624,7 @@ input[type="button"].bid_btn {
color: #fff; color: #fff;
padding: 0px; padding: 0px;
background: #15bccf; background: #15bccf;
text-align: center;
border-radius: 4px; border-radius: 4px;
border: 1px solid #15bccf; border: 1px solid #15bccf;
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2), 0px 0px 2px rgb(255, 255, 255) inset; box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2), 0px 0px 2px rgb(255, 255, 255) inset;
@ -2180,7 +2202,7 @@ button.tab-right {
padding-bottom: 2px; padding-bottom: 2px;
text-align: center; text-align: center;
border: 1px solid #15BCCF; border: 1px solid #15BCCF;
/*border-bottom: 0px solid #15BCCF;*/ border-bottom: 0px solid #15BCCF;
color:#606060; color:#606060;
font-weight:bold; font-weight:bold;

View File

@ -69,7 +69,7 @@ a.wzan_visited{background:url(images/pic_zan.png) 0 0 no-repeat;}
/****评分弹框****/ /****评分弹框****/
.alert_box {width:488px;height:550px;position:absolute;z-index:1002;left:50%;top:40%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; padding:5px; overflow:auto; } .alert_box {width:488px;height:550px;position:fixed;z-index:1002;left:50%;top:40%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; padding:5px; overflow:auto; }
.alert .close{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-502px;background:url(images/close.png) no-repeat;cursor:pointer;} .alert .close{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-502px;background:url(images/close.png) no-repeat;cursor:pointer;}
.alert .C{width:476px;height:296px;position:absolute;left:5px;top:5px; } .alert .C{width:476px;height:296px;position:absolute;left:5px;top:5px; }
@ -143,7 +143,7 @@ a:hover.tijiao{ background:#0f99a9 !important;}
.N_search{ height:20px !important; border:1px solid #999 !important;} .N_search{ height:20px !important; border:1px solid #999 !important;}
/* 匿名评分弹框 */ /* 匿名评分弹框 */
.alert_praise{width:480px;height:200px;position:absolute;z-index:100;left:50%;top:50%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;} .alert_praise{width:480px;height:200px;position:fixed;z-index:100;left:50%;top:50%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}
.alert .close02{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-490px;background:url(images/close.png) no-repeat;cursor:pointer;} .alert .close02{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-490px;background:url(images/close.png) no-repeat;cursor:pointer;}
.ni_con { width:425px; margin:25px 30px;} .ni_con { width:425px; margin:25px 30px;}
.ni_con h2{ display:block; height:40px; width:188px; margin:0 auto;} .ni_con h2{ display:block; height:40px; width:188px; margin:0 auto;}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 958 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

View File

@ -15,7 +15,7 @@ span[id^=valid_user] {
} }
.red { .red {
color: red;margin-left: 10px;margin-right: 10px;text-align: right; color: red;margin-right: 10px;text-align: right;
} }
.green { .green {
@ -475,19 +475,21 @@ body {
top: 1px; top: 1px;
} }
input[class~='ButtonClolr'],.ButtonColor{ input[class~='ButtonClolr'],.ButtonColor{
color: #fffbff !important; color: #fffbff !important;
padding-bottom: 5px; padding: 5px;
width: 40px; width: auto;
height: 20px; height: 24px ;
font-family: '微软雅黑',Arial,Helvetica,sans-serif; font-family: '微软雅黑',Arial,Helvetica,sans-serif;
font-size: 15px; font-size: 15px;
text-align: center;
padding: 0px; padding: 0px;
background: #15bccf; background: #15bccf !important;
border: 1px solid #15bccf; border: 0px solid #15bccf ;
display:inline-block
} }
input[class~='whiteButton'], .whiteButton { input[class~='whiteButton'], .whiteButton {
-moz-box-shadow: inset 0px 1px 0px 0px #ffffff; -moz-box-shadow: inset 0px 1px 0px 0px #ffffff;
-webkit-box-shadow: inset 0px 1px 0px 0px #ffffff; -webkit-box-shadow: inset 0px 1px 0px 0px #ffffff;
@ -541,7 +543,6 @@ input[class~='m3p10'], .m3p10 {
padding: 3px 10px; padding: 3px 10px;
height: 20px; height: 20px;
display: inline-block; display: inline-block;
text-align: center;
color: #ffffff; color: #ffffff;
} }
@ -648,14 +649,14 @@ input[class='nyan-clean-gray']:active, .nyan-clean-gray:active {
} }
.tools a:visited { .tools a:visited {
color: #116699; color: #fffbff;
text-decoration: none; text-decoration: none;
padding: 3px 5px 0px 5px; padding: 3px 5px 0px 5px;
width: 100px; width: 100px;
} }
.tools a:hover { .tools a:hover {
color: white; color: #fffbff;
padding: 3px 3px 0px 20px; padding: 3px 3px 0px 20px;
width: 88px; width: 88px;
text-decoration: none; text-decoration: none;

View File

@ -0,0 +1,105 @@
body{ font-size:12px; font-family:"微软雅黑","宋体"; line-height:1.9; background:#fff; font-style:normal;}
div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,form,span,textarea{ margin:0; padding:0;}
div,img,tr,td,textarea{ border:0;}
table,tr,td{border:0; cellspacing:0; cellpadding:0;}
ul,li{ list-style-type:none}
.cl{ clear:both; overflow:hidden; }
a{ text-decoration:none; text-align:center; }
a:hover{ text-decoration:underline;}
/**** 常用***/
.f_l{ float:left;}
.f_r{ float:right;}
.b_lblue{ background:#64bdd9 !important;}
.b_dblue{ background:#55a1b9 !important; cursor:pointer !important;}
.f_b{ font-weight: bold !important;}
.c_blue{ color:#64bdd9;}
.c_grey{ color:#999999 !important;}
.c_grey02{ color:#666666 !important;}
.f_14{ font-size:14px ;}
.c_dblue{ color:#3e6d8e;}
.w90{width:90px;}
.ml10{margin-left:10px;}
.ml5{margin-left:5px;}
.b_grey{ background:#a3a3a3;}
.container{ }
/****搜索***/
.resource{ width:693px;}
.re_top{width:688px; height:50px; margin-left:5px; background:#eaeaea;}
.re_top input{ float:left;}
.re_search{ margin:12px;}
.re_schbox{ width:240px; height:24px; border:1px solid #64bdd9 !important; color:#666666;}
.re_schbtn
{
width:60px !important;
height:26px !important;
color:#fff !important;
margin-right:5px !important;
border:none !important;
margin-left:0px !important;
box-shadow: none !important;
padding: 0px !important;
border-radius: 0 !important;
text-shadow: none !important;
}
a.re_fabu { display:block; width:90px; height:35px; font-size:14px; color:#fff; text-align:center; padding-top:5px; margin:5px; }
a:hover.re_fabu{background:#55a1b9;}
/****列表***/
.re_con{ margin:5px; width:683px;}
.re_con_top{color:#494949; }
.re_con_top span{ color:#999999; font-weight:bold;}
a.re_select{ display:block; width:88px; height:22px; background:url(images/pic_select01.png) 0 0 no-repeat; color:#fff; font-weight:bold; margin-left:10px;}
a:hover.re_select{background:url(images/pic_select02.png) 0 0 no-repeat;}
.re_open{display:block; width:46px; height:22px; background:url(images/pic_open01.png) 0 0 no-repeat; color:#fff; font-weight:bold; margin-left:10px;}
a:hover.re_open{background:url(images/pic_open02.png) 0 0 no-repeat;}
a.re_de{ color:#6883b6; margin-left:15px;}
.re_con_box{ border-bottom:1px dashed #dadada; padding:10px 0;}
/****翻页***/
ul.wlist{ float:right; border-bottom:none; height:30px; margin-top:20px; }
.wlist li{float: left;}
.wlist span{ border:1px solid #15bccf; padding:0 5px; margin-left:3px;}
.wlist a{display: block; border:1px solid #15bccf; padding:0 5px; margin-left:3px;}
.wlist a:hover{ background:#15bccf; color:#fff; text-decoration:none;}
.wlist_select { background-color:#64bdd9; color:#fff; padding:0 5px; margin-left:3px; border:1px solid #64bdd9;}
/****标签***/
a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;}
.submit
{
height:21px !important;
border:0 !important;
cursor:pointer !important;
background:url(images/btn.png) no-repeat 0 0 !important;
width:42px !important;
margin-top:2px !important;
margin-left:3px !important;
border:none !important;
margin-left:0px !important;
box-shadow: none !important;
padding: 0px !important;
border-radius: 0 !important;
text-shadow: none !important;
}
.isTxt{background:#fbfbfb url(images/inputBg.png) repeat-x left top !important;height:22px !important;line-height:22px !important;border:1px solid #c1c1c1 !important;padding:0 5px !important;color:#666666 !important;}
.re_tag{ width: auto; padding:0 5px; height:22px; border:1px solid #f8df8c; background:#fffce6; margin-right:10px;}
.re_tag a{ color:#0d90c3;}
.tag_h span,.tag_h a{ margin-bottom:5px;}
/***弹框***/
.alert .close02{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-490px;background:url(images/close.png) no-repeat;cursor:pointer;}
.upload_con { }
.upload_con h2{ display:block; background:#eaeaea; font-size:14px; color:#343333; height:31px; width: auto; margin-top:25px; padding-left:20px; padding-top:5px;}
.upload_box{ width:430px; margin:15px auto;}
a.upload_btn{ display:block; float:left; margin-top:15px; width:80px; height:30px; text-align: center; color:#fff; font-size:14px; background:#15bccf; margin-right:15px;}
a:hover.upload_btn{ background:#55a1b9;}
a.upload_btn_grey{background:#a3a3a3;}
a:hover.upload_btn_grey{background:#8a8a8a;}
.upload_con p{ color:#808181;}
.upload_con a:hover{ text-decoration:none;}
#upload_file_count #count {
color: #F00;
font-size: 1.1em;
}