From 95a48b7da0fa0be4ffa02cc2fd72ee4a23c7a76c Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Fri, 22 May 2015 14:45:01 +0800
Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E4=BD=9C=E5=93=81show=E7=95=8C?=
=?UTF-8?q?=E9=9D=A2=E8=AF=A6=E7=BB=86=E5=86=85=E5=AE=B9=E5=A1=AB=E5=85=85?=
=?UTF-8?q?=202=E3=80=81=E6=9B=B4=E6=96=B0public.css=203=E3=80=81=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0=E4=BD=9C=E5=93=81=E9=99=84=E4=BB=B6=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/student_work_controller.rb | 5 +
app/views/student_work/_show.html.erb | 105 +++++++++---------
.../student_work/_work_attachments.html.erb | 5 +
app/views/student_work/index.html.erb | 3 -
public/stylesheets/public.css | 7 ++
5 files changed, 67 insertions(+), 58 deletions(-)
create mode 100644 app/views/student_work/_work_attachments.html.erb
diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb
index f9d393ca3..98de01eab 100644
--- a/app/controllers/student_work_controller.rb
+++ b/app/controllers/student_work_controller.rb
@@ -70,6 +70,11 @@ class StudentWorkController < ApplicationController
end
+ #评分
+ def add_score
+
+ end
+
private
#获取作业
def find_homework
diff --git a/app/views/student_work/_show.html.erb b/app/views/student_work/_show.html.erb
index cb3f0181a..df6b00a9d 100644
--- a/app/views/student_work/_show.html.erb
+++ b/app/views/student_work/_show.html.erb
@@ -1,13 +1,41 @@
- - 上交时间:2015-05-07
- - 参与人员:程梦雯 王强
- - 关联项目:Trustie Forge
- - 内容:
我写了一个验证身份证号码的程序,它是以一定内存空间(大概100M)换取cpu消耗,然后它的运算量就降低了,前十四位的验证就相当于转换类型再查表一样,所以它的验证号码速度比一般的方式快。如果还不明白就所以它的验证号码速度比一般的方式快。
- - 附件:socket实验-123456-王强.zip(123KB)
- - 评价:
-
+ -
+ 上交时间:
+ <%=format_time work.created_at %>
+
+
+
+
+
+ <% if work.project%>
+ -
+ 关联项目:
+ <%= link_to( work.project.name, project_path(work.project.id), :class => "c_blue02" )%>
+
+ <% end%>
+ -
+ 内容:
+
+ <%= work.description%>
+
+
+
+ -
+ 附件:
+ <% if work.attachments.empty?%>
+ 尚未提交附件
+ <% else%>
+ <%= render :partial => 'work_attachments', :locals => {:attachments => work.attachments} %>
+ <% end%>
+
+
+ -
+ 评价:
+
+
+
-
评分:
@@ -15,32 +43,24 @@
-
批阅结果:
-
- -文件不超过200MB
+
+ <%= render :partial => 'attachments/form' %>
+
提交
+
-
-
-
-
-
-
-
-
-
jacknudt(教辅)
-
评分:85分
-
删除
-
回复
-
一小时前
-
-
作品非常好,格式不正确,继续努力!
-
-

-
-
程梦雯
-
删除
-
一小时前
-
-
谢谢老师!
-
-
-
-
+
-
+
-
收起
+
收起
\ No newline at end of file
diff --git a/app/views/student_work/_work_attachments.html.erb b/app/views/student_work/_work_attachments.html.erb
new file mode 100644
index 000000000..638644fdf
--- /dev/null
+++ b/app/views/student_work/_work_attachments.html.erb
@@ -0,0 +1,5 @@
+<% for attachment in attachments %>
+ <%= link_to_short_attachment attachment, :class => 'link_file', :download => true -%>
+ (<%= number_to_human_size attachment.filesize %>)
+
+<% end -%>
diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb
index 258d26cf9..2a7396ae2 100644
--- a/app/views/student_work/index.html.erb
+++ b/app/views/student_work/index.html.erb
@@ -84,9 +84,6 @@
<%= link_to student_work.user.show_name,user_path(student_work.user),:class => "c_blue02 hwork_name"%>
-
-
-
<%= link_to student_work.name, student_work_path(student_work),:remote => true%>
diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css
index 255536e9c..e7421d1fe 100644
--- a/public/stylesheets/public.css
+++ b/public/stylesheets/public.css
@@ -34,6 +34,7 @@ h4{ font-size:14px; color:#3b3b3b;}
.fmYh{font-family:"MicroSoft Yahei";}
.font999{ color:#999;}
.fontRed{color:#770000;}
+.text_c{ text-align:center;}
/* Float & Clear */
.cl{ clear:both; overflow:hidden; }
@@ -77,6 +78,7 @@ h4{ font-size:14px; color:#3b3b3b;}
.mt5{ margin-top:5px;}
.mt8{ margin-top:8px;}
.mt10{ margin-top:10px;}
+.mt30{ margin-top: 30px;}
.mb5{ margin-bottom:5px;}
.mb10{ margin-bottom:10px;}
.mb20{ margin-bottom:20px;}
@@ -133,6 +135,7 @@ a.c_green{ color:#28be6c;}
.b_grey{ background: #F5F5F5;}
.b_dgrey{ background: #CCC;}
.c_orange{color:#e8770d;}
+.c_dark{ color:#2d2d2d;}
.c_lorange{ color:#ff9900;}
.c_purple{color: #6883b6;}
.c_blue{ color:#15bccf;}
@@ -169,6 +172,9 @@ a:hover.bgreen_u_btn{background:#1abc9c; color:#fff;}
.blue_u_btn{border:1px solid #64bdd9; padding:2px 10px; color:#64bdd9;}
a.blue_u_btn{border:1px solid #64bdd9; padding:2px 10px; color:#64bdd9;}
a:hover.blue_u_btn{background:#64bdd9; color:#fff;}
+.blue_n_btn{ background:#64bdd9; color:#fff; font-weight:normal;padding:2px 10px; text-align:center;}
+a.blue_n_btn{background:#64bdd9;color:#fff;font-weight:normal; padding:2px 10px; text-align:center;}
+a:hover.blue_n_btn{ background:#329cbd;}
.nolink_btn{ background:#BCBCBC; color: #fff; padding:2px 5px;}
.more_btn{-moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #9DCEFF; color:#9DCEFF; border-radius:3px; padding:0px 3px;}
@@ -184,6 +190,7 @@ a:hover.blue_u_btn{background:#64bdd9; color:#fff;}
.pic_mes{ display:block; background:url(../images/new_project/public_icon.png) 0px -376px no-repeat; width:20px; height:15px; padding-left:18px;}
.pic_img{ display:block; background:url(../images/new_project/public_icon.png) -31px -419px no-repeat; width:20px; height:15px; }
.pic_del{ display:block; background:url(../images/new_project/public_icon.png) 0px -235px no-repeat; width:20px; height:15px; }
+.pic_del:hover{ background:url(../images/new_project/public_icon.png) -32px -235px no-repeat; }
.pic_stats{display:block; background:url(../images/new_project/public_icon.png) 0px -548px no-repeat; width:20px; height:15px;}
.pic_files{display:block; background:url(../images/new_project/public_icon.png) 0px -578px no-repeat; width:20px; height:15px;}
.pic_text{display:block; background:url(../images/new_project/public_icon.png) 0px -609px no-repeat; width:20px; height:18px;}