From b259f923816b23618d76a67e752a654926fa0b62 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Sun, 9 Oct 2016 09:02:12 +0800 Subject: [PATCH 01/41] =?UTF-8?q?=E4=B8=80=E7=BA=A7=E5=B8=96=E5=AD=90?= =?UTF-8?q?=E6=A0=8F=E7=9B=AE=E9=BB=98=E8=AE=A4=E5=B1=95=E7=A4=BA5?= =?UTF-8?q?=E4=B8=AA=EF=BC=8C=E7=82=B9=E5=87=BB=E5=8F=AF=E8=BF=9B=E5=85=A5?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=EF=BC=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/organizations_controller.rb | 10 +++++ .../_org_left_subfield_list.html.erb | 41 +++++++++---------- .../organizations/_org_subdomain.html.erb | 13 +++--- .../organizations/more_org_submains.js.erb | 1 + config/routes.rb | 1 + public/javascripts/org.js | 11 +++++ 6 files changed, 49 insertions(+), 28 deletions(-) create mode 100644 app/views/organizations/more_org_submains.js.erb diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index 2b31cae13..edffdd28b 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -460,6 +460,16 @@ class OrganizationsController < ApplicationController @members = paginateHelper @members, 20 end + def more_org_submains + @org_subfield = OrgSubfield.find params[:org_subfield_id].to_i + + @page = params[:page] + @submains = @org_subfield.sub_domains.reorder('priority').uniq.page((params[:page].to_i || 1) +1).per(5) + respond_to do |format| + format.js + end + end + def more_org_projects @organization = Organization.find params[:id] @page = params[:page] diff --git a/app/views/organizations/_org_left_subfield_list.html.erb b/app/views/organizations/_org_left_subfield_list.html.erb index 11f45ede1..ee467067b 100644 --- a/app/views/organizations/_org_left_subfield_list.html.erb +++ b/app/views/organizations/_org_left_subfield_list.html.erb @@ -43,12 +43,11 @@ $(this).prev().css("color","#808080"); $(this).css("z-index", "1"); }); - //二级菜单滑动时箭头方向控制 $(".homepageLeftMenuMoreIcon").toggle(function(){ - $(this).css("background","url(/images/homepage_icon.png) 100px -624px no-repeat"); - },function(){ $(this).css("background","url(/images/homepage_icon.png) -74px -240px no-repeat"); + },function(){ + $(this).css("background","url(/images/homepage_icon.png) 100px -624px no-repeat"); }); }) @@ -103,17 +102,15 @@ <%= link_to "#{field.name}", show_org_subfield_organization_path(:id => organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %> <% end %> <% else %> - - <%= field.name %> + <%= link_to "#{field.name}", organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %> <% end %> <% if User.current.logged? and User.current.admin_of_org?(organization) %> <%=link_to "", new_organization_org_document_comment_path(organization, :field_id => field.id), :method => "get", :class => "homepageMenuSetting fr", :title => "发布帖子" %> <% end %> -
- +
@@ -139,20 +136,20 @@
<% elsif field.field_type == "Resource" %>
- <% if !field.subfield_subdomain_dir.nil? %> - <% if !request.local? and Secdomain.where("sub_type=2 and pid=?", organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", organization.id).map(&:subname).include?(request.subdomain) %> - <%= link_to "#{field.name}", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "homepageMenuText homepageMenuControl hidden" %> - <% else %> - <%= link_to "#{field.name}", show_org_subfield_organization_path(:id => organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "homepageMenuText homepageMenuControl hidden" %> - <% end %> - <% else %> - <%= link_to "#{field.name}", org_subfield_files_path(field), :class => "homepageMenuText homepageMenuControl hidden" %> - <% end %> - <% if User.current.member_of_org?organization %> - <%= link_to "", subfield_upload_file_org_subfield_files_path(field.id, :in_org => 1),:method => "post", :remote => true, :class => "homepageMenuSetting fr", :title => "上传资源" %> - - <% end %> - + <% if !field.subfield_subdomain_dir.nil? %> + <% if !request.local? and Secdomain.where("sub_type=2 and pid=?", organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", organization.id).map(&:subname).include?(request.subdomain) %> + <%= link_to "#{field.name}", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "homepageMenuText homepageMenuControl hidden" %> + <% else %> + <%= link_to "#{field.name}", show_org_subfield_organization_path(:id => organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "homepageMenuText homepageMenuControl hidden" %> + <% end %> + <% else %> + <%= link_to "#{field.name}", org_subfield_files_path(field), :class => "homepageMenuText homepageMenuControl hidden" %> + <% end %> + <% if User.current.member_of_org?organization %> + <%= link_to "", subfield_upload_file_org_subfield_files_path(field.id, :in_org => 1),:method => "post", :remote => true, :class => "homepageMenuSetting fr", :title => "上传资源" %> + + <% end %> +
<% end %> diff --git a/app/views/organizations/_org_subdomain.html.erb b/app/views/organizations/_org_subdomain.html.erb index b096a14ae..8b8807533 100644 --- a/app/views/organizations/_org_subdomain.html.erb +++ b/app/views/organizations/_org_subdomain.html.erb @@ -3,9 +3,10 @@ <%= link_to subdomain.name, org_subfield_sub_domain_sub_document_comments_path(subdomain, :org_subfield_id => org_subfield_id), :class => "coursesLineGrey hidden", :title => subdomain.name %> <% end %> -<%# if subdomains.size == 5 %> - - - - -<%# end%> \ No newline at end of file +<% if subdomains.size == 5 %> +
  • + + +
  • +<% end%> + diff --git a/app/views/organizations/more_org_submains.js.erb b/app/views/organizations/more_org_submains.js.erb new file mode 100644 index 000000000..088c9ed34 --- /dev/null +++ b/app/views/organizations/more_org_submains.js.erb @@ -0,0 +1 @@ +$("#show_more_org_submains").replaceWith("<%= escape_javascript( render :partial => 'organizations/org_subdomain',:locals => {:subdomains => @submains, :org_subfield_id => @org_subfield.id, :page=> @page, :org_id => @organization } )%>"); \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 4ff75cbf9..633ce465c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -73,6 +73,7 @@ RedmineApp::Application.routes.draw do put 'set_homepage' put 'cancel_homepage' get 'members' + get 'more_org_submains' get 'more_org_projects' get 'more_org_courses' get 'search_courses' diff --git a/public/javascripts/org.js b/public/javascripts/org.js index f1520a0ec..84711cded 100644 --- a/public/javascripts/org.js +++ b/public/javascripts/org.js @@ -34,6 +34,17 @@ function observeSearchfield(fieldId, targetId, url) { }); } +//显示更多子栏目 +function show_more_org_submain(url){ + $.get( + url, + { page: $("#org_submains_page_num").val() }, + function (data) { + + } + ); +} + //显示更多的项目 function show_more_org_project(url){ $.get( From dd4d20011ddefa1dca1e9df59db97e6ce05a3780 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 13 Oct 2016 09:43:53 +0800 Subject: [PATCH 02/41] =?UTF-8?q?=E5=85=AC=E5=85=B1=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E5=BA=93=E6=98=BE=E7=A4=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 4 ++-- app/views/layouts/_logined_header.html.erb | 2 +- app/views/users/user_resource.html.erb | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 78c60599a..556b1ed1b 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -3056,7 +3056,7 @@ class UsersController < ApplicationController user_course_ids = User.current.courses.map { |c| c.is_delete == 0 && c.id} user_project_ids = User.current.projects.map {|p| p.status != 9 && p.id } # user_org_ids = User.current.organizations.map {|o| o.id} - if( params[:type] == "1") # 我的资源 + if(params[:type].blank? || params[:type] == "1") # 我的资源 # 修正:我的资源库的话,那么应该是我上传的所有资源加上,我加入的课程、项目、组织的所有资源 if params[:status] == "2" @attachments = get_course_resources(params[:id], user_course_ids, @order, @score) @@ -3070,7 +3070,7 @@ class UsersController < ApplicationController # 公共资源库:所有公开资源或者我上传的私有资源 @attachments = get_my_resources(params[:id], user_course_ids, user_project_ids, @order, @score) end - elsif (params[:type].blank? || params[:type] == "6") # 公共资源 + elsif (params[:type] == "6") # 公共资源 if params[:status] == "2" @attachments = get_course_resources_public( user_course_ids, @order, @score) elsif params[:status] == "3" diff --git a/app/views/layouts/_logined_header.html.erb b/app/views/layouts/_logined_header.html.erb index b8235ff1c..4e501b2eb 100644 --- a/app/views/layouts/_logined_header.html.erb +++ b/app/views/layouts/_logined_header.html.erb @@ -8,7 +8,7 @@ <%= link_to "首页",user_activities_path(User.current), :class => "c_white f16 db p10", :title => "回到个人首页"%> <% if hidden_unproject_infos %> <% end %> - <% unless show_nav?(@course.boards.first ? @course.boards.first.topics.count : 0) %> + <% course_board = @course.boards.where("parent_id is NULL").first %> + <% unless show_nav?(course_board ? course_board.topics.count : 0) %>
  • - <% count = @course.boards.first ? (@course.boards.first.topics.count + Message.where("board_id =? and parent_id is not ?", @course.boards.first.id, nil).count) : 0 %> + <% count = course_board ? (course_board.topics.count + Message.where("board_id =? and parent_id is not ?", course_board.id, nil).count) : 0 %> 讨论区<%=count %> <%= link_to( "",course_boards_path(@course, :flag => true, :is_new => 1), :class => 'sy_class_add', :title =>"#{l(:label_message_new)}") %>
  • +
    + <%= render :partial => 'layouts/board_children_list', :locals => {:course_board => course_board} %> +
    <% end %> <% unless show_nav?(@course.homework_commons.count) %>
  • diff --git a/app/views/messages/_course_new.html.erb b/app/views/messages/_course_new.html.erb index bac064a9c..8c2be1588 100644 --- a/app/views/messages/_course_new.html.erb +++ b/app/views/messages/_course_new.html.erb @@ -4,11 +4,11 @@

    <%= l(:label_message_new) %>

      - <%= form_for @message, :url => {:action => 'new'}, :html => {:multipart => true, :id => 'message-form'} do |f| %> + <%= form_for @message, :url => {:action => 'new', :board_id => @board.id}, :html => {:multipart => true, :id => 'message-form'} do |f| %> <%= render :partial => 'form_course', :locals => {:f => f,:is_new => true} %> <%= l(:button_submit)%> <%#= preview_link({:controller => 'messages', :action => 'preview', :board_id => @board}, 'message-form' ,target='preview',{:class => 'blue_btn grey_btn fl c_white'} )%> - <%= link_to l(:button_cancel), course_boards_path(@course), :class => "grey_btn fl c_white ml10"%> + <%= link_to l(:button_cancel), course_boards_path(@course, :board_id => @board.id), :class => "grey_btn fl c_white ml10"%> <% end %>
    diff --git a/app/views/users/_course_message.html.erb b/app/views/users/_course_message.html.erb index 99e3aca62..391128287 100644 --- a/app/views/users/_course_message.html.erb +++ b/app/views/users/_course_message.html.erb @@ -10,7 +10,7 @@ TO <%=link_to activity.course.syllabus.title, syllabus_path(activity.course.syllabus_id), :class => 'newsBlue ml15', :target => '_blank' %> - <%= link_to activity.course.name.to_s+" | 班级讨论区", course_boards_path(activity.course,:host=> Setting.host_course), :class => "newsBlue mr5"%> + <%= link_to activity.course.name.to_s+" | #{activity.board.parent.nil? ? '班级讨论区' : activity.board.name}", course_boards_path(activity.course,:host=> Setting.host_course), :class => "newsBlue mr5"%>
    -
    - <%= submit_tag '确定', :onclick => 'upload_attachment_version(event);', :onfocus => 'this.blur()', :id => 'upload_files_submit_btn', :class => 'btn btn-blue fr mr5' %> +
    取消 + <%= submit_tag '确定', :onclick => 'upload_attachment_version(event);', :onfocus => 'this.blur()', :id => 'upload_files_submit_btn', :class => 'btn btn-blue fr mr5' %>
    <% end %> \ No newline at end of file diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb index 528265c26..a278c585b 100644 --- a/app/views/files/index.html.erb +++ b/app/views/files/index.html.erb @@ -1,17 +1,16 @@ - - <% if @container_type == 0 %> -
    - <%= render :partial => 'project_file', locals: {project: @project} %> -
    - <% elsif @container_type == 1 %> -
    - <%= render :partial => 'course_file', locals: {course: @course} %> -
    - <% elsif @container_type == 2 %> -
    - <%= render :partial => 'files/subfield_files', locals: {org_subfield: @org_subfield} %> -
    - <% end %> +<% if @container_type == 0 %> +
    + <%= render :partial => 'project_file', locals: {project: @project} %> +
    +<% elsif @container_type == 1 %> +
    + <%= render :partial => 'course_file', locals: {course: @course} %> +
    +<% elsif @container_type == 2 %> +
    + <%= render :partial => 'files/subfield_files', locals: {org_subfield: @org_subfield} %> +
    +<% end %>
    - + - + />
    diff --git a/app/views/poll/_edit_mulit.html.erb b/app/views/poll/_edit_mulit.html.erb index 921dfcb70..6b6279809 100644 --- a/app/views/poll/_edit_mulit.html.erb +++ b/app/views/poll/_edit_mulit.html.erb @@ -2,7 +2,7 @@
    - + - +
  • <% end %>
  • - <%= link_to( '删除资源', attachment_path(file),:data => {:confirm => l(:text_are_you_sure)}, :method => :delete,:class => "postOptionLink") if (delete_allowed || User.current.id == file.author_id) && file.container_id == project.id && file.container_type == "Project" && file.destroyable %> + <%= link_to( '删除资源', attachment_path(file),:data => {:confirm => file.destroyable ? l(:text_are_you_sure) : l(:text_history_are_you_sure)}, :method => :delete,:class => "postOptionLink") if (delete_allowed || User.current.id == file.author_id) && file.container_id == project.id && file.container_type == "Project" %>
  • <% end %> diff --git a/config/locales/commons/zh.yml b/config/locales/commons/zh.yml index cfe52e11a..985fd9bc3 100644 --- a/config/locales/commons/zh.yml +++ b/config/locales/commons/zh.yml @@ -188,6 +188,7 @@ zh: text_are_you_sure: 您确定要删除吗? #js 提示 + text_history_are_you_sure: 本资源有多个版本,你确定要全部删除吗? text_are_you_sure_out: 你确定要退出该班级吗? text_are_you_sure_out_group: 你确定要退出该分班吗? text_are_you_sure_all: 您确定要删除所有文件吗 From f87e335acf4f188da396bda1416745c5b45b0f59 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 14 Oct 2016 15:01:36 +0800 Subject: [PATCH 12/41] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=A4=A7=E7=BA=B2?= =?UTF-8?q?=E3=80=81=E4=BD=9C=E4=B8=9A=E4=BA=8C=E7=BA=A7=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E4=B8=8D=E5=8F=AF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/words_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb index c9bb42ebe..de232a423 100644 --- a/app/controllers/words_controller.rb +++ b/app/controllers/words_controller.rb @@ -332,7 +332,7 @@ class WordsController < ApplicationController @homework_common = HomeworkCommon.find reply.jour_id if params[:reply_message].size>0 && User.current.logged? && @user options = {:notes => params[:reply_message], :reply_id => reply.user_id,:user_id => @user.id,:m_parent_id => params[:id].to_i,:m_reply_id => params[:id].to_i, :root_id => reply.root_id} - feedback = HomeworkCommon.add_homework_jour(@user, params[:reply_message], reply.jour_id, options) + feedback = HomeworkCommon.add_homework_jour(@user, params[:reply_message], reply.jour_id, reply.root_id, options) if (feedback.errors.empty?) if params[:asset_id] ids = params[:asset_id].split(',') @@ -366,7 +366,7 @@ class WordsController < ApplicationController @syllabus = Syllabus.find reply.jour_id if params[:reply_message].size>0 && User.current.logged? && @user options = {:notes => params[:reply_message], :reply_id => reply.user_id,:user_id => @user.id,:m_parent_id => params[:id].to_i,:m_reply_id => params[:id].to_i, :root_id => reply.root_id} - feedback = Syllabus.add_syllabus_jour(@user, params[:reply_message], reply.jour_id, options) + feedback = Syllabus.add_syllabus_jour(@user, params[:reply_message], reply.jour_id, reply.root_id, options) if (feedback.errors.empty?) if params[:asset_id] ids = params[:asset_id].split(',') From 0c137515c1e0512d9f578dcf6c8e9d81bfd39a23 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 14 Oct 2016 15:08:29 +0800 Subject: [PATCH 13/41] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E3=80=81=E7=BB=84?= =?UTF-8?q?=E7=BB=87=E5=AD=98=E5=9C=A8=E5=8E=86=E5=8F=B2=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E4=B8=80=E9=94=AE=E5=88=A0=E9=99=A4=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/files/_org_subfield_list.html.erb | 2 +- app/views/files/_resource_detail.html.erb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/files/_org_subfield_list.html.erb b/app/views/files/_org_subfield_list.html.erb index 45aa7095b..05d307016 100644 --- a/app/views/files/_org_subfield_list.html.erb +++ b/app/views/files/_org_subfield_list.html.erb @@ -80,7 +80,7 @@ <% end %>
  • <%= link_to( '删除资源', attachment_path(file), - :data => {:confirm => l(:text_are_you_sure)}, :method => :delete,:class => "postOptionLink") if (delete_allowed || User.current.id == file.author_id) && file.container_id == org_subfield.id && file.container_type == "OrgSubfield" && file.destroyable %> + :data => {:confirm => file.destroyable ? l(:text_are_you_sure) : l(:text_history_are_you_sure)}, :method => :delete,:class => "postOptionLink") if (delete_allowed || User.current.id == file.author_id) && file.container_id == org_subfield.id && file.container_type == "OrgSubfield" %>
  • <%else%> diff --git a/app/views/files/_resource_detail.html.erb b/app/views/files/_resource_detail.html.erb index 08b85ab2f..c9431f7d3 100644 --- a/app/views/files/_resource_detail.html.erb +++ b/app/views/files/_resource_detail.html.erb @@ -82,8 +82,8 @@ <%end%>
  • <%= link_to( '删除资源', attachment_path(file), - :data => {:confirm => l(:text_are_you_sure)}, - :method => :delete,:class => "postOptionLink") if (delete_allowed || User.current.id == file.author_id) && file.container_id == @course.id && file.container_type == "Course" && file.destroyable %> + :data => {:confirm => file.destroyable ? l(:text_are_you_sure) : l(:text_history_are_you_sure)}, + :method => :delete,:class => "postOptionLink") if (delete_allowed || User.current.id == file.author_id) && file.container_id == @course.id && file.container_type == "Course" %>
  • <% end %> From 5f04baf572c7577acbef27b597d2dff29d9d3738 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 14 Oct 2016 15:09:47 +0800 Subject: [PATCH 14/41] =?UTF-8?q?=E5=8D=9A=E5=AE=A2=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E6=98=BE=E7=A4=BA=EF=BC=9A=E2=80=9C=E5=B1=95?= =?UTF-8?q?=E5=BC=80=E6=9B=B4=E5=A4=9A=E2=80=9D=E3=80=81=E2=80=9C=E6=94=B6?= =?UTF-8?q?=E8=B5=B7=E5=9B=9E=E5=A4=8D=E2=80=9D=E7=82=B9=E5=87=BB=E6=97=A0?= =?UTF-8?q?=E5=8F=8D=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 150a113a3..de7ba7f68 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -3559,7 +3559,7 @@ class UsersController < ApplicationController @type = 'Issue' @user_activity_id = params[:div_id].to_i if params[:div_id] when 'BlogComment' - #obj = BlogComment.where('id = ?', params[:id].to_i).first + obj = BlogComment.where('id = ?', params[:id].to_i).first @user_activity_id = params[:div_id].to_i if params[:div_id] @homepage = params[:homepage].to_i @type = 'BlogComment' From e72b2de6e248418abeaa867ced757bedb0727fbf Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 14 Oct 2016 15:29:07 +0800 Subject: [PATCH 15/41] =?UTF-8?q?=E9=95=BF=E5=8D=95=E8=AF=8D=E5=BC=BA?= =?UTF-8?q?=E5=88=B6=E6=8A=98=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/poll/_show_MCQ_result.html.erb | 2 +- app/views/poll/_show_MC_result.html.erb | 2 +- app/views/poll/_show_mulit_result.html.erb | 2 +- app/views/poll/_show_single_result.html.erb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/poll/_show_MCQ_result.html.erb b/app/views/poll/_show_MCQ_result.html.erb index 065a4b6c9..4129f164b 100644 --- a/app/views/poll/_show_MCQ_result.html.erb +++ b/app/views/poll/_show_MCQ_result.html.erb @@ -13,7 +13,7 @@ <% poll_question.poll_votes.where("user_id = #{User.current.id}").each do |answer|%> -

    +

    <%= answer.poll_answer.answer_text == "" ? (answer.vote_text.nil? ? "其他" : answer.vote_text) : answer.poll_answer.answer_text %>

    diff --git a/app/views/poll/_show_MC_result.html.erb b/app/views/poll/_show_MC_result.html.erb index 34bd7f644..d154468b3 100644 --- a/app/views/poll/_show_MC_result.html.erb +++ b/app/views/poll/_show_MC_result.html.erb @@ -13,7 +13,7 @@ <% poll_question.poll_votes.where("user_id = #{User.current.id}").each do |answer|%> -

    +

    <%= answer.poll_answer.answer_text == "" ? (answer.vote_text.nil? ? "其他" : answer.vote_text) : answer.poll_answer.answer_text %>

    diff --git a/app/views/poll/_show_mulit_result.html.erb b/app/views/poll/_show_mulit_result.html.erb index 77c6d510c..da72ea35d 100644 --- a/app/views/poll/_show_mulit_result.html.erb +++ b/app/views/poll/_show_mulit_result.html.erb @@ -10,7 +10,7 @@ <% poll_question.poll_answers.reorder("answer_position").each_with_index do |poll_answer, i| %>

    <%= i + 1 %>.<%= poll_answer.answer_text%>

    -

    +

    <%= get_anwser_vote_text(poll_question.id,User.current.id,poll_answer.id).html_safe%>

    diff --git a/app/views/poll/_show_single_result.html.erb b/app/views/poll/_show_single_result.html.erb index 7bdf9940a..4fbf3698f 100644 --- a/app/views/poll/_show_single_result.html.erb +++ b/app/views/poll/_show_single_result.html.erb @@ -8,7 +8,7 @@
    -

    +

    <%= get_anwser_vote_text poll_question.id,User.current.id%>

    From 6b7ca9c84d1ee18b382c720d0acb73c30a432e0e Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 14 Oct 2016 15:30:44 +0800 Subject: [PATCH 16/41] =?UTF-8?q?=E9=97=AE=E5=8D=B7=E8=B0=83=E6=9F=A5?= =?UTF-8?q?=EF=BC=9A=E7=BC=96=E8=BE=91=EF=BC=88=E7=AC=94=EF=BC=89=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=E6=8C=89=E9=92=AE=E5=BB=BA=E8=AE=AE=E6=94=B9=E6=88=90?= =?UTF-8?q?=E5=BD=93=E9=BC=A0=E6=A0=87=E7=A7=BB=E4=B8=8A=E5=8E=BB=E6=97=B6?= =?UTF-8?q?=E6=89=8D=E6=98=BE=E7=A4=BA=E3=80=81=E5=A4=9A=E9=80=89=E9=A2=98?= =?UTF-8?q?=E4=B8=8D=E6=98=BE=E7=A4=BA=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/poll/_poll_form.html.erb | 2 +- app/views/poll/_show_head.html.erb | 4 ++-- app/views/poll/show.html.erb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/poll/_poll_form.html.erb b/app/views/poll/_poll_form.html.erb index 9e087d329..6edea0362 100644 --- a/app/views/poll/_poll_form.html.erb +++ b/app/views/poll/_poll_form.html.erb @@ -577,7 +577,7 @@ function insert_MCQ(quest_type,quest_num,quest_id){ diff --git a/app/views/poll/_show_head.html.erb b/app/views/poll/_show_head.html.erb index 8db327146..83b5d26e9 100644 --- a/app/views/poll/_show_head.html.erb +++ b/app/views/poll/_show_head.html.erb @@ -1,5 +1,5 @@ -
    - +
    +

    <%= poll.polls_name%>

    <%= @poll.polls_description.nil? ? "" : @poll.polls_description.html_safe%>
    diff --git a/app/views/poll/show.html.erb b/app/views/poll/show.html.erb index 484b9e66b..63f7feae5 100644 --- a/app/views/poll/show.html.erb +++ b/app/views/poll/show.html.erb @@ -233,7 +233,7 @@
    <% end %>
    -
    "> +
    ">

    多行主观题

    <% multi_question_list.each do |pq| %>
    From eff68d937f2cf5bc4eafb2d89d50001078a19a17 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 14 Oct 2016 15:45:13 +0800 Subject: [PATCH 17/41] gemfile --- Gemfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 1305320cf..cbeade2a3 100644 --- a/Gemfile +++ b/Gemfile @@ -50,10 +50,10 @@ gem 'elasticsearch-model' gem 'elasticsearch-rails' #rails 3.2.22.2 bug - # gem "test-unit", "~>3.0" + gem "test-unit", "~>3.0" ### profile - # gem 'oneapm_rpm' + gem 'oneapm_rpm' group :development do gem 'grape-swagger' From 0859f86518cb4e277130a850bbae0dac797104fa Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 14 Oct 2016 15:46:15 +0800 Subject: [PATCH 18/41] =?UTF-8?q?=E7=A9=BA=E9=97=AE=E5=8D=B7=E5=A4=B4?= =?UTF-8?q?=E9=83=A8=E7=BC=96=E8=BE=91=E6=8C=89=E9=92=AE=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/poll/_show_head.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/poll/_show_head.html.erb b/app/views/poll/_show_head.html.erb index 8db327146..e0fe4415d 100644 --- a/app/views/poll/_show_head.html.erb +++ b/app/views/poll/_show_head.html.erb @@ -1,5 +1,5 @@
    - +

    <%= poll.polls_name%>

    <%= @poll.polls_description.nil? ? "" : @poll.polls_description.html_safe%>
    From 45008d98684c8f5bb0874cdf5d34c3bc7ae837b0 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 14 Oct 2016 15:55:47 +0800 Subject: [PATCH 19/41] =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E9=97=AE=E5=8D=B7?= =?UTF-8?q?=EF=BC=9A=E9=BC=A0=E6=A0=87=E7=82=B9=E5=87=BB=E6=8F=8F=E8=BF=B0?= =?UTF-8?q?=E6=A1=86=EF=BC=8C=E5=85=89=E6=A0=87=E5=8D=B4=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=AE=9A=E4=BD=8D=E5=88=B0=E7=AC=AC=E4=BA=8C=E8=A1=8C=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/poll/_edit_head.html.erb | 4 +--- public/stylesheets/css/courses.css | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/views/poll/_edit_head.html.erb b/app/views/poll/_edit_head.html.erb index 8238b9f37..90a12f20d 100644 --- a/app/views/poll/_edit_head.html.erb +++ b/app/views/poll/_edit_head.html.erb @@ -3,9 +3,7 @@
    - + 取消 保存
    diff --git a/public/stylesheets/css/courses.css b/public/stylesheets/css/courses.css index 5977f25de..178b772eb 100644 --- a/public/stylesheets/css/courses.css +++ b/public/stylesheets/css/courses.css @@ -482,7 +482,7 @@ a:hover.btn_cancel{ color:#666;} .testStatus{width:698px; border:1px solid #cbcbcb; padding:10px; margin-bottom:10px; background:#ffffff; position:relative; color:#767676;} .testEdit{ background:url(../images/icons.png) 0px -272px no-repeat; width:16px; height:27px; display:block;float:right; bottom:10px; right:10px; position:absolute;} a:hover.testEdit{ background:url(../images/icons.png) -21px -272px no-repeat;} -.testDesEdit {width:670px; overflow:hidden;} +.testDesEdit {width:670px; overflow:hidden; white-space:pre-wrap;} .testEditTitle{ padding:10px 0px ; float:left; width:564px; } .questionEditContainer {border:1px solid #cbcbcb;background:#eeeeee; padding:10px; margin-bottom:10px; margin-top:10px;} .fillInput {border:1px solid #cbcbcb; padding-left:5px; background-color:#ffffff; width:693px; height:30px; color:#888888;} From caa54c77a23847b1ab398bb0c05f00b3b61905a2 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 14 Oct 2016 16:00:40 +0800 Subject: [PATCH 20/41] =?UTF-8?q?=E8=A7=A3=E5=86=B3issue=E7=9A=84=E5=86=B2?= =?UTF-8?q?=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/issues/index.html.erb | 122 +++++++++++++++++++++++++++++++- 1 file changed, 120 insertions(+), 2 deletions(-) diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index 6d5f25c3b..cf4e2bf34 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -1,3 +1,121 @@ +<%= content_for(:header_tags) do %> + <%= import_ke(enable_at: true,init_activity: true) %> +<% end %> + + +
    <% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %> @@ -168,4 +286,4 @@
    -
    \ No newline at end of file +
    From 38d43cfb674c0a9687e0dc3c9ad9806d5e36bbb9 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 14 Oct 2016 16:11:46 +0800 Subject: [PATCH 21/41] =?UTF-8?q?=E5=BF=85=E7=AD=94=E4=B8=8D=E5=BA=94?= =?UTF-8?q?=E6=8D=A2=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/poll/_new_MC.html.erb | 2 +- app/views/poll/_new_MCQ.html.erb | 2 +- app/views/poll/_new_mulit.html.erb | 2 +- app/views/poll/_new_single.html.erb | 2 +- public/stylesheets/css/common.css | 1 + 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/views/poll/_new_MC.html.erb b/app/views/poll/_new_MC.html.erb index b3f38df21..108fb9f5a 100644 --- a/app/views/poll/_new_MC.html.erb +++ b/app/views/poll/_new_MC.html.erb @@ -5,7 +5,7 @@
    - +
    diff --git a/app/views/poll/_new_MCQ.html.erb b/app/views/poll/_new_MCQ.html.erb index 4405ce581..472ddfaf1 100644 --- a/app/views/poll/_new_MCQ.html.erb +++ b/app/views/poll/_new_MCQ.html.erb @@ -3,7 +3,7 @@
    - +
    diff --git a/app/views/poll/_new_mulit.html.erb b/app/views/poll/_new_mulit.html.erb index 056da12a7..5f58afffa 100644 --- a/app/views/poll/_new_mulit.html.erb +++ b/app/views/poll/_new_mulit.html.erb @@ -3,7 +3,7 @@
    - +