diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 3c815c7d8..a57b5f8a5 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -141,6 +141,23 @@ class AttachmentsController < ApplicationController 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 if @attachment.thumbnailable? && thumbnail = @attachment.thumbnail(:size => params[:size]) if stale?(:etag => thumbnail) @@ -326,6 +343,35 @@ class AttachmentsController < ApplicationController 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 def find_project @attachment = Attachment.find(params[:id]) diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index 145a73178..c8ce6ec31 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -807,6 +807,7 @@ class BidsController < ApplicationController @bid.is_evaluation = params[:bid][:is_evaluation] @bid.proportion = params[:bid][:proportion] @bid.evaluation_num = params[:bid][:evaluation_num] + @bid.open_anonymous_evaluation = params[:bid][:open_anonymous_evaluation] @bid.reward_type = 3 # @bid.budget = params[:bid][:budget] @bid.deadline = params[:bid][:deadline] @@ -863,6 +864,7 @@ class BidsController < ApplicationController @bid.is_evaluation = params[:bid][:is_evaluation] @bid.proportion = params[:bid][:proportion] @bid.evaluation_num = params[:bid][:evaluation_num] + @bid.open_anonymous_evaluation = params[:bid][:open_anonymous_evaluation] @bid.reward_type = 3 @bid.deadline = params[:bid][:deadline] @bid.budget = 0 diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index dc7e97054..bd389ff68 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -512,6 +512,7 @@ class CoursesController < ApplicationController def new_homework @homework = Bid.new @homework.safe_attributes = params[:bid] + @homework.open_anonymous_evaluation = 1 if (User.current.logged? && User.current.member_of_course?(Course.find params[:id] )) render :layout => 'base_courses' else diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 91176efdf..6de800efc 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -22,22 +22,55 @@ class FilesController < ApplicationController menu_item :files 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 include SortHelper helper :project_score def show_attachments obj - all_attachments = [] + @all_attachments = [] obj.each do |container| - all_attachments += container.attachments + @all_attachments += container.attachments end @limit = 10 - @feedback_count = all_attachments.count + @feedback_count = @all_attachments.count @feedback_pages = Paginator.new @feedback_count, @limit, params['page'] @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 def index @@ -48,7 +81,9 @@ class FilesController < ApplicationController 'size' => "#{Attachment.table_name}.filesize", 'downloads' => "#{Attachment.table_name}.downloads" sort = "" - + @sort = "" + @order = "" + @is_remote = false if params[:project_id] @isproject = true @@ -113,7 +148,8 @@ class FilesController < ApplicationController when "created_on" attribute = "created_on" end - + @sort = order_by[0] + @order = order_by[1] if order_by.count == 1 sort += "#{Attachment.table_name}.#{attribute} asc " elsif order_by.count == 2 @@ -134,6 +170,10 @@ class FilesController < ApplicationController end + def quote_resource_show + @file = Attachment.find(params[:id]) + end + def new @versions = @project.versions.sort @course_tag = @project.project_type diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 97c0ce4f6..f3c2b199c 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -17,7 +17,6 @@ class IssuesController < ApplicationController layout 'base_projects'#Added by young - menu_item :new_issue, :only => [:new, :create] default_search_scope :issues before_filter :find_issue, :only => [:show, :edit, :update] @@ -59,8 +58,8 @@ class IssuesController < ApplicationController sort_init(@query.sort_criteria.empty? ? [['id', 'desc']] : @query.sort_criteria) sort_update(@query.sortable_columns) @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? case params[:format] diff --git a/app/controllers/memos_controller.rb b/app/controllers/memos_controller.rb index 9257888dd..aaa99e417 100644 --- a/app/controllers/memos_controller.rb +++ b/app/controllers/memos_controller.rb @@ -19,7 +19,7 @@ class MemosController < ApplicationController @content = "#{ll(Setting.default_language, :text_user_wrote, @memo.author)}
  " @content << @memo.content.to_s.strip.gsub(%r{
((.|\s)*?)
}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n") + "\n\n
" - @content = "
" << @content + @content = "
" << @content #@content = "> #{ll(Setting.default_language, :text_user_wrote, @memo.author)}\n> " #@content << @memo.content.to_s.strip.gsub(%r{
((.|\s)*?)
}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n" #@content_html = textilizable(@content) diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index b64c18b33..5bd5fb0e3 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -14,12 +14,14 @@ class TagsController < ApplicationController include AttachmentsHelper include ContestsHelper include ActsAsTaggableOn::TagsHelper + include TagsHelper helper :projects helper :courses helper :tags include OpenSourceProjectsHelper before_filter :require_admin,:only => [:delete,:show_all] + before_filter :require_login,:only => [:tag_save] # $selected_tags = Array.new # $related_tags = Array.new @@ -187,6 +189,83 @@ class TagsController < ApplicationController # 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 # 这里用来刷新搜索结果的区域 @@ -307,5 +386,7 @@ class TagsController < ApplicationController return end end + + end diff --git a/app/helpers/attachments_helper.rb b/app/helpers/attachments_helper.rb index 7ea49dad2..3c882d393 100644 --- a/app/helpers/attachments_helper.rb +++ b/app/helpers/attachments_helper.rb @@ -177,6 +177,8 @@ module AttachmentsHelper s.html_safe end + + # Modified by Longjun # 有参数的方法要加() def private_filter(resultSet) diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index ac22ed412..178782da3 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -328,7 +328,7 @@ module CoursesHelper #当前用户是不是指定课程的学生 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 - !(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 #@membership = User.current.memberships.all(:conditions => Project.visible_condition(User.current)) diff --git a/app/helpers/files_helper.rb b/app/helpers/files_helper.rb index 052aae468..4f3f401c9 100644 --- a/app/helpers/files_helper.rb +++ b/app/helpers/files_helper.rb @@ -44,6 +44,16 @@ module FilesHelper File.new(zipfile_name,'w+') 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 << "
" + end + end + s.html_safe + end + # 判断指定的资源时候符合类型 def isTypeOk(attachment, type, contentType) result = false diff --git a/app/models/forum.rb b/app/models/forum.rb index e0592723e..61ba528a0 100644 --- a/app/models/forum.rb +++ b/app/models/forum.rb @@ -30,7 +30,7 @@ class Forum < ActiveRecord::Base def destroyable_by? user # user && user.logged? && Forum.find(self.forum_id).creator_id == user.id || user.admin? - user.admin? + self.creator == user || user.admin? end # Updates topic_count, memo_count and last_memo_id attributes for +board_id+ diff --git a/app/models/memo.rb b/app/models/memo.rb index b02564834..cfc509923 100644 --- a/app/models/memo.rb +++ b/app/models/memo.rb @@ -88,11 +88,11 @@ class Memo < ActiveRecord::Base def editable_by? user # user && user.logged? || (self.author == usr && usr.allowed_to?(:edit_own_messages, project)) - user.admin? + user.admin? || self.author == user end 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? end diff --git a/app/views/account/email_valid.html.erb b/app/views/account/email_valid.html.erb index 6f4de1197..c77c0294e 100644 --- a/app/views/account/email_valid.html.erb +++ b/app/views/account/email_valid.html.erb @@ -11,7 +11,7 @@ <% email = @user.mail.split("@")[1] %> -
+

邮箱激活

@@ -19,9 +19,10 @@
-

请在24小时内点击邮件中的链接继续完成注册

-
- 邮件已发送到邮箱 +

请在24小时内点击邮件中的链接继续完成注册

+
+
+ 邮件已发送到邮箱 <%= @user.mail %>

@@ -33,12 +34,7 @@ padding: 10px 16px; line-height: 1.33;" target="_blank">立即查收邮件

- - 没收到邮件? - -
- - 请先检查是否在垃圾邮件中 +
diff --git a/app/views/account/register.html.erb b/app/views/account/register.html.erb index 32940d111..0bebfdf5f 100644 --- a/app/views/account/register.html.erb +++ b/app/views/account/register.html.erb @@ -19,15 +19,15 @@

<%= f.text_field :login, :size => 25, :required => true %> <%= l(:label_max_number) %>

-

<%= f.password_field :password, :size => 25, :required => true %> +

<%= f.password_field :password, :size => 25, :required => true %> <%= l(:text_caracters_minimum, :count => Setting.password_min_length) %>

-

<%= f.password_field :password_confirmation, :size => 25, :required => true %>

+

<%= f.password_field :password_confirmation, :size => 25, :required => true %>

<% end %>

<%= f.text_field :mail,:size => 25, :required => true %> - +

@@ -56,10 +56,12 @@

<%= custom_field_tag_with_label :user, value %>

<% end %>
+<% password_min_length = Setting.password_min_length %> + + <% if bids.blank? %> <%#= l(:label_uncommit_homework) %> 暂无作业! @@ -26,7 +60,15 @@ <% if User.current.logged? && is_cur_course_student(@course) %> <% cur_user_homework = cur_user_homework_for_bid(bid) %> <% if cur_user_homework!= nil && cur_user_homework.empty? %> - <%= link_to l(:label_commit_homework),new_exercise_book_path(bid) %> + <% if bid.comment_status == 0 || bid.comment_status == 2%> + + <%= link_to l(:label_commit_homework),new_exercise_book_path(bid) %> + + <% else %> + + 提交作业 + + <% end %> <% else %> <%= l(:lable_has_commit_homework)%> @@ -34,7 +76,8 @@ <% end %> <% end %> <% if (User.current.admin?||User.current.id==bid.author_id) %> - + <% if bid.open_anonymous_evaluation == 1%> + <% case bid.comment_status %> <% when 0 %> <%= link_to '启动匿评', alert_anonymous_comment_bid_path(bid), id: "#{bid.id}_start_anonymous_comment", remote: true, disable_with: '加载中...' %> @@ -44,11 +87,13 @@ 匿评结束 <% end %> - <%= link_to( + <%end%> + + <%= link_to( l(:button_edit), - {:action => 'edit', :controller=>'bids', :course_id =>@course.id, :bid_id => bid.id}, - :class => 'icon icon-edit' + {:action => 'edit', :controller=>'bids', :course_id =>@course.id, :bid_id => bid.id} ) %> + <%#= link_to( l(:button_delete), {:action => 'homework_destroy', :controller=>'bids', :course_id => bid.id}, @@ -94,19 +139,6 @@ ) - - <% if betweentime(bid.deadline) < 0 %> - - <%= l(:label_commit_limit)%> - - <% else %> - <% if betweentime(bid.deadline) < 3 %> - - <%= l(:label_commit_ar) %> - - <% end %> - <% end %> - @@ -146,10 +178,18 @@ <%=format_time bid.created_on %> - <%= l(:field_deadline) %> - :  - <%=bid.deadline %> - + <% if betweentime(bid.deadline) < 0 %> + + <%= l(:label_commit_limit)%> + + <% else %> + + + + <% end %> + diff --git a/app/views/bids/_homework.html.erb b/app/views/bids/_homework.html.erb index 078ca8000..7cde4f31d 100644 --- a/app/views/bids/_homework.html.erb +++ b/app/views/bids/_homework.html.erb @@ -43,9 +43,9 @@ <% end %> <% unless @is_teacher%> - <% if @bid.comment_status == 0%> + <% if @bid.comment_status == 0 && @bid.open_anonymous_evaluation == 1%> $("#my_homework").click(); - <% elsif @bid.comment_status == 2%> + <% elsif @bid.comment_status == 2 || @bid.open_anonymous_evaluation == 0%> $("#all_homeworks").click(); <% end %> <% end %> diff --git a/app/views/bids/_homework_form.html.erb b/app/views/bids/_homework_form.html.erb index 448e4144a..cd682deb0 100644 --- a/app/views/bids/_homework_form.html.erb +++ b/app/views/bids/_homework_form.html.erb @@ -44,6 +44,10 @@ <%= f.select :proportion, proportion_option %>

+ <%= f.check_box :open_anonymous_evaluation, :style => "margin-left:10px;" %> + 未开启匿评作业将直接进入众评点赞阶段 +

+

<%= f.text_field :evaluation_num, :required => true, :size => 60, :style => "width:150px;", :onblur => "regexEvaluationNum();" , :maxlength => 4%> 匿评分配数量不宜太大,否则会影响开启匿评速度

diff --git a/app/views/bids/_homework_list.html.erb b/app/views/bids/_homework_list.html.erb index acbcbc2fa..036289b0a 100644 --- a/app/views/bids/_homework_list.html.erb +++ b/app/views/bids/_homework_list.html.erb @@ -28,14 +28,17 @@ <% else %>
    -
  • - <%= link_to @bid.comment_status == 2 ? "已评作品" : "待评作品", get_student_batch_homework_homework_attach_index_path(:bid_id => @bid.id), {id: 'student_batch_homework',:remote => true}%> -
  • + <% if @bid.open_anonymous_evaluation == 1%> +
  • + + <%= link_to @bid.comment_status == 2 ? "已评作品" : "待评作品", get_student_batch_homework_homework_attach_index_path(:bid_id => @bid.id), {id: 'student_batch_homework',:remote => true}%> +
  • + <% end %>
  • <%= link_to "我的作品", get_my_homework_homework_attach_index_path(:bid_id => @bid.id), {id: 'my_homework',:remote => true}%>
  • - <% if @bid.comment_status == 2 %> - + <% if @bid.comment_status == 2 || @bid.open_anonymous_evaluation == 0%> +
  • <%= link_to "所有作品", get_homeworks_homework_attach_index_path(:bid_id => @bid.id), {id: 'all_homeworks',:remote => true}%>
  • diff --git a/app/views/bids/edit.html.erb b/app/views/bids/edit.html.erb index 322b8cdc3..0a2d17e7d 100644 --- a/app/views/bids/edit.html.erb +++ b/app/views/bids/edit.html.erb @@ -43,35 +43,66 @@ { var evaluation_num = $.trim($("#bid_evaluation_num").val()); var regex = /^\d+$/; - if(evaluation_num=="") + if($("#bid_open_anonymous_evaluation").attr("checked") == "checked") { - $("#bid_evaluation_num_span").text("匿评分配数量不能为空"); - $("#bid_evaluation_num_span").css('color','#ff0000'); - return false; - } - else if(regex.test(evaluation_num)) - { - if(evaluation_num > 0) + if(evaluation_num=="") { - $("#bid_evaluation_num_span").text("填写正确"); - $("#bid_evaluation_num_span").css('color','#008000'); - return true; + $("#bid_evaluation_num_span").text("匿评分配数量不能为空"); + $("#bid_evaluation_num_span").css('color','#ff0000'); + return false; + } + else if(regex.test(evaluation_num)) + { + if(evaluation_num > 0) + { + $("#bid_evaluation_num_span").text("填写正确"); + $("#bid_evaluation_num_span").css('color','#008000'); + return true; + } + else + { + $("#bid_evaluation_num_span").text("匿评分配数量必须为大于0"); + $("#bid_evaluation_num_span").css('color','#ff0000'); + return false; + } } else { - $("#bid_evaluation_num_span").text("匿评分配数量必须为大于0"); + $("#bid_evaluation_num_span").text("匿评分配数量只能为数字"); $("#bid_evaluation_num_span").css('color','#ff0000'); return false; } } else { - $("#bid_evaluation_num_span").text("匿评分配数量只能为数字"); - $("#bid_evaluation_num_span").css('color','#ff0000'); - return false; + 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) { if(regexDeadLine()&®exName()&®exEvaluationNum()) diff --git a/app/views/boards/_course_show.html.erb b/app/views/boards/_course_show.html.erb index fd1dd3e00..cde2019a1 100644 --- a/app/views/boards/_course_show.html.erb +++ b/app/views/boards/_course_show.html.erb @@ -19,8 +19,9 @@ <%= form_for @message, :url => new_board_message_path(@board), :html => {:multipart => false, :id => 'message-form'} do |f| %> <%= render :partial => 'messages/form', :locals => {:f => f} %>

    - - <%= link_to l(:button_cancel), "#", :onclick => '$("#add-message").hide(); return false;' ,:class => 'whiteButton m3p10' %> + + <%= l(:button_submit)%> + <%= link_to l(:button_cancel), "#", :onclick => '$("#add-message").hide(); return false;' ,:class => 'ButtonColor m3p10' %>

    <% end %>
    diff --git a/app/views/courses/_course_ad.html.erb b/app/views/courses/_course_ad.html.erb index f8b4781f8..efac79afc 100644 --- a/app/views/courses/_course_ad.html.erb +++ b/app/views/courses/_course_ad.html.erb @@ -33,12 +33,11 @@ var xstep=1; // 移动步长,此参数越小,移动越平滑,最小值为1 var delay_time=60; // 每步的时间间隔,此参数越小,移动速度越快 var YY=0; - var screen_height = $(window).height(); //浏览器当前窗口文档的高度 - var screen_width = $(window).width(); //浏览器当前窗口文档的宽度 window.setInterval(function(){move();},delay_time); function move() { + var screen_height = $(window).height(); //浏览器当前窗口文档的高度 var floatpoint_height = $("#floatpoint").height(); YY += xstep; if(YY <= 0){xstep = 1; YY = 0;} //如果浮动层超出了上界,则设定移动方向为向下;并设定层的位置为正好在上界处 @@ -47,9 +46,9 @@ xstep = -1; 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();}); - $(window).resize(function(){screen_width = $(window).width();change_size();}); + $(window).resize(function(){change_size();}); \ No newline at end of file diff --git a/app/views/courses/_homework_form.html.erb b/app/views/courses/_homework_form.html.erb index 9d5ad1155..8ce6be3fe 100644 --- a/app/views/courses/_homework_form.html.erb +++ b/app/views/courses/_homework_form.html.erb @@ -49,6 +49,10 @@ <%= f.select :proportion, proportion_option %>

    + <%= f.check_box :open_anonymous_evaluation, :style => "margin-left:10px;" %> + 未开启匿评作业将直接进入众评点赞阶段 +

    +

    <%= f.text_field :evaluation_num, :required => true, :size => 60, :style => "width:150px;", :onblur => "regexEvaluationNum();" , :maxlength => 4%> 匿评分配数量不宜太大,否则会影响开启匿评速度

    diff --git a/app/views/courses/new_homework.html.erb b/app/views/courses/new_homework.html.erb index 753aa20c8..7b6784243 100644 --- a/app/views/courses/new_homework.html.erb +++ b/app/views/courses/new_homework.html.erb @@ -43,35 +43,55 @@ { var evaluation_num = $.trim($("#bid_evaluation_num").val()); var regex = /^\d+$/; - if(evaluation_num=="") + if($("#bid_open_anonymous_evaluation").attr("checked") == "checked") { - $("#bid_evaluation_num_span").text("匿评分配数量不能为空"); - $("#bid_evaluation_num_span").css('color','#ff0000'); - return false; - } - else if(regex.test(evaluation_num)) - { - if(evaluation_num > 0) + if(evaluation_num=="") { - $("#bid_evaluation_num_span").text("填写正确"); - $("#bid_evaluation_num_span").css('color','#008000'); - return true; + $("#bid_evaluation_num_span").text("匿评分配数量不能为空"); + $("#bid_evaluation_num_span").css('color','#ff0000'); + return false; + } + else if(regex.test(evaluation_num)) + { + if(evaluation_num > 0) + { + $("#bid_evaluation_num_span").text("填写正确"); + $("#bid_evaluation_num_span").css('color','#008000'); + return true; + } + else + { + $("#bid_evaluation_num_span").text("匿评分配数量必须为大于0"); + $("#bid_evaluation_num_span").css('color','#ff0000'); + return false; + } } else { - $("#bid_evaluation_num_span").text("匿评分配数量必须为大于0"); + $("#bid_evaluation_num_span").text("匿评分配数量只能为数字"); $("#bid_evaluation_num_span").css('color','#ff0000'); return false; } } else { - $("#bid_evaluation_num_span").text("匿评分配数量只能为数字"); - $("#bid_evaluation_num_span").css('color','#ff0000'); - return false; + 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() { if(regexDeadLine()&®exName()&®exEvaluationNum()) diff --git a/app/views/files/_arrow_show.erb b/app/views/files/_arrow_show.erb new file mode 100644 index 000000000..d8f094719 --- /dev/null +++ b/app/views/files/_arrow_show.erb @@ -0,0 +1,10 @@ + +<% if sort == current %> + <% if order =="asc" %> + ↑ + <% elsif order == "desc" %> + ↓ + <% else %> + + <% end %> +<% end %> \ No newline at end of file diff --git a/app/views/files/_attachement_list.html.erb b/app/views/files/_attachement_list.html.erb new file mode 100644 index 000000000..f65ba8d41 --- /dev/null +++ b/app/views/files/_attachement_list.html.erb @@ -0,0 +1,46 @@ +
    + +<% if defined?(container) && container && container.saved_attachments %> + <% container.attachments.each_with_index do |attachment, i| %> + + <%= 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;") %> + <%= l(:field_is_public)%>: + <%= 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(' '.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}" %> + + <% end %> +<% end %> + +
    + + +<%= 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) + } %> + + \ No newline at end of file diff --git a/app/views/files/_course_file.html.erb b/app/views/files/_course_file.html.erb index 46a954746..49747ae11 100644 --- a/app/views/files/_course_file.html.erb +++ b/app/views/files/_course_file.html.erb @@ -2,84 +2,43 @@ <% sufixtypes = @course.contenttypes %> -<%= t(:label_user_course) %>资源共享区 +<%= stylesheet_link_tag 'resource', :media => 'all' %> + - <%= 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) %> - <%= 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) %> -

    - +
    +
    +
    + <%= form_tag( search_course_files_path(@course), method: 'get',:class => "re_search f_l",:remote=>true) do %> + <%= text_field_tag 'name', params[:name], name: "name", :class => 're_schbox',:style=>"padding: 0px"%> + <%= submit_tag "课内搜索", :class => "re_schbtn b_dblue",:name => "incourse"%> + <%= submit_tag "全站搜索", :class => "re_schbtn b_lblue",:name => "insite" %> + <% end %> + <% if is_course_teacher(User.current,@course) %> + 上传资源 + <% end %> +
    +
    - - -
    -
    - - <% if attachmenttypes.any? %> -       - - <%= 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 %> - <% if sufixtypes.any? %> -   - - <%= 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 %> -
    +
    +<%= render :partial => 'course_list',:locals => {course: @course,all_attachments: @all_attachments,sort:@sort,order:@order,curse_attachments:@curse_attachments} %> +
    -<%= 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) %> - -
    - <%#= 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%>
    - <% html_title(l(:label_attachment_plural)) -%> \ No newline at end of file diff --git a/app/views/files/_course_list.html.erb b/app/views/files/_course_list.html.erb new file mode 100644 index 000000000..fa22c404d --- /dev/null +++ b/app/views/files/_course_list.html.erb @@ -0,0 +1,56 @@ +<% delete_allowed = User.current.allowed_to?(:manage_files, course) %> +
    +

    共有 <%= User.current.member_of_course?(course) ? all_attachments.count : 0 %> 个资源

    + +
    +
    +<% curse_attachments.each do |file| %> + <%if file.is_public == 0 && !User.current.member_of_course?(@course)%> + <%next%> + <%end%> +
    +
    + <%= 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" %> + + <%= 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 %> + + <% 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 %> +
    +
    +
    +

    文件大小:<%= number_to_human_size(file.filesize) %>

    + <%= 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"%> +

    <%= time_tag(file.created_on).html_safe %><%= l(:label_bids_published_ago) %>  |  下载<%= file.downloads %>  |  引用0

    +
    +
    +
    + <%= render :partial => 'tags/tag_new', :locals => {:obj => file, :object_flag => "6"} %> + <%= render :partial => 'tags/tag_add', :locals => {:obj => file, :object_flag => "6"} %> +
    +
    +
    +<% end %> +
      + <%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => @is_remote, :flag => true%> +
    +
    \ No newline at end of file diff --git a/app/views/files/_show_quote_resource.html.erb b/app/views/files/_show_quote_resource.html.erb new file mode 100644 index 000000000..ef907f40f --- /dev/null +++ b/app/views/files/_show_quote_resource.html.erb @@ -0,0 +1,24 @@ +
    +
    +
    +

    将此课件引入我的课程资源库

    +
    + <%= 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')%> + 引  用取  消 + <% end -%> +
    + +
    +
    + + \ No newline at end of file diff --git a/app/views/files/_upload_show.html.erb b/app/views/files/_upload_show.html.erb new file mode 100644 index 000000000..a979715de --- /dev/null +++ b/app/views/files/_upload_show.html.erb @@ -0,0 +1,26 @@ +
    +
    +

    上传资源

    +
    + <%= error_messages_for 'attachment' %> + + <%= form_tag(course_files_path(course), :multipart => true,:remote => true,:method => :post,:name=>"upload_form") do %> + + <%= render :partial => 'attachement_list',:locals => {:course => course} %> +
    + 上传资源取  消 + <% end %> +
    + +
    + <% content_for :header_tags do %> + <%= javascript_include_tag 'attachments' %> + <% end %> +
    + + \ No newline at end of file diff --git a/app/views/files/create.js.erb b/app/views/files/create.js.erb index 0eca9c1ed..90215c16c 100644 --- a/app/views/files/create.js.erb +++ b/app/views/files/create.js.erb @@ -27,6 +27,8 @@ $('#upload_file_div').slideToggle('slow'); $("#all_browse_div").html('<%= j(render partial: "show_all_attachment")%>'); <%elsif @course%> $("#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 %> diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb index 69b41fc28..fe04c4e3f 100644 --- a/app/views/files/index.html.erb +++ b/app/views/files/index.html.erb @@ -1,10 +1,11 @@ +
    <% if @isproject %> <%= render :partial => 'project_file', locals: {project: @project} %> <% else %> <%= render :partial => 'course_file', locals: {course: @course} %> <% end %> - +
    -

    (<%= l(:label_forums_max_length) %>)

    +

    + (<%= l(:label_forums_max_length) %>) +

<%= submit_tag l(:button_submit) %> diff --git a/app/views/forums/_forum_list.html.erb b/app/views/forums/_forum_list.html.erb index 874dc355f..fe2f757c3 100644 --- a/app/views/forums/_forum_list.html.erb +++ b/app/views/forums/_forum_list.html.erb @@ -4,23 +4,54 @@ <% forums.each do |forum| %>
- <%= 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)) %> +
- - - - +
-

<%= link_to h(forum.name), forum_path(forum) %>

<%= textAreailizable forum.description%>

<%= authoring forum.created_at, forum.creator %>

+ + + + + + + + +
+

+ <%= link_to h(forum.name), forum_path(forum) %> +

+
+

+ <%= textAreailizable forum.description%> +

+
+

+ <%= authoring forum.created_at, forum.creator %> +

+
- -
<%= link_to (forum.memo_count), forum_path(forum) %><%= link_to (forum.topic_count), forum_path(forum) %>
回答帖子
+ + + + + + + + + +
+ <%= link_to (forum.memo_count), forum_path(forum) %> + + <%= link_to (forum.topic_count), forum_path(forum) %> +
回答帖子
+
<% end %> - + <% else %> <% end %>
\ No newline at end of file diff --git a/app/views/forums/index.html.erb b/app/views/forums/index.html.erb index 31d00891e..18ac7f752 100644 --- a/app/views/forums/index.html.erb +++ b/app/views/forums/index.html.erb @@ -7,12 +7,15 @@ - + - - + +
公共贴吧 <%= l(:label_user_location) %> : + + <%= l(:label_user_location) %> : + + - <% if User.current.logged? %> - <%= link_to( l(:label_forum_new), new_forum_path, :class => 'icon icon-add') %> - <% end %> - + <% if User.current.logged? %> + <%= link_to( l(:label_forum_new), new_forum_path, :class => 'icon icon-add') %> + <% end %>
<%= link_to request.host()+"/forums", forums_path %> <%= link_to l(:field_homepage), home_path %> > <%= link_to "公共贴吧", forums_path %> + + <%= link_to request.host()+"/forums", forums_path %> + + + <%= link_to l(:field_homepage), home_path %> > + <%= link_to "公共贴吧", forums_path %> +
diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb index 642cf5b15..85fa8093a 100644 --- a/app/views/forums/show.html.erb +++ b/app/views/forums/show.html.erb @@ -1,16 +1,25 @@
-

<%=l(:label_memo_new)%>

+

+ <%=l(:label_memo_new)%> +

<% if User.current.logged? %> <%= labelled_form_for(@memo, :url => create_memo_forum_path(@forum), :html => {:multipart => true} ) do |f| %>
-

<%= f.text_field :subject, :required => true%>

-

<%= f.text_area :content, :required => true, :id => 'editor02' %>

- -

(<%= l(:label_memos_max_length) %>)

- <%= l(:label_attachment_plural) %>
- <%= render :partial => 'attachments/form', :locals => {:container => @memo} %> + <%= f.text_field :subject, :required => true, :maxlength => 50%> +

+

+ <%= f.text_area :content, :required => true, :id => 'editor02' %> +

+ +

+ (<%= l(:label_memos_max_length) %>) +

+

+ <%= l(:label_attachment_plural) %> +
+ <%= render :partial => 'attachments/form', :locals => {:container => @memo} %>

<%= f.submit :value => l(:label_memo_create) %> <%= link_to l(:button_cancel), "#", :onclick => '$("#add-memo").hide(); return false;' %> diff --git a/app/views/homework_attach/_homeworks_list.html.erb b/app/views/homework_attach/_homeworks_list.html.erb index c778588f7..c40004d02 100644 --- a/app/views/homework_attach/_homeworks_list.html.erb +++ b/app/views/homework_attach/_homeworks_list.html.erb @@ -35,13 +35,13 @@
  • 您还没交作业,请创建作业!
  • - <% if @bid.comment_status == 0 %> + <% if @bid.comment_status == 0 || @bid.comment_status == 1%>
  • <%= link_to "提交作业", new_exercise_book_path(@bid), :style => "width:80px; margin:20px 0 0 350px;" %>
  • <% else %> -
  • +
  • 提交作业
  • <% end %> diff --git a/app/views/issues/new.html.erb b/app/views/issues/new.html.erb index 4b0140b1c..efa3adc2e 100644 --- a/app/views/issues/new.html.erb +++ b/app/views/issues/new.html.erb @@ -41,9 +41,9 @@ <% end %>
    - <%= submit_tag l(:button_create) %> - <%= submit_tag l(:button_create_and_continue), :name => 'continue' %> - <%= preview_link preview_new_issue_path(:project_id => @project), 'issue-form' %> + <%= submit_tag l(:button_create), :class => "ButtonAddTags"%> + <%= submit_tag l(:button_create_and_continue), :class => 'ButtonAddTags' %> + <%= preview_link preview_new_issue_path(:project_id => @project), 'issue-form','preview',{:class => "ButtonColor"}%> <%= javascript_tag "$('#issue_subject').focus();" %> <% end %> diff --git a/app/views/layouts/_user_courses_list.html.erb b/app/views/layouts/_user_courses_list.html.erb index d3da499dc..250ab1d5f 100644 --- a/app/views/layouts/_user_courses_list.html.erb +++ b/app/views/layouts/_user_courses_list.html.erb @@ -1,6 +1,6 @@ <% if hasCourse %>
  • - <%=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) %>
      <% course_index = 0 %> <% User.current.courses.each do |course| %> diff --git a/app/views/layouts/_user_homework_list.html.erb b/app/views/layouts/_user_homework_list.html.erb index 9eddc94d9..446222bd3 100644 --- a/app/views/layouts/_user_homework_list.html.erb +++ b/app/views/layouts/_user_homework_list.html.erb @@ -1,10 +1,10 @@ <% if course %>
    • - <%= link_to course.name, {:controller => 'courses',:action => 'show',id:course.id} %> + <%= link_to course.name, course_path(course.id, host: Setting.host_course) %>
        <% course.homework_for_courses.map(&:bid).each do |bid| %>
      • - <%= 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" %>
      • <% end %>
      diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index 6de46d2fe..86f48fbd7 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -24,7 +24,7 @@ -<%= render :partial => 'courses/course_ad' %> +
      diff --git a/app/views/layouts/base_homework.html.erb b/app/views/layouts/base_homework.html.erb index 6a1db48d5..b3336fb46 100644 --- a/app/views/layouts/base_homework.html.erb +++ b/app/views/layouts/base_homework.html.erb @@ -106,6 +106,7 @@ <% if (User.current.admin?||User.current.id==@bid.author_id) %> + <% if @bid.open_anonymous_evaluation == 1%> <% case @bid.comment_status %> <% when 0 %> @@ -116,6 +117,7 @@ 匿评结束 <% end %> + <%end%> <% end %> diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index 14be707f3..ee490c653 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -133,7 +133,7 @@
      - <%= render_main_menu(@project) %> + <%= render_main_menu(@project) %>
      <%= render_flash_messages %> <%= yield %> diff --git a/app/views/memos/_reply_box.html.erb b/app/views/memos/_reply_box.html.erb index e3346ee32..938952c32 100644 --- a/app/views/memos/_reply_box.html.erb +++ b/app/views/memos/_reply_box.html.erb @@ -1,5 +1,5 @@ <%= 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 :parent_id, :required => true, value: @memo.id %>
      @@ -7,11 +7,12 @@ <%= hidden_field_tag :quote,"",:required => false,:style => 'display:none' %> <%= label_tag(l(:label_reply_plural)) %>: - <%= f.text_area :content, :cols => 80, :rows => 15, :class => 'wiki-edit', :id => 'editor01', :value => @content %>

      - + <%= f.text_area :content, :cols => 80, :rows => 15, :class => 'wiki-edit', :id => 'editor01', :value => @content %> -

      <%= l(:label_attachment_plural) %>
      - <%= render :partial => 'attachments/form' %> +

      + <%= l(:label_attachment_plural) %> +
      + <%= render :partial => 'attachments/form' %>

      <%= f.submit value: l(:label_reply_plural), class: "replies" %> <% end %> \ No newline at end of file diff --git a/app/views/memos/edit.html.erb b/app/views/memos/edit.html.erb index ded3a1b12..09e4262fe 100644 --- a/app/views/memos/edit.html.erb +++ b/app/views/memos/edit.html.erb @@ -4,30 +4,43 @@ <%= labelled_form_for(@memo, :url => forum_memo_path(@memo.forum_id, @memo)) do |f| %> <% if @memo.errors.any? %>
      -

      <%= pluralize(@memo.errors.count, "error") %> prohibited this memo from being saved:

      +

      + <%= pluralize(@memo.errors.count, "error") %> + prohibited this memo from being saved: +

        <% @memo.errors.full_messages.each do |msg| %> -
      • <%= msg %>
      • +
      • + <%= msg %> +
      • <% end %>
      <% end %>
      -

      <%= f.text_field :subject, :required => true, :size => 96 ,:readonly => @replying%>

      - <% unless @replying %> - <% if @memo.safe_attribute? 'sticky' %> - <%= f.check_box :sticky %> <%= label_tag 'memo_sticky', l(:label_board_sticky) %> - <% end %> - <% if @memo.safe_attribute? 'lock' %> - <%= f.check_box :lock %> <%= label_tag 'memo_locked', l(:label_board_locked) %> - <% end %> - <% end %> + <%= f.text_field :subject, :required => true, :size => 96 ,:readonly => @replying, :maxlength => 50%> +

      + <% if User.current.admin?%> +

      + <% unless @replying %> + <% if @memo.safe_attribute? 'sticky' %> + <%= f.check_box :sticky %> + <%= label_tag 'memo_sticky', l(:label_board_sticky) %> + <% end %> + <% if @memo.safe_attribute? 'lock' %> + <%= f.check_box :lock %> <%= label_tag 'memo_locked', l(:label_board_locked) %> + <% end %> + <% end %> +

      + <% end %> +

      + <%= f.text_area :content, :required => true, :size => 80, id: 'editor01' %>

      -

      <%= f.text_area :content, :required => true, :size => 80, id: 'editor01' %>

      - <%= l(:label_attachment_plural) %>
      + <%= l(:label_attachment_plural) %> +
      <%= render :partial => 'attachments/form', :locals => {:container => @memo} %>


      diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index b7e5e2749..5222b466f 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -117,28 +117,34 @@

      - +
      - - +
      <%= link_to image_tag(url_to_avatar(reply.author), :class => "avatar"), user_path(reply.author) %> -
      <%=h sanitize(reply.content.html_safe) %>
      +
      +
      + <%=h sanitize(reply.content.html_safe) %> +

      <% if reply.attachments.any?%> - <% options = {:author => true, :deletable => reply.deleted_attach_able_by?(User.current) } %> - <%= render :partial => 'attachments/links', :locals => {:attachments => reply.attachments, :options => options} %> + <% options = {:author => true, :deletable => reply.deleted_attach_able_by?(User.current) } %> + <%= render :partial => 'attachments/links', :locals => {:attachments => reply.attachments, :options => options} %> <% end %>

      <%= authoring reply.created_at, reply.author %> + <%= authoring reply.created_at, reply.author %> +
      <% end %> - +
      <% if User.current.login? %> diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index 04793a02e..277a6eaca 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -106,7 +106,7 @@

      - <%= 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;'%> <%= l(:label_max_number) %>

      diff --git a/app/views/my/blocks/_assiagn_issue.html.erb b/app/views/my/blocks/_assiagn_issue.html.erb index 6e7df84fd..1cd940eb9 100644 --- a/app/views/my/blocks/_assiagn_issue.html.erb +++ b/app/views/my/blocks/_assiagn_issue.html.erb @@ -11,11 +11,13 @@
  • --> -

    <%= link_to l(:label_issue_view_all), :controller => 'issues', - :action => 'index', - :set_filter => 1, - :assigned_to_id => 'me', - :sort => 'priority:desc,updated_on:desc' %>

    +

    + <%#= link_to l(:label_issue_view_all), :controller => 'issues', + :action => 'index', + :set_filter => 1, + :assigned_to_id => 'me', + :sort => 'priority:desc,updated_on:desc' %> +

    <% end %> <% content_for :header_tags do %> <%= auto_discovery_link_tag(:atom, diff --git a/app/views/my/blocks/_issuesreportedbyme.html.erb b/app/views/my/blocks/_issuesreportedbyme.html.erb index 06bbda7f8..de5e20229 100644 --- a/app/views/my/blocks/_issuesreportedbyme.html.erb +++ b/app/views/my/blocks/_issuesreportedbyme.html.erb @@ -3,7 +3,7 @@ <% reported_issues = issuesreportedbyme_items %> <%= render :partial => 'issues/list_simple', :locals => { :issues => reported_issues } %> <% if reported_issues.length > 0 %> -

    <%= link_to l(:label_issue_view_all), :controller => 'issues', +

    <%#= link_to l(:label_issue_view_all), :controller => 'issues', :action => 'index', :set_filter => 1, :status_id => '*', diff --git a/app/views/my/blocks/_issueswatched.html.erb b/app/views/my/blocks/_issueswatched.html.erb index 510920a08..906a47b12 100644 --- a/app/views/my/blocks/_issueswatched.html.erb +++ b/app/views/my/blocks/_issueswatched.html.erb @@ -3,7 +3,7 @@ <%= render :partial => 'issues/list_simple', :locals => { :issues => watched_issues } %> <% if watched_issues.length > 0 %> -

    <%= link_to l(:label_issue_view_all), :controller => 'issues', +

    <%#= link_to l(:label_issue_view_all), :controller => 'issues', :action => 'index', :set_filter => 1, :watcher_id => 'me', diff --git a/app/views/tags/_tag.html.erb b/app/views/tags/_tag.html.erb index 4d3414a1f..63592d91a 100644 --- a/app/views/tags/_tag.html.erb +++ b/app/views/tags/_tag.html.erb @@ -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 :object_id,:value=> obj.id,:style=>"display:none"%> <%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%> - <%= f.submit l(:button_project_tags_add),:class => "small" %> - <%= link_to_function l(:button_cancel), '$("#put-tag-form").hide();'%> + <%= f.submit l(:button_project_tags_add),:class => "ButtonAddTags" %> + <%= link_to_function l(:button_cancel), '$("#put-tag-form").hide();',:class=>'ButtonColor'%> + <% end %>

    <% end %> diff --git a/app/views/tags/_tag_add.html.erb b/app/views/tags/_tag_add.html.erb new file mode 100644 index 000000000..14f2dc965 --- /dev/null +++ b/app/views/tags/_tag_add.html.erb @@ -0,0 +1,13 @@ +<%= link_to '+ 添加标签', 'javascript:void(0);', + :class => "yellowBtn f_l", + :onclick=>"$('#add_tag_#{obj.id}').slideToggle();" if User.current.logged? %> + \ No newline at end of file diff --git a/app/views/tags/_tag_list.html.erb b/app/views/tags/_tag_list.html.erb new file mode 100644 index 000000000..c815d71f8 --- /dev/null +++ b/app/views/tags/_tag_list.html.erb @@ -0,0 +1,20 @@ +<% @tags = obj.reload.tag_list %> + +<% if @tags.size > 0 %> + <% @tags.each do |tag| %> + <%= 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?%> + <%= link_to 'x', :controller => "tags", :action => "remove_tag_new", :remote => true, :tag_name => tag, + :taggable_id => obj.id, :taggable_type => object_flag %> + <% end %> + <% end %> + + <% end %> +<% else %> + +    <%= l(:label_tags_no) %> + +<% end %> \ No newline at end of file diff --git a/app/views/tags/_tag_new.html.erb b/app/views/tags/_tag_new.html.erb new file mode 100644 index 000000000..eb49005ae --- /dev/null +++ b/app/views/tags/_tag_new.html.erb @@ -0,0 +1,24 @@ + <%#begin + 1 代表是user类型 + 2 代表是project类型 + 3 代表是issue类型 + 4 代表是bid类型 + 5 代表是forum类型 + 6 代表是Attachment类型 + 7 代表是contest类型 + 8 代表是OpenSourceProject类型 + 9 代表是RelativeMemo类型 + #end%> + + <% if object_flag == '3' %> + + <% elsif object_flag == '6' %> +
    + <%= render :partial => "tags/tag_list",:locals => {:obj => obj,:object_flag => object_flag} %> +
    + + <% else %> + + <% end %> diff --git a/app/views/tags/remove_tag_new.js.erb b/app/views/tags/remove_tag_new.js.erb new file mode 100644 index 000000000..24d52a35f --- /dev/null +++ b/app/views/tags/remove_tag_new.js.erb @@ -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 %> \ No newline at end of file diff --git a/app/views/tags/tag_save.js.erb b/app/views/tags/tag_save.js.erb new file mode 100644 index 000000000..20ffb54cf --- /dev/null +++ b/app/views/tags/tag_save.js.erb @@ -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 %> \ No newline at end of file diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 7d13e404e..28994fe29 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -107,7 +107,7 @@ <%= l(:label_i_new_activity) %> - <%= 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) %> <% else %> @@ -117,7 +117,7 @@ <%= l(:label_new_activity) %>   - <%= 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) %> <% end %> <% else %> diff --git a/app/views/welcome/_course_list.html.erb b/app/views/welcome/_course_list.html.erb index c33cc841e..8d0d6c40d 100644 --- a/app/views/welcome/_course_list.html.erb +++ b/app/views/welcome/_course_list.html.erb @@ -1,5 +1,5 @@ <% course_list.map do |course| %> -
  • /,"") %>> +
  • <%= image_tag(get_course_avatar(course), :class => "avatar-4") %>
    @@ -9,11 +9,11 @@ <% unless course.is_public == 1 %> <%= l(:label_private) %> <% 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}") %> - <%= 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)%> diff --git a/config/locales/zh.yml b/config/locales/zh.yml index d89d078a7..3f4267b76 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -396,7 +396,8 @@ zh: setting_repository_log_display_limit: 在文件变更记录页面上显示的最大修订版本数量 setting_openid: 允许使用OpenID登录和注册 setting_password_min_length: 最短密码长度 - setting_password_error: 密码不一致 + setting_password_min_length_limit: "密码长度至少大于 %{count} 个字符。" + setting_password_error: 密码长度不够或密码不一致 setting_password_success: 密码设置成功 setting_new_project_user_role_id: 非管理员用户新建项目时将被赋予的(在该项目中的)角色 setting_default_projects_modules: 新建项目默认启用的模块 @@ -1598,7 +1599,7 @@ zh: label_tags_user_mail: 用户邮箱: label_tags_user_name: 用户名: label_tags_numbers: Tag统计: - label_max_number: 登录名是在网站中显示的您的公开标识,只能为英文。 + label_max_number: 登录名是在网站中显示的您的公开标识,只能为英文和数字。 label_mail_attention: qq邮箱可能收不到此邮件,其他邮箱如果没有收到可能在垃圾邮件中, label_mail_attention1: 其中gmail与教育网邮箱的激活邮件有时比较慢,请耐心等待。 label_your_course: 您的课程《 @@ -2202,3 +2203,4 @@ zh: label_submit_comments: 提交评论 field_evaluation_num: 匿评分配数量 label_my_score: 我的评分 + field_open_anonymous_evaluation: 是否开启匿评 diff --git a/config/routes.rb b/config/routes.rb index 1a2309c2c..1d28a9ae6 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -558,11 +558,13 @@ RedmineApp::Application.routes.draw do match 'attachments/autocomplete', :to => 'attachments#autocomplete', :via => [:post] 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/courserelationfiles', to: 'attachments#add_exist_file_to_courses', as: 'course_attach_relations' get 'attachments/renderTag/:attchmentId', :to => 'attachments#renderTag', :attchmentId => /\d+/ resources :attachments, :only => [:show, :destroy] do collection do match "updateType" , :via => [:get, :post] match "updateFileDense" , :via => [:get, :post] + match "update_file_dense", :via => [:post] match "renderTag" , :via => [:get, :post] match 'delete_softapplications', :via => [:get, :post] end @@ -652,6 +654,10 @@ RedmineApp::Application.routes.draw do resources :files, :only => [:index, :new, :create] do collection do match "getattachtype", :via => [:get, :post] + match "search",:via => [:post,:get] + end + member do + match "quote_resource_show", :via => [:get] end end 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 'tags/delete' 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' diff --git a/db/migrate/20141119011439_add_open_anonymous_evaluation.rb b/db/migrate/20141119011439_add_open_anonymous_evaluation.rb new file mode 100644 index 000000000..cea7143c4 --- /dev/null +++ b/db/migrate/20141119011439_add_open_anonymous_evaluation.rb @@ -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 diff --git a/db/migrate/20141120091234_add_column_copyfrom_to_attachment.rb b/db/migrate/20141120091234_add_column_copyfrom_to_attachment.rb new file mode 100644 index 000000000..cc8444f6d --- /dev/null +++ b/db/migrate/20141120091234_add_column_copyfrom_to_attachment.rb @@ -0,0 +1,5 @@ +class AddColumnCopyfromToAttachment < ActiveRecord::Migration + def change + add_column("attachments","copy_from",:integer) + end +end diff --git a/db/schema.rb b/db/schema.rb index f6fc138af..2e664eaa7 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # 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| t.integer "act_id", :null => false @@ -95,21 +95,22 @@ ActiveRecord::Schema.define(:version => 20141105012624) do create_table "bids", :force => true do |t| t.string "name" - t.string "budget", :null => false + t.string "budget", :null => false t.integer "author_id" t.date "deadline" t.text "description" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false t.integer "commit" t.integer "reward_type" t.integer "homework_type" t.integer "parent_id" t.string "password" t.integer "is_evaluation" - t.integer "proportion", :default => 60 - t.integer "comment_status", :default => 0 - t.integer "evaluation_num", :default => 3 + t.integer "proportion", :default => 60 + t.integer "comment_status", :default => 0 + t.integer "evaluation_num", :default => 3 + t.integer "open_anonymous_evaluation", :default => 1 end create_table "boards", :force => true do |t| diff --git a/public/images/files/btn.png b/public/images/files/btn.png new file mode 100644 index 000000000..85cea7f5c Binary files /dev/null and b/public/images/files/btn.png differ diff --git a/public/images/files/close.png b/public/images/files/close.png new file mode 100644 index 000000000..301ba5e85 Binary files /dev/null and b/public/images/files/close.png differ diff --git a/public/images/files/inputBg.png b/public/images/files/inputBg.png new file mode 100644 index 000000000..243bbf7ec Binary files /dev/null and b/public/images/files/inputBg.png differ diff --git a/public/images/files/pic_open01.png b/public/images/files/pic_open01.png new file mode 100644 index 000000000..45552ae00 Binary files /dev/null and b/public/images/files/pic_open01.png differ diff --git a/public/images/files/pic_open02.png b/public/images/files/pic_open02.png new file mode 100644 index 000000000..b457f302f Binary files /dev/null and b/public/images/files/pic_open02.png differ diff --git a/public/images/files/pic_select01.png b/public/images/files/pic_select01.png new file mode 100644 index 000000000..4f3b294fe Binary files /dev/null and b/public/images/files/pic_select01.png differ diff --git a/public/images/files/pic_select02.png b/public/images/files/pic_select02.png new file mode 100644 index 000000000..e620fad1f Binary files /dev/null and b/public/images/files/pic_select02.png differ diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index e691b87aa..1b1580d8c 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -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; } /***** 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 img{ border: 0; } @@ -1580,13 +1580,15 @@ form {display: inline;} /*added by bai*/ input[type="submit"].bid_btn { padding-bottom: 5px; - width: 55px; + width: 50px; height: 25px; + text-align: center; font-family: '微软雅黑', Arial, Helvetica, sans-serif; font-size: 12px; color: #fff; - padding: 0px; + padding: 8px; background: #15bccf; + text-align: center; border-radius: 4px; border: 1px solid #15bccf; 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; } +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 { /*padding-bottom: 5px;*/ width: 55px; @@ -1603,6 +1624,7 @@ input[type="button"].bid_btn { color: #fff; padding: 0px; background: #15bccf; + text-align: center; border-radius: 4px; border: 1px solid #15bccf; 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; text-align: center; border: 1px solid #15BCCF; - /*border-bottom: 0px solid #15BCCF;*/ + border-bottom: 0px solid #15BCCF; color:#606060; font-weight:bold; diff --git a/public/stylesheets/css.css b/public/stylesheets/css.css index e54cd3af5..2eb401dfd 100644 --- a/public/stylesheets/css.css +++ b/public/stylesheets/css.css @@ -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 .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;} /* 匿名评分弹框 */ -.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;} .ni_con { width:425px; margin:25px 30px;} .ni_con h2{ display:block; height:40px; width:188px; margin:0 auto;} diff --git a/public/stylesheets/images/btn.png b/public/stylesheets/images/btn.png new file mode 100644 index 000000000..85cea7f5c Binary files /dev/null and b/public/stylesheets/images/btn.png differ diff --git a/public/stylesheets/images/inputBg.png b/public/stylesheets/images/inputBg.png new file mode 100644 index 000000000..243bbf7ec Binary files /dev/null and b/public/stylesheets/images/inputBg.png differ diff --git a/public/stylesheets/images/pic_open01.png b/public/stylesheets/images/pic_open01.png new file mode 100644 index 000000000..45552ae00 Binary files /dev/null and b/public/stylesheets/images/pic_open01.png differ diff --git a/public/stylesheets/images/pic_open02.png b/public/stylesheets/images/pic_open02.png new file mode 100644 index 000000000..b457f302f Binary files /dev/null and b/public/stylesheets/images/pic_open02.png differ diff --git a/public/stylesheets/images/pic_select01.png b/public/stylesheets/images/pic_select01.png new file mode 100644 index 000000000..4f3b294fe Binary files /dev/null and b/public/stylesheets/images/pic_select01.png differ diff --git a/public/stylesheets/images/pic_select02.png b/public/stylesheets/images/pic_select02.png new file mode 100644 index 000000000..e620fad1f Binary files /dev/null and b/public/stylesheets/images/pic_select02.png differ diff --git a/public/stylesheets/nyan.css b/public/stylesheets/nyan.css index 27e8a367e..50a1de7c4 100644 --- a/public/stylesheets/nyan.css +++ b/public/stylesheets/nyan.css @@ -15,7 +15,7 @@ span[id^=valid_user] { } .red { - color: red;margin-left: 10px;margin-right: 10px;text-align: right; + color: red;margin-right: 10px;text-align: right; } .green { @@ -475,19 +475,21 @@ body { top: 1px; } input[class~='ButtonClolr'],.ButtonColor{ + color: #fffbff !important; - padding-bottom: 5px; - width: 40px; - height: 20px; + padding: 5px; + width: auto; + height: 24px ; font-family: '微软雅黑',Arial,Helvetica,sans-serif; font-size: 15px; - + text-align: center; padding: 0px; - background: #15bccf; - border: 1px solid #15bccf; - + background: #15bccf !important; + border: 0px solid #15bccf ; + display:inline-block } + input[class~='whiteButton'], .whiteButton { -moz-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; height: 20px; display: inline-block; - text-align: center; color: #ffffff; } @@ -648,14 +649,14 @@ input[class='nyan-clean-gray']:active, .nyan-clean-gray:active { } .tools a:visited { - color: #116699; + color: #fffbff; text-decoration: none; padding: 3px 5px 0px 5px; width: 100px; } .tools a:hover { - color: white; + color: #fffbff; padding: 3px 3px 0px 20px; width: 88px; text-decoration: none; diff --git a/public/stylesheets/resource.css b/public/stylesheets/resource.css new file mode 100644 index 000000000..1046429be --- /dev/null +++ b/public/stylesheets/resource.css @@ -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; +} +