<% for attachment in attachments %>
-
+
<% if options[:length] %>
<%= link_to_short_attachment attachment, :class => 'icon icon-attachment', :download => true,:length => options[:length] -%>
<% else %>
diff --git a/app/views/homework_attach/_homework_member.html.erb b/app/views/homework_attach/_homework_member.html.erb
index 9dfe170bd..f85333d69 100644
--- a/app/views/homework_attach/_homework_member.html.erb
+++ b/app/views/homework_attach/_homework_member.html.erb
@@ -4,8 +4,12 @@
- <%= l(:label_user) %> |
- <%= l(:label_role_plural) %> |
+
+ <%= l(:label_user) %>
+ |
+
+ <%= l(:label_role_plural) %>
+ |
|
@@ -19,9 +23,15 @@
<% hoemwork_users.each do |user| %>
<% if homework.user != user %>
- <%= link_to_user user %> |
- 参与人员 |
- <%= link_to l(:button_delete),destory_homework_users_homework_attach_path(:user_id=>user),:remote => true, :method => :post %> |
+
+ <%= link_to_user user %>
+ |
+
+ 参与人员
+ |
+
+ <%= link_to l(:button_delete),destory_homework_users_homework_attach_path(:user_id=>user),:remote => true, :method => :post, :confirm => l(:label_delete_confirm) %>
+ |
<% end %>
<% end %>
@@ -31,14 +41,18 @@
<%= form_for(hoemwork_users, {:url => add_homework_users_homework_attach_path(homework), :remote => true, :method => :post}) do |f| %>
-
+
+ <%= l(:label_member_new) %>
+
+
+ <%= label_tag "principal_search", l(:label_principal_search) %>
+ <%= text_field_tag 'principal_search', nil %>
+ <%= javascript_tag "observeSearchfield('principal_search', null, '#{ escape_javascript get_homework_member_list_homework_attach_index_path(:q => params[:q], :bid_id => params[:id]||homework, :format => 'js') }')" %>
+
+ <%= render_new_members_for_homework(members) %>
+
+
+ <%= submit_tag l(:button_add), :id => 'member-add-submit' %>
+
<% end %>
diff --git a/app/views/homework_attach/edit.html.erb b/app/views/homework_attach/edit.html.erb
index d7764f347..9f81a3d19 100644
--- a/app/views/homework_attach/edit.html.erb
+++ b/app/views/homework_attach/edit.html.erb
@@ -1,75 +1,103 @@
+
+
+
+
+ 新建作业
+ <%= stylesheet_link_tag 'css'%>
+
+
-
+
+
+
+
+
+ -
+ 修改作业
+
+ -
+ 成员
+
+ -
+ <%= link_to(l(:label_project_new), {:controller => 'projects',
+ :action => 'new',
+ :course => 0,
+ :project_type => 0}) if User.current.allowed_to?(:add_project, nil, :global => true) %>
+
+
-
<%=raw l(:label_edit_homework)%>
-
-
- <%= form_for(@homework) do |f|%>
-
- 标 题 *:
- <%= f.text_field :name, :required => true, :name => "homework_name", :size => 60, :style => "width:490px;", :maxlength => 254%>
-
-
- 提交项目 :
- <% if @homework.project.nil? %>
- <%= f.select :project_id, options_for_select(user_projects_option),:name => "project_id", :required => true%>
- <% else %>
- <%= f.select :project_id, options_for_select(user_projects_option,@homework.project.id),:name => "project_id", :required => true%>
- <% end %>
-
- <%= link_to '创建项目', new_project_path(course: 0, project_type: 0), :target => '_blank' %>
-
提交项目可以为空
-
-
- 描 述 :
-
- <%= f.text_area :description, :rows => 8, :name => "homework_description", :class => 'wiki-edit', :maxlength => 3000, :style => "font-size:small;width:490px;margin-left:10px;" %>
-
-
-
-
+
+
+ <%= form_for(@homework) do |f|%>
+
+
+ <%= f.text_field :name, :required => true, :name => "homework_name", :class => "w430 bo", :maxlength => 254, :placeholder => "作品名称"%>
+
+
+
+ <% if @homework.project.nil? %>
+ <%= f.select :project_id, options_for_select(user_projects_option),{}, {:name => "project_id", :required => true,:class => "w350 bo"}%>
+ <% else %>
+ <%= f.select :project_id, options_for_select(user_projects_option,@homework.project.id),{},{:name => "project_id", :required => true, :class => "w350 bo"}%>
+ <% end %>
+
+
+
+ <%= f.text_area :description, :rows => 8, :name => "homework_description", :class => "w620",
+ :maxlength => 3000, :placeholder => "最多3000个汉字" %>
-
-
- <%= render :partial => 'attachments/form' %>
+
+
+
+ <%#= render :partial => 'attachments/form' %>
+
+ <% options = {:author => true, :deletable => attach_delete(@homework)} %>
+ <%= render :partial => 'attachments/links',
+ :locals => {:attachments => @homework.attachments, :options => options} %>
+
+
+ <%= render :partial => 'attachments/form' %>
+
-
-
-
-
- <%= submit_tag t(:label_button_ok), :sta => 0, :class => "enterprise"%>
-
-
- <% end %>
-
-
-<%= render :partial => "homework_member",:locals => {:members => @members,:hoemwork_users =>@hoemwork_users,:homework => @homework} %>
-
+
+
+
+
+
+ <%= l(:label_button_ok) %>
+
+ 取 消
+
+
+ <% end %>
+
+
+
+
+ <%= render :partial => "homework_member",:locals => {:members => @members,:hoemwork_users =>@hoemwork_users,:homework => @homework} %>
+
+
+
+
+
diff --git a/app/views/homework_attach/new.html.erb b/app/views/homework_attach/new.html.erb
index fcf4099ab..8a8e3b1c8 100644
--- a/app/views/homework_attach/new.html.erb
+++ b/app/views/homework_attach/new.html.erb
@@ -1,19 +1,10 @@
-
-
-
-
- 新建作业
- <%= stylesheet_link_tag 'css', :media => 'all' %>
-
-
-
-
-
+
@@ -28,18 +19,16 @@
:project_type => 0}) if User.current.allowed_to?(:add_project, nil, :global => true) %>
-
-
-
-
- <%= form_for(HomeworkAttach.new, :method => :post,
- :name => 'new_form',
- :url => {:controller => 'homework_attach',
- :action => 'create',
- :user_id => User.current.id,
- :bid_id => @bid
- }) do |f|%>
+
+
+ <%= form_for(HomeworkAttach.new, :method => :post,
+ :name => 'new_form',
+ :url => {:controller => 'homework_attach',
+ :action => 'create',
+ :user_id => User.current.id,
+ :bid_id => @bid
+ }) do |f|%>
@@ -86,25 +72,10 @@
<%= l(:label_button_ok) %>
取 消
-
-
-
-
- <% end %>
-
-
-
-
+ <% end %>
+
-
-
-
-
-
-
-
-
diff --git a/public/stylesheets/css.css b/public/stylesheets/css.css
index 3df7df034..244447ec7 100644
--- a/public/stylesheets/css.css
+++ b/public/stylesheets/css.css
@@ -118,7 +118,7 @@ a:hover.ping_sub{ background:#14a8b9;}
/* 创建作业 */
-.Newwork{ width:940px; height:auto; border:1px solid #c3c3c3;}
+.Newwork{ width:940px; border:1px solid #c3c3c3;}
.N_top{ height:35px; background:#e5e5e5; border:1px solid #fff; width:691px; padding:5px 10px 0 15px;}
.N_top h2{ color:#616161; font-size:14px; float:left;}
.N_top a{ float:right; font-size:14px; color:#15bccf; display:block; background:url(images/pic_ad.png) 0 5px no-repeat; height:20px; width:60px; padding-left:16px;}
@@ -131,6 +131,15 @@ a:hover.ping_sub{ background:#14a8b9;}
.bo{height:26px; border:1px solid #CCC !important; padding: 0 !important;}
a.tijiao{ height:28px !important; display:block !important; width:80px !important; color:#fff !important; background:#15bccf !important; text-align:center !important; padding-top:4px !important; float:left !important; margin-right:10px !important;}
a:hover.tijiao{ background:#0f99a9 !important;}
+.members_left{ float:left; width:570px; margin-right:20px;}
+.members_left{}
+.members_left ul li{ height:30px; border-bottom:1px solid #CCC; width:570px; padding-top:5px; }
+.members_left ul li a{ float:left;}
+.members_left ul li span{ float:left; text-align:center; color:#484747;}
+.w260{ text-align:center; width:260px;}
+.f_b{ font-weight: bold;}
+.members_right label{ margin-left:15px;}
+.N_search{ height:20px; border:1px s #999;}
/* 匿名评分弹框 */
.alert .close02{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-490px;background:url(images/close.png) no-repeat;cursor:pointer;}
From caec663fe4bf7162bda1292026eab7af7b4bdcb9 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Mon, 3 Nov 2014 15:52:41 +0800
Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BC=96=E8=BE=91?=
=?UTF-8?q?=E4=BD=9C=E4=B8=9A=E7=95=8C=E9=9D=A2=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../homework_attach/_homework_member.html.erb | 38 ++++++++++++-------
public/stylesheets/css.css | 2 +-
2 files changed, 26 insertions(+), 14 deletions(-)
diff --git a/app/views/homework_attach/_homework_member.html.erb b/app/views/homework_attach/_homework_member.html.erb
index f85333d69..82e4a3b36 100644
--- a/app/views/homework_attach/_homework_member.html.erb
+++ b/app/views/homework_attach/_homework_member.html.erb
@@ -1,3 +1,10 @@
+
+
<%= error_messages_for 'member' %>
@@ -41,18 +48,23 @@
<%= form_for(hoemwork_users, {:url => add_homework_users_homework_attach_path(homework), :remote => true, :method => :post}) do |f| %>
-
- <%= l(:label_member_new) %>
-
-
- <%= label_tag "principal_search", l(:label_principal_search) %>
- <%= text_field_tag 'principal_search', nil %>
- <%= javascript_tag "observeSearchfield('principal_search', null, '#{ escape_javascript get_homework_member_list_homework_attach_index_path(:q => params[:q], :bid_id => params[:id]||homework, :format => 'js') }')" %>
-
- <%= render_new_members_for_homework(members) %>
-
-
- <%= submit_tag l(:button_add), :id => 'member-add-submit' %>
-
+
<% end %>
diff --git a/public/stylesheets/css.css b/public/stylesheets/css.css
index 244447ec7..6c72186bd 100644
--- a/public/stylesheets/css.css
+++ b/public/stylesheets/css.css
@@ -139,7 +139,7 @@ a:hover.tijiao{ background:#0f99a9 !important;}
.w260{ text-align:center; width:260px;}
.f_b{ font-weight: bold;}
.members_right label{ margin-left:15px;}
-.N_search{ height:20px; border:1px s #999;}
+.N_search{ height:20px !important; border:1px solid #999 !important;}
/* 匿名评分弹框 */
.alert .close02{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-490px;background:url(images/close.png) no-repeat;cursor:pointer;}