diff --git a/app/helpers/student_work_helper.rb b/app/helpers/student_work_helper.rb
index bff997ba4..aa359e273 100644
--- a/app/helpers/student_work_helper.rb
+++ b/app/helpers/student_work_helper.rb
@@ -2,17 +2,16 @@
include UserScoreHelper
module StudentWorkHelper
+ #获取当前用户的项目列表
def user_projects_option
- cond = Project.visible_condition(User.current) + " AND projects.project_type <> 1"
- memberships = User.current.memberships.all(:conditions => cond)
- projects = memberships.map(&:project)
+ projects = User.current.projects.visible
not_have_project = []
- not_have_project << Setting.please_chose
+ not_have_project << "没有可选项目,请直接为本作品创建一个项目"
not_have_project << 0
type = []
type << not_have_project
projects.each do |project|
- if project != nil
+ if project
option = []
option << project.name
option << project.id
diff --git a/app/views/student_work/new.html.erb b/app/views/student_work/new.html.erb
index 85c23f300..de9ede9ff 100644
--- a/app/views/student_work/new.html.erb
+++ b/app/views/student_work/new.html.erb
@@ -75,6 +75,17 @@
<%= render :partial => 'users/user_homework_attachment', :locals => {:container => @student_work, :has_program=>false} %>
+
+ <%= select_tag :project_id, options_for_select(user_projects_option, @student_work.project_id), {:class => "InputBox W680 fl"} %>
+ <%=link_to "", new_project_path, :class => "ml5 mt5 SetUpIcon fl", :title => "快速创建"%>
+
+
+
确定
或
diff --git a/app/views/users/_user_homework_attachment.html.erb b/app/views/users/_user_homework_attachment.html.erb
index 0944ffab6..08927ab8f 100644
--- a/app/views/users/_user_homework_attachment.html.erb
+++ b/app/views/users/_user_homework_attachment.html.erb
@@ -48,10 +48,10 @@
上传附件
- <%= link_to "资源库",{:controller => 'users',:action=>'user_import_resource',:id=>User.current.id,:homework_id=>container.id},:class => "FilesBtn fl mr15 mt3",:remote => true%>
+ <%= link_to "资源库",{:controller => 'users',:action=>'user_import_resource',:id=>User.current.id,:homework_id=>container.id},:class => "FilesBtn fl mt3",:remote => true%>
<% if defined?(has_program) && has_program %>
-
编程
-
+
编程
+
<% end %>
diff --git a/app/views/users/_user_homework_list.html.erb b/app/views/users/_user_homework_list.html.erb
index 642373d58..37afc3384 100644
--- a/app/views/users/_user_homework_list.html.erb
+++ b/app/views/users/_user_homework_list.html.erb
@@ -47,6 +47,9 @@
<%= link_to(l(:label_bid_respond_delete), homework_common_path(homework_common),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %>
+
+ <%= link_to(l(:label_bid_respond_delete), homework_common_path(homework_common),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %>
+
diff --git a/public/images/homepage_icon.png b/public/images/homepage_icon.png
index 127f12e92..a6f3223b6 100644
Binary files a/public/images/homepage_icon.png and b/public/images/homepage_icon.png differ
diff --git a/public/javascripts/new_user.js b/public/javascripts/new_user.js
index eb50c2762..9e5a858f6 100644
--- a/public/javascripts/new_user.js
+++ b/public/javascripts/new_user.js
@@ -180,6 +180,12 @@ function regexStudentWorkDescription()
}
}
+//学生作品
+function show_project()
+{
+ $("#about_project").slideToggle();
+}
+
//textarea自适应高度 纯js写的 有浏览器判断
/**
* 文本框根据输入内容自适应高度
diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css
index 51bd52547..128890d4b 100644
--- a/public/stylesheets/new_user.css
+++ b/public/stylesheets/new_user.css
@@ -890,7 +890,7 @@ a.FilesBtn{ background: url(../images/homepage_icon.png) 0px -373px no-repeat;
a:hover.FilesBtn{background: url(../images/homepage_icon.png) -89px -372px no-repeat; color:#3598db;}
a.BlueCirBtnMini{ display:block;width:40px; height:22px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
a:hover.BlueCirBtnMini{ background:#3598db; color:#fff;}
-a.ProBtn{background: url(../images/homepage_icon.png) -86px -396px no-repeat; width:35px; height:20px; display:block; padding-left:20px; color:#888888;}
+a.ProBtn{background: url(../images/homepage_icon.png) -86px -396px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;}
a:hover.ProBtn{background: url(../images/homepage_icon.png) -86px -426px no-repeat; color:#3598db;}
a.DropBtn{background: url(../images/homepage_icon.png) -125px -339px no-repeat; width:85px; height:20px; display:block; color:#888888; font-size:14px;}
@@ -1116,3 +1116,11 @@ a:hover.tijiao{ background:#0f99a9;}
#cboxPrevious{position:absolute; bottom:0px; left:0; color:#444;}
#cboxNext{position:absolute; bottom:0px; left:63px; color:#444;}
#cboxClose{position:absolute; bottom:0; right:0; display:block; color:#444;}
+
+/*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: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;}
+.W680{ width:680px;}
+.W710{ width:708px;}