diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 664dc4cf5..9ce76dca8 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -242,6 +242,8 @@ class AttachmentsController < ApplicationController format.html { redirect_to_referer_or mobile_version_path } elsif !@attachment.container.nil? && @attachment.container.is_a?(OrgSubfield) format.html {redirect_to_referer_or org_subfield_files_path(@attachment.container)} + elsif !@attachment.container.nil? && @attachment.container.is_a?(OrgDocumentComment) + format.html {redirect_to_referer_or org_document_comment_path(@attachment.container)} else if @project.nil? format.html { redirect_to_referer_or forum_memo_path(@attachment.container.forum, @attachment.container) } diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb index 0c3236d4e..c8518e8a3 100644 --- a/app/controllers/boards_controller.rb +++ b/app/controllers/boards_controller.rb @@ -18,8 +18,8 @@ class BoardsController < ApplicationController layout 'base_projects'#by young default_search_scope :messages - before_filter :find_project_by_project_id, :find_board_if_available - before_filter :authorize, :except => [:new, :show, :create, :index] + before_filter :find_project_by_project_id, :find_board_if_available, :except => [:join_to_org_subfields] + before_filter :authorize, :except => [:new, :show, :create, :index, :join_to_org_subfields] accept_rss_auth :index, :show @@ -79,13 +79,12 @@ class BoardsController < ApplicationController end end end - + # 更新@消息为已读 @project.boards.each do |board| board.messages.each do |m| User.current.at_messages.unviewed('Message', m.id).each {|x| x.viewed!} end end - elsif @course query_course_messages = @board.messages query_course_messages.each do |query_course_message| @@ -106,43 +105,19 @@ class BoardsController < ApplicationController @is_new = params[:is_new] @topic_count = @board ? @board.topics.count : 0 if @project - @topic_pages = Paginator.new @topic_count, per_page_option, params['page'] - #现在发布帖子的时候置顶功能已经没有了。所以取消这个置顶排序 #{Message.table_name}.sticky DESC, - @topics = @board.topics. - reorder("#{Message.table_name}.created_on desc"). - includes(:last_reply). - limit(@topic_pages.per_page). - offset(@topic_pages.offset). - - preload(:author, {:last_reply => :author}). - all + if @board + limit = 10; + @topic_count = @board.topics.count(); + @topic_pages = (params[:page] ? params[:page].to_i + 1 : 0) *10 + @topics = @board.topics.reorder("#{Message.table_name}.sticky DESC, COALESCE(last_replies_messages.created_on, #{Message.table_name}.created_on) desc"). + limit(limit).offset(@topic_pages).includes(:last_reply). + preload(:author, {:last_reply => :author}).all(); + else + @topics = []; + end elsif @course - # - # board_topics = @board ? @board.topics.reorder("#{Message.table_name}.sticky DESC, #{Message.table_name}.created_on desc"). - # includes(:last_reply). - # # limit(@topic_pages.per_page). - # # offset(@topic_pages.offset). - # - # preload(:author, {:last_reply => :author}). - # all : [] - # @topics = paginateHelper board_topics,10 if (@board) limit = 10; - #pageno = params[:page]; - #if(pageno == nil || pageno=='') - # dw_topic = nil; - # if( params[:parent_id]!=nil && params[:parent_id]!='' ) - # dw_topic = @board.topics.where(id:params[:parent_id]).first(); - # end - # if( dw_topic != nil ) - # dw_count = @board.topics.where('(sticky>?) or (sticky=? and created_on>?)',dw_topic.sticky,dw_topic.sticky,dw_topic.created_on).count(); - # dw_count = dw_count+1; - # pageno = dw_count%10==0 ? (dw_count/limit) : (dw_count/limit+1) - # end - #end - #if(pageno == nil || pageno=='') - # pageno=1; - #end @topic_count = @board.topics.count(); @topic_pages = (params[:page] ? params[:page].to_i + 1 : 0) *10 @topics = @board.topics.reorder("#{Message.table_name}.sticky DESC, COALESCE(last_replies_messages.created_on, #{Message.table_name}.created_on) desc"). @@ -225,6 +200,16 @@ class BoardsController < ApplicationController redirect_to_settings_in_projects end + def join_to_org_subfields + if params[:id] + @board = Board.find(params[:id]) + @org_subfield_ids = params[:org_subfield_ids] + @org_subfield_ids.each do |id| + OrgSubfieldBoard.create(:org_subfield_id => id.to_i, :board_id => params[:id].to_i) + end + end + end + private def redirect_to_settings_in_projects redirect_to settings_project_url(@project, :tab => 'boards') diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index 8a64918ae..11a788590 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -27,7 +27,12 @@ class CommentsController < ApplicationController raise Unauthorized unless @news.commentable? @comment = Comment.new - @project ? @comment.comments = params[:comment][:comments] : @comment.comments = params[:comment] + #@project ? @comment.comments = params[:comment][:comments] : @comment.comments = params[:comment] + if params[:user_activity_id] + @comment.comments = params[:comment] + else + @comment.comments = params[:comment][:comments] + end @comment.author = User.current if @news.comments << @comment if params[:asset_id] @@ -48,7 +53,7 @@ class CommentsController < ApplicationController # end # end # # ������ض�̬�ļ�¼add end - flash[:notice] = l(:label_comment_added) + #flash[:notice] = l(:label_comment_added) course_activity = CourseActivity.where("course_act_type='News' and course_act_id =#{@news.id}").first if course_activity course_activity.updated_at = Time.now diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index aa0e1596f..57e365aff 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -293,10 +293,15 @@ class CoursesController < ApplicationController @all_members = searchTeacherAndAssistant(@course) @members = @all_members when '2' - @subPage_title = l :label_student_list - page = params[:page].nil? ? 0 : (params['page'].to_i - 1) - @all_members = student_homework_score(0,page, 10,"desc") - @members = @all_members + if @course.open_student == 1 || User.current.member_of_course?(@course) + @subPage_title = l :label_student_list + page = params[:page].nil? ? 0 : (params['page'].to_i - 1) + @all_members = student_homework_score(0,page, 10,"desc") + @members = @all_members + else + render_403 + return + end end respond_to do |format| if params[:page] @@ -394,6 +399,25 @@ class CoursesController < ApplicationController end + def private_or_public + if @course.is_public == 0 + @course.update_attributes(:is_public => 1) + else + @course.update_attributes(:is_public => 0) + end + if @course.is_public == 0 + course_status = CourseStatus.find_by_course_id(@course.id) + course_status.destroy if course_status + elsif @course.is_public == 1 + course_status = CourseStatus.find_by_course_id(@course.id) + course_status.destroy if course_status + course_status = CourseStatus.create(:course_id => @course.id, :grade => 0) + end + respond_to do |format| + format.js + end + end + def search_member if User.current.allowed_to?(:as_teacher,@course) || User.current.admin q = "#{params[:name].strip}" diff --git a/app/controllers/exercise_controller.rb b/app/controllers/exercise_controller.rb index 25b5dacec..9c073afa8 100644 --- a/app/controllers/exercise_controller.rb +++ b/app/controllers/exercise_controller.rb @@ -485,7 +485,7 @@ class ExerciseController < ApplicationController ea.answer_text = params[:answer_text] if ea.save @percent = get_percent(@exercise,User.current) - render :json => {:text => pv.vote_text,:percent => format("%.2f", @percent)} + render :json => {:text => ea.answer_text,:percent => format("%.2f", @percent)} else render :json => {:text => "failure"} end diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb index 048f62296..46362c2d3 100644 --- a/app/controllers/homework_common_controller.rb +++ b/app/controllers/homework_common_controller.rb @@ -63,6 +63,7 @@ class HomeworkCommonController < ApplicationController end @homework.end_time = params[:homework_common][:end_time] || Time.now @homework.course_id = params[:course_id] + @homework.anonymous_comment = params[:homework_common][:anonymous_comment] ? params[:homework_common][:anonymous_comment] : 1 homework_detail_manual = @homework.homework_detail_manual || HomeworkDetailManual.new if @homework.publish_time <= Date.today && homework_detail_manual.comment_status == 0 diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 9b81ac775..77dc1a9aa 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -81,7 +81,8 @@ class IssuesController < ApplicationController @status_id = params[:status_id] @subject = params[:subject] @issue_count = @query.issue_count - @issue_pages = Paginator.new @issue_count, @limit, params['page'].to_i + 1 + @issue_pages = Paginator.new @issue_count, @limit, params['page'] + params[:page] = (params[:page] || 1).to_i + 1 #页码需要加1 @offset ||= @issue_pages.offset @issues = @query.issues(:include => [:assigned_to, :tracker, :priority, :category, :fixed_version], :order => sort_clause, diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index 6f173b7c2..7b70dffe5 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -22,8 +22,8 @@ class MessagesController < ApplicationController default_search_scope :messages before_filter :find_board, :only => [:new, :preview,:edit] before_filter :find_attachments, :only => [:preview] - before_filter :find_message, :except => [:new, :preview] - before_filter :authorize, :except => [:preview, :edit, :destroy, :new] + before_filter :find_message, :except => [:new, :preview, :join_org_subfield, :get_subfield_on_click_org, :join_org_subfields] + before_filter :authorize, :except => [:preview, :edit, :destroy, :new,:join_org_subfield, :get_subfield_on_click_org, :join_org_subfields] helper :boards helper :watchers @@ -270,7 +270,12 @@ class MessagesController < ApplicationController if params[:is_board] redirect_to project_boards_url(@project) else - redirect_to board_message_url(@board, @topic, :r => @reply) + if @message.parent + redirect_to board_message_url(@board, @message.parent, :r => r) + else + redirect_to project_board_url(@project, @board) + end + # redirect_to board_message_url(@board, @topic, :r => @reply) end elsif @course if params[:is_board] @@ -301,6 +306,31 @@ class MessagesController < ApplicationController render :partial => 'common/preview' end + def join_org_subfield + @message = Message.find(params[:message_id]) + @organizations = User.current.organizations + end + + def get_subfield_on_click_org + @org = Organization.find(params[:organization_id]) + end + + def join_org_subfields + org_subfield_ids = params[:org_subfields] + @message = Message.find(params[:id]) + # @message.update_attribute(:updated_on, Time.now) + type = @message.board.course_id.nil? ? "Project":"Course" + org_subfield_ids.each do |field_id| + OrgSubfieldMessage.create(:org_subfield_id => field_id.to_i, :message_id => @message.id, :message_type => type) + org_acts = OrgActivity.where("container_type='OrgSubfield' and container_id=? and org_act_type='Message' and org_act_id=?", field_id.to_i, @message.id) + if org_acts.all.size() > 0 + org_acts.first.update_attribute(:updated_at, Time.now) + else + OrgActivity.create(:container_type => 'OrgSubfield', :container_id => field_id.to_i, :org_act_type=>'Message', :org_act_id => @message.id, :user_id => User.current.id) + end + end + end + private def find_message return unless find_board diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index be2b44c06..d3ac71b99 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -69,20 +69,25 @@ class NewsController < ApplicationController elsif @course if (User.current.admin? || @course.is_public == 1 || (@course.is_public == 0 && User.current.member_of_course?(@course))) scope = @course ? @course.news.course_visible : News.course_visible + news_arr = scope.map{|news| news.id} + + @page = params[:page] ? params[:page].to_i + 1 : 0 + news_page = @page *10 @news_count = scope.count + @is_new = params[:is_new] @q = params[:subject] if params[:subject].nil? || params[:subject].blank? - scope_order = scope.all(:include => [:author, :course], - :order => "#{News.table_name}.sticky DESC, #{News.table_name}.created_on DESC") + scope_order = scope.reorder("#{News.table_name}.sticky DESC, #{News.table_name}.created_on DESC").limit(10).offset(news_page).includes(:author,:course).all() + #all(:include => [:author, :course], + #:order => "#{News.table_name}.sticky DESC, #{News.table_name}.created_on DESC").limit(10).offset(news_page) else - scope_order = scope.where("#{News.table_name}.title like '#{'%' << params[:subject].to_s << '%'}'").all(:include => [:author, :course], - :order => "#{News.table_name}.sticky DESC, #{News.table_name}.created_on DESC") + scope_order = scope.where("#{News.table_name}.title like '#{'%' << params[:subject].to_s << '%'}'").reorder("#{News.table_name}.sticky DESC, #{News.table_name}.created_on DESC").limit(10).offset(news_page).includes(:author,:course).all() + #.all(:include => [:author, :course],:order => "#{News.table_name}.sticky DESC, #{News.table_name}.created_on DESC") end - # :offset => @offset, - # :limit => @limit) - @newss = paginateHelper scope_order,10 + @newss = scope_order + #@newss = paginateHelper scope_order,10 respond_to do |format| format.html { @news = News.new @@ -130,6 +135,7 @@ class NewsController < ApplicationController result = cs.show_course_news params,User.current @news = result[:news] @comments = result[:comments] + @comment = Comment.new #@comments = @news.comments #@comments.reverse! if User.current.wants_comments_in_reverse_order? #modify by nwb @@ -147,7 +153,22 @@ class NewsController < ApplicationController @news = News.new(:project => @project, :author => User.current) elsif @course @news = News.new(:course => @course, :author => User.current) - render :layout => 'base_courses' + #render :layout => 'base_courses' + @news.safe_attributes = params[:news] + @news.save_attachments(params[:attachments]) + if @news.save + if params[:asset_id] + ids = params[:asset_id].split(',') + update_kindeditor_assets_owner ids,@news.id,OwnerTypeHelper::NEWS + end + render_attachment_warning_if_needed(@news) + #flash[:notice] = l(:notice_successful_create) + redirect_to course_news_index_url(@course) + else + redirect_to course_news_index_url(@course) + #layout_file = 'base_courses' + #render :action => 'new', :layout => layout_file + end end end @@ -210,7 +231,7 @@ class NewsController < ApplicationController @news.save_attachments(params[:attachments]) if @news.save render_attachment_warning_if_needed(@news) - flash[:notice] = l(:notice_successful_update) + #flash[:notice] = l(:notice_successful_update) redirect_to news_url(@news) else #flash[:error] = l(:notice_successful_update) diff --git a/app/controllers/org_document_comments_controller.rb b/app/controllers/org_document_comments_controller.rb index b8584fea3..7685b77a8 100644 --- a/app/controllers/org_document_comments_controller.rb +++ b/app/controllers/org_document_comments_controller.rb @@ -1,16 +1,18 @@ class OrgDocumentCommentsController < ApplicationController before_filter :find_organization, :only => [:new, :create, :show, :index] - + helper :attachments layout 'base_org' def new @org_document_comment = OrgDocumentComment.new end + def create @org_document_comment = OrgDocumentComment.new(:organization_id => @organization.id, :creator_id => User.current.id) @org_document_comment.title = params[:org_document_comment][:title] @org_document_comment.content = params[:org_document_comment][:content] + @org_document_comment.save_attachments(params[:attachments]) if params[:field_id] @org_document_comment.org_subfield_id = params[:field_id].to_i end @@ -26,6 +28,7 @@ class OrgDocumentCommentsController < ApplicationController redirect_to new_org_document_comment_path(:organization_id => @organization.id) end end + def show @document = OrgDocumentComment.find(params[:id]) end @@ -37,9 +40,12 @@ class OrgDocumentCommentsController < ApplicationController render_403 end end + def update @org_document = OrgDocumentComment.find(params[:id]) @org_document.update_attributes(:title => params[:org_document_comment][:title], :content => params[:org_document_comment][:content]) + Attachment.attach_files(@org_document, params[:attachments]) + # @org_document.save_attachments(params[:attachments]) if @org_document.parent.nil? act = OrgActivity.where("org_act_type='OrgDocumentComment' and org_act_id =?", @org_document.id).first act.update_attributes(:updated_at => @org_document.updated_at) diff --git a/app/controllers/org_subfields_controller.rb b/app/controllers/org_subfields_controller.rb index 1dc7885fe..66a236b5b 100644 --- a/app/controllers/org_subfields_controller.rb +++ b/app/controllers/org_subfields_controller.rb @@ -1,24 +1,32 @@ -class OrgSubfieldsController < ApplicationController - def create - @subfield = OrgSubfield.create(:name => params[:name]) - @organization = Organization.find(params[:organization_id]) - @organization.org_subfields << @subfield - @subfield.update_attributes(:priority => @subfield.id, :field_type => params[:field_type]) - end - - def destroy - @subfield = OrgSubfield.find(params[:id]) - @organization = Organization.find(@subfield.organization_id) - @subfield.destroy - end - - def update - @subfield = OrgSubfield.find(params[:id]) - @organization = Organization.find(@subfield.organization_id) - @subfield.update_attributes(:name => params[:name]) - end - - def show - - end -end +class OrgSubfieldsController < ApplicationController + def create + @subfield = OrgSubfield.create(:name => params[:name]) + @organization = Organization.find(params[:organization_id]) + @organization.org_subfields << @subfield + @subfield.update_attributes(:priority => @subfield.id, :field_type => params[:field_type]) + end + + def show + @org_subfield = OrgSubfield.find(params[:id]) + @organization = @org_subfield.organization.id + @messages = [] + @messages << @org_subfield.org_document_comments + @messages << @org_subfield.messages + @messages.sort{|a, b| b.updated_at <=> a.updated_at} + respond_to do |format| + format.html{render :layout => 'base_org'} + end + end + def destroy + @subfield = OrgSubfield.find(params[:id]) + @organization = Organization.find(@subfield.organization_id) + @subfield.destroy + end + + def update + @subfield = OrgSubfield.find(params[:id]) + @organization = Organization.find(@subfield.organization_id) + @subfield.update_attributes(:name => params[:name]) + end + +end diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index 38402f68e..aba656750 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -1,284 +1,284 @@ -# encoding: utf-8 -class OrganizationsController < ApplicationController - - - helper :sort - include SortHelper - helper :custom_fields - include CustomFieldsHelper - include AvatarHelper - include WordsHelper - include GitlabHelper - include UserScoreHelper - - include PollHelper - helper :user_score - helper :journals - - # added by liuping 关注 - - helper :watchers - helper :activities - - ### added by william - include ActsAsTaggableOn::TagsHelper - - # fq - helper :words - helper :project_score - helper :issues - include UsersHelper - before_filter :find_organization, :only => [:show, :members] - layout 'base_org' - def index - - end - def new - @organization = Organization.new - render :layout => 'new_base' - end - - def edit - @organization = Organization.find(params[:id]) - end - - def destroy - @organization = Organization.find(params[:id]) - @organization.destroy - respond_to do |format| - format.html{ redirect_to admin_organization_path } - end - end - - def create - @organization = Organization.new - @organization.name = params[:organization][:name] - @organization.description = params[:organization][:description] - @organization.is_public = params[:organization][:is_public] - @organization.creator_id = User.current.id - member = OrgMember.new(:user_id => User.current.id) - - @organization.org_members << member - if @organization.save - OrgMemberRole.create(:org_member_id => member.id, :role_id => 11) - redirect_to organization_path(@organization) - end - end - - def show - if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization) - @organization = Organization.find(params[:id]) - if params[:org_subfield_id] - @org_subfield = OrgSubfield.find(params[:org_subfield_id]) - @org_subfield_ids = @org_subfield.org_document_comments.map(&:id) << 0 - @org_activities = OrgActivity.where("org_act_type='OrgDocumentComment'and org_act_id in (#{@org_subfield_ids.join(",")})").order('updated_at desc').page(params[:page] || 1).per(10) - else - project_ids = @organization.projects.map(&:id) << 0 - course_ids = @organization.courses.map(&:id) << 0 - course_types = "('Message','News','HomeworkCommon','Poll','Course')" - case params[:type] - when nil - @org_activities = OrgActivity.where("(container_id =? and container_type =?) " + - "or (container_type ='Project' and org_act_type in ('Issue','Message','ProjectCreateInfo') and container_id in (#{project_ids.join(',')})) "+ - "or (container_type ='Course' and org_act_type in #{course_types} and container_id in (#{course_ids.join(',')}))", - @organization.id, 'Organization').order('updated_at desc').page(params[:page] || 1).per(10) - when 'project_issue' - @org_activities = OrgActivity.where("container_type = 'Project' and org_act_type = 'Issue' and container_id in (#{project_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10) - when 'project_message' - @org_activities = OrgActivity.where("container_type = 'Project' and org_act_type = 'Message' and container_id in (#{project_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10) - when 'org' - @org_activities = OrgActivity.where("container_id =? and container_type =?",@organization.id, 'Organization').order('updated_at desc').page(params[:page] || 1).per(10) - when 'course_homework' - @org_activities = OrgActivity.where("container_type = 'Course' and org_act_type = 'HomeworkCommon' and container_id in (#{course_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10) - when 'course_news' - @org_activities = OrgActivity.where("container_type = 'Course' and org_act_type = 'News' and container_id in (#{course_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10) - when 'course_message' - @org_activities = OrgActivity.where("container_type = 'Course' and org_act_type = 'Message' and container_id in (#{course_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10) - when 'course_poll' - @org_activities = OrgActivity.where("container_type = 'Course' and org_act_type = 'Poll' and container_id in (#{course_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10) - end - end - @page = params[:page] - respond_to do |format| - format.html - format.js - end - else - render_403 - end - end - - def update - @organization = Organization.find(params[:id]) - @organization.name = params[:organization][:name] - @organization.description = params[:organization][:description] - @organization.domain = params[:organization][:domain] - @organization.is_public = params[:organization][:is_public] == 'on' ? 1 : 0 - #@organization.name = params[:organization][:name] - @organization.save - respond_to do |format| - format.html { redirect_to setting_organization_path(@organization)} - end - end - - def check_uniq - @check = false; - @org_name = params[:org_name].strip - @config_page = params[:config_page] - sameName = @config_page ? Organization.where('name = ? and id != ?',params[:org_name],params[:org_id].to_i).count == 0 : Organization.where('name = ?',params[:org_name]).count == 0 - if sameName == true - @check = true - end - respond_to do |format| - format.js - end - end - - def find_organization - @organization = Organization.find(params[:id]) - end - - def setting - @organization = Organization.find(params[:id]) - - if User.current.admin? || User.current.admin_of_org?(@organization) - else - render_403 - end - end - - - def clear_org_avatar_temp - - end - - def set_homepage - @org = Organization.find(params[:id]) - @org.home_id = params[:home_id] - @org.save - # respond_to do |format| - # format.html {redirect_to organization_path(org)} - # end - end - - def cancel_homepage - @org = Organization.find(params[:id]) - @org.home_id = nil - @org.save - end - - def autocomplete_search - @project = Project.find(params[:project_id]) - #@flag = params[:flag] || false - respond_to do |format| - format.js - end - end - - def members - if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization) - @members = OrgMember.where("organization_id =?", @organization.id) - else - render_403 - end - end - - def more_org_projects - @organization = Organization.find params[:id] - @page = params[:page] - @org_projects = @organization.projects.reorder('created_at').uniq.page((params[:page].to_i || 1) +1).per(5) - respond_to do |format| - format.js - end - end - - def more_org_courses - @organization = Organization.find(params[:id]) - @page = params[:page] - @org_courses = @organization.courses.reorder('created_at').uniq.page((params[:page].to_i || 1) + 1 ).per(5) - respond_to do |format| - format.js - end - end - - def join_course_menu - @organization = Organization.find(params[:id]) - respond_to do |format| - format.js - end - end - - def search_courses - @organization = Organization.find(params[:id]) - condition = '%%' - if !params[:name].nil? - condition = "%#{params[:name].strip}%".gsub(" ","") - end - sql = "select courses.* from courses inner join members on courses.id = members.course_id where members.user_id = #{User.current.id} and courses.name like '#{condition}'"+ - "and courses.id not in (select distinct org_courses.course_id from org_courses where org_courses.organization_id = #{@organization.id})" - #user_courses = Course.find_by_sql(sql) - @courses = Course.find_by_sql(sql) - # @added_course_ids = @organization.courses.map(&:id) - # @courses = [] - # user_courses.each do |course| - # if !@added_course_ids.include?(course.id) - # @courses << course - # end - # end - end - - def join_courses - @organization = Organization.find(params[:id]) - course_ids = params[:courseNames] - course_ids.each do |id| - OrgCourse.create(:organization_id => @organization.id, :course_id => id.to_i, :created_at => Time.now) - end - respond_to do |format| - format.js - end - end - - def join_project_menu - @organization = Organization.find(params[:id]) - respond_to do |format| - format.js - end - end - - def logout - logout_user - respond_to do |format| - format.html {redirect_to organization_path(params[:id])} - end - end - - def search_projects - @organization = Organization.find(params[:id]) - condition = '%%' - if !params[:name].nil? - condition = "%#{params[:name].strip}%".gsub(" ","") - end - sql = "select projects.* from projects inner join members on projects.id = members.project_id where members.user_id = #{User.current.id} and projects.status != 9 and projects.name like '#{condition}'" + - " and projects.id not in (select org_projects.project_id from org_projects where organization_id = #{@organization.id})" - #user_projects = Course.find_by_sql(sql) - @projects = Course.find_by_sql(sql) - # @added_course_ids = @organization.projects.map(&:id) - # @projects = [] - # user_projects.each do |project| - # if !@added_course_ids.include?(project.id) - # @projects << project - # end - # end - end - - def join_projects - @organization = Organization.find(params[:id]) - project_ids = params[:projectNames] - project_ids.each do |id| - OrgProject.create(:organization_id => @organization.id, :project_id => id.to_i, :created_at => Time.now) - end - respond_to do |format| - format.js - end - end -end +# encoding: utf-8 +class OrganizationsController < ApplicationController + + + helper :sort + include SortHelper + helper :custom_fields + include CustomFieldsHelper + include AvatarHelper + include WordsHelper + include GitlabHelper + include UserScoreHelper + + include PollHelper + helper :user_score + helper :journals + + # added by liuping 关注 + + helper :watchers + helper :activities + + ### added by william + include ActsAsTaggableOn::TagsHelper + + # fq + helper :words + helper :project_score + helper :issues + include UsersHelper + before_filter :find_organization, :only => [:show, :members] + layout 'base_org' + def index + + end + def new + @organization = Organization.new + render :layout => 'new_base' + end + + def edit + @organization = Organization.find(params[:id]) + end + + def destroy + @organization = Organization.find(params[:id]) + @organization.destroy + respond_to do |format| + format.html{ redirect_to admin_organization_path } + end + end + + def create + @organization = Organization.new + @organization.name = params[:organization][:name] + @organization.description = params[:organization][:description] + @organization.is_public = params[:organization][:is_public] + @organization.creator_id = User.current.id + member = OrgMember.new(:user_id => User.current.id) + + @organization.org_members << member + if @organization.save + OrgMemberRole.create(:org_member_id => member.id, :role_id => 11) + redirect_to organization_path(@organization) + end + end + + def show + if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization) + @organization = Organization.find(params[:id]) + if params[:org_subfield_id] + @org_subfield = OrgSubfield.find(params[:org_subfield_id]) + @org_subfield_ids = @org_subfield.org_document_comments.map(&:id) << 0 + @org_activities = OrgActivity.where("(org_act_type='OrgDocumentComment'and org_act_id in (#{@org_subfield_ids.join(",")})) || (container_type='OrgSubfield' and container_id=#{@org_subfield.id})").order('updated_at desc').page(params[:page] || 1).per(10) + else + project_ids = @organization.projects.map(&:id) << 0 + course_ids = @organization.courses.map(&:id) << 0 + course_types = "('Message','News','HomeworkCommon','Poll','Course')" + case params[:type] + when nil + @org_activities = OrgActivity.where("(container_id =? and container_type =?) " + + "or (container_type ='Project' and org_act_type in ('Issue','Message','ProjectCreateInfo') and container_id in (#{project_ids.join(',')})) "+ + "or (container_type ='Course' and org_act_type in #{course_types} and container_id in (#{course_ids.join(',')}))", + @organization.id, 'Organization').order('updated_at desc').page(params[:page] || 1).per(10) + when 'project_issue' + @org_activities = OrgActivity.where("container_type = 'Project' and org_act_type = 'Issue' and container_id in (#{project_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10) + when 'project_message' + @org_activities = OrgActivity.where("container_type = 'Project' and org_act_type = 'Message' and container_id in (#{project_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10) + when 'org' + @org_activities = OrgActivity.where("container_id =? and container_type =?",@organization.id, 'Organization').order('updated_at desc').page(params[:page] || 1).per(10) + when 'course_homework' + @org_activities = OrgActivity.where("container_type = 'Course' and org_act_type = 'HomeworkCommon' and container_id in (#{course_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10) + when 'course_news' + @org_activities = OrgActivity.where("container_type = 'Course' and org_act_type = 'News' and container_id in (#{course_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10) + when 'course_message' + @org_activities = OrgActivity.where("container_type = 'Course' and org_act_type = 'Message' and container_id in (#{course_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10) + when 'course_poll' + @org_activities = OrgActivity.where("container_type = 'Course' and org_act_type = 'Poll' and container_id in (#{course_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10) + end + end + @page = params[:page] + respond_to do |format| + format.html + format.js + end + else + render_403 + end + end + + def update + @organization = Organization.find(params[:id]) + @organization.name = params[:organization][:name] + @organization.description = params[:organization][:description] + @organization.domain = params[:organization][:domain] + @organization.is_public = params[:organization][:is_public] == 'on' ? 1 : 0 + #@organization.name = params[:organization][:name] + @organization.save + respond_to do |format| + format.html { redirect_to setting_organization_path(@organization)} + end + end + + def check_uniq + @check = false; + @org_name = params[:org_name].strip + @config_page = params[:config_page] + sameName = @config_page ? Organization.where('name = ? and id != ?',params[:org_name],params[:org_id].to_i).count == 0 : Organization.where('name = ?',params[:org_name]).count == 0 + if sameName == true + @check = true + end + respond_to do |format| + format.js + end + end + + def find_organization + @organization = Organization.find(params[:id]) + end + + def setting + @organization = Organization.find(params[:id]) + + if User.current.admin? || User.current.admin_of_org?(@organization) + else + render_403 + end + end + + + def clear_org_avatar_temp + + end + + def set_homepage + @org = Organization.find(params[:id]) + @org.home_id = params[:home_id] + @org.save + # respond_to do |format| + # format.html {redirect_to organization_path(org)} + # end + end + + def cancel_homepage + @org = Organization.find(params[:id]) + @org.home_id = nil + @org.save + end + + def autocomplete_search + @project = Project.find(params[:project_id]) + #@flag = params[:flag] || false + respond_to do |format| + format.js + end + end + + def members + if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization) + @members = OrgMember.where("organization_id =?", @organization.id) + else + render_403 + end + end + + def more_org_projects + @organization = Organization.find params[:id] + @page = params[:page] + @org_projects = @organization.projects.reorder('created_at').uniq.page((params[:page].to_i || 1) +1).per(5) + respond_to do |format| + format.js + end + end + + def more_org_courses + @organization = Organization.find(params[:id]) + @page = params[:page] + @org_courses = @organization.courses.reorder('created_at').uniq.page((params[:page].to_i || 1) + 1 ).per(5) + respond_to do |format| + format.js + end + end + + def join_course_menu + @organization = Organization.find(params[:id]) + respond_to do |format| + format.js + end + end + + def search_courses + @organization = Organization.find(params[:id]) + condition = '%%' + if !params[:name].nil? + condition = "%#{params[:name].strip}%".gsub(" ","") + end + sql = "select courses.* from courses inner join members on courses.id = members.course_id where members.user_id = #{User.current.id} and courses.name like '#{condition}'"+ + "and courses.id not in (select distinct org_courses.course_id from org_courses where org_courses.organization_id = #{@organization.id})" + #user_courses = Course.find_by_sql(sql) + @courses = Course.find_by_sql(sql) + # @added_course_ids = @organization.courses.map(&:id) + # @courses = [] + # user_courses.each do |course| + # if !@added_course_ids.include?(course.id) + # @courses << course + # end + # end + end + + def join_courses + @organization = Organization.find(params[:id]) + course_ids = params[:courseNames] + course_ids.each do |id| + OrgCourse.create(:organization_id => @organization.id, :course_id => id.to_i, :created_at => Time.now) + end + respond_to do |format| + format.js + end + end + + def join_project_menu + @organization = Organization.find(params[:id]) + respond_to do |format| + format.js + end + end + + def logout + logout_user + respond_to do |format| + format.html {redirect_to organization_path(params[:id])} + end + end + + def search_projects + @organization = Organization.find(params[:id]) + condition = '%%' + if !params[:name].nil? + condition = "%#{params[:name].strip}%".gsub(" ","") + end + sql = "select projects.* from projects inner join members on projects.id = members.project_id where members.user_id = #{User.current.id} and projects.status != 9 and projects.name like '#{condition}'" + + " and projects.id not in (select org_projects.project_id from org_projects where organization_id = #{@organization.id})" + #user_projects = Course.find_by_sql(sql) + @projects = Course.find_by_sql(sql) + # @added_course_ids = @organization.projects.map(&:id) + # @projects = [] + # user_projects.each do |project| + # if !@added_course_ids.include?(project.id) + # @projects << project + # end + # end + end + + def join_projects + @organization = Organization.find(params[:id]) + project_ids = params[:projectNames] + project_ids.each do |id| + OrgProject.create(:organization_id => @organization.id, :project_id => id.to_i, :created_at => Time.now) + end + respond_to do |format| + format.js + end + end +end diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 5cb646c8e..9319c4db2 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -649,7 +649,8 @@ class StudentWorkController < ApplicationController if revise_attachments.count == 2 revise_attachments.last.destroy end - #@attachment = @work.attachments.where("attachtype = 7").order("created_on desc").first + attachment = @work.attachments.where("attachtype = 7").first + attachment.update_attributes(:description => params[:description]) respond_to do |format| format.js end diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 281b8b7e0..f26f6c118 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -522,6 +522,7 @@ class UsersController < ApplicationController else homework.publish_time = params[:homework_common][:publish_time] end + homework.anonymous_comment = params[:homework_common][:anonymous_comment] ? params[:homework_common][:anonymous_comment] : 1 homework.homework_type = params[:homework_type].to_i || 1 homework.late_penalty = 10 homework.teacher_priority = 1 diff --git a/app/controllers/zipdown_controller.rb b/app/controllers/zipdown_controller.rb index 1a01ac97b..d66c6a30d 100644 --- a/app/controllers/zipdown_controller.rb +++ b/app/controllers/zipdown_controller.rb @@ -1,4 +1,8 @@ -require 'zip' +#coding=utf-8 + +require "base64" +require 'zip' + class ZipdownController < ApplicationController #查找项目(课程) before_filter :find_project_by_bid_id, :only => [:assort] @@ -11,7 +15,13 @@ class ZipdownController < ApplicationController def download if User.current.logged? begin - send_file "#{OUTPUT_FOLDER}/#{params[:file]}", :filename => filename_for_content_disposition(params[:filename]), :type => detect_content_type(params[:file]) + if params[:base64file] + file = Base64.decode64(params[:base64file]) + file = file.sub('*', '+') + send_file "#{OUTPUT_FOLDER}/#{file}", :filename => filename_for_content_disposition(file), :type => detect_content_type(file) + else + send_file "#{OUTPUT_FOLDER}/#{params[:file]}", :filename => filename_for_content_disposition(params[:filename]), :type => detect_content_type(params[:file]) + end rescue => e render file: 'public/no_file_found.html' end @@ -107,11 +117,17 @@ class ZipdownController < ApplicationController bid_homework_path, OUTPUT_FOLDER) } [{files:[out_file.file_path], count: 1, index: 1, - real_file: out_file.file_path, file: File.basename(out_file.file_path), + real_file: out_file.file_path, + file: File.basename(out_file.file_path), + base64file: encode64(File.basename(out_file.file_path)), size:(out_file.pack_size / 1024.0 / 1024.0).round(2) }] end + def encode64(str) + Base64.encode64(str).sub('+', '*') + end + def zip_homework_common homework_common bid_homework_path = [] digests = [] @@ -129,7 +145,9 @@ class ZipdownController < ApplicationController bid_homework_path, OUTPUT_FOLDER) } [{files:[out_file.file_path], count: 1, index: 1, - real_file: out_file.file_path, file: File.basename(out_file.file_path), + real_file: out_file.file_path, + file: File.basename(out_file.file_path), + base64file: encode64(File.basename(out_file.file_path)), size:(out_file.pack_size / 1024.0 / 1024.0).round(2) }] end diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 1cbe7421c..737a1ea69 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -156,7 +156,6 @@ class Mailer < ActionMailer::Base def send_for_user_activities(user, date_to, days) date_from = date_to - days.days subject = "[ #{user.show_name}#{l(:label_day_mail)}]" - @subject = " #{user.show_name}#{l(:label_day_mail)}" date_from = "#{date_from} 17:59:59" date_to = "#{date_to} 17:59:59" # 生成token用于直接点击登录 @@ -268,7 +267,10 @@ class Mailer < ActionMailer::Base has_content = [@issues,@issues_journals,@course_messages,@project_messages,@course_news,@course_news_comments,@project_news,@project_news_comments,@project_attachments, @course_journal_messages,@user_journal_messages,@project_journal_messages,@forums,@memos,@attachments,@bids,@wiki_contents].any? {|o| !o.empty?} - + total_count = @issues.count + @issues_journals.count + @course_messages.count + @project_messages.count + @course_news.count + @course_news_comments.count + @project_news.count + @project_news_comments.count + + @project_attachments.count + @course_journal_messages.count + @user_journal_messages.count + @project_journal_messages.count + @forums.count + @memos.count + @attachments.count + + @bids.count + @wiki_contents.count + @subject = " #{user.show_name}#{l(:label_day_mail_first)}#{total_count}#{l(:label_day_mail_last)}" mylogger.debug "Sent activity mail : #{user.mail} - #{has_content}" #有内容才发,没有不发 mail :to => user.mail,:subject => subject if has_content diff --git a/app/models/message.rb b/app/models/message.rb index 4cdae1f6e..19531e270 100644 --- a/app/models/message.rb +++ b/app/models/message.rb @@ -23,6 +23,8 @@ class Message < ActiveRecord::Base belongs_to :board,:touch => true belongs_to :author, :class_name => 'User', :foreign_key => 'author_id' has_many :praise_tread, as: :praise_tread_object, dependent: :destroy + has_many :org_subfield_messages, :dependent => :destroy + has_many :org_subfields, :through => :org_subfield_messages acts_as_tree :counter_cache => :replies_count, :order => "#{Message.table_name}.created_on ASC" acts_as_attachable diff --git a/app/models/org_document_comment.rb b/app/models/org_document_comment.rb index e2ce350ce..c1619fc6e 100644 --- a/app/models/org_document_comment.rb +++ b/app/models/org_document_comment.rb @@ -1,20 +1,26 @@ -class OrgDocumentComment < ActiveRecord::Base - attr_accessible :content, :creator_id, :organization_id, :parent_id, :reply_id, :title,:sticky,:locked - include Redmine::SafeAttributes - belongs_to :organization - belongs_to :creator, :class_name => 'User', :foreign_key => 'creator_id' - has_many :editor_of_documents, :dependent => :destroy - acts_as_tree :order => "#{OrgDocumentComment.table_name}.sticky asc, #{OrgDocumentComment.table_name}.created_at desc" - has_many :org_acts, :class_name => 'OrgActivity',:as =>:org_act ,:dependent => :destroy - after_create :document_save_as_org_activity - - def document_save_as_org_activity - if(self.parent().nil?) - self.org_acts << OrgActivity.new(:user_id => User.current.id, :container_id => self.organization.id, :container_type => 'Organization') - else - act = OrgActivity.where("org_act_type='OrgDocumentComment' and org_act_id =?", self.root.id).first - act.update_attributes(:updated_at => self.updated_at) - end - end - -end +class OrgDocumentComment < ActiveRecord::Base + attr_accessible :content, :creator_id, :organization_id, :parent_id, :reply_id, :title,:sticky,:locked + include Redmine::SafeAttributes + belongs_to :organization + belongs_to :creator, :class_name => 'User', :foreign_key => 'creator_id' + has_many :editor_of_documents, :dependent => :destroy + acts_as_tree :order => "#{OrgDocumentComment.table_name}.sticky asc, #{OrgDocumentComment.table_name}.created_at desc" + acts_as_attachable + has_many :org_acts, :class_name => 'OrgActivity',:as =>:org_act ,:dependent => :destroy + after_create :document_save_as_org_activity + + def document_save_as_org_activity + if(self.parent().nil?) + self.org_acts << OrgActivity.new(:user_id => User.current.id, :container_id => self.organization.id, :container_type => 'Organization') + else + act = OrgActivity.where("org_act_type='OrgDocumentComment' and org_act_id =?", self.root.id).first + act.update_attributes(:updated_at => self.updated_at) + end + end + + + def project + + end + +end diff --git a/app/models/org_subfield.rb b/app/models/org_subfield.rb index f95bb3eba..6a31203b0 100644 --- a/app/models/org_subfield.rb +++ b/app/models/org_subfield.rb @@ -1,9 +1,11 @@ -class OrgSubfield < ActiveRecord::Base - belongs_to :organization, :foreign_key => :organization_id - has_many :org_document_comments, :dependent => :destroy - has_many :files - acts_as_attachable - - def project - end +class OrgSubfield < ActiveRecord::Base + belongs_to :organization, :foreign_key => :organization_id + has_many :org_document_comments, :dependent => :destroy + has_many :files + has_many :org_subfield_messages, :dependent => :destroy + has_many :messages, :through => :org_subfield_messages + acts_as_attachable + + def project + end end \ No newline at end of file diff --git a/app/models/org_subfield_message.rb b/app/models/org_subfield_message.rb new file mode 100644 index 000000000..64dbdfdf5 --- /dev/null +++ b/app/models/org_subfield_message.rb @@ -0,0 +1,3 @@ +class OrgSubfieldMessage < ActiveRecord::Base + # attr_accessible :title, :body +end diff --git a/app/models/user.rb b/app/models/user.rb index 2714117e9..aa048888c 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -344,7 +344,8 @@ class User < Principal user_feedback_count = UserFeedbackMessage.where("user_id =? and viewed =? and created_at >?", User.current.id, 0, User.current.onclick_time.onclick_time).count user_memo_count = MemoMessage.where("user_id =? and viewed =? and created_at >?", User.current.id, 0, User.current.onclick_time.onclick_time).count system_messages_count = SystemMessage.where("created_at >?", User.current.onclick_time.onclick_time).count - messages_count = course_count + forge_count + user_feedback_count + user_memo_count + system_messages_count + at_count = AtMessage.where("user_id =? and viewed =? and created_at >?", User.current.id, 0, User.current.onclick_time.onclick_time).count + messages_count = course_count + forge_count + user_feedback_count + user_memo_count + system_messages_count + at_count end # 查询指派给我的缺陷记录 diff --git a/app/views/attachments/_form_course.html.erb b/app/views/attachments/_form_course.html.erb index ef5385647..6d921903d 100644 --- a/app/views/attachments/_form_course.html.erb +++ b/app/views/attachments/_form_course.html.erb @@ -4,10 +4,10 @@ <% container.saved_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 => 255, :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_checkbox')%> + <%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'upload_filename readonly', :readonly=>'readonly')%> + <%#= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 255, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %> + + <%#= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false, :class => 'is_public_checkbox')%> <%= link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') %> <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %> @@ -17,10 +17,10 @@ <% 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 => 255, :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_checkbox')%> + <%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'upload_filename readonly', :readonly=>'readonly')%> + <%#= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 255, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %> + + <%#= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false, :class => 'is_public_checkbox')%> <%= link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') %> <%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %> @@ -61,8 +61,7 @@ :are_you_sure => l(:text_are_you_sure), :file_count => l(:label_file_count), :delete_all_files => l(:text_are_you_sure_all), - :lebel_file_uploding => l(:lebel_file_uploding), - :containerid => "#{container.id}" + :lebel_file_uploding => l(:lebel_file_uploding) } %> <% if container.nil? %> <%= l(:label_no_file_uploaded)%> diff --git a/app/views/attachments/_form_project_new.html.erb b/app/views/attachments/_form_project_new.html.erb new file mode 100644 index 000000000..09a1ea847 --- /dev/null +++ b/app/views/attachments/_form_project_new.html.erb @@ -0,0 +1,77 @@ + +<% if defined?(container) && container && container.saved_attachments %> + <% if isReply %> + <% container.saved_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 => 255, :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_checkbox')%> + + <%= link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') %> + <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %> + + <% end %> + <% else %> + <% 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 => 255, :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_checkbox')%> + + <%= link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') %> + <%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %> + + <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %> + + <% end %> + <% end %> +<% end %> + + + +<%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %> + +<%#= button_tag "#{l(:button_browse)}", :type=>"button", :onclick=>"file#{container.id}.click()",:class =>"sub_btn",:style => ie8? ? 'display:none' : '' %> + <% id ="file#{container.id}"%> + 上传附件 + <%= file_field_tag 'attachments[dummy][file]', + :id => "file#{container.id}", + :class => 'file_selector', + :multiple => true, + :onchange => "addInputFiles_board(this, '#{container.id}');", + :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), + :field_is_public => l(:field_is_public), + :are_you_sure => l(:text_are_you_sure), + :file_count => l(:label_file_count), + :delete_all_files => l(:text_are_you_sure_all), + :lebel_file_uploding => l(:lebel_file_uploding), + :containerid => "#{container.id}" + } %> + <% if container.nil? %> + <%= l(:label_no_file_uploaded)%> + <% end %> + + + +<% content_for :header_tags do %> + <%= javascript_include_tag 'attachments' %> +<% end %> + + diff --git a/app/views/blog_comments/_blog_attachments.erb b/app/views/blog_comments/_blog_attachments.erb index dd8be659b..86298a330 100644 --- a/app/views/blog_comments/_blog_attachments.erb +++ b/app/views/blog_comments/_blog_attachments.erb @@ -57,7 +57,7 @@ :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', :project => container), + :upload_path => uploads_path(:format => 'js'), :description_placeholder => l(:label_optional_description), :field_is_public => l(:field_is_public), :are_you_sure => l(:text_are_you_sure), diff --git a/app/views/boards/_course_show_detail.html.erb b/app/views/boards/_course_show_detail.html.erb index c324f1d69..7b96c4f9a 100644 --- a/app/views/boards/_course_show_detail.html.erb +++ b/app/views/boards/_course_show_detail.html.erb @@ -59,12 +59,14 @@ <% end %> <% if topics.count == 10 %> -
展开更多<%= link_to "", boards_topic_path(@board, :course_id => @board.course.id ,:page => page), :id => "more_topic_link", :remote => "true", :class => "none" %>
+ + <%= link_to "点击展开更多",boards_topic_path(@board, :course_id => @board.course.id ,:page => page),:id => "show_more_course_topic",:remote => "true",:class => "loadMore mt10 f_grey"%> <% end %> <% end%> + diff --git a/app/views/boards/_project_message_edit.html.erb b/app/views/boards/_project_message_edit.html.erb new file mode 100644 index 000000000..88297bd79 --- /dev/null +++ b/app/views/boards/_project_message_edit.html.erb @@ -0,0 +1,16 @@ + +
+
+
+ 编辑帖子 +
+
+ <%= render :partial => 'boards/project_new_topic', + :locals => {:f => f, :edit_mode => edit_mode, :topic => topic, :project => project} %> +
\ No newline at end of file diff --git a/app/views/boards/_project_new.html.erb b/app/views/boards/_project_new.html.erb new file mode 100644 index 000000000..44895a48e --- /dev/null +++ b/app/views/boards/_project_new.html.erb @@ -0,0 +1,65 @@ +<%= content_for(:header_tags) do %> + <%= import_ke(enable_at: true, prettify: false) %> +<% end %> + +<%= error_messages_for 'message' %> +
+
+
+
+ +

+
+ +
+
+
\ No newline at end of file diff --git a/app/views/boards/_project_new_topic.html.erb b/app/views/boards/_project_new_topic.html.erb index 00a3d2016..7a211e25d 100644 --- a/app/views/boards/_project_new_topic.html.erb +++ b/app/views/boards/_project_new_topic.html.erb @@ -1,11 +1,65 @@ -<%= form_for @message, :url =>{:controller=>'messages',:action => 'new', :board_id => @board.id, :is_board => 'true'},:html => {:nhname=>'form', :multipart => true, :id => 'message-form', :name=>'message-form'} do |f| %> - - <%= render :partial => 'form_project', :locals => {:f => f, :topic => @message} %> -
  • -
    - <%= l(:button_cancel) %> - - <%= l(:button_submit)%> -
    -
  • -<% end %> \ No newline at end of file +<%= content_for(:header_tags) do %> + <%= import_ke(enable_at: true, prettify: false) %> +<% end %> + +<%= error_messages_for 'message' %> +
    +
    +
    +
    + +

    +
    + +
    +
    +
    \ No newline at end of file diff --git a/app/views/boards/_project_show.html.erb b/app/views/boards/_project_show.html.erb index 839d587b2..3dac2a3d5 100644 --- a/app/views/boards/_project_show.html.erb +++ b/app/views/boards/_project_show.html.erb @@ -1,278 +1,33 @@ -
    -
    -

    - <% if User.current.language == "zh"%> - <%= h @board.name %> - <% else %> - <%= l(:project_module_boards) %> - <% end %> -

    - <% if User.current.logged? %> - <%= l(:label_message_new) %> - <% end %> -
    -
    - <% if !User.current.logged? %> -
    - <%= l(:label_user_login_project_board) %> - <%= link_to l(:label_user_login_new), signin_path, :class => "c_blue ml5" %> -
    - <% end %> -
    -
    - -
    -
    -
    -

    讨论区共有<%= @topic_count %>个帖子

    - <% if @topics.any? %> - <% @topics.each do |topic| %> -
    - <%= link_to image_tag(url_to_avatar(topic.author), :width=>"42",:height=>"42"), user_path(topic.author),:class =>'talkmain_pic fl' %> -
    - <% author = topic.author.to_s %> -
    - <%= link_to author, user_path(topic.author), :class =>"talkmain_name fl f14",:title=>author, - :style=>'max-width:80px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;' %> -
    -

      :

    - -

      <%= h(topic.subject) %>

    - - <% if topic.editable_by?(User.current) %> - <%= l(:button_edit) %> - <% end %> - <%= link_to(l(:button_delete), {:controller =>'messages',:action => 'destroy', :id => topic.id, :board_id => topic.board_id, :is_board=>'true'}, - :method => :post, - :data => {:confirm => l(:text_are_you_sure)}, - :class => 'talk_edit fr', - :style => ' margin-right: 10px;') if topic.destroyable_by?(User.current) %> - <% if topic.sticky? %> - <%= l(:label_board_sticky)%> - <% end %> - - -
    -
    -
    - <%= topic.content.html_safe %> - -
    -
    - - <%= link_to_attachments_course topic, :author => false %> - <%= l(:label_activity_time)%>:  <%= format_time topic.created_on %> -
    - <% if User.current.logged? %> - <%= l(:button_reply) %> - <% end %> -
    - -
    -
    - <% reply = Message.new(:subject => "RE: #{topic.subject}")%> - <% if !topic.locked? && authorize_for('messages', 'reply') %> - - <% end %> -
    - <% replies_all = topic.children.includes(:author, :attachments, {:board => :project}).reorder("#{Message.table_name}.id desc").all %> - <% unless replies_all.empty? %> -
    -
      - <% replies_all_i = 0 %> - <% replies_all.each do |message| %> - <% replies_all_i=replies_all_i+1 %> -
    • - <%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class =>'Msg_pic' %> -
      - <%= link_to_user_header message.author,false,:class => 'fl c_orange f14 ' %> -
      -
      - <%= textAreailizable message,:content,:attachments => message.attachments %> - -
      - -
      - <%= format_time(message.created_on) %> - <%= link_to(l(:button_delete),{:controller => 'messages', :action => 'destroy', :id => message.id, :board_id => message.board_id, :is_board => 'true'}, - :method => :post, - :data => {:confirm => l(:text_are_you_sure)}, - :title => l(:button_delete), - :class => ' c_dblue fr f14') if message.course_destroyable_by?(User.current) %> - <%= link_to(l(:button_reply), 'javascript:;', - :nhname =>'showbtn_child_reply', - :class => ' c_dblue fr f14', - :style => 'margin-right: 10px;', - :title => l(:button_reply)) if !topic.locked? && authorize_for('messages', 'reply') %> -
      -
      -
    • - <% end %> -
    -
    - <%if topic.replies_count>2 %> - - <% end %> - <% end %> -
    -
    - <% end %> - <% else %> -

    <%= l(:label_no_data) %>

    - <% end %> -
      - <%= pagination_links_full @topic_pages, @topic_count, :per_page_links => false, :remote => false, :flag => true %> -
    - - -<%# other_formats_links do |f| %> - <%#= f.link_to 'Atom', :url => {:key => User.current.rss_key} %> -<%# end %> - <% html_title @board.name %> - <% content_for :header_tags do %> - <%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@project}: #{@board}") %> - <% end %> -
    -
    - \ No newline at end of file + function reset_topic(){ + $("#message_subject").val(""); + $("#subjectmsg").text(""); + document.getElementById("message_sticky").checked=false; + document.getElementById("message_locked").checked=false; + $("#topic_attachments").html("<%= escape_javascript(render :partial => 'attachments/form_project_new', :locals => {:container => Message.new, :isReply => @isReply})%>"); + message_content_editor.html(""); + $("#topic_editor").toggle(); + } + <% if @is_new%> + $(function(){ + $("#message_subject").focus(); + }); + <%end%> + + +
    +
    +
    <%= l(:label_borad_project) %>
    +
    + <% if User.current.logged? %> + <%= labelled_form_for @message, :url =>{:controller=>'messages',:action => 'new', :board_id => @board.id, :is_board => 'true'}, + :html => {:nhname=>'form',:multipart => true, :id => 'message-form-project'} do |f| %> + <%= render :partial => 'project_new', :locals => {:f => f, :topic => @message, :edit_mode => false, :project => @board.project} %> + <% end %> + <% end %> + <%= render :partial=> 'project_show_detail',:locals =>{:topics => @topics, :page => 0} %> +
    diff --git a/app/views/boards/_project_show_detail.html.erb b/app/views/boards/_project_show_detail.html.erb new file mode 100644 index 000000000..8fb663aff --- /dev/null +++ b/app/views/boards/_project_show_detail.html.erb @@ -0,0 +1,71 @@ +<%= content_for(:header_tags) do %> + <%= import_ke(enable_at: false, prettify: false) %> + <%= javascript_include_tag "init_activity_KindEditor" %> +<% end %> + +<% if topics%> + <% topics.each do |topic| %> + + <% if topic %> + <%= render :partial => 'users/project_message', :locals => {:activity => topic, :user_activity_id => topic.id} %> + <% end %> + <% end %> + + <% if topics.count == 10 %> + + <%= link_to "点击展开更多", boards_topic_path(@board, :project_id => @board.project.id ,:page => page), :id => "show_more_project_topic",:remote => "true",:class => "loadMore mt10 f_grey"%> + <% end %> +<% end%> + + diff --git a/app/views/boards/show.html.erb b/app/views/boards/show.html.erb index 5ae3459a5..89f43e0d6 100644 --- a/app/views/boards/show.html.erb +++ b/app/views/boards/show.html.erb @@ -32,12 +32,11 @@ <% end %> - - <% if @project %> - <%= render :partial => 'project_show', locals: {project: @project} %> - <% elsif @course %> - <%= render :partial => 'course_show', :locals => {:topics => @topics, :page => 0, :course => @course} %> - <% end %> +<% if @project %> + <%= render :partial => 'project_show', locals: {:topics => @topics, :page => 0, project: @project} %> +<% elsif @course %> + <%= render :partial => 'course_show', :locals => {:topics => @topics, :page => 0, :course => @course} %> +<% end %> --> diff --git a/app/views/courses/private_or_public.js.erb b/app/views/courses/private_or_public.js.erb new file mode 100644 index 000000000..71315e910 --- /dev/null +++ b/app/views/courses/private_or_public.js.erb @@ -0,0 +1,8 @@ +$("#project_info_<%=@course.id %>").html('<%=escape_javascript(render :partial=>'layouts/project_info') %>'); +if(document.getElementById("course_is_public")) { + <% if @course.is_public == 0%> + $("#course_is_public").attr("checked",false); + <% elsif @course.is_public == 1 %> + $("#course_is_public").attr("checked",true); + <% end %> +} \ No newline at end of file diff --git a/app/views/courses/settings.html.erb b/app/views/courses/settings.html.erb index 634f26495..ae6416c9d 100644 --- a/app/views/courses/settings.html.erb +++ b/app/views/courses/settings.html.erb @@ -66,19 +66,19 @@
  • id="course_is_public" name="course[is_public]" type="checkbox"> - (打钩为公开,不打钩则不公开,若不公开,仅课程成员可见该课程。) + (选中后课外用户可见该课程,否则仅对课内成员可见)
  • id="course_open_student" name="course[open_student]" type="checkbox" style="margin-left: 1px;"/> - (打钩为"学生列表公开",不打钩为不公开,若不公开,则课程外部人员看不到学生列表) + (选中后课外用户可见学生列表,否则仅对课内成员可见)
  • id="course_publish_resource" name="course[publish_resource]" type="checkbox" style="margin-left: 1px;"/> - (打钩为"允许学生上传资源",不打钩为"不允许学生上传资源") + (选中后允许学生上传课程资源,否则不允许)
  • diff --git a/app/views/exercise/_exercise_student.html.erb b/app/views/exercise/_exercise_student.html.erb index 8a1f3dbd6..4f4892b79 100644 --- a/app/views/exercise/_exercise_student.html.erb +++ b/app/views/exercise/_exercise_student.html.erb @@ -100,6 +100,9 @@ { obj.checked = false; } + }, + error: function () { + alert("网络异常,答题失败,请确认网络正常连接后再答题。"); } }); } @@ -154,6 +157,9 @@ { obj.checked = false; } + }, + error: function () { + alert("网络异常,答题失败,请确认网络正常连接后再答题。"); } }); } @@ -196,6 +202,9 @@ success: function (data) { var dataObj = eval(data); obj.value = dataObj.text; + }, + error: function () { + alert("网络异常,答题失败,请确认网络正常连接后再答题。"); } }); diff --git a/app/views/exercise/_exercise_student_result.html.erb b/app/views/exercise/_exercise_student_result.html.erb index 58ebcaf20..3e989d93c 100644 --- a/app/views/exercise/_exercise_student_result.html.erb +++ b/app/views/exercise/_exercise_student_result.html.erb @@ -116,8 +116,7 @@ √ <% else %> × - <% end %>
    - 标准答案:<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s) if exercise_question.exercise_standard_answers.first %> + <% end %>
    diff --git a/app/views/exercise/_exercise_teacher.html.erb b/app/views/exercise/_exercise_teacher.html.erb index 586c033a1..ce3928817 100644 --- a/app/views/exercise/_exercise_teacher.html.erb +++ b/app/views/exercise/_exercise_teacher.html.erb @@ -95,8 +95,6 @@
    第<%= list_index+1%>题:<%= exercise_question.question_title %>  (<%= exercise_question.question_score %>分) -
    - 标准答案:<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s) if exercise_question.exercise_standard_answers.first%>
    diff --git a/app/views/files/_org_subfield_list.html.erb b/app/views/files/_org_subfield_list.html.erb index 029570047..ad90550d4 100644 --- a/app/views/files/_org_subfield_list.html.erb +++ b/app/views/files/_org_subfield_list.html.erb @@ -30,7 +30,7 @@ <% if User.current.logged? %> <% if !@org_subfield.attachments.all.include?file %> <%= link_to("选入栏目",quote_resource_show_org_subfield_org_subfield_file_path(:org_subfield_id => @org_subfield.id, :id => file.id),:class => "f_l re_select c_lorange",:remote => true) %> - <% else %> + <% elsif @org_subfield.organization.org_subfields.where("field_type='Resource'").count > 1 %> <%= link_to("选入组织其他栏目",quote_resource_show_org_subfield_org_subfield_file_path(:org_subfield_id => @org_subfield.id, :id => file.id),:class => "f_l re_select c_lorange",:remote => true) %> <% end %> <%= file_preview_tag(file, class: 'f_l re_open', style:'text-align: center;') %> diff --git a/app/views/forums/_file_form.html.erb b/app/views/forums/_file_form.html.erb index 2510952f1..9bbbc9188 100644 --- a/app/views/forums/_file_form.html.erb +++ b/app/views/forums/_file_form.html.erb @@ -58,7 +58,7 @@ :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', :project => project), + :upload_path => uploads_path(:format => 'js'), :description_placeholder => l(:label_optional_description), :field_is_public => l(:field_is_public), :are_you_sure => l(:text_are_you_sure), diff --git a/app/views/homework_common/index.html.erb b/app/views/homework_common/index.html.erb index 010bc8ec9..bc960154e 100644 --- a/app/views/homework_common/index.html.erb +++ b/app/views/homework_common/index.html.erb @@ -3,6 +3,7 @@ $("#homework_name").val(""); $("#homework_publish_time").val(""); $("#homework_end_time").val(""); + document.getElementById("anonymous_comment").checked = true; $("#course_id").val($("#option_select").val()); $("#homework_attachments").html("<%= escape_javascript(render :partial => 'users/user_homework_attachment', :locals => { :container => HomeworkCommon.new,:has_program => true,:has_group => true})%>"); homework_description_editor.html(""); diff --git a/app/views/issues/_attributes.html.erb b/app/views/issues/_attributes.html.erb index 1b6bebb01..f0967843a 100644 --- a/app/views/issues/_attributes.html.erb +++ b/app/views/issues/_attributes.html.erb @@ -46,7 +46,7 @@ :method => 'get', :title => l(:label_version_new), :tabindex => 200) if User.current.allowed_to?(:manage_versions, @issue.project) %> - <%= link_to "", new_project_version_path(@issue.project), :class => "pic_add mt5 ml5 " %> + <%= link_to "", new_project_version_path(@issue.project), :class => "pic_add mt5 ml5 ", :target => "_blank" %> <% end %>
  • diff --git a/app/views/issues/_edit.html.erb b/app/views/issues/_edit.html.erb index 529de3480..ccd37dc91 100644 --- a/app/views/issues/_edit.html.erb +++ b/app/views/issues/_edit.html.erb @@ -3,13 +3,12 @@ <%= import_ke(enable_at: true, prettify: false, init_activity: false) %> <% end %> -<%= labelled_form_for @issue, :html => {:id => 'issue-form', :multipart => true,:remote=>true} do |f| %> +<%= labelled_form_for @issue, :html => {:id => 'issue-form', :multipart => true, :remote => true} do |f| %> <%= error_messages_for 'issue', 'time_entry' %> <%= render :partial => 'conflict' if @conflict %>
    <%= render :partial => 'issues/form', :locals => {:f => f} %> -
    <%# if @journals.present? %> diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb index 464104335..8b313a2ef 100644 --- a/app/views/issues/_form.html.erb +++ b/app/views/issues/_form.html.erb @@ -49,7 +49,7 @@ <%= f.label_for_field :description, :required => @issue.required_attribute?('description'), :no_label => true, :class => "label" %> <%#= link_to_function image_tag('edit.png'), '$(this).hide(); $("#issue_description_and_toolbar").show()' unless @issue.new_record? %> <%#= content_tag 'span', :id => "issue_description_and_toolbar" do %> - <%= f.kindeditor :description,:editor_id => "issue_desc_editor", :width=>'85%', :resizeType => 0, :no_label => true,at_id: @project.id, at_type: @project.class.to_s %> + <%= f.kindeditor :description,:editor_id => "issue_desc_editor", :width=>'85%', :height =>170, :resizeType => 0, :no_label => true,at_id: @project.id, at_type: @project.class.to_s %> <%# end %> <%#= wikitoolbar_for 'issue_description' %> <% end %> diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb index fd6171f18..58fbda6d6 100644 --- a/app/views/issues/_list.html.erb +++ b/app/views/issues/_list.html.erb @@ -40,7 +40,7 @@ <%= render :partial => 'users/project_issue', :locals => {:activity => issue, :user_activity_id => issue.id} %> <% end %> <% if issues.count == 10%> -
    展开更多<%=link_to "", project_issues_path({:project_id => project.id,:page => issue_pages.page}.merge(params)),:id => "more_issues_link",:remote => "true",:class => "none" %>
    +
    展开更多<%=link_to "", project_issues_path({:project_id => project.id}.merge(params)),:id => "more_issues_link",:remote => "true",:class => "none" %>
    <%#= link_to "点击展开更多",user_activities_path(@user.id,:type => type,:page => page),:id => "show_more_activities",:remote => "true",:class => "loadMore mt10 f_grey"%> <% end%> diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 4af757c77..b9d463855 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -26,20 +26,15 @@
    -
    -
    -
    回复(<%= @issue.journals.count %>)
    -
    -
    - -
    - <%= render :partial => 'issue_replies',:locals => {:issue=>@issue,:replies_all_i=>0} %> -
    - - - -
    - +
    +
    +
    回复(<%= @issue.journals.count %>)
    +
    +
    +
    + <%= render :partial => 'issue_replies',:locals => {:issue => @issue, :replies_all_i => 0} %> +
    + + - - \ No newline at end of file + \ No newline at end of file diff --git a/app/views/layouts/_footer.html.erb b/app/views/layouts/_footer.html.erb index 13730fd96..1db3091d7 100644 --- a/app/views/layouts/_footer.html.erb +++ b/app/views/layouts/_footer.html.erb @@ -1,39 +1,43 @@ -