提交作品样式

This commit is contained in:
sw 2015-09-02 19:41:45 +08:00
parent c2bfbfecee
commit 6a6fbea446
4 changed files with 124 additions and 70 deletions

View File

@ -134,10 +134,14 @@ class StudentWorkController < ApplicationController
end
def new
@user = User.current
@student_work = @homework.student_works.where("user_id = ?",User.current.id).first
if @student_work.nil?
@student_work = StudentWork.new
end
respond_to do |format|
format.html{ render :layout => "new_base_user"}
end
end
def create

View File

@ -1,4 +1,6 @@
# encoding: utf-8
include UserScoreHelper
module StudentWorkHelper
def user_projects_option
cond = Project.visible_condition(User.current) + " AND projects.project_type <> 1"

View File

@ -17,8 +17,9 @@
});
<% end%>
</script>
<div class="project_r_h">
<h2 class="project_h2">创建作品</h2>
<div class="HomeWork" id="RSide">
<div class="RightBanner">
<div class="NewsBannerName">提交作品</div>
</div>
<div class="Newwork">
<div class="hwork_ctt">
@ -39,7 +40,7 @@
<label class="fl"><span class="c_red">*</span>&nbsp;&nbsp;作品名称&nbsp;&nbsp;&nbsp;&nbsp;</label>
<%= f.text_field "name", :required => true, :size => 60, :class => "bo fl", :maxlength => 200, :placeholder => "作品名称", :onkeyup => "regexStudentWorkName();" %>
<% if @homework.homework_type != 2%>
<a href="javascript:void(0)" class="fl ml10 mt3" onclick="show_project();" >
<a href="javascript:void(0)" class="fl ml10 mt3" onclick=" $('#about_project').slideToggle();" >
项目信息
<img class="ml5 " src="../images/bid/pic_question.png" width="15" height="15" Title="项目是一种由用户创建的基于&#10;网络的协作空间,能够为个人&#10;或小组提供分布式的协同交流&#10;和资料管理等方面的。">
</a>
@ -86,6 +87,7 @@
</div>
</div><!--新建作业结束-->
<div class="cl"></div>
</div>
<% else %>
@ -125,8 +127,8 @@
</script>
<!-- 模板1结束 -->
<div class="homepageRight">
<div class="HomeWork">
<div class="HomeWork" id="RSide">
<div class="RightBanner">
<div class="NewsBannerName">提交作品</div>
</div>
@ -201,6 +203,5 @@
<% end %>
<% end %>
</div><!----ProResult end-->
</div><!--homepageRight end-->
<% end %>

View File

@ -953,3 +953,50 @@ blockquote {
background-color: #e8e8e8;
}
/* 创建作品 work */
.Newwork{ width:668px; height:418px;}
.N_top{ float:right; margin-left:390px; }
.N_con{ color:#484747; font-weight:bold; width:660px; margin-top:10px; }
.N_con p{ }
.w430{ width:470px;}
.w557{ width:557px;}
.w350{ width:350px;}
.h400{height: 400px !important;}
.w620{ width:480px; height:160px; border:1px solid #CCC;}
.bo{height:26px; border:1px solid #CCC; padding-left:5px; background:#fff;width:470px; }
.bo02{height:26px; border:1px solid #CCC; padding-left:5px; background:#fff;width:480px; margin-left:2px; color: #999; }
.hwork_txt{ width:560px; padding-left:5px; background:#fff;}
a.tijiao{ height:28px; display:block; width:80px; color:#fff; background:#15bccf; text-align:center; padding-top:4px; float:left; margin-right:10px;}
a:hover.tijiao{ background:#0f99a9;}
.members_left{ float:left; width:410px; margin-right:20px; text-align:center;}
.members_left{}
.members_left ul li{ height:30px; border-bottom:1px solid #E4E4E4; width:410px; padding-top:10px; }
.members_left ul li a{ float:left; text-align:center;}
.members_left ul li span{ float:left; text-align:center; color:#484747;}
.w150{ text-align:center; width:150px;min-height: 10px;}
.f_b{ font-weight: bold;}
.members_right label{ margin-left:15px;}
.N_search{ height:20px; border:1px solid #999;}
/* 创建作品 homework */
.hwork_new{ color:#4c4c4c;}
.c_red{ color:#F00;}
.hwork_input{ border:1px solid #64bdd9; height:22px; width:88%; background:#fff; margin-bottom:10px; padding:5px;}
.hwork_input02{ border:1px solid #64bdd9; height:15px; width:140px; background:#fff; margin-bottom:10px; padding:5px;}
.hwork_text{ border:1px solid #64bdd9; height:100px;width:555px; background:#fff; margin-left:5px; padding:5px; margin-bottom:10px;}
.hwork_new ul li{ }
.ml21{ margin-left:21px;}
.ml9{ margin-left:9px;}
.hwork_ttl{height:24px;}
.hwork_ctt{height:auto; padding-left:10px;clear:both;}
.hwork_tb_{ border-bottom:3px solid #e4e4e4; text-align:center;}
.hwork_tb_ ul{height:24px;}
.hwork_tb_ li{float:left;height: 24px;width: auto; padding:0 10px;cursor:pointer;}
.hwork_normaltab { color:#15bccf ; border-bottom:3px solid #e4e4e4; }
.hwork_hovertab { color:#656767; font-weight:bold; border-bottom:3px solid #15bccf; }
.hwork_dis{display:block; }
.hwork_undis{display:none;}
.project_none{ display:none;}
.about_project{ overflow:hidden;display:none;}
.project_r_h{ width:670px; height:40px; background:#eaeaea; margin-bottom:10px;}
.project_r_h02{ width:920px; height:40px; background:#eaeaea; margin-bottom:10px;}