From 3b1ea392af03413de2f8c8fb211510bcfbd910d9 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Mon, 16 Mar 2015 11:00:31 +0800 Subject: [PATCH 001/305] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E7=9A=84gem?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 34e81cef6..835857625 100644 --- a/Gemfile +++ b/Gemfile @@ -27,8 +27,8 @@ group :development do gem 'grape-swagger' #gem 'grape-swagger-ui', git: 'https://github.com/guange2015/grape-swagger-ui.git' #gem 'puma' - gem 'pry-rails' - gem 'pry-byebug' + # gem 'pry-rails' + # gem 'pry-byebug' gem 'better_errors', path: 'lib/better_errors' gem 'rack-mini-profiler', path: 'lib/rack-mini-profiler' end From 747a109638bd564f4f65a2ab39c8901498ef9f5f Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Mon, 16 Mar 2015 11:51:12 +0800 Subject: [PATCH 002/305] =?UTF-8?q?1=E3=80=81=E6=B7=BB=E5=8A=A0CSS?= =?UTF-8?q?=E6=96=87=E4=BB=B6=202=E3=80=81=E8=B0=83=E6=95=B4=E9=A6=96?= =?UTF-8?q?=E9=A1=B5HTML=203=E3=80=81=E5=8E=BB=E6=8E=89base=5Fheader?= =?UTF-8?q?=E4=B8=AD=E6=B2=A1=E7=94=A8=E7=9A=84erb=E8=AF=AD=E5=8F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_base_header.html.erb | 33 ------ app/views/layouts/base.html.erb | 74 ++++++------ app/views/layouts/base_welcome.html.erb | 49 ++++++++ public/stylesheets/courses.css | 49 ++++++++ public/stylesheets/leftside.css | 59 ++++++++++ public/stylesheets/public.css | 150 ++++++++++++++++++++++++ 6 files changed, 346 insertions(+), 68 deletions(-) create mode 100644 app/views/layouts/base_welcome.html.erb create mode 100644 public/stylesheets/courses.css create mode 100644 public/stylesheets/leftside.css create mode 100644 public/stylesheets/public.css diff --git a/app/views/layouts/_base_header.html.erb b/app/views/layouts/_base_header.html.erb index 445a5abf4..75c39a407 100644 --- a/app/views/layouts/_base_header.html.erb +++ b/app/views/layouts/_base_header.html.erb @@ -1,32 +1,3 @@ -<% - request.headers['REQUEST_URI'] = "" if request.headers['REQUEST_URI'].nil? - realUrl = request.original_url - if (realUrl.match(/.*forge\.trustie\.net\/*/)) - #@nav_dispaly_project_label = 1 - #@nav_dispaly_forum_label = 1 - elsif (realUrl.match(/.*course\.trustie\.net\/*/)) - #@nav_dispaly_course_all_label = 1 - #@nav_dispaly_forum_label = 1 - #@nav_dispaly_course_label = nil - #@nav_dispaly_store_all_label = 1 - elsif (realUrl.match(/.*user\.trustie\.net\/*/)) - #@nav_dispaly_home_path_label = 1 - #@nav_dispaly_main_course_label = 1 - #@nav_dispaly_main_project_label = 1 - #@nav_dispaly_main_contest_label = 1 - elsif (realUrl.match(/.*contest\.trustie\.net\/*/)) - #@nav_dispaly_contest_label = 1 - #@nav_dispaly_store_all_label = 1 - else - #@nav_dispaly_project_all_label = 1 - #@nav_dispaly_course_all_label = 1 - #@nav_dispaly_forum_label = 1 - #@nav_dispaly_bid_label = 1 - #@nav_dispaly_contest_label = 1 - #@nav_dispaly_store_all_label = 1 - #@nav_dispaly_user_label = 1 - end -%> <%= render :partial => "layouts/base_feedback" %>
<% end -%> - <%#= render_menu :top_menu if User.current.logged? || !Setting.login_required? -%> <%= render_dynamic_nav if User.current.logged? || !Setting.login_required? -%> - <%# 自建导航条在base页面中以 (@nav_dispaly......) 开头变量设定, 全局搜索即可发现 %>
-
-
- <%= form_tag({:controller => 'courses', :action => 'search'},:id => "course_search_form", :method => :get) do %> - <%= text_field_tag 'name', params[:name], :size => 20, :style => "float:left" %> - - <%= l(:label_search)%> - -
- - <%#= submit_tag l(:label_search), :class => "ButtonColor m3p10", :name => nil, :style => "float:left;padding-top: 3px; margin: 0px;padding-bottom:0px;" %> - <% end %> - - - - - - -

- <%= link_to l(:field_homepage), home_path %> - > - - <%=l(:label_courses_management_platform)%> - - > - <%= link_to @course.name, nil %> -

- - - - - - - -
-
- -
- <%= render_flash_messages %> - <%= yield %> - <%= call_hook :view_layouts_base_content %> -
- - -
- -<%= render :partial => 'layouts/base_footer' %> - - - + + <%= call_hook :view_layouts_base_body_bottom %> +<%= render :partial => 'layouts/new_feedback' %> \ No newline at end of file diff --git a/lib/redmine/menu_manager.rb b/lib/redmine/menu_manager.rb index 60719753d..947103ea8 100644 --- a/lib/redmine/menu_manager.rb +++ b/lib/redmine/menu_manager.rb @@ -104,6 +104,15 @@ module Redmine links.empty? ? nil : content_tag('ul', links.join("\n").html_safe) end + #重新写个方法,专门给header用 sw + def header_render_menu (menu, project=nil) + links = [] + menu_items_for(menu, project) do |node| + links << render_menu_node(node, project) + end + links.empty? ? nil : links.join("\n").html_safe + end + def bootstrap_render_menu(menu, project=nil) links = [] menu_items_for(menu, project) do |node| @@ -122,8 +131,7 @@ module Redmine else caption, url, selected = extract_node_details(node, project) unless url.to_s.include?( 'code_review') - return content_tag('li', - render_single_menu_node(node, caption, url, selected)) + return content_tag('li',render_single_menu_node(node, caption, url, selected),:class => 'fr') end end end diff --git a/public/javascripts/feedback.js b/public/javascripts/feedback.js new file mode 100644 index 000000000..56d1c296f --- /dev/null +++ b/public/javascripts/feedback.js @@ -0,0 +1,47 @@ +(function($){ + $.fn.fix = function(options){ + var defaults = { + float : 'right', + minStatue : true, + skin : 'blue', + durationTime : 1000 + }; + var options = $.extend(defaults, options); + + this.each(function(){ + var thisBox = $(this), + closeBtn = thisBox.find('.close_btn' ), + show_btn = thisBox.find('.show_btn' ), + sideContent = thisBox.find('.side_content'), + sideList = thisBox.find('.side_list') + ; + var defaultTop = thisBox.offset().top; + + thisBox.css(options.float, 0); + if(options.minStatue == "true"){ + $(".show_btn").css("float", options.float); + sideContent.css('width', 0); + show_btn.css('width', 25); + + } + closeBtn.bind("click",function(){ + sideContent.animate({width: '0px'},"fast"); + show_btn.stop(true, true).delay(300).animate({ width: '25px'},"fast"); + cookiesave('minStatue','false','','',''); + }); + show_btn.bind("click",function() { + $(this).animate({width: '0px'},"fast"); + sideContent.stop(true, true).delay(200).animate({ width: '154px'},"fast"); + cookiesave('minStatue','false','','',''); + }); + }); + }; +})(jQuery); + +$(function() { + $("#scrollsidebar").fix({ + float : 'right', //default.left or right + //minStatue : true, + durationTime : 600 + }); +}); \ No newline at end of file diff --git a/public/javascripts/header.js b/public/javascripts/header.js new file mode 100644 index 000000000..e5363f8d5 --- /dev/null +++ b/public/javascripts/header.js @@ -0,0 +1,41 @@ +function addSlipMenu () { + var loggedas = $('#current_user_li:first'); + var sub_menu = $('#user_sub_menu'); + loggedas.mouseenter(function(event) { + sub_menu.show(); + }); + sub_menu.mouseleave(function(event) { + sub_menu.hide(); + }); +} + +function addProjectSlipMenu () { + var loggedas = $('#my_projects_li'); + var project_sub_menu = $('#my_projects_ul'); + var course_sub_menu = $('#my_courses_ul'); + loggedas.mouseenter(function(event) { + course_sub_menu.hide(); + project_sub_menu.show(); + }); + loggedas.mouseleave(function(event) { + project_sub_menu.hide(); + }); +} +function addCourseSlipMenu () { + var loggedas = $('#my_courses_li'); + var project_sub_menu = $('#my_projects_ul'); + var course_sub_menu = $('#my_courses_ul'); + loggedas.mouseenter(function(event) { + project_sub_menu.hide(); + course_sub_menu.show(); + }); + loggedas.mouseleave(function(event) { + course_sub_menu.hide(); + }); +} + +$(document).ready(function () { + addSlipMenu(); + addProjectSlipMenu (); + addCourseSlipMenu(); +}); \ No newline at end of file diff --git a/public/javascripts/polls.js b/public/javascripts/polls.js deleted file mode 100644 index c10bf6d1f..000000000 --- a/public/javascripts/polls.js +++ /dev/null @@ -1,65 +0,0 @@ -function add_MC(){ - var now = new Date().getTime(); - $("#poll_content").append("
"+ - "
"+ - "
" + - "
" + - "
" + - "" + - "" + - "" + - "" + - "" + - "
" + - "
" + - "
    " + - "
  • " + - "" + - "" + - "" + - "" + - "
  • " + - "
    " + - "
  • " + - "" + - "" + - "" + - "" + - "
  • " + - "
    " + - "
  • " + - "" + - "" + - "" + - "" + - "
  • " + - "
    " + - "
" + - "
" + - "" + - "
" + - "
" + - "
" + - "
" + - "
"); -} -function add_MCQ(){$("#poll_content").append("<%= escape_javascript(render :partial => 'new_MCQ') %>");} -function add_single(){$("#poll_content").append("<%= escape_javascript(render :partial => 'new_single') %>");} -function add_mulit(){$("#poll_content").append("<%= escape_javascript(render :partial => 'new_mulit') %>");} -//问卷头 -function pollsCancel(){$("#polls_head_edit").hide();$("#polls_head_show").show();} -function pollsEdit(){$("#polls_head_edit").show();$("#polls_head_show").hide();} -//单选题 -function add_single_answer(doc) -{ - doc.parent().after("
  • " + - ""+ - "
  • "); -} -function remove_single_answer(doc) -{ - if(doc.parent().siblings("li").length == 0){doc.parent().parent().parent().parent().parent().parent().remove();}else{doc.parent().remove();} -} \ No newline at end of file diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 0ee806159..d44c10161 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -121,10 +121,10 @@ a:hover.c_blue02{color: #0781b4;} .footlogo{ width:580px; margin:0 auto;height:50px; } /*意见反馈*/ html{ overflow-x:hidden;} -.scrollsidebar{ position:absolute;top:1px; right:1px; background:none; } +.scrollsidebar{ position:fixed;bottom:1px; right:1px; background:none; } .side_content{width:154px; height:auto; overflow:hidden; float:left; } .side_content .side_list {width:154px;overflow:hidden;} -.show_btn{ width:0; height:112px; overflow:hidden; float:left; cursor:pointer;} +.show_btn{ width:0; height:112px; overflow:hidden; float:left;margin-top: 200px; cursor:pointer;} .show_btn span { display:none;} .close_btn{width:24px;height:24px;cursor:pointer;} .side_title,.side_bottom,.close_btn,.show_btn {background:url(../images/sidebar_bg.png) no-repeat; } From d2c7861706d7a137c328cebc71b81a88d4b10f8f Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 17 Mar 2015 15:57:09 +0800 Subject: [PATCH 004/305] =?UTF-8?q?1=E3=80=81=E6=B7=BB=E5=8A=A0=E7=BC=BA?= =?UTF-8?q?=E5=B0=91=E5=9B=BE=E7=89=87=202=E3=80=81=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=84=8F=E8=A7=81=E5=8F=8D=E9=A6=88=E6=A1=86=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E4=B8=BA=E5=85=B3=E9=97=AD=203=E3=80=81=E4=BF=AE=E6=94=B9css?= =?UTF-8?q?=E4=B8=AD=E9=83=A8=E5=88=86=E5=9B=BE=E7=89=87=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_base_feedback.html.erb | 2 +- public/images/pic_headnav.png | Bin 0 -> 210 bytes public/javascripts/feedback.js | 45 ++++++++++++++++++++-- public/stylesheets/courses.css | 8 ++-- public/stylesheets/leftside.css | 2 +- 5 files changed, 48 insertions(+), 9 deletions(-) create mode 100644 public/images/pic_headnav.png diff --git a/app/views/layouts/_base_feedback.html.erb b/app/views/layouts/_base_feedback.html.erb index bf6862244..1dc15e481 100644 --- a/app/views/layouts/_base_feedback.html.erb +++ b/app/views/layouts/_base_feedback.html.erb @@ -110,7 +110,7 @@ $(function(){ myTips("<%= l(:label_feedback_success) %>","success"); }); -}) +}); function f_submit() { diff --git a/public/images/pic_headnav.png b/public/images/pic_headnav.png new file mode 100644 index 0000000000000000000000000000000000000000..2f59b84c4d265afc7fb81084bf9ba2bf93119435 GIT binary patch literal 210 zcmeAS@N?(olHy`uVBq!ia0vp^Y(UJx0U~c5>$3n-oCO|{#S9F5M?jcysy3fAP*5S+ zBgmJ5p-Pp3p`n?9;pcxK{gQ#9)PRBERRRNp)eHs(@%%~gN8NyGBRpLkLn?0NoZHCT z?7-k0*xjc(A;`deNsiO}z)gIz(J3rht4b7}241)`_s1md=xxpFm$YttJh<5OpWeP1 zUXKHelV1dV_THp+Ge|{z_S`Cs1ts3`v~!(gV@w>ToX4QMw5gQu&X%Q~loCICLD BMpXa+ literal 0 HcmV?d00001 diff --git a/public/javascripts/feedback.js b/public/javascripts/feedback.js index 56d1c296f..7ed063b75 100644 --- a/public/javascripts/feedback.js +++ b/public/javascripts/feedback.js @@ -32,16 +32,55 @@ show_btn.bind("click",function() { $(this).animate({width: '0px'},"fast"); sideContent.stop(true, true).delay(200).animate({ width: '154px'},"fast"); - cookiesave('minStatue','false','','',''); + cookiesave('minStatue','true','','',''); }); }); }; })(jQuery); +function cookiesave(n, v, mins, dn, path) +{ + if(n) + { + if(!mins) mins = 365 * 24 * 60; + if(!path) path = "/"; + var date = new Date(); + date.setTime(date.getTime() + (mins * 60 * 1000)); + var expires = "; expires=" + date.toGMTString(); + if(dn) dn = "domain=" + dn + "; "; + document.cookie = n + "=" + v + expires + "; " + dn + "path=" + path; + } +} + +function cookieget(n) +{ + var name = n + "="; + var ca = document.cookie.split(';'); + for(var i=0;i","success"); + }); +}); + +function f_submit() +{ + $("#new_memo").submit(); +} \ No newline at end of file diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index b403a5984..042e7caae 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -7,10 +7,10 @@ .more:hover{ color:#64bdd9;} .project_box_ul{ padding:0 10px;} .project_box_list{ padding:10px 0; border-bottom:1px dashed #e2e1e1; padding-left:30px; color:#6f6c6c;} -.img_problem{ background:url(../images/img_project.png) 0 -20px no-repeat;} -.img_talk{ background:url(../images/img_project.png) 0 -62px no-repeat;} -.img_ziyuan{ background:url(../images/img_project.png) 0 -115px no-repeat;} -.img_edition{ background:url(../images/img_project.png) 0 -167px no-repeat;} +.img_problem{ background:url(../images/new_project/img_project.png) 0 -20px no-repeat;} +.img_talk{ background:url(../images/new_project/img_project.png) 0 -62px no-repeat;} +.img_ziyuan{ background:url(../images/new_project/img_project.png) 0 -115px no-repeat;} +.img_edition{ background:url(../images/new_project/img_project.png) 0 -167px no-repeat;} .project_name{ color:#058c42;} .project_name:hover{ color:#016f33;} .project_txt{ color:#0781b4; width:445px; display:block; float:left; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} diff --git a/public/stylesheets/leftside.css b/public/stylesheets/leftside.css index 4c2a1ef0f..12d0f2c4f 100644 --- a/public/stylesheets/leftside.css +++ b/public/stylesheets/leftside.css @@ -14,7 +14,7 @@ .pr_info_score{ font-size:14px; color:#3e4040; } .pr_info_score a{ color:#ff7143;} .pr_info_score a:hover{ color:#64bdd9;} -.img_private{ background:url(../images/img_project.png) 0 0 no-repeat; width:32px; height:16px; color:#fff; font-size:12px; padding-left:7px; } +.img_private{ background:url(../images/new_project/img_project.png) 0 0 no-repeat; width:32px; height:16px; color:#fff; font-size:12px; padding-left:7px; } .info_foot_num{ color:#3ca5c6; } .pr_info_foot{ color:#7f7f7f; margin-top:5px; } .info_foot_num:hover{ color:#2390b2;} From 4c482e1facdd0ada4cd69a3d10911e975815e0f7 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 17 Mar 2015 16:19:31 +0800 Subject: [PATCH 005/305] =?UTF-8?q?=E5=AE=8C=E6=88=90=E6=96=B0=E7=9A=84?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=8F=8D=E9=A6=88=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_new_feedback.html.erb | 33 ++++++++++++++++-------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/app/views/layouts/_new_feedback.html.erb b/app/views/layouts/_new_feedback.html.erb index ec113d413..4f7e650eb 100644 --- a/app/views/layouts/_new_feedback.html.erb +++ b/app/views/layouts/_new_feedback.html.erb @@ -1,27 +1,38 @@ <%= javascript_include_tag "feedback" %> +
    -
    - -
    - 提  交 + <% get_memo %> + <%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %> + <%= f.text_area :subject, :class => "opnionText", :placeholder => l(:label_feedback_tips) %> + <%= f.hidden_field :content, :required => true , :value => l(:label_feedback_value) %> + + <%= l(:label_submit)%> + + <% end %>
    -
    在线客服
    -
    \ No newline at end of file + From 4d60a6dabcab093f8c5fae6ca08de1912d61ef97 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 17 Mar 2015 17:04:18 +0800 Subject: [PATCH 006/305] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E6=94=B9=E7=89=88?= =?UTF-8?q?=E6=9D=83=202=E3=80=81=E5=A2=9E=E5=8A=A0footer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_base_footer.html.erb | 24 +++++++++++++++----- app/views/layouts/_new_footer.html.erb | 29 +++++++++++++++++++++++++ app/views/layouts/base_courses.html.erb | 2 ++ config/locales/contacts/zh.yml | 2 +- 4 files changed, 50 insertions(+), 7 deletions(-) create mode 100644 app/views/layouts/_new_footer.html.erb diff --git a/app/views/layouts/_base_footer.html.erb b/app/views/layouts/_base_footer.html.erb index 0c7cca7d5..322fae0e3 100644 --- a/app/views/layouts/_base_footer.html.erb +++ b/app/views/layouts/_base_footer.html.erb @@ -22,14 +22,26 @@

    diff --git a/app/views/layouts/_new_footer.html.erb b/app/views/layouts/_new_footer.html.erb new file mode 100644 index 000000000..06f8c61e3 --- /dev/null +++ b/app/views/layouts/_new_footer.html.erb @@ -0,0 +1,29 @@ + +
    \ No newline at end of file diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index af03ba9ca..84e0e288d 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -24,6 +24,8 @@
    <%= render :partial => 'layouts/new_header' %> + <%= render :partial => 'layouts/new_footer' %> + diff --git a/app/views/tags/_new_tag_name.html.erb b/app/views/tags/_new_tag_name.html.erb index a1fb3fa46..6d8d58adb 100644 --- a/app/views/tags/_new_tag_name.html.erb +++ b/app/views/tags/_new_tag_name.html.erb @@ -9,9 +9,21 @@ <%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id, :class => 'pt5' %> - <%= link_to('x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,:taggable_id => obj.id, :taggable_type => object_flag) if (CourseInfos.find_by_course_id(obj.id)).try(:user_id) == User.current.id %> + <%= link_to('x', remove_tag_path(:tag_name => tag,:taggable_id => obj.id, :taggable_type => object_flag), :remote => true, :confirm => l(:text_are_you_sure) ) if (CourseInfos.find_by_course_id(obj.id)).try(:user_id) == User.current.id %> <% end %> <% end %> -<% end %> \ No newline at end of file +<% end %> + +<% if User.current.logged?%> + <%= l(:label_add_tag)%> + +<% end%> \ No newline at end of file diff --git a/app/views/tags/remove_tag.js.erb b/app/views/tags/remove_tag.js.erb index dbad80f96..b102776d5 100644 --- a/app/views/tags/remove_tag.js.erb +++ b/app/views/tags/remove_tag.js.erb @@ -6,8 +6,10 @@ $('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_n $("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty(); $("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_name', :locals => {:obj => @obj,:non_list_all => false, :object_flag => @object_flag}) %>'); -<% else %> +<% elsif @object_flag == '9'%> + $('#tags_show').html('<%= escape_javascript(render :partial => 'tags/new_tag_name', + :locals => {:obj => @obj,:non_list_all => false,:object_flag => @object_flag}) %>'); +<% else%> $('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_name', :locals => {:obj => @obj,:non_list_all => false,:object_flag => @object_flag}) %>'); - <% end %> \ No newline at end of file From 3bd0bf3c4962f3bc6857f7c667ee4a5988403a58 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 19 Mar 2015 16:20:32 +0800 Subject: [PATCH 027/305] =?UTF-8?q?1=E3=80=81=E6=B7=BB=E5=8A=A0=E6=A0=87?= =?UTF-8?q?=E7=AD=BEurl=E4=BF=AE=E6=94=B9=202=E3=80=81=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E6=98=AFjs=E9=A1=B5=E9=9D=A2=E5=88=B7?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/tags/_new_tag_name.html.erb | 2 +- app/views/tags/tag_save.js.erb | 22 ++++++++++++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/app/views/tags/_new_tag_name.html.erb b/app/views/tags/_new_tag_name.html.erb index 6d8d58adb..3e8c2c021 100644 --- a/app/views/tags/_new_tag_name.html.erb +++ b/app/views/tags/_new_tag_name.html.erb @@ -19,7 +19,7 @@ <% if User.current.logged?%> <%= l(:label_add_tag)%>
    diff --git a/app/views/members/create.js.erb b/app/views/members/create.js.erb index 35280b7a4..93aad5b5e 100644 --- a/app/views/members/create.js.erb +++ b/app/views/members/create.js.erb @@ -1,22 +1,27 @@ <%if @project%> $('#tab-content-members').html('<%= escape_javascript(render :partial => 'projects/settings/members') %>'); -<%elsif @course%> -$('#tab-content-members').html('<%= escape_javascript(render :partial => 'courses/settings/members') %>'); -<%end%> - -hideOnLoad(); <%if !@applied_members%> - <% if @members.present? && @members.all? {|m| m.valid? } %> - <% @members.each do |member| %> - $("#member-<%= member.id %>").effect("highlight"); - <% end %> - <% else %> - <% if @members %> - <% errors = @members.collect {|m| m.errors.full_messages}.flatten.uniq.join(', ')%> - alert('<%= raw(escape_javascript(l(:notice_failed_to_save_members, :errors => errors || ''))) %>'); - <% else%> +<% if @members.present? && @members.all? {|m| m.valid? } %> +<% @members.each do |member| %> +$("#member-<%= member.id %>").effect("highlight"); +<% end %> +<% else %> +<% if @members %> +<% errors = @members.collect {|m| m.errors.full_messages}.flatten.uniq.join(', ')%> +alert('<%= raw(escape_javascript(l(:notice_failed_to_save_members, :errors => errors || ''))) %>'); +<% else%> // alert(''); - <% end%> - <% end %> +<% end%> <% end %> +<% end %> +<%elsif @course%> + <% if @create_member_error_messages%> + alert("<%= @create_member_error_messages%>"); + <% else%> + $('#tbc_02').html('<%= escape_javascript(render :partial => 'courses/course_members') %>'); + alert("添加成功"); + <% end%> +<%end%> + +hideOnLoad(); From ed02959e0027ab0555f7dd23028ec533254f3083 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Mon, 30 Mar 2015 15:57:10 +0800 Subject: [PATCH 183/305] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=88=90=E5=91=98?= =?UTF-8?q?=E8=A7=92=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/members_controller.rb | 2 ++ app/views/courses/_course_members.html.erb | 4 +-- app/views/courses/_member.html.erb | 38 ++++++++++++++++++---- app/views/members/update.js.erb | 9 +++-- public/stylesheets/courses.css | 3 +- 5 files changed, 43 insertions(+), 13 deletions(-) diff --git a/app/controllers/members_controller.rb b/app/controllers/members_controller.rb index 248b22991..170e64ef6 100644 --- a/app/controllers/members_controller.rb +++ b/app/controllers/members_controller.rb @@ -250,6 +250,8 @@ class MembersController < ApplicationController end end end + @roles = Role.givable.all[3..5] + @members = @course.member_principals.includes(:roles, :principal).all.sort end saved = @member.save diff --git a/app/views/courses/_course_members.html.erb b/app/views/courses/_course_members.html.erb index 87cf59c3b..9d7db7b98 100644 --- a/app/views/courses/_course_members.html.erb +++ b/app/views/courses/_course_members.html.erb @@ -35,13 +35,13 @@ <% @roles.each do |role| %>
  • - <%= check_box_tag 'membership[role_ids][]', role.id %> + <%= radio_button_tag 'membership[role_ids][]', role.id %>
  • <% end %>
    - + 新增成员 diff --git a/app/views/courses/_member.html.erb b/app/views/courses/_member.html.erb index acebc11bd..53e7c15a5 100644 --- a/app/views/courses/_member.html.erb +++ b/app/views/courses/_member.html.erb @@ -2,12 +2,36 @@
  • <%= link_to_user_header member.principal,false,:class => "w150 c_orange fl" %> - <%= h member.roles.sort.collect(&:to_s).join(', ') %> - - 编辑 - <%= delete_link membership_path(member), - :remote => true, - :class => "c_dblue w40 fl", - :data => (!User.current.admin? && member.include?(User.current) ? {:confirm => l(:text_own_membership_delete_confirmation)} : {confirm: l(:label_delete_confirm)}) if member.deletable? %> + <%= h member.roles.sort.collect(&:to_s).join(', ') %> + <%= form_for(member, {:as => :membership, :remote => true, :url => membership_path(member), + :method => :put, + :html => {:id => "member-#{member.id}-roles-form", :class => 'hol'}} + ) do |f| %> + <% @roles.each do |role| %> +
      + <%= radio_button_tag 'membership[role_ids][]', role.id, member.roles.include?(role), + :disabled => member.member_roles.detect { |mr| mr.role_id == role.id && !mr.inherited_from.nil? } %> + +
    + + <% end %> + <%= hidden_field_tag 'membership[role_ids][]', '' %> + + <% end %> + + <% unless member.roles.first.to_s == "Manager"%> + 编辑 + <%= delete_link membership_path(member), + :remote => true, + :class => "c_dblue w40 fl", + :data => (!User.current.admin? && member.include?(User.current) ? {:confirm => l(:text_own_membership_delete_confirmation)} : {confirm: l(:label_delete_confirm)}) if member.deletable? %> + <% end%>
  • <% end%> \ No newline at end of file diff --git a/app/views/members/update.js.erb b/app/views/members/update.js.erb index 9f6709701..c72c16fc5 100644 --- a/app/views/members/update.js.erb +++ b/app/views/members/update.js.erb @@ -1,7 +1,10 @@ <%if @project%> $('#tab-content-members').html('<%= escape_javascript(render :partial => 'projects/settings/members') %>'); +$("#member-<%= @member.id %>").effect("highlight"); +hideOnLoad(); <%elsif @course%> -$('#tab-content-members').html('<%= escape_javascript(render :partial => 'courses/settings/members') %>'); -<%end%> +$('#tbc_02').html('<%= escape_javascript(render :partial => 'courses/course_members') %>'); hideOnLoad(); -$("#member-<%= @member.id %>").effect("highlight"); +<%end%> + + diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index f4ffa1fe0..89925371e 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -272,8 +272,9 @@ a:hover.tijiao{ background:#0f99a9;} .member_search_input{ border:1px solid #15bccf; background:#fff; width:170px; height:24px; color:#9b9b9b; padding-left:5px; margin-bottom:10px;} .member_search_btn{ background:#15bccf; color:#fff; text-align: center; width:40px; height:22px;border:1px solid #15bccf; padding-top:2px; cursor:pointer;} .member_search_btn:hover{ background:#0da1b2; border:1px solid #0da1b2;} -a.member_btn{ padding:5px; background:#15bccf; color:#fff;} +a.member_btn{ padding: 3px 5px; background:#15bccf; color:#fff;} a:hover.member_btn{ background:#329cbd;} +.hol{display: none;} /* 新建项目 */ .pro_new{ } From 5640eae39b9b28459491926c52c02b5c03321c23 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Mon, 30 Mar 2015 15:59:57 +0800 Subject: [PATCH 184/305] =?UTF-8?q?=E5=88=A0=E9=99=A4=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E6=88=90=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/members_controller.rb | 3 ++- app/views/members/destroy.js.erb | 4 ++-- app/views/members/update.js.erb | 3 +-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/members_controller.rb b/app/controllers/members_controller.rb index 170e64ef6..078cb1db5 100644 --- a/app/controllers/members_controller.rb +++ b/app/controllers/members_controller.rb @@ -314,7 +314,8 @@ class MembersController < ApplicationController joined.each do |join| join.delete end - + @roles = Role.givable.all[3..5] + @members = @course.member_principals.includes(:roles, :principal).all.sort end respond_to do |format| format.html { redirect_to_settings_in_courses } diff --git a/app/views/members/destroy.js.erb b/app/views/members/destroy.js.erb index 2d0d26271..912cfde58 100644 --- a/app/views/members/destroy.js.erb +++ b/app/views/members/destroy.js.erb @@ -1,6 +1,6 @@ <%if @project%> -$('#tab-content-members').html('<%= escape_javascript(render :partial => 'projects/settings/members') %>'); + $('#tab-content-members').html('<%= escape_javascript(render :partial => 'projects/settings/members') %>'); <%elsif @course%> - $('#tab-content-members').html('<%= escape_javascript(render :partial => 'courses/settings/members') %>'); + $('#tbc_02').html('<%= escape_javascript(render :partial => 'courses/course_members') %>'); <%end%> hideOnLoad(); diff --git a/app/views/members/update.js.erb b/app/views/members/update.js.erb index c72c16fc5..a166e76ab 100644 --- a/app/views/members/update.js.erb +++ b/app/views/members/update.js.erb @@ -1,10 +1,9 @@ <%if @project%> $('#tab-content-members').html('<%= escape_javascript(render :partial => 'projects/settings/members') %>'); $("#member-<%= @member.id %>").effect("highlight"); -hideOnLoad(); <%elsif @course%> $('#tbc_02').html('<%= escape_javascript(render :partial => 'courses/course_members') %>'); -hideOnLoad(); <%end%> +hideOnLoad(); From de0403580ed3a7a4d064ca1f6de8c7af21a50892 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Mon, 30 Mar 2015 16:03:24 +0800 Subject: [PATCH 185/305] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E6=88=90=E5=91=98=E6=97=B6=E5=A2=9E=E5=8A=A0=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/_course_members.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/courses/_course_members.html.erb b/app/views/courses/_course_members.html.erb index 9d7db7b98..38ef7e9db 100644 --- a/app/views/courses/_course_members.html.erb +++ b/app/views/courses/_course_members.html.erb @@ -35,7 +35,7 @@ <% @roles.each do |role| %>
  • - <%= radio_button_tag 'membership[role_ids][]', role.id %> + <%= radio_button_tag 'membership[role_ids][]', role.id, role.name == "学生" || role.name == "Student" %>
  • <% end %> From 51dbc43ecf3841eb9cc3502ed748a9587e64da96 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Mon, 30 Mar 2015 16:05:55 +0800 Subject: [PATCH 186/305] =?UTF-8?q?=E4=BF=AE=E6=94=B9apache=E4=B8=ADgit?= =?UTF-8?q?=E8=AE=A4=E8=AF=81=E6=96=87=E4=BB=B6=E8=B7=AF=E5=BE=84=EF=BC=8C?= =?UTF-8?q?user.passwd=20=3D=3D>=20htdocs/user.passwd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/repositories_controller.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 6c115fc11..01e470c91 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -131,7 +131,7 @@ update @project_path=@root_path+"htdocs/"+@repository_name @repository_tag=params[:repository][:upassword] || params[:repository][:password] @repo_name=User.current.login.to_s+"_"+params[:repository][:identifier] - logger.info "htpasswd -mb "+@root_path+"user.passwd "+@repo_name+": "+@repository_tag + logger.info "htpasswd -mb "+@root_path+"htdocs/user.passwd "+@repo_name+": "+@repository_tag logger.info "the value of create repository"+@root_path+": "+@repository_name+": "+@project_path+": "+@repo_name attrs = pickup_extra_info if((@repository_tag!="")&¶ms[:repository_scm]=="Git") @@ -147,9 +147,9 @@ update @repository.project = @project if request.post? && @repository.save if(params[:repository_scm]=="Git") - system "htpasswd -mb "+@root_path+"user.passwd "+@repo_name+" "+@repository_tag + system "htpasswd -mb "+@root_path+"htdocs/user.passwd "+@repo_name+" "+@repository_tag system "echo -e '"+@repo_name+"-write:"+ - " "+@repo_name+"' >> "+@root_path+"group.passwd" + " "+@repo_name+"' >> "+@root_path+"htdocs/group.passwd" system "mkdir "+@root_path+"htdocs/"+User.current.login.to_s system "git init --bare "+@project_path system "mv "+@project_path+"/hooks/post-update{.sample,}" @@ -243,8 +243,8 @@ update if(@repository.type=="Repository::Git") logger.info "destory the repository value"+"root path"+@root_path+"repo_name"+@repo_name+ "repository_name"+@repository_name+"user group"+@middle - system "sed -i /"+@repo_name+"/{d} "+@root_path+"user.passwd" - system "sed -i /"+@middle+"/{d} "+@root_path+"group.passwd" + system "sed -i /"+@repo_name+"/{d} "+@root_path+"htdocs/user.passwd" + system "sed -i /"+@middle+"/{d} "+@root_path+"htdocs/group.passwd" system "rm -r "+@root_path+"htdocs/"+@repository_name # if(@sed_user&&@sed_group&&@remove) # else From 94ecc3e59e2fa1ab9cb0354552333bf5cac0785e Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Mon, 30 Mar 2015 17:03:20 +0800 Subject: [PATCH 187/305] =?UTF-8?q?1=E3=80=81=E8=AF=BE=E7=A8=8B=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=88=90=E5=91=98=E5=88=86=E9=A1=B5=E6=8E=A7=E4=BB=B6?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=202=E3=80=81=E8=AF=BE=E7=A8=8B=E8=80=81?= =?UTF-8?q?=E5=B8=88=E5=88=97=E8=A1=A8=E7=BF=BB=E9=A1=B5=E4=B8=8D=E5=8F=AF?= =?UTF-8?q?=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 1 + app/controllers/members_controller.rb | 1 + lib/redmine/pagination.rb | 2 +- public/stylesheets/courses.css | 3 ++- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 8169a9b64..581005bf7 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -323,6 +323,7 @@ class CoursesController < ApplicationController end respond_to do |format| if params[:page] + format.html {render :layout => 'base_courses'} format.js else format.html {render :layout => 'base_courses'} diff --git a/app/controllers/members_controller.rb b/app/controllers/members_controller.rb index 078cb1db5..fc243741a 100644 --- a/app/controllers/members_controller.rb +++ b/app/controllers/members_controller.rb @@ -252,6 +252,7 @@ class MembersController < ApplicationController end @roles = Role.givable.all[3..5] @members = @course.member_principals.includes(:roles, :principal).all.sort + @member = @course.members.new end saved = @member.save diff --git a/lib/redmine/pagination.rb b/lib/redmine/pagination.rb index 00a20c15e..41702e2ce 100644 --- a/lib/redmine/pagination.rb +++ b/lib/redmine/pagination.rb @@ -260,7 +260,7 @@ module Redmine end if page == paginator.page if flag - html << '
  • ' << page.to_s << '
  • ' + html << '
  • ' << content_tag('a', page.to_s, :class => 'current-page c_white') << '
  • ' else html << '
  • ' << content_tag('span', page.to_s, :class => 'current-page') << '
  • ' end diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index 89925371e..6053940d6 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -63,7 +63,8 @@ ul.wlist{ float:right; border-bottom:none; height:30px; margin-top:20px; } ul.wlist li{float: left;} ul.wlist li a{ border:1px solid #15bccf; padding: 1px 4px 1px 4px; margin-left:3px;} ul.wlist li a:hover{ background:#15bccf; color:#fff; text-decoration:none;} -.wlist_select { background-color:#64bdd9; color:#fff; padding: 1px 5px 0px 5px; margin-left:3px;margin-top: -2px; border:1px solid #64bdd9;} +/*.wlist_select { background-color:#64bdd9; color:#fff; padding: 1px 5px 0px 5px; margin-left:3px;margin-top: -2px; border:1px solid #64bdd9;}*/ +.wlist_select a{background-color: #64bdd9;cursor: default;} /****讨论区***/ .talk_top{ margin:10px 0; font-size:14px; color:#4c4c4c;} .talk_top span{ color:#ff7143;} From 4817e2e1a798a0461396b1638fb8c9906a13ae44 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Mon, 30 Mar 2015 17:04:36 +0800 Subject: [PATCH 188/305] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E5=90=8E=E8=BF=94=E5=9B=9Ehost=5Fcourse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/new.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/courses/new.html.erb b/app/views/courses/new.html.erb index 3d1a3f6a4..3057285a7 100644 --- a/app/views/courses/new.html.erb +++ b/app/views/courses/new.html.erb @@ -47,7 +47,7 @@
  • 提交 - 取消 + 取消
  • <% end%> From eabcd4e92b68348c90f6eeb06c2c97aaa3d6ade4 Mon Sep 17 00:00:00 2001 From: z9hang Date: Mon, 30 Mar 2015 17:14:52 +0800 Subject: [PATCH 189/305] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E6=96=B0=E7=95=8C=E9=9D=A2=EF=BC=88=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=98=BE=E7=A4=BA=EF=BC=8C=E6=8E=92=E5=BA=8F=E7=AD=89?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=A0=B7=E5=BC=8F=E5=B0=9A=E6=9C=AA?= =?UTF-8?q?=E8=B0=83=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/files_controller.rb | 34 +++++++---- app/helpers/attachments_helper.rb | 10 ++++ app/helpers/files_helper.rb | 11 ++++ app/views/files/_course_file.html.erb | 2 +- app/views/files/_project_file_list.html.erb | 58 ++++++++++++++++++ app/views/files/_project_file_new.html.erb | 65 +++++++++++++++++++++ app/views/files/index.html.erb | 2 +- config/locales/projects/zh.yml | 3 +- db/schema.rb | 22 ++----- 9 files changed, 178 insertions(+), 29 deletions(-) create mode 100644 app/views/files/_project_file_list.html.erb create mode 100644 app/views/files/_project_file_new.html.erb diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 28156ac0c..0d459e3ba 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -41,8 +41,8 @@ class FilesController < ApplicationController @feedback_count = @all_attachments.count @feedback_pages = Paginator.new @feedback_count, @limit, params['page'] @offset ||= @feedback_pages.offset - @curse_attachments_all = @all_attachments[@offset, @limit] - @curse_attachments = paginateHelper @all_attachments,10 + #@curse_attachments_all = @all_attachments[@offset, @limit] + @obj_attachments = paginateHelper @all_attachments,10 end def search @@ -132,16 +132,30 @@ class FilesController < ApplicationController attribute = "downloads" when "created_on" attribute = "created_on" + when "quotes" + attribute = "quotes" end - - if order_by.count == 1 - sort += "#{Attachment.table_name}.#{attribute} asc " if attribute - elsif order_by.count == 2 - sort += "#{Attachment.table_name}.#{attribute} #{order_by[1]} " if attribute && order_by[1] - end - if sort_type != params[:sort].split(",").last - sort += "," + @sort = order_by[0] + @order = order_by[1] + if order_by.count == 1 && attribute + sort += "#{Attachment.table_name}.#{attribute} asc " + if sort_type != params[:sort].split(",").last + sort += "," + end + elsif order_by.count == 2 && order_by[1] + sort += "#{Attachment.table_name}.#{attribute} #{order_by[1]} " + if sort_type != params[:sort].split(",").last + sort += "," + end end + # if order_by.count == 1 + # sort += "#{Attachment.table_name}.#{attribute} asc " if attribute + # elsif order_by.count == 2 + # sort += "#{Attachment.table_name}.#{attribute} #{order_by[1]} " if attribute && order_by[1] + # end + # if sort_type != params[:sort].split(",").last + # sort += "," + # end end end diff --git a/app/helpers/attachments_helper.rb b/app/helpers/attachments_helper.rb index 2e07421f8..8843b1a76 100644 --- a/app/helpers/attachments_helper.rb +++ b/app/helpers/attachments_helper.rb @@ -77,6 +77,7 @@ module AttachmentsHelper end end + #判断课程course中是否包含课件attachment,course中引用了attachment也算作包含 def course_contains_attachment? course,attachment course.attachments.each do |att| if att.id == attachment.id || (!att.copy_from.nil? && !attachment.copy_from.nil? && att.copy_from == attachment.copy_from) || att.copy_from == attachment.id || att.id == attachment.copy_from @@ -85,6 +86,15 @@ module AttachmentsHelper end false end + #判断项目project中是否包含课件attachment,project中引用了attachment也算作包含 + def project_contains_attachment? project,attachment + project.attachments.each do |att| + if att.id == attachment.id || (!att.copy_from.nil? && !attachment.copy_from.nil? && att.copy_from == attachment.copy_from) || att.copy_from == attachment.id || att.id == attachment.copy_from + return true + end + end + false + end def get_qute_number attachment if attachment.copy_from diff --git a/app/helpers/files_helper.rb b/app/helpers/files_helper.rb index 884ebc2eb..08b17ea7a 100644 --- a/app/helpers/files_helper.rb +++ b/app/helpers/files_helper.rb @@ -66,6 +66,17 @@ module FilesHelper result end + #判断用户是否拥有不包含当前资源的项目,需用户在该项目中有资源管理相关资源 + def has_project? user,file + result = false + user.projects.each do |project| + if !project_contains_attachment?(project,file) && User.current.allowed_to?(:manage_files, project) + return true + end + end + result + end + # 判断指定的资源时候符合类型 def isTypeOk(attachment, type, contentType) result = false diff --git a/app/views/files/_course_file.html.erb b/app/views/files/_course_file.html.erb index ea499477a..b6f65e9b2 100644 --- a/app/views/files/_course_file.html.erb +++ b/app/views/files/_course_file.html.erb @@ -55,7 +55,7 @@
    - <%= render :partial => 'course_list',:locals => {course: @course,all_attachments: @all_attachments,sort:@sort,order:@order,curse_attachments:@curse_attachments} %> + <%= render :partial => 'course_list',:locals => {course: @course,all_attachments: @all_attachments,sort:@sort,order:@order,curse_attachments:@obj_attachments} %>
    diff --git a/app/views/files/_project_file_list.html.erb b/app/views/files/_project_file_list.html.erb new file mode 100644 index 000000000..60675194b --- /dev/null +++ b/app/views/files/_project_file_list.html.erb @@ -0,0 +1,58 @@ + +
    +

    共有 <%= all_attachments.count%> 个资源

    +

    + <% if order == "asc" %> + 按 <%= link_to "时间",params.merge(:sort=>"created_on:desc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'arrow_show',locals: { sort: sort,order:order,current:"created_on"} %> /  + <%= link_to "下载次数",params.merge(:sort=>"downloads:desc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'arrow_show',locals: { sort: sort,order:order,current:"downloads"} %> /  + <%= link_to "引用次数",params.merge(:sort=>"quotes:desc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'arrow_show',locals: { sort: sort,order:order,current:"quotes"} %> 排序 + <% else %> + 按 <%= link_to "时间",params.merge(:sort=>"created_on:asc"),:class => "f_b c_grey" ,:remote => @is_remote %><%= render partial: 'arrow_show',locals: { sort: sort,order:order,current:"created_on"} %> /  + <%= link_to "下载次数",params.merge(:sort=>"downloads:asc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'arrow_show',locals: { sort: sort,order:order,current:"downloads"} %>  /  + <%= link_to "引用次数",params.merge(:sort=>"quotes:asc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'arrow_show',locals: { sort: sort,order:order,current:"quotes"} %> 排序 + <% end %> +

    +
    +
    +
    + <% project_attachments.each do |file| %> +
    +
    + <%= link_to_attachment file, :download => true,:text => truncate(file.filename,length: 35, omission: '...'), :title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "c_dblue f_14 f_b f_l" %> + <% if User.current.logged? %> + <% if (is_course_teacher(User.current,@course) || file.author_id == User.current.id) && project_contains_attachment?(project,file) %> + <%= link_to(l(:label_slected_to_other_project),quote_resource_show_course_file_path(@course,file),:class => "f_l re_select",:remote => true) if has_project?(User.current,file) %> + + <% if manage_allowed && file.container_id == project.id && file.container_type == "Project" %> + + <%= link_to (file.is_public? ? "公开":"私有"), update_file_dense_attachments_path(:attachmentid=>file.id,:newtype=>(file.is_public? ? 0:1)),:remote=>true,:class=>"f_l re_open",:method => :post %> + + <% else %> + + <% end %> + <% else %> + <%= link_to(l(:label_slected_to_project),quote_resource_show_course_file_path(@course,file),:class => "f_l re_select",:remote => true) if has_course?(User.current,file) %> + <% end %> + <% else %> + <% end %> +
    +
    +
    +

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

    + <%= link_to( l(:button_delete), attachment_path(file), + :data => {:confirm => l(:text_are_you_sure)}, :method => :delete,:class => "f_r re_de") if manage_allowed && file.container_id == project.id && file.container_type == "Project"%> +

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

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

    <%= l(:lable_file_sharingarea) %>

    +
    + + + + +
    +
    +
    + <%#= form_tag( search_course_files_path(@course), method: 'get',:class => "re_search f_l",:remote=>true) do %> + <%#= text_field_tag 'name', params[:name], name: "name", :class => 're_schbox',:style=>"padding: 0px"%> + <%#= submit_tag "课内搜索", :class => "re_schbtn b_lblue",:name => "incourse",:id => "incourse", :onmouseover => "presscss('incourse')",:onmouseout =>"buttoncss()" %> + <%#= submit_tag "全站搜索", :class => "re_schbtn b_lblue",:name => "insite",:id => "insite",:onmouseover => "presscss('insite')",:onmouseout =>"buttoncss()" %> + <%# end %> + <% manage_allowed = User.current.allowed_to?(:manage_files, @project) %> + <% if manage_allowed %> + 上传资源 + <% end %> +
    +
    + +
    + <%= render :partial => 'project_file_list',:locals => {project: @project,all_attachments: @all_attachments,sort:@sort,order:@order,project_attachments:@obj_attachments,:manage_allowed => manage_allowed} %> +
    + +
    +
    +<% html_title(l(:label_attachment_plural)) -%> \ No newline at end of file diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb index 4b6df47cb..aefa1a5a9 100644 --- a/app/views/files/index.html.erb +++ b/app/views/files/index.html.erb @@ -1,6 +1,6 @@
    <% if @isproject %> - <%= render :partial => 'project_file', locals: {project: @project} %> + <%= render :partial => 'project_file_new', locals: {project: @project} %> <% else %> <%= render :partial => 'course_file', locals: {course: @course} %> <% end %> diff --git a/config/locales/projects/zh.yml b/config/locales/projects/zh.yml index 9f1a95201..bb78fda4d 100644 --- a/config/locales/projects/zh.yml +++ b/config/locales/projects/zh.yml @@ -106,7 +106,8 @@ zh: lable_file_sharingarea: 资源共享区 label_upload_files: 上传文件 - + label_slected_to_other_project: 选入我的其他项目 + label_slected_to_project: 选入我的项目 # 资源库(附件)公用 > 关联资源 label_relation_files: 关联已有资源 diff --git a/db/schema.rb b/db/schema.rb index b149a870b..295b459e6 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20150309090143) do +ActiveRecord::Schema.define(:version => 20150324021043) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -638,16 +638,6 @@ ActiveRecord::Schema.define(:version => 20150309090143) do add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id" - create_table "journal_details_copy", :force => true do |t| - t.integer "journal_id", :default => 0, :null => false - t.string "property", :limit => 30, :default => "", :null => false - t.string "prop_key", :limit => 30, :default => "", :null => false - t.text "old_value" - t.text "value" - end - - add_index "journal_details_copy", ["journal_id"], :name => "journal_details_journal_id" - create_table "journal_replies", :id => false, :force => true do |t| t.integer "journal_id" t.integer "user_id" @@ -1069,12 +1059,12 @@ ActiveRecord::Schema.define(:version => 20150309090143) do end create_table "roles", :force => true do |t| - t.string "name", :limit => 90 - t.integer "position" - t.boolean "assignable" - t.integer "builtin" + t.string "name", :limit => 30, :default => "", :null => false + t.integer "position", :default => 1 + t.boolean "assignable", :default => true + t.integer "builtin", :default => 0, :null => false t.text "permissions" - t.string "issues_visibility", :limit => 90 + t.string "issues_visibility", :limit => 30, :default => "default", :null => false end create_table "schools", :force => true do |t| From a84af9d13865bc556e878648f9b9a7551e15209b Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Mon, 30 Mar 2015 17:44:40 +0800 Subject: [PATCH 190/305] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E7=A7=81=E6=9C=89?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E4=B8=8D=E6=98=BE=E7=A4=BA=E5=9C=A8=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E6=9D=83=E9=99=90=E6=9F=A5=E7=9C=8B=E7=9A=84=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/courses_helper.rb | 10 ++++++++++ app/helpers/files_helper.rb | 10 ---------- app/views/layouts/base_courses.html.erb | 7 +++++-- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index 408783934..f4ba5040e 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -736,4 +736,14 @@ module CoursesHelper "未启用匿评".html_safe end end + + def visable_attachemnts_incourse course + result = [] + course.attachments.each do |attachment| + if attachment.is_public? || User.current.member_of_course?(course) + result << attachment + end + end + result + end end diff --git a/app/helpers/files_helper.rb b/app/helpers/files_helper.rb index 884ebc2eb..749e7e437 100644 --- a/app/helpers/files_helper.rb +++ b/app/helpers/files_helper.rb @@ -97,16 +97,6 @@ module FilesHelper result end - def visable_attachemnts_incourse attachments - result = [] - attachments.each do |attachment| - if attachment.is_public? || (attachment.author.member_of_course?(Course.find(attachment.container_id)))|| attachment.author_id == User.current.id - result << attachment - end - end - result - end - def visable_attachemnts_insite attachments,course result = [] attachments.each do |attachment| diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index e787cfa54..25b08ce7d 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -1,6 +1,7 @@ <% course_model %> <% teacher_num = teacherCount(@course) %> <% student_num = studentCount(@course) %> +<% course_file_num = visable_attachemnts_incourse(@course).count%> <% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) %> @@ -94,7 +95,7 @@ <%= l(:label_account_identity_student)%>(<%= course_student_link student_num %>) - <%= l(:project_module_attachments)%>(<%= link_to @course.attachments.count, course_files_path(@course), :class => 'info_foot_num c_blue' %>)
    + <%= l(:project_module_attachments)%>(<%= link_to course_file_num, course_files_path(@course), :class => 'info_foot_num c_blue' %>)
    @@ -125,7 +126,9 @@ <%= link_to( "+#{l(:label_course_news_new)}", new_course_news_path(@course), :class => 'subnav_green c_white') if is_teacher %>
    - 回复<%= link_to (topic.replies_count), board_message_path(@board, topic), :style =>"color:#fff;" %> + <%= link_to (l(:label_reply) + topic.replies_count.to_s), board_message_path(@board, topic), :style =>"color:#fff;" %>
    <% end %> From 1009f7ac073f1fc9c3f0ab892a7b97fcbbe38781 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 3 Apr 2015 16:35:46 +0800 Subject: [PATCH 220/305] =?UTF-8?q?=E8=B5=84=E6=BA=90id=E5=88=A4=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/comments_controller.rb | 6 ++++-- app/controllers/forums_controller.rb | 12 ++++++++---- app/controllers/messages_controller.rb | 13 ++++++++----- app/controllers/news_controller.rb | 6 ++++-- app/controllers/words_controller.rb | 6 ++++-- 5 files changed, 28 insertions(+), 15 deletions(-) diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index 0d1c39104..bb84b1fa4 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -30,8 +30,10 @@ class CommentsController < ApplicationController @comment.comments = params[:comment] @comment.author = User.current if @news.comments << @comment - ids = params[:asset_id].split(',') - update_kindeditor_assets_owner ids,@comment.id,OwnerTypeHelper::COMMENT + if params[:asset_id] + ids = params[:asset_id].split(',') + update_kindeditor_assets_owner ids,@comment.id,OwnerTypeHelper::COMMENT + end flash[:notice] = l(:label_comment_added) end diff --git a/app/controllers/forums_controller.rb b/app/controllers/forums_controller.rb index f59704a62..253e1d28d 100644 --- a/app/controllers/forums_controller.rb +++ b/app/controllers/forums_controller.rb @@ -63,8 +63,10 @@ class ForumsController < ApplicationController respond_to do |format| if @memo.save - ids = params[:asset_id].split(',') - update_kindeditor_assets_owner ids ,@memo.id,OwnerTypeHelper::MEMO + if params[:asset_id] + ids = params[:asset_id].split(',') + update_kindeditor_assets_owner ids ,@memo.id,OwnerTypeHelper::MEMO + end #end format.html { redirect_to (forum_memo_url(@forum, (@memo.parent_id.nil? ? @memo : @memo.parent_id))), notice: "#{l :label_memo_create_succ}" } format.json { render json: @memo, status: :created, location: @memo } @@ -170,8 +172,10 @@ class ForumsController < ApplicationController # Author lizanle # Description after save后需要进行资源记录的更新 # owner_type = 2 对应的是 forum - ids = params[:asset_id].split(',') - update_kindeditor_assets_owner ids ,@forum.id,OwnerTypeHelper::FORUM + if params[:asset_id] + ids = params[:asset_id].split(',') + update_kindeditor_assets_owner ids ,@forum.id,OwnerTypeHelper::FORUM + end #end respond_to do |format| diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index 2ad388f41..c58ebf851 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -87,9 +87,10 @@ class MessagesController < ApplicationController @message.save_attachments(params[:attachments]) if @message.save # 更新kindeditor上传的图片资源所有者 - ids = params[:asset_id].split(',') - update_kindeditor_assets_owner ids,@message.id,OwnerTypeHelper::MESSAGE - + if params[:asset_id] + ids = params[:asset_id].split(',') + update_kindeditor_assets_owner ids,@message.id,OwnerTypeHelper::MESSAGE + end call_hook(:controller_messages_new_after_save, { :params => params, :message => @message}) render_attachment_warning_if_needed(@message) redirect_to board_message_url(@board, @message) @@ -121,8 +122,10 @@ class MessagesController < ApplicationController @topic.children << @reply #@topic.update_attribute(:updated_on, Time.now) if !@reply.new_record? - ids = params[:asset_id].split(',') - update_kindeditor_assets_owner ids,@reply.id,OwnerTypeHelper::MESSAGE + if params[:asset_id] + ids = params[:asset_id].split(',') + update_kindeditor_assets_owner ids,@reply.id,OwnerTypeHelper::MESSAGE + end call_hook(:controller_messages_reply_after_save, { :params => params, :message => @reply}) attachments = Attachment.attach_files(@reply, params[:attachments]) render_attachment_warning_if_needed(@reply) diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index 27c4aa37f..d41491349 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -137,8 +137,10 @@ class NewsController < ApplicationController @news.safe_attributes = params[:news] @news.save_attachments(params[:attachments]) if @news.save - ids = params[:asset_id].split(',') - update_kindeditor_assets_owner ids,@news.id,OwnerTypeHelper::NEWS + 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) diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb index de2fbc732..680a13963 100644 --- a/app/controllers/words_controller.rb +++ b/app/controllers/words_controller.rb @@ -209,8 +209,10 @@ class WordsController < ApplicationController message = params[:new_form][:course_message] feedback = Course.add_new_jour(user, message, params[:id]) if(feedback.errors.empty?) - ids = params[:asset_id].split(',') - update_kindeditor_assets_owner ids,feedback[:id],OwnerTypeHelper::JOURNALSFORMESSAGE + if params[:asset_id] + ids = params[:asset_id].split(',') + update_kindeditor_assets_owner ids,feedback[:id],OwnerTypeHelper::JOURNALSFORMESSAGE + end redirect_to course_feedback_url(params[:id]), notice: l(:label_feedback_success) else flash[:error] = feedback.errors.full_messages[0] From 84c2e39e6c6642ceda85c296fed9581f5482dcfe Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 3 Apr 2015 17:06:19 +0800 Subject: [PATCH 221/305] =?UTF-8?q?=E6=96=B0=E9=97=BB=E8=AF=84=E8=AE=BA?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E9=94=99=E8=AF=AF=E3=80=82=E8=AF=AF=E5=B0=86?= =?UTF-8?q?safe=5Fattributes=E6=8D=A2=E4=B8=BA=E7=9B=B4=E6=8E=A5=E5=B1=9E?= =?UTF-8?q?=E6=80=A7comments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/comments_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index bb84b1fa4..57ad9d4ce 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -27,7 +27,7 @@ class CommentsController < ApplicationController raise Unauthorized unless @news.commentable? @comment = Comment.new - @comment.comments = params[:comment] + @comment.safe_attributes = params[:comment] @comment.author = User.current if @news.comments << @comment if params[:asset_id] From 7b09fd0489e237dfedc7b2449f22d57ea6c81a3d Mon Sep 17 00:00:00 2001 From: whimlex Date: Fri, 3 Apr 2015 17:33:33 +0800 Subject: [PATCH 222/305] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E9=80=89=E6=8B=A9=E5=99=A8=E9=80=89=E6=8B=A9=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E5=90=8E=E4=B8=8D=E8=83=BD=E8=87=AA=E5=8A=A8=E5=85=B3?= =?UTF-8?q?=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/course.js | 8 +++++++- public/javascripts/iPass.packed.js | 8 ++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 public/javascripts/iPass.packed.js diff --git a/public/javascripts/course.js b/public/javascripts/course.js index 3536478a8..5758a8412 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -404,4 +404,10 @@ $(function(){ //将右侧的最小高度设置成左侧高度,美化界面 $(document).ready(function () { $("#RSide").css("min-height",$("#LSide").height()-30); -}); \ No newline at end of file +}); + +// 日历选择日期后关闭 +function regexDeadLine() +{ + ('#ui-datepicker-div').hide; +} \ No newline at end of file diff --git a/public/javascripts/iPass.packed.js b/public/javascripts/iPass.packed.js new file mode 100644 index 000000000..d553a9c31 --- /dev/null +++ b/public/javascripts/iPass.packed.js @@ -0,0 +1,8 @@ +// ---------------------------------------------------------------------- // +// iPass - Iphone-like masked password input +// version 1.0 +// author: pixelboi8 (pixelboi8@gmail.com) +// created: 12/12/2010 +// ---------------------------------------------------------------------- // + +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(8($){$.1e.1l=8(D){2 c={\'I\':1r,\'1a\':1q,\'e\':\'%1w\'};5(D){$.1p(c,D)}2 v=[];2 l=[];2 T=1n 1s(\'[^\'+c[\'e\']+\']\',\'1v\');2 i=0;4.W(8(6){2 G=\'-\'+6;2 t=$(4);2 3=4.3;2 q=4.q;2 h=3+G;2 11=3+G;5(!3||!q){1t("1m 1d 1c \'3\' 1b \'q\' 1f w 1g!");12 16}$(\'\').1M(t);2 A=$(\'#\'+h);2 g=$(\'#\'+h)[0];5(4.x){g.x=4.x}5(4.F){g.F=4.F}5(4.E){g.E=4.E}5(4.z&&4.z!=\'-1\'){g.z=4.z}5(4.N){g.N=4.N}5(4.H){g.H=4.H}5(4.B){g.B=4.B}5(4.L){g.L=4.L}4.x=\'\';4.B=\'\';t.1O();A.Z(\'1J\',8(){2 m=A.j();v[6]=V(8(){M(6,3,h,m)},c[\'I\'])});A.Z(\'1A\',8(){e(6,h);18(v[6])});$(\'X\').W(8(){5(4.J==3){4.J=h}n 5(t[0].13.1y.1C()==\'X\'){t[0].13.J=h}})});M=8(6,r,3,m){2 o=$(\'#\'+3).j();5(o!=m){19(6,r,3)}n{e(6,3)}m=o;v[6]=V(8(){M(6,r,3,m)},c[\'I\'])};19=8(6,r,3){2 7=P(3);2 K=16;2 p=$(\'#\'+3);2 C=$(\'#\'+r);2 9=p.j().17(\'\');2 d=C.j().17(\'\');5(l[6]){18(l[6]);l[6]=10}w(i=0;i<9.f;i++){5(9[i]!=d[i]){5(9[i]!=u(c[\'e\'])){d.O(i,0,9[i])}n{d[i]=d[i]}}n{d.O(i,0,9[i])}}5(9.f Date: Tue, 7 Apr 2015 15:45:39 +0800 Subject: [PATCH 223/305] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E6=A0=87=E9=A2=98a=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E8=BF=87=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/courses.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index c0458e503..c60fca5cc 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -55,7 +55,7 @@ a:hover.problem_pic{border:1px solid #64bdd9;} .problem_txt{ width:610px; margin-left:10px; color:#777777;word-break: break-all;word-wrap: break-word;} a.problem_name{ color:#ff5722;} a:hover.problem_name{ color:#d33503;} -a.problem_tit{ color:#0781b4; width:430px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} +a.problem_tit{ color:#0781b4; max-width:430px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} a:hover.problem_tit{ color:#09658c; } .problem_main{ border-bottom:1px dashed #d4d4d4; padding-bottom:10px; margin-bottom:10px;} /****翻页***/ From 60838460fc245ed81793c4b6dc07d7fa75945f96 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 7 Apr 2015 16:32:53 +0800 Subject: [PATCH 224/305] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E7=9A=84=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E5=8A=A8=E6=80=81=E4=B9=9F=E8=A6=81=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/courses_service.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb index 7c1f14104..73cf4452d 100644 --- a/app/services/courses_service.rb +++ b/app/services/courses_service.rb @@ -373,6 +373,16 @@ class CoursesService unless latest_bid.nil? latest_course_dynamics << {:type => 4,:time => latest_bid.updated_on,:message => l(:label_recently_updated_homework,:locale => get_user_language(current_user))} end + + # Time 2015-04-07 14:58:30 + # Author lizanle + # Description 添加课程创建动态 + if(User.find_by_id(CourseInfos.find_by_course_id(course.id).try(:user_id))) + create_user_name = User.find_by_id(CourseInfos.find_by_course_id(course.id).user_id).realname + latest_course_dynamics << {:type => 5,:time => course.created_at,:message =>l(:label_recently,:locale => get_user_language(current_user)) << create_user_name << l(:label_creat,:locale => get_user_language(current_user))} + end + + #每个作业中的最新留言 messages = [] course.homeworks.each do |bid| From cc6a9d12f1d6fb7f7db9c692f81bdc411789c1a8 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 8 Apr 2015 09:46:05 +0800 Subject: [PATCH 225/305] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E6=97=B6=E6=98=BE=E7=A4=BA=E6=98=8E=E7=A0=81=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/new.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/courses/new.html.erb b/app/views/courses/new.html.erb index 68a326fb2..73e86c5a0 100644 --- a/app/views/courses/new.html.erb +++ b/app/views/courses/new.html.erb @@ -38,7 +38,7 @@
  • - 显示明码 + 显示明码
    学生或其他成员申请加入课程时候需要使用该口令,该口令可以由老师在课堂上公布。
  • From ba4894239cc2120a1d8e81d2b68a62efa22418e8 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 8 Apr 2015 11:29:21 +0800 Subject: [PATCH 226/305] =?UTF-8?q?1=E3=80=81=E9=83=A8=E5=88=86=E6=B5=8F?= =?UTF-8?q?=E8=A7=88=E5=99=A8=E4=B8=8B=E6=96=B0=E5=BB=BA=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=AF=86=E7=A0=81=E9=BB=98=E8=AE=A4=E5=A1=AB?= =?UTF-8?q?=E5=86=99=EF=BC=8C=E8=AF=BE=E6=97=B6=E9=BB=98=E8=AE=A4=E5=A1=AB?= =?UTF-8?q?=E5=86=99=E4=B8=BA=E7=99=BB=E5=BD=95=E5=90=8D=202=E3=80=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=BE=E7=A8=8B=E5=AF=86=E7=A0=81=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=8F=96=E6=B6=88=E6=98=8E=E7=A0=81=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/new.html.erb | 16 ++-------------- app/views/courses/settings.html.erb | 3 ++- public/javascripts/course.js | 6 ++++++ 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/app/views/courses/new.html.erb b/app/views/courses/new.html.erb index 73e86c5a0..0ea51d5f4 100644 --- a/app/views/courses/new.html.erb +++ b/app/views/courses/new.html.erb @@ -1,16 +1,3 @@ - - -

    <%= l(:permission_new_course)%>

    @@ -37,7 +24,8 @@
  • - + + 显示明码
    学生或其他成员申请加入课程时候需要使用该口令,该口令可以由老师在课堂上公布。 diff --git a/app/views/courses/settings.html.erb b/app/views/courses/settings.html.erb index 569ae302b..acc6c12a5 100644 --- a/app/views/courses/settings.html.erb +++ b/app/views/courses/settings.html.erb @@ -39,7 +39,8 @@
  • - + + 显示明码
    学生或其他成员申请加入课程时候需要使用该口令,该口令可以由老师在课堂上公布。
  • diff --git a/public/javascripts/course.js b/public/javascripts/course.js index 5248d31dd..286905017 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -410,3 +410,9 @@ function regexDeadLine() { ('#ui-datepicker-div').hide; } + +$(function(){ + $("#psw_btn").click(function() { + alert("密码: "+$("#course_course_password").val()); + }); +}); From 89af4b451bc4c8c767fa73f8f70b1cd179dbe1a8 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 8 Apr 2015 13:52:52 +0800 Subject: [PATCH 227/305] =?UTF-8?q?#2100=20IE8=E4=B8=AD=EF=BC=8C=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B--=E8=80=81=E5=B8=88=E5=8F=91=E5=B8=83=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A/=E5=AD=A6=E7=94=9F=E6=8F=90=E4=BA=A4=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=EF=BC=8C=E4=B8=8A=E4=BC=A0=E9=99=84=E4=BB=B6=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E4=B8=8D=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/attachments/_form.html.erb | 16 ---------------- app/views/attachments/_new_form.html.erb | 6 +++--- app/views/bids/edit.html.erb | 2 +- app/views/courses/new_homework.html.erb | 2 +- app/views/files/_attachement_list.html.erb | 4 ++-- app/views/homework_attach/new.html.erb | 1 + public/javascripts/attachments.js | 3 ++- 7 files changed, 10 insertions(+), 24 deletions(-) diff --git a/app/views/attachments/_form.html.erb b/app/views/attachments/_form.html.erb index b026fead2..18586e809 100644 --- a/app/views/attachments/_form.html.erb +++ b/app/views/attachments/_form.html.erb @@ -17,23 +17,7 @@ <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %> <% end %> - <% 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 => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %> - <%= l(:field_is_public)%>: - <%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%> - <%= if attachment.id.nil? - #待补充代码 - else - link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') - end - %> - <%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %> - <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %> - - <% end %> <% end %>
    - <%= textAreailizable bid, :description %> + <%= bid.description.html_safe %>
    -
      - <%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%> -
    - - <%# other_formats_links do |f| %> - <%#= f.link_to 'Atom', :url => {:course_id => @course, :key => User.current.rss_key} %> - <%# end %> - - <% content_for :header_tags do %> - <%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :page => nil, :key => User.current.rss_key})) %> - <%= stylesheet_link_tag 'scm' %> - <% end %> - - <% html_title(l(:label_course_news)) -%> - - - +
      + <%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%> +
    +<% content_for :header_tags do %> + <%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :page => nil, :key => User.current.rss_key})) %> + <%= stylesheet_link_tag 'scm' %> +<% end %> +<% html_title(l(:label_course_news)) -%> diff --git a/lib/rails_kindeditor/vendor/assets/javascripts/kindeditor/kindeditor.js b/lib/rails_kindeditor/vendor/assets/javascripts/kindeditor/kindeditor.js index d5dd1e443..e58e4b2be 100644 --- a/lib/rails_kindeditor/vendor/assets/javascripts/kindeditor/kindeditor.js +++ b/lib/rails_kindeditor/vendor/assets/javascripts/kindeditor/kindeditor.js @@ -4922,7 +4922,7 @@ KEditor.prototype = { editDiv = K('.edit', container), statusbar = self.statusbar = K('.statusbar', container); container.removeClass('container') - .addClass('ke-container ml56 ke-container-' + self.themeType).css('width', width); + .addClass('ke-container ke-container-' + self.themeType).css('width', width); if (fullscreenMode) { container.css({ position : 'absolute', diff --git a/public/assets/kindeditor/kindeditor.js b/public/assets/kindeditor/kindeditor.js index 9bdcff891..8ecbfef06 100644 --- a/public/assets/kindeditor/kindeditor.js +++ b/public/assets/kindeditor/kindeditor.js @@ -4917,7 +4917,7 @@ KEditor.prototype = { editDiv = K('.edit', container), statusbar = self.statusbar = K('.statusbar', container); container.removeClass('container') - .addClass('ke-container ml56 ke-container-' + self.themeType).css('width', width); + .addClass('ke-container ke-container-' + self.themeType).css('width', width); if (fullscreenMode) { container.css({ position : 'absolute', diff --git a/public/javascripts/course.js b/public/javascripts/course.js index 286905017..64b8898f4 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -411,8 +411,20 @@ function regexDeadLine() ('#ui-datepicker-div').hide; } +//新建、修改课程明码显示 $(function(){ $("#psw_btn").click(function() { alert("密码: "+$("#course_course_password").val()); }); }); + +//课程通知更多按钮显示 +$(function(){ + $('.news_description').each(function () { + if($(this).height() >= 38) + { + $('#news_foot_'+$(this).attr('id').replace('news_description_','')).css("display","block"); + } + } + ) +}); From dae907d0b82e75c83f394cbc283418c023baa892 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 8 Apr 2015 15:49:53 +0800 Subject: [PATCH 232/305] =?UTF-8?q?1=E3=80=81=E8=AF=BE=E7=A8=8B=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E6=97=A0=E6=B3=95=E6=B7=BB=E5=8A=A0=E8=AF=84=E8=AE=BA?= =?UTF-8?q?=202=E3=80=81=E8=AF=BE=E7=A8=8B=E9=80=9A=E7=9F=A5=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E6=98=BE=E7=A4=BA=203=E3=80=81=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E8=AF=84=E8=AE=BA=E5=8F=96=E6=B6=88=E6=8C=89?= =?UTF-8?q?=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/comments_controller.rb | 2 +- app/views/news/_course_show.html.erb | 93 +++++++------------------- public/javascripts/course.js | 10 ++- public/stylesheets/courses.css | 2 +- 4 files changed, 35 insertions(+), 72 deletions(-) diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index 57ad9d4ce..bb84b1fa4 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -27,7 +27,7 @@ class CommentsController < ApplicationController raise Unauthorized unless @news.commentable? @comment = Comment.new - @comment.safe_attributes = params[:comment] + @comment.comments = params[:comment] @comment.author = User.current if @news.comments << @comment if params[:asset_id] diff --git a/app/views/news/_course_show.html.erb b/app/views/news/_course_show.html.erb index d44deb66e..f7c5145f0 100644 --- a/app/views/news/_course_show.html.erb +++ b/app/views/news/_course_show.html.erb @@ -1,63 +1,7 @@ - <%= javascript_include_tag "/assets/kindeditor/kindeditor" %> @@ -77,8 +21,9 @@
    <%= link_to image_tag(url_to_avatar(@news.author),:width => 42,:height => 42), user_path(@news.author), :class => "problem_pic fl" %>
    -

    <%=h @news.title %>

    - <%#= watcher_link(@news, User.current) %> +

    + <%=h @news.title %> +

    <%= link_to(l(:button_edit), edit_news_path(@news), :class => 'talk_edit fr', @@ -86,7 +31,11 @@ :onclick => '$("#edit-news").show(); return false;') if User.current.allowed_to?(:manage_news, @course) %> <%= delete_link(news_path(@news),:class => 'talk_edit fr') if User.current.allowed_to?(:manage_news, @course) %>
    -
    <%= textAreailizable(@news, :description) %>
    <%= l(:label_create_time) %> : <%= format_time(@news.created_on) %>
    +
    + <%= @news.description.html_safe %> +
    + <%= l(:label_create_time) %> : <%= format_time(@news.created_on) %> +
    <%= link_to_attachments_course @news %>
    @@ -97,13 +46,17 @@

    <%= l(:label_comment_add) %>

    <%= form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form") do %> -
    +
    <%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %> <%= kindeditor_tag :comment, '',:height=>'100',:editor_id =>'comment_editor', :placeholder=>"最多250个字"%>

    - <%= l(:label_cancel_with_space) %> - <%= l(:label_comment_with_space) %> + + <%= l(:label_cancel_with_space) %> + + + <%= l(:label_comment_with_space) %> +

    <% end %>
    @@ -116,12 +69,16 @@
    <%= link_to image_tag(url_to_avatar(comment.author),:width => 42,:height => 42), user_path(comment.author)%>
    - <%= link_to_user_header(comment.author,false,:class => 'c_blue fb fl mb10 ') if comment.respond_to?(:author) %><%= format_time(comment.created_on) %> + <%= link_to_user_header(comment.author,false,:class => 'c_blue fb fl mb10 ') if comment.respond_to?(:author) %> + + <%= format_time(comment.created_on) %> +
    -

    <%= textAreailizable(comment.comments) %>

    +

    <%= comment.comments.html_safe %>

    -
    <%= link_to_if_authorized_course image_tag('delete.png'), {:controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment}, - :data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :title => l(:button_delete) %> +
    + <%= link_to_if_authorized_course image_tag('delete.png'), {:controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment}, + :data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :title => l(:button_delete) %>
    diff --git a/public/javascripts/course.js b/public/javascripts/course.js index 64b8898f4..fcb72ee78 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -158,7 +158,7 @@ function regexTitle() { $("#title_notice_span").text("标题不能为空"); $("#title_notice_span").css('color','#ff0000'); - $("#title_notice_span").focus(); + $("#news_title").focus(); return false; } else if(name.length <= 60) @@ -171,7 +171,7 @@ function regexTitle() { $("#title_notice_span").text("标题超过60个字符"); $("#title_notice_span").css('color','#ff0000'); - $("#title_notice_span").focus(); + $("#news_title").focus(); return false; } } @@ -214,6 +214,12 @@ function submitFocus(obj) $(obj).focus(); } +function submitComment() +{ + comment_editor.sync(); + $("#add_comment_form").submit(); +} + /////////////////////////////////////////////////课程讨论区 function course_board_submit_message_replay() { diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index b9202279c..fa9e9787c 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -175,7 +175,7 @@ a:hover.work_edit{color: #fff; background: #64bdd9;} .wzan a{ display: block;} a.wzan_img{background:url(images/pic_zan.png) 0 -59px no-repeat; display:block; height:31px; width:30px; color:#fff;} a.wzan_visited{background:url(images/pic_zan.png) 0 0 no-repeat;} -.msg_box{ width:670px; height:200px; border-bottom:1px dashed #CCC; padding-top:10px;} +.msg_box{ width:670px; height:205px; border-bottom:1px dashed #CCC; padding-top:10px;} .msg_box h4{ } .msg_box textarea{width:658px;height:90px;padding:5px;overflow:hidden;background-color: #ffffff; border:1px solid #CCC; margin:5px 0px; color:#666; font-size:12px; } /*.msg_box a{ float:right; display:block; width:50px; height:22px; background:#15bccf; padding-top:3px; color:#fff; margin-left:10px; text-align:center; margin-top:5px; }*/ From c5b55042d4cf8de882482ec9bfd51bfffac6c6a1 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 8 Apr 2015 17:25:52 +0800 Subject: [PATCH 233/305] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E5=A4=8D=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E8=AE=A8=E8=AE=BA=E5=8C=BA=E5=BC=95=E7=94=A8=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=202=E3=80=81=E5=9B=9E=E5=A4=8D=E6=97=B6=E5=9B=9E?= =?UTF-8?q?=E5=A4=8D=E6=A1=86=E8=87=AA=E5=8A=A8=E8=8E=B7=E5=BE=97=E7=84=A6?= =?UTF-8?q?=E7=82=B9=203=E3=80=81=E5=BC=95=E7=94=A8=E6=A0=B7=E5=BC=8F=204?= =?UTF-8?q?=E3=80=81=E4=BF=AE=E6=94=B9=E6=8F=90=E4=BA=A4=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E6=97=B6=E4=B8=8B=E9=9D=A2=E5=87=BA=E7=8E=B0=E7=9A=84=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/messages_controller.rb | 2 +- app/helpers/application_helper.rb | 2 +- app/views/boards/_course_show.html.erb | 21 ++++----- app/views/messages/_course_show.html.erb | 59 +++++++----------------- app/views/messages/_form_course.html.erb | 5 +- app/views/messages/quote.js.erb | 2 +- public/javascripts/course.js | 4 +- public/stylesheets/courses.css | 17 +++++++ 8 files changed, 52 insertions(+), 60 deletions(-) diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index 455981d9c..436418430 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -192,7 +192,7 @@ class MessagesController < ApplicationController @content = "> #{ll(Setting.default_language, :text_user_wrote, @message.author)}\n> " @temp = Message.new - @temp.content = "
    #{@message.content.html_safe}
    ".html_safe + @temp.content = "
    #{ll(Setting.default_language, :text_user_wrote, @message.author)}
    #{@message.content.html_safe}
    ".html_safe end def preview diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index c94108dc1..f36e4b397 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -303,7 +303,7 @@ module ApplicationHelper onclick = "$('##{id}').slideToggle(); " onclick << (options[:focus] ? "$('##{options[:focus]}').focus(); " : "this.blur(); ") onclick << "return false;" - link_to(name, "#", :onclick => onclick,:class => options[:class]) + link_to(name, "javascript:void(0)", :onclick => onclick,:class => options[:class]) end def image_to_function(name, function, html_options = {}) diff --git a/app/views/boards/_course_show.html.erb b/app/views/boards/_course_show.html.erb index c27546e85..ed2c20448 100644 --- a/app/views/boards/_course_show.html.erb +++ b/app/views/boards/_course_show.html.erb @@ -1,13 +1,7 @@ -