From 418e7e379d8bd0e3d8bcbf018102766e0dd568fd Mon Sep 17 00:00:00 2001
From: lizanle <491823689@qq.com>
Date: Thu, 8 Oct 2015 14:33:58 +0800
Subject: [PATCH 01/12] =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=AE=A4=E4=B8=8D?=
=?UTF-8?q?=E8=83=BD=E7=A7=BB=E5=8A=A8=E5=85=89=E6=A0=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/files/_tag_yun.html.erb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/views/files/_tag_yun.html.erb b/app/views/files/_tag_yun.html.erb
index 159384c6e..59b25c035 100644
--- a/app/views/files/_tag_yun.html.erb
+++ b/app/views/files/_tag_yun.html.erb
@@ -1,7 +1,8 @@
<% unless tag_list.nil?%>
<% tag_list.each do |k,v|%>
<% if tag_name && tag_name == k%>
- <%= k%>×<%= v%>
+
+ <%= k%>×<%= v%>
<% else%>
Date: Thu, 8 Oct 2015 16:35:08 +0800
Subject: [PATCH 02/12] =?UTF-8?q?=E8=B5=84=E6=BA=90=E5=BA=93=E5=9B=BA?=
=?UTF-8?q?=E5=AE=9A=E5=AE=BD=E5=BA=A6=E3=80=81=E4=BD=9C=E5=93=81=E6=8F=8F?=
=?UTF-8?q?=E8=BF=B0margin=E3=80=81=E6=90=9C=E7=B4=A2=E6=A1=86=E6=96=87?=
=?UTF-8?q?=E5=AD=97=E5=B1=85=E4=B8=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/stylesheets/courses.css | 4 ++--
public/stylesheets/new_user.css | 7 ++++---
public/stylesheets/public.css | 2 +-
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css
index 11d38eb58..73488ad18 100644
--- a/public/stylesheets/courses.css
+++ b/public/stylesheets/courses.css
@@ -904,7 +904,7 @@ a:hover.BlueCirBtn{ background:#269ac9; color:#fff;}
.w720{width:721px;}
.w709{width: 709px;}
.w701{width: 701px;}
-a.AnnexBtn{ background: url(images/homepage_icon2.png) 0px -343px no-repeat !important; width:70px; height:20px; display:block; padding-left:20px; color:#888888;}
+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;}
a.FilesBtn{ background: url(../images/homepage_icon2.png) 0px -373px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;}
a:hover.FilesBtn{background: url(../images/homepage_icon2.png) -89px -372px no-repeat; color:#269ac9;}
@@ -941,7 +941,7 @@ a:hover.icon_add{background:url(../images/course/icons.png) -20px -310px no-repe
.icon_remove{background:url(../images/course/icons.png) 0px -338px no-repeat; width:16px; height:27px; display:block;float:left;}
a:hover.icon_remove{background:url(../images/course/icons.png) -20px -338px no-repeat;}
/*20150820提交作业 LB*/
-.HomeWorkBox{ background:#f6f6f6; padding:10px; margin:10px 0;}
+.HomeWorkBox{ background:#f6f6f6; padding:10px;}
.c_grey{ color:#888888;}
.HomeWorkP{ width:690px; font-size:14px;}
.HomeWorkP p{background-color: transparent !important;}
diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css
index 8de891699..1d2116874 100644
--- a/public/stylesheets/new_user.css
+++ b/public/stylesheets/new_user.css
@@ -97,6 +97,7 @@ a.linkGrey6:hover {color:#ffffff !important;}
.mw20{ margin: 0 20px;}
.mt-20 {margin-top:-20px;}
.mt-4 {margin-top: -4px;}
+.mt0 {margin-top: 0px !important;}
.mt3{ margin-top:3px;}
.mt5{ margin-top:5px;}
.mt8{ margin-top:8px !important;}
@@ -811,7 +812,7 @@ a.postReplyIcon:hover {background:url(images/post_image_list.png) -40px -29px no
.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; width:70px; height:20px; display:block; padding-left:20px; color:#888888;}
+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;}
.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;}
@@ -1038,7 +1039,7 @@ a:hover.icon_add{background:url(../images/course/icons.png) -20px -310px no-repe
.icon_remove{background:url(../images/course/icons.png) 0px -338px no-repeat; width:16px; height:27px; display:block;float:left;}
a:hover.icon_remove{background:url(../images/course/icons.png) -20px -338px no-repeat;}
/*20150820提交作业 LB*/
-.HomeWorkBox{ background:#f6f6f6; padding:10px; margin:10px 0;}
+.HomeWorkBox{ background:#f6f6f6; padding:10px;}
.c_grey{ color:#888888;}
.HomeWorkP{ width:690px; font-size:14px;}
.HomeWorkP p{background-color: transparent !important;}
@@ -1256,7 +1257,7 @@ a:hover.tijiao{ background:#0f99a9;}
.system_message_style {line-height: 19.1px; max-width: 681px;overflow:hidden; work-wrap: break-word; word-break: break-all;}
.system_message_style img {max-width: 100%;}
/*20150906关联项目LB*/
-a.RalationIcon{ background: url(../images/homepage_icon.png) -183px -396px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;}
+a.RalationIcon{ background: url(../images/homepage_icon.png) -183px -396px no-repeat; height:20px; display:block; padding-left:20px; color:#888888;}
a:hover.RalationIcon{background: url(../images/homepage_icon.png) -183px -428px no-repeat; color:#3598db;}
a.SetUpIcon{background: url(../images/homepage_icon.png) 0px -453px no-repeat; width:20px; height:20px; display:block; color:#888888;}
a:hover.SetUpIcon{background: url(../images/homepage_icon.png) 0px -486px no-repeat; color:#3598db;}
diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css
index eb9732754..e14fb48fe 100644
--- a/public/stylesheets/public.css
+++ b/public/stylesheets/public.css
@@ -447,7 +447,7 @@ a.uploadIcon {background:url(../images/resource_icon_list.png) 8px -60px no-repe
.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; line-height:35px; vertical-align:middle; position:absolute; border:1px solid #98a1a6; background-color:#ffffff; padding-left:10px; display:none; color:#3e3e3e; font-size:14px; top:43px;}
+.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;}
#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 2ceba291bf2b3975ed748f21ca9839f6ddd57351 Mon Sep 17 00:00:00 2001
From: Tim
Date: Thu, 8 Oct 2015 17:27:08 +0800
Subject: [PATCH 03/12] =?UTF-8?q?=E8=93=9D=E8=89=B2=E7=AE=AD=E5=A4=B4?=
=?UTF-8?q?=E6=9B=BF=E6=8D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/images/course/arrow_up.jpg | Bin 18880 -> 19324 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
diff --git a/public/images/course/arrow_up.jpg b/public/images/course/arrow_up.jpg
index 6bf285a1955654745423c78830c9d17ba422f707..bbf348fe1554afda8d34f08a5580060d312659f5 100644
GIT binary patch
delta 1304
zcmX>wneopwMz;Sq{y!9$KauSouceitse++_m8r3niQ&YL%}o4~o68t$`RePIU(Gt0
zot^Fbv+SjtwP|sG=ih7fnjyzu?c7nmU4E_U)?XJgPo{q^dRxoQ|7_=cSLQ|ar+!xN
zpY!KG!)|A9ROd)g$?(
zx=a5tv!<$d{ZRd7@N;4OYt`SE@|Nt_TN`fwJ5oOB)7;tr8P5Oa`_J%~>&t(J2SLtF
z^3U1+Gwjx#{O;+024mg*)$(WmnVHqFzAP*Z
zARsQo7{$OWt?E8`j)087q^W-Gf?nxa>Md%25BLcOZ$2Rq!Mxc_M3&JRteSy|fd#CY
z3C!h!2!cqkr~#PI$_N4w5nZqd8v`Sd=Gp8gx|Erh2dtC_B*AYwNm2|Huo9BF10JwO
zBnK?RWC4u|CZV3myjn7wmuakF;xf9E9xXDn3)=ySsFT9Iy;(JxS5$c
zJ32aA7@8WmSr}V7nwT3}ZeFOfomqj9v6DCGi=esYqJH4yR|ao03t)-E$|XO!G&eP`
z#4#^9wYVg|sMt=yrYI%N$|*4&%F4;K13FJHB{Rj!z}UjT(9qn(z}(2d%)-#n!r9Qo
z)dlD(OE(vw^Gt2@L0W+tAZ7p=ldW|$>M@032D%!%y16A~hd=jUQy=_&{}SzA!QZM1{xi7$+WzU6{ge91vvtG22fq8){yqL<
zP5rf!UHtE#-~V^>pW%OokU#dXjO?v`)jwQ)Kls(W`GTik|M|-mQVPuam8buHKm6$V
zj9u~X*{}Xfzw-R`>O)gM{AW1nzxZ$e%4hcSSNFfnJ^sb~r_Emd_<#JbZ2mL6c&&N)
uKSNh>?)4w`d;T+2|7Y;6zfnKu^Iv;lc~ScBc=x{<{~0dblYe3V|0V!_KrBuG
delta 884
zcmew}jq$)_Mz;Sq{y!9`n#gvK*VM|;NWs9;%D~jh)NJC%W+uKbo68t$`RaS_JPw}S
z?_BG%+OFA#{r$~9Q`k~c6KvO29?*H}tQ^+h{h8izm;GM$jC3rFV4s>
zP%zdrV6brV^krdT00I8VCk12#QpF~oJmv8%X4MK&{^nWklAFH@L@*05e*!DvVqo|W
z2AkbQlo>Z~5?#Q|%LX=r2W*1CPqsiCv8p@D&mrQ75Top}ld_<`YOHQnvZgpInZE6#;*>1H`Y
zJI2j1#y`dC+qSOVx~4NZWq!m}b@`nwC4qlFRcM?pe7yJkrAMz!W$b4B+9Wss{e*y5
zQp>tc3bT#6XKOcc#jjYtT)EU;{$%`y`_HD$a7%i;rTxPecbyNjPQL2d-~V&}#T2_O
z_UHDe&ky`oKl|y7D>3g3??3y`@c+X5eF0B@xd%V>`gLr7#N)5;3Om33c>Cf%gIZcv
zCI9#RcXyp-zp7vV@jpZTzw$4^Z
Date: Thu, 8 Oct 2015 17:42:48 +0800
Subject: [PATCH 04/12] =?UTF-8?q?=E6=89=B9=E9=87=8F=E4=BF=AE=E6=94=B9tag?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/tags_controller.rb | 7 ++++---
app/views/files/_tag_yun.html.erb | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb
index 4f1a343d5..6b03cff1e 100644
--- a/app/controllers/tags_controller.rb
+++ b/app/controllers/tags_controller.rb
@@ -244,10 +244,11 @@ class TagsController < ApplicationController
@taggings = ActsAsTaggableOn::Tagging.find_by_tag_id_and_taggable_id_and_taggable_type(@tag_id,@taggable_id,@taggable_type) unless @taggable_id.blank?
@obj = get_object(@taggable_id,params[:taggableType]) unless @taggable_id.blank?
if @taggable_id.blank? #如果没有传tag_id,那么直接更新tag_name就好了。但是要防止 重命名后的tag存在。
- #看重命名后的tag是否存在。如果存在的话,只需要更改taggings里边的id即可
+ #看重命名后的tag是否存在。如果存在的话,只需要更改taggings里边的id,
if @rename_tag
- @taggings = ActsAsTaggableOn::Tagging.find_by_tag_id_and_taggable_type(@tag_id,@taggable_type)
- @taggings.update_attributes({:tag_id=>@rename_tag.id})
+ @taggings = ActsAsTaggableOn::Tagging.where(" `taggings`.`tag_id` = #{ @tag_id} AND `taggings`.`taggable_type` = 'Attachment' ")#find_by_tag_id_and_taggable_type(@tag_id,@taggable_type)
+ @taggings.each { |t| t.update_attributes({:tag_id=> @rename_tag.id}) if t.tag_id != @rename_tag.id }
+ ActsAsTaggableOn::Tag.find(@tag_id).update_attributes(:name=>@rename_tag_name)#并且将该tag改名
else #如果不存在,那么就直接更新该tag名称为新的名称
(ActsAsTaggableOn::Tag.find_by_name(@tag_name)).update_attributes(:name=>@rename_tag_name)
end
diff --git a/app/views/files/_tag_yun.html.erb b/app/views/files/_tag_yun.html.erb
index 59b25c035..912d3b4f4 100644
--- a/app/views/files/_tag_yun.html.erb
+++ b/app/views/files/_tag_yun.html.erb
@@ -5,7 +5,7 @@
<%= k%>×<%= v%>
<% else%>
- <%= k%>×<%= v%>
<% end%>
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 05/12] =?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 06/12] =?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 07/12] =?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 08/12] =?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;}
From 654ebfca46969370664bedd9f1859a31c761efde Mon Sep 17 00:00:00 2001
From: huang
Date: Fri, 9 Oct 2015 10:33:10 +0800
Subject: [PATCH 09/12] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E9=82=80=E8=AF=B7?=
=?UTF-8?q?=E6=B7=BB=E5=8A=A0=EF=BC=9A=E5=A7=93=E3=80=81=E5=90=8D=E3=80=81?=
=?UTF-8?q?=E6=80=A7=E5=88=AB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/projects_controller.rb | 5 ++-
app/models/mailer.rb | 4 +-
app/services/users_service.rb | 7 +++-
.../projects/invite_members_by_mail.html.erb | 39 +++++++++++++++++++
config/locales/zh.yml | 6 ++-
public/stylesheets/project.css | 5 ++-
6 files changed, 60 insertions(+), 6 deletions(-)
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 251c47d4c..a8a302045 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -382,7 +382,10 @@ class ProjectsController < ApplicationController
end
else
email = params[:mail]
- Mailer.send_invite_in_project(email, @project, User.current).deliver
+ first_name = params[:first_name]
+ last_name = params[:last_name]
+ gender = params[:gender]
+ Mailer.send_invite_in_project(email, @project, User.current, first_name, last_name, gender).deliver
@is_zhuce = false
flash[:notice] = l(:notice_email_sent, :value => email)
end
diff --git a/app/models/mailer.rb b/app/models/mailer.rb
index 39e709beb..d797f1ce1 100644
--- a/app/models/mailer.rb
+++ b/app/models/mailer.rb
@@ -107,7 +107,7 @@ class Mailer < ActionMailer::Base
# author: alan
# 邀请未注册用户加入项目
# 功能: 在加入项目的同时自动注册用户
- def send_invite_in_project(email, project, invitor)
+ def send_invite_in_project(email, project, invitor, first_name, last_name, gender)
@email = email
@subject = "#{invitor.name} #{l(:label_invite_project)} #{project.name} "
@password = newpass(6)
@@ -116,7 +116,7 @@ class Mailer < ActionMailer::Base
login = login.sub(/%40/,'@')
us = UsersService.new
# 自动激活用户
- user = us.register_auto(login, email, @password)
+ user = us.register_auto(login, email, @password, first_name, last_name, gender)
InviteList.create(:user_id => user.id, :project_id => project.id, :mail =>email)
User.current = user unless User.current.nil?
@user = user
diff --git a/app/services/users_service.rb b/app/services/users_service.rb
index 7e8e775ed..236dbc731 100644
--- a/app/services/users_service.rb
+++ b/app/services/users_service.rb
@@ -47,12 +47,16 @@ class UsersService
end
# 自动注册功能 FOR:邮件邀请
- def register_auto(login,mail,password)
+ def register_auto(login, mail, password, first_name, last_name, gender)
+ mail_notification = "day"
@user = User.new
@user.admin = false
@user.register
@user.login = login
@user.mail = mail
+ @user.firstname = first_name
+ @user.lastname = last_name
+ @user.mail_notification = mail_notification
password_confirmation = password
should_confirmation_password = true
if !password.blank? && !password_confirmation.blank? && should_confirmation_password
@@ -65,6 +69,7 @@ class UsersService
@user = automatically_register_lock(@user)
if @user.id != nil
ue = @user.user_extensions ||= UserExtensions.new
+ ue.gender = gender
ue.user_id = @user.id
ue.save
end
diff --git a/app/views/projects/invite_members_by_mail.html.erb b/app/views/projects/invite_members_by_mail.html.erb
index 44c571422..a697b70a4 100644
--- a/app/views/projects/invite_members_by_mail.html.erb
+++ b/app/views/projects/invite_members_by_mail.html.erb
@@ -44,6 +44,36 @@
}
+ function verifyFirstName() {
+ var first_name = $.trim($('#first_name').val());
+ if(first_name.length > 30)
+ {
+ $("#valid_email").text("用户名字过长,最长为30个字符");
+ return false;
+ }
+ else
+ {
+ $("#valid_email").text("");
+ return true;
+ }
+
+ }
+
+ function verifyLastName() {
+ var last_name = $.trim($('#last_name').val());
+ if(last_name.length > 30)
+ {
+ $("#valid_email").text("用户姓氏过长,最长为30个字符");
+ return false;
+ }
+ else
+ {
+ $("#valid_email").text("");
+ return true;
+ }
+
+ }
+
function senderEmail(obj)
{
if(verifyAddress())
@@ -79,6 +109,15 @@
-
<%= text_field_tag 'mail', '', :class => "fb_item fl", :placeholder => l(:label_input_email), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyAddress(this);" %>
+ -
+ <%= text_field_tag 'first_name', '', :class => "fb_item_first_name fl", :placeholder => l(:label_input_email_lastname), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyLastName(this);" %>
+
+ -
+ <%= text_field_tag 'last_name', '', :class => "fb_item_last_name fl", :placeholder => l(:label_input_email_firstname), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyFirstName(this);" %>
+
+ -
+
+
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 69288d933..195526712 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -2024,7 +2024,11 @@ zh:
label_end_time: 截止时间
label_send_email: 确定发送
- label_input_email: 请输入邮箱地址
+ label_input_email: 请输入邮箱地址(必填)
+ label_input_email_firstname: 请输入用户名字(非必填)
+ label_input_email_lastname: 请输入用户姓氏(非必填)
+ label_input_email_gender: 请输入用户性别
+
#api end
project_module_files: 资源库
diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css
index f769ff9e6..0a78b399b 100644
--- a/public/stylesheets/project.css
+++ b/public/stylesheets/project.css
@@ -44,7 +44,10 @@ a:hover.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;}
.box_main02{ width:390px; margin:15px auto;}
.box_h3{ color:#15bccf; font-size:16px;}
.box_p{ color:#404040; margin-bottom:5px;}
-.fb_item{ color:#919191; border:1px solid #919191; height:28px; margin-bottom:5px; padding-left:5px; width:290px;}
+.fb_item{ color:#919191; border:1px solid #919191; height:28px; margin-bottom:5px; padding-left:5px; width:200px;}
+.fb_item_first_name{ color:#919191; border:1px solid #919191; height:28px; margin-bottom:5px; padding-left:5px; width:150px;margin-left: 10px;}
+.fb_item_last_name{ color:#919191; border:1px solid #919191; height:28px; margin-bottom:5px; padding-left:5px; width:150px;margin-left: 10px;}
+.fb_item_gender{ color:#919191; border:1px solid #919191; height:29px; margin-bottom:5px; padding-left:5px; width:48px;margin-left: 10px;}
a.icon_addm{ background:url(../images/img_floatbox.png) 0 -33px no-repeat; width:16px; height:16px; display:block; margin:5px 0 0 5px;}
a:hover.icon_addm{background:url(../images/img_floatbox.png) 0 -61px no-repeat; }
a.icon_removem{ background:url(../images/img_floatbox.png) -22px -33px no-repeat;width:16px; height:16px; display:block; margin:5px 0 0 5px}
From 530d101024199681b52ce0925649668ba1b602ed Mon Sep 17 00:00:00 2001
From: huang
Date: Fri, 9 Oct 2015 11:25:21 +0800
Subject: [PATCH 10/12] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E9=82=80=E8=AF=B7--?=
=?UTF-8?q?=E5=A7=93=E5=90=8D=E3=80=81=E9=95=BF=E5=BA=A6JS=E9=AA=8C?=
=?UTF-8?q?=E8=AF=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../projects/invite_members_by_mail.html.erb | 24 +++++++++----------
config/locales/zh.yml | 4 ++--
public/stylesheets/project.css | 2 +-
3 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/app/views/projects/invite_members_by_mail.html.erb b/app/views/projects/invite_members_by_mail.html.erb
index a697b70a4..32a124078 100644
--- a/app/views/projects/invite_members_by_mail.html.erb
+++ b/app/views/projects/invite_members_by_mail.html.erb
@@ -44,11 +44,11 @@
}
- function verifyFirstName() {
- var first_name = $.trim($('#first_name').val());
- if(first_name.length > 30)
+ function verifyLastName() {
+ var last_name = $.trim($('#last_name').val());
+ if(last_name.length > 30)
{
- $("#valid_email").text("用户名字过长,最长为30个字符");
+ $("#valid_email").text("用户姓氏过长,最长为30个字符");
return false;
}
else
@@ -59,11 +59,11 @@
}
- function verifyLastName() {
- var last_name = $.trim($('#last_name').val());
- if(last_name.length > 30)
+ function verifyFirstName() {
+ var first_name = $.trim($('#first_name').val());
+ if(first_name.length > 30)
{
- $("#valid_email").text("用户姓氏过长,最长为30个字符");
+ $("#valid_email").text("用户名字过长,最长为30个字符");
return false;
}
else
@@ -76,7 +76,7 @@
function senderEmail(obj)
{
- if(verifyAddress())
+ if(verifyAddress() && verifyFirstName() && verifyLastName() )
{
obj.parent().submit();
}
@@ -110,13 +110,13 @@
<%= text_field_tag 'mail', '', :class => "fb_item fl", :placeholder => l(:label_input_email), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyAddress(this);" %>
- <%= text_field_tag 'first_name', '', :class => "fb_item_first_name fl", :placeholder => l(:label_input_email_lastname), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyLastName(this);" %>
+ <%= text_field_tag 'last_name', '', :class => "fb_item_first_name fl", :placeholder => l(:label_input_email_lastname), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyLastName(this);" %>
- <%= text_field_tag 'last_name', '', :class => "fb_item_last_name fl", :placeholder => l(:label_input_email_firstname), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyFirstName(this);" %>
+ <%= text_field_tag 'first_name', '', :class => "fb_item_last_name fl", :placeholder => l(:label_input_email_firstname), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyFirstName(this);" %>
-
+
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 195526712..5efe4a2cc 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -2025,8 +2025,8 @@ zh:
label_end_time: 截止时间
label_send_email: 确定发送
label_input_email: 请输入邮箱地址(必填)
- label_input_email_firstname: 请输入用户名字(非必填)
- label_input_email_lastname: 请输入用户姓氏(非必填)
+ label_input_email_firstname: 请输入用户名字(可选)
+ label_input_email_lastname: 请输入用户姓氏(可选)
label_input_email_gender: 请输入用户性别
#api end
diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css
index 0a78b399b..e044f9d51 100644
--- a/public/stylesheets/project.css
+++ b/public/stylesheets/project.css
@@ -47,7 +47,7 @@ a:hover.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;}
.fb_item{ color:#919191; border:1px solid #919191; height:28px; margin-bottom:5px; padding-left:5px; width:200px;}
.fb_item_first_name{ color:#919191; border:1px solid #919191; height:28px; margin-bottom:5px; padding-left:5px; width:150px;margin-left: 10px;}
.fb_item_last_name{ color:#919191; border:1px solid #919191; height:28px; margin-bottom:5px; padding-left:5px; width:150px;margin-left: 10px;}
-.fb_item_gender{ color:#919191; border:1px solid #919191; height:29px; margin-bottom:5px; padding-left:5px; width:48px;margin-left: 10px;}
+.fb_item_gender{ color:#919191; border:1px solid #919191; height:29px; margin-bottom:5px; padding-left:5px; width:58px;margin-left: 10px;}
a.icon_addm{ background:url(../images/img_floatbox.png) 0 -33px no-repeat; width:16px; height:16px; display:block; margin:5px 0 0 5px;}
a:hover.icon_addm{background:url(../images/img_floatbox.png) 0 -61px no-repeat; }
a.icon_removem{ background:url(../images/img_floatbox.png) -22px -33px no-repeat;width:16px; height:16px; display:block; margin:5px 0 0 5px}
From dc3cb3a26b2862afe80d1de4e394b3988a734e52 Mon Sep 17 00:00:00 2001
From: lizanle <491823689@qq.com>
Date: Fri, 9 Oct 2015 13:38:35 +0800
Subject: [PATCH 11/12] =?UTF-8?q?=5Flogined=5Fheader.html=E5=A4=B4?=
=?UTF-8?q?=E5=83=8F=20=E9=BC=A0=E6=A0=87=E7=A7=BB=E5=85=A5=E5=B0=B1?=
=?UTF-8?q?=E8=A6=81=E6=9C=89=E6=95=88=E6=9E=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/layouts/_logined_header.html.erb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/views/layouts/_logined_header.html.erb b/app/views/layouts/_logined_header.html.erb
index d0cbc1f6b..fbbe40a93 100644
--- a/app/views/layouts/_logined_header.html.erb
+++ b/app/views/layouts/_logined_header.html.erb
@@ -112,7 +112,7 @@
$("#navHomepageSearchType").hide();
});
- $("#user_avatar img").mouseenter(function(){
+ $("#navHomepageProfile").mouseenter(function(){
$("#homepageProfileMenuIcon").addClass("homepageProfileMenuIconhover");
$("#topnav_login_list").show();
});
From 6a3312230a14e3ae64e3493583cc94743954908f Mon Sep 17 00:00:00 2001
From: huang
Date: Fri, 9 Oct 2015 14:04:47 +0800
Subject: [PATCH 12/12] =?UTF-8?q?=E9=82=AE=E7=AE=B1=E9=AA=8C=E8=AF=81?=
=?UTF-8?q?=E4=B8=8D=E5=85=81=E8=AE=B8=E4=B8=AD=E6=96=87=E8=BE=93=E5=85=A5?=
=?UTF-8?q?=20=E5=A7=93=E5=90=8D=E5=85=81=E8=AE=B8=E4=B8=AD=E6=96=87?=
=?UTF-8?q?=E8=BE=93=E5=85=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/projects/invite_members_by_mail.html.erb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/views/projects/invite_members_by_mail.html.erb b/app/views/projects/invite_members_by_mail.html.erb
index 32a124078..bced1e936 100644
--- a/app/views/projects/invite_members_by_mail.html.erb
+++ b/app/views/projects/invite_members_by_mail.html.erb
@@ -110,10 +110,10 @@
<%= text_field_tag 'mail', '', :class => "fb_item fl", :placeholder => l(:label_input_email), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyAddress(this);" %>
- <%= text_field_tag 'last_name', '', :class => "fb_item_first_name fl", :placeholder => l(:label_input_email_lastname), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyLastName(this);" %>
+ <%= text_field_tag 'last_name', '', :class => "fb_item_first_name fl", :placeholder => l(:label_input_email_lastname), :onkeyup => "this.value=this.value.replace(' ','')", :onblur => "verifyLastName(this);" %>
- <%= text_field_tag 'first_name', '', :class => "fb_item_last_name fl", :placeholder => l(:label_input_email_firstname), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyFirstName(this);" %>
+ <%= text_field_tag 'first_name', '', :class => "fb_item_last_name fl", :placeholder => l(:label_input_email_firstname), :onkeyup => "this.value=this.value.replace(' ','')", :onblur => "verifyFirstName(this);" %>