From 0f4d2e40fb762a91b5133a5f45910c106b6f98a8 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Fri, 25 Mar 2016 19:09:25 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=88=90=E5=91=98?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E7=9A=84=E8=AF=AD=E5=8F=A5=EF=BC=8C=E6=AF=8F?= =?UTF-8?q?=E4=B8=AA=E6=9D=A1=E4=BB=B6=E9=83=BD=E8=A6=81=E5=8A=A0=E4=B8=8A?= =?UTF-8?q?escape'/';=E7=BB=84=E7=BB=87=E6=A0=8F=E7=9B=AE=E6=96=B0?= =?UTF-8?q?=E5=BB=BA=E6=96=87=E7=AB=A0margin=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/principal.rb | 2 +- app/views/org_document_comments/new.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/principal.rb b/app/models/principal.rb index 2c8465538..0c87ec0c6 100644 --- a/app/models/principal.rb +++ b/app/models/principal.rb @@ -44,7 +44,7 @@ class Principal < ActiveRecord::Base else pattern = "%#{q}%".gsub("/","//").gsub("_","/_") # sql = %w(login firstname lastname mail).map {|column| "LOWER(#{table_name}.#{column}) LIKE LOWER(:p)"}.join(" OR ") - sql= "LOWER(concat(lastname,firstname)) LIKE LOWER(:p) or LOWER(login) LIKE LOWER(:p) or LOWER(mail) LIKE LOWER(:p) escape '/'" + sql= "LOWER(concat(lastname,firstname)) LIKE LOWER(:p) escape '/' or LOWER(login) LIKE LOWER(:p) escape '/' or LOWER(mail) LIKE LOWER(:p) escape '/'" params = {:p => pattern} if q =~ /^(.+)\s+(.+)$/ a, b = "#{$1}%", "#{$2}%" diff --git a/app/views/org_document_comments/new.html.erb b/app/views/org_document_comments/new.html.erb index 24dd7dcfe..cf4ffddcf 100644 --- a/app/views/org_document_comments/new.html.erb +++ b/app/views/org_document_comments/new.html.erb @@ -38,7 +38,7 @@
<%= form_tag organization_org_document_comments_path(:organization_id => @organization.id, :field_id => params[:field_id]), :id => 'new_org_document_form' do |f| %>
- +
From ba25f41bcb846ed79fcc6185b4f21212cd2ad66a Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 25 Mar 2016 19:20:36 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=95=99=E5=B8=88?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=95=B0=E3=80=81=E5=AD=A6=E7=94=9F=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_project_info.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/_project_info.html.erb b/app/views/layouts/_project_info.html.erb index 06d6304d2..d94cbdcc7 100644 --- a/app/views/layouts/_project_info.html.erb +++ b/app/views/layouts/_project_info.html.erb @@ -1,6 +1,6 @@ <% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) %> -<% teacher_num = 0 %> -<% student_num = 0 %> +<% teacher_num = TeacherAndAssistantCount(@course) %> +<% student_num = studentCount(@course) %> From 35faa12d4dff488d2f7229b62c58ea85bab69c5a Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 25 Mar 2016 20:10:53 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E7=BB=84=E7=BB=87=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=96=87=E7=AB=A0=E6=97=A0=E6=B3=95=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/org_document_comments/edit.html.erb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/org_document_comments/edit.html.erb b/app/views/org_document_comments/edit.html.erb index 3ad388bd2..5997482fb 100644 --- a/app/views/org_document_comments/edit.html.erb +++ b/app/views/org_document_comments/edit.html.erb @@ -12,10 +12,12 @@ if($("#document_title").val().trim() == "") { $("#doc_title_hint").html("标题不能为空").show(); + return false; } else { $("#doc_title_hint").hide(); + return true; } } From 1bf494f661dfa3237377e89dbea9775b86881eba Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 25 Mar 2016 20:11:26 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E6=8E=A8=E8=8D=90?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E7=BB=9F=E8=AE=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/_recommendation.html.erb | 4 ++-- app/views/layouts/base_courses.html.erb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/courses/_recommendation.html.erb b/app/views/courses/_recommendation.html.erb index 63803a5b9..1db2edf57 100644 --- a/app/views/courses/_recommendation.html.erb +++ b/app/views/courses/_recommendation.html.erb @@ -7,8 +7,8 @@

<%=link_to e_course.name, course_path(e_course.id), :class => "hidden fl w170" %>

- <% if course_file_num > 0 %> - <%= l(:project_module_attachments) %>(<%= link_to course_file_num, course_files_path(e_course), :class => "linkBlue2" %>) + <% if visable_attachemnts_incourse(e_course).count > 0 %> + <%= l(:project_module_attachments) %>(<%= link_to visable_attachemnts_incourse(e_course).count, course_files_path(e_course), :class => "linkBlue2" %>) <% end %> <% if e_course.homework_commons.where("publish_time <= '#{Date.today}'").count > 0 %> <%= l(:label_homework_commont) %>(<%= link_to e_course.homework_commons.where("publish_time <= '#{Date.today}'").count, homework_common_index_path(:course=>e_course.id), :class => "linkBlue2" %>) diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index 7495b20db..bdbed2931 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -169,7 +169,7 @@

- <%= render :partial => 'courses/recommendation', :locals => {:course => @course, :course_file_num => course_file_num} %> + <%= render :partial => 'courses/recommendation', :locals => {:course => @course} %>
访问计数 <%= @course.visits.to_i %>
From c7c96e0c6a505ddf8530da321f86cf6f7fb9428d Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 25 Mar 2016 20:37:32 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E5=85=AC=E5=85=B1=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E9=99=84=E4=BB=B6=E5=90=8D=E7=BC=96=E8=BE=91=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_resources_list.html.erb | 353 +----------------- app/views/users/_user_resource_info.html.erb | 356 ++++++++++++++++++- 2 files changed, 356 insertions(+), 353 deletions(-) diff --git a/app/views/users/_resources_list.html.erb b/app/views/users/_resources_list.html.erb index a545038f1..c2b37f0e6 100644 --- a/app/views/users/_resources_list.html.erb +++ b/app/views/users/_resources_list.html.erb @@ -26,349 +26,14 @@ <% end %> <% end %> - diff --git a/app/views/users/_user_resource_info.html.erb b/app/views/users/_user_resource_info.html.erb index bea78130a..bf36e4b38 100644 --- a/app/views/users/_user_resource_info.html.erb +++ b/app/views/users/_user_resource_info.html.erb @@ -37,12 +37,350 @@ - \ No newline at end of file + \ No newline at end of file