From b51066694e24e9a1ebac373cd1080c3baff6fa8b Mon Sep 17 00:00:00 2001
From: lizanle <491823689@qq.com>
Date: Fri, 9 Oct 2015 09:06:01 +0800
Subject: [PATCH 1/4] =?UTF-8?q?=E5=85=A8=E9=83=A8=20=E6=8C=89=E9=92=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/files_controller.rb | 6 +++++-
app/views/files/_tag_yun.html.erb | 4 ++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb
index 0f8330afe..057d962c8 100644
--- a/app/controllers/files_controller.rb
+++ b/app/controllers/files_controller.rb
@@ -134,8 +134,12 @@ class FilesController < ApplicationController
if sort == ""
sort = "created_on DESC"
end
+ if keywords != "%%"
resultSet = Attachment.where("attachments.container_type = 'Course' And attachments.container_id = '#{course.id}' AND filename LIKE :like ", like: "%#{keywords}%").
reorder(sort)
+ else
+ resultSet = Attachment.where("attachments.container_type = 'Course' And attachments.container_id = '#{course.id}' "). reorder(sort)
+ end
#resultSet = Attachment.find_by_sql("SELECT `attachments`.* FROM `attachments` LEFT OUTER JOIN `homework_attaches` ON `attachments`.container_type = 'HomeworkAttach' AND `attachments`.container_id = `homework_attaches`.id LEFT OUTER JOIN `homework_for_courses` ON `homework_attaches`.bid_id = `homework_for_courses`.bid_id LEFT OUTER JOIN `homework_for_courses` AS H_C ON `attachments`.container_type = 'Bid' AND `attachments`.container_id = H_C.bid_id WHERE (`homework_for_courses`.course_id = 117 OR H_C.course_id = 117 OR (`attachments`.container_type = 'Course' AND `attachments`.container_id = 117)) AND `attachments`.filename LIKE '%#{keywords}%'").reorder("created_on DESC")
end
@@ -547,7 +551,7 @@ class FilesController < ApplicationController
q = "%#{@q.strip}%"
@result = find_course_attache q,@course,sort
@result = visable_attachemnts @result
- @result = @result.select{|attachment| attachment.tag_list.include?(@tag_name)}
+ @result = @result.select{|attachment| attachment.tag_list.include?(@tag_name)} unless @tag_name.blank?
@searched_attach = paginateHelper @result,10
@tag_list = get_course_tag_list @course
diff --git a/app/views/files/_tag_yun.html.erb b/app/views/files/_tag_yun.html.erb
index 912d3b4f4..f60a5fb9e 100644
--- a/app/views/files/_tag_yun.html.erb
+++ b/app/views/files/_tag_yun.html.erb
@@ -1,3 +1,7 @@
+
+ 全部
<% unless tag_list.nil?%>
<% tag_list.each do |k,v|%>
<% if tag_name && tag_name == k%>
From 8841b5221bda56fad45fb0d98fe7cfe799c15808 Mon Sep 17 00:00:00 2001
From: ouyangxuhua
Date: Fri, 9 Oct 2015 09:08:58 +0800
Subject: [PATCH 2/4] =?UTF-8?q?=E6=B6=88=E6=81=AF=E6=98=BE=E7=A4=BA?=
=?UTF-8?q?=E5=86=85=E5=AE=B9=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/users_controller.rb | 6 +++---
app/views/users/user_messages.html.erb | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 73a26b52c..54ab38bfd 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -128,13 +128,13 @@ class UsersController < ApplicationController
# when 'system_messages'
# @message_alls = SystemMessage.order("created_at desc").all
when 'apply'
- @message_alls = ForgeMessage.where("forge_message_type =? and user_id =?" , "AppliedProject", @user).order("created_at desc")
+ @message_alls = ForgeMessage.where("forge_message_type in ('ProjectInvite', 'AppliedProject') and user_id =?", @user).order("created_at desc")
when 'homework'
@message_alls = CourseMessage.where("course_message_type in ('HomeworkCommon','StudentWorksScore','JournalsForMessage') and user_id =?", @user).order("created_at desc")
when 'course_message'
@message_alls = CourseMessage.where("course_message_type =? and user_id =?", "Message", @user).order("created_at desc")
- # when 'forge_message'
- # @message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Message", @user).order("created_at desc")
+ when 'forge_message'
+ @message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Message", @user).order("created_at desc")
# @message_alls_count = @message_alls.count
when 'course_news'
# 课程通知包含发布的通知和回复的通知
diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb
index bd794438c..7ce0cb9d9 100644
--- a/app/views/users/user_messages.html.erb
+++ b/app/views/users/user_messages.html.erb
@@ -5,7 +5,7 @@
- <%= link_to "全部",user_message_path(User.current), :class => "resourcesGrey" %>
- <%= link_to "未读消息", user_message_path(User.current, :type => 'unviewed'), :class => "resourcesGrey" %>
- - <%= link_to "用户申请", user_message_path(User.current, :type => 'apply'), :class => "resourcesGrey" %>
+ - <%= link_to "加入项目", user_message_path(User.current, :type => 'apply'), :class => "resourcesGrey" %>
<%# 课程相关消息 %>
- <%= link_to "作业消息", user_message_path(User.current, :type => 'homework'), :class => "resourcesGrey" %>
- <%= link_to "课程讨论",user_message_path(User.current, :type => 'course_message'), :class => "resourcesGrey" %>
@@ -17,7 +17,7 @@
<%# 项目相关消息 %>
- <%= link_to "项目任务", user_message_path(User.current, :type => 'issue'), :class => "resourcesGrey" %>
-
+ - <%= link_to "项目讨论区", user_message_path(User.current, :type => 'forge_message'), :class => "resourcesGrey" %>
<%# 项目相关消息 %>
From 0ff58b763107414b121956d9bee85357004215b6 Mon Sep 17 00:00:00 2001
From: Tim
Date: Fri, 9 Oct 2015 09:41:36 +0800
Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E8=B4=B4?=
=?UTF-8?q?=E5=90=A7=E5=9B=BE=E7=89=87=E6=BC=82=E7=A7=BB=E7=9A=84=E9=97=AE?=
=?UTF-8?q?=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/stylesheets/new_user.css | 12 ++++++------
public/stylesheets/public.css | 6 +++---
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css
index 1d2116874..cf40389a1 100644
--- a/public/stylesheets/new_user.css
+++ b/public/stylesheets/new_user.css
@@ -803,17 +803,17 @@ a.sortArrowActiveU {background:url(images/post_image_list.png) -17px -20px no-re
.postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;}
.postDetailDate {color:#888888; font-size:12px; float:left;}
.postDetailReply { margin-top:28px; color:#888888; float:right;}
-a.postReplyIcon {background:url(images/post_image_list.png) -40px 2px no-repeat; width:18px; height:18px; float:left;}
-a.postReplyIcon:hover {background:url(images/post_image_list.png) -40px -29px no-repeat;}
+a.postReplyIcon {background:url(images/post_image_list.png) -40px 2px no-repeat; width:18px; height:18px; float:left; -moz-transition :all 0s linear 0s; -webkit-transition :all 0s linear 0s; -o-transition:all 0s linear 0s; transition:all 0s linear 0s;}
+a.postReplyIcon:hover {background:url(images/post_image_list.png) -40px -29px no-repeat; -moz-transition :all 0s linear 0s; -webkit-transition :all 0s linear 0s; -o-transition:all 0s linear 0s; transition:all 0s linear 0s;}
.postDetailInput {width:713px; height:28px; border:1px solid #d9d9d9; outline:none !important;}
.postAttIcon {background:url(images/post_image_list.png) 0px -91px no-repeat; width:16px; height:16px; padding-left:20px;}
.postAttIcon:hover {background:url(images/post_image_list.png) 0px -113px no-repeat;}
.postThemeContainer {width:720px;}
.postThemeWrap {width:655px; float:left;position: relative}
-.postLikeIcon {background:url(images/post_image_list.png) 0px -42px no-repeat ;float:right; padding-left:18px; margin-top:3px;}
-.postLikeIcon:hover {background:url(images/post_image_list.png) 0px -64px no-repeat ;}
-a.AnnexBtn{ background: url(images/homepage_icon2.png) 0px -343px no-repeat !important; height:20px; display:block; padding-left:20px; color:#888888;}
-a:hover.AnnexBtn{background: url(images/homepage_icon2.png) -90px -343px no-repeat !important; color:#3598db;}
+.postLikeIcon {background:url(images/post_image_list.png) 0px -42px no-repeat ;float:right; padding-left:18px; margin-top:3px; -moz-transition :all 0s linear 0s; -webkit-transition :all 0s linear 0s; -o-transition:all 0s linear 0s; transition:all 0s linear 0s;}
+.postLikeIcon:hover {background:url(images/post_image_list.png) 0px -64px no-repeat ; -moz-transition :all 0s linear 0s; -webkit-transition :all 0s linear 0s; -o-transition:all 0s linear 0s; transition:all 0s linear 0s;}
+a.AnnexBtn{ background: url(images/homepage_icon2.png) 0px -343px no-repeat !important; height:20px; display:block; padding-left:20px; color:#888888; -moz-transition :all 0s linear 0s; -webkit-transition :all 0s linear 0s; -o-transition:all 0s linear 0s; transition:all 0s linear 0s;}
+a:hover.AnnexBtn{background: url(images/homepage_icon2.png) -90px -343px no-repeat !important; color:#3598db; -moz-transition :all 0s linear 0s; -webkit-transition :all 0s linear 0s; -o-transition:all 0s linear 0s; transition:all 0s linear 0s;}
.postEdit {background:url(images/post_image_list.png) 0px -94px no-repeat; width:18px; height:18px; display:block; float:left;}
.postDelete {background:url(images/post_image_list.png) -42px -93px no-repeat; width:18px; height:18px; display:block; float:right;}
.pageBanner {width:968px; margin:0px auto; border:1px solid #dddddd; background-color: #FFF; padding: 10px 15px; float:left;}
diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css
index e14fb48fe..dc2fecbba 100644
--- a/public/stylesheets/public.css
+++ b/public/stylesheets/public.css
@@ -445,9 +445,9 @@ a.uploadIcon {background:url(../images/resource_icon_list.png) 8px -60px no-repe
.navHomepageSearchBoxcontainer {margin-top:11px; }
.navHomepageSearchBox {width:380px; border:none; outline:none; height:32px; background-color:#ffffff;}
.navHomepageSearchInput {width:345px; height:32px; outline:none; border:none; float:left; padding-left:5px;; margin:0;}
-.homepageSearchIcon {width:30px; height:32px; background:url(../images/nav_icon.png) -8px 3px no-repeat; float:left;}
-a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-repeat;}
-.navSearchTypeBox {width:368px; height:35px; position:absolute; border:1px solid #98a1a6; background-color:#ffffff; padding-left:10px; display:none; color:#3e3e3e; font-size:14px; top:43px;}
+.homepageSearchIcon {width:30px; height:32px; background:url(../images/nav_icon.png) -8px 3px no-repeat; float:left; -moz-transition :all 0s linear 0s; -webkit-transition :all 0s linear 0s; -o-transition:all 0s linear 0s; transition:all 0s linear 0s;}
+a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-repeat; -moz-transition :all 0s linear 0s; -webkit-transition :all 0s linear 0s; -o-transition:all 0s linear 0s; transition:all 0s linear 0s;}
+.navSearchTypeBox {width:368px; height:35px; position:absolute; border:1px solid #98a1a6; background-color:#ffffff; padding-left:10px; display:none; color:#3e3e3e; font-size:14px;}
#navSearchAlert {display:none;}
.navHomepageNews {width:30px; display:block; float:right; margin-top:8px; position:relative;}
.homepageNewsIcon {background:url(../images/nav_icon.png) -5px -85px no-repeat; width:30px; height:35px; display:block;}
From fb5eae3ae2fd196750982c9397878f1ff35be7a0 Mon Sep 17 00:00:00 2001
From: Tim
Date: Fri, 9 Oct 2015 10:26:47 +0800
Subject: [PATCH 4/4] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=A1=86=E5=9B=BE?=
=?UTF-8?q?=E6=A0=87=E6=BC=82=E7=A7=BB=E6=95=88=E6=9E=9C=E6=B8=85=E9=99=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/stylesheets/new_user.css | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css
index cf40389a1..5d31c3984 100644
--- a/public/stylesheets/new_user.css
+++ b/public/stylesheets/new_user.css
@@ -447,8 +447,8 @@ a.resourcesTypeUser {background:url(images/homepage_icon.png) -178px -453px no-r
/*.resourcesUploadBox {float:right; width:103px; height:34px; background-color:#64bdd9; line-height:34px; vertical-align:middle; text-align:center; margin-left:12px;}*/
/*.resourcesUploadBox:hover {background-color:#0781b4;}*/
/* 个人主页右边部分*/
-.homepageSearchIcon {width:30px; height:32px; background:url(images/nav_icon.png) -8px 3px no-repeat; float:left;}
-input.homepageSearchIcon:hover {cursor: pointer;background:url(../images/nav_icon.png) -49px 3px no-repeat;}
+.homepageSearchIcon {width:30px; height:32px; background:url(images/nav_icon.png) -8px 3px no-repeat; float:left; -moz-transition :all 0s linear 0s; -webkit-transition :all 0s linear 0s; -o-transition:all 0s linear 0s; transition:all 0s linear 0s;}
+input.homepageSearchIcon:hover {cursor: pointer;background:url(../images/nav_icon.png) -49px 3px no-repeat; -moz-transition :all 0s linear 0s; -webkit-transition :all 0s linear 0s; -o-transition:all 0s linear 0s; transition:all 0s linear 0s;}
a.homepagePostTypeQuiz {background:url(images/homepage_icon.png) -90px -124px no-repeat; padding-left:23px;}
a.homepagePostTypeAssignment {background:url(images/homepage_icon.png) -93px -318px no-repeat; padding-left:23px;}
a.replyGrey {color:#888888; display:inline-block;}