diff --git a/app/views/users/_user_homework_attachment.html.erb b/app/views/users/_user_homework_attachment.html.erb
new file mode 100644
index 000000000..9e198a762
--- /dev/null
+++ b/app/views/users/_user_homework_attachment.html.erb
@@ -0,0 +1,65 @@
+
+
+ <% if defined?(container) && container && container.saved_attachments %>
+ <% container.attachments.each_with_index do |attachment, i| %>
+
+ <%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename link_file', :readonly=>'readonly')%>
+ <%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %>
+ <%= l(:field_is_public)%>:
+ <%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%>
+ <%= link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') unless attachment.id.nil? %>
+ <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
+
+ <% end %>
+ <% container.saved_attachments.each_with_index do |attachment, i| %>
+
+ <%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%>
+ <%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %>
+ <%= l(:field_is_public)%>:
+ <%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%>
+ <%= link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') unless attachment.id.nil? %>
+ <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
+
+ <% end %>
+<% end %>
+
+ <% project = project %>
+
+ <%= button_tag l(:button_browse), :type=>"button", :onclick=>"_file.click()",:onmouseover => 'this.focus()',:class => 'sub_btn', :style => ie8? ? 'display:none' : '' %>
+ <%= file_field_tag 'attachments[dummy][file]',
+ :id => '_file',
+ :class => ie8? ? '' : 'file_selector',
+ :multiple => true,
+ :onchange => 'addInputFiles(this);',
+ :style => ie8? ? '' : 'display:none',
+ :data => {
+ :max_file_size => Setting.attachment_max_size.to_i.kilobytes,
+ :max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
+ :max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
+ :upload_path => uploads_path(:format => 'js',:project =>project),
+ :description_placeholder => l(:label_optional_description),
+ :field_is_public => l(:field_is_public),
+ :are_you_sure => l(:text_are_you_sure),
+ :file_count => l(:label_file_count),
+ :delete_all_files => l(:text_are_you_sure_all)
+ } %>
+
+ <%= l(:label_no_file_uploaded)%>
+
+ (<%= l(:label_max_size) %>:
+ <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
+
+
+ <% content_for :header_tags do %>
+ <%= javascript_include_tag 'attachments' %>
+ <% end %>
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/users/_user_homework_form.html.erb b/app/views/users/_user_homework_form.html.erb
new file mode 100644
index 000000000..3a4c3496c
--- /dev/null
+++ b/app/views/users/_user_homework_form.html.erb
@@ -0,0 +1,56 @@
+<%= javascript_include_tag "/assets/kindeditor/kindeditor" %>
+
+
+
+
+
+
+
+
导入作业
+
+ <%= calendar_for('homework_end_time')%>
+
+
+
+
+
+
+
+
+
+
+
+ <% if edit_mode %>
+ <%= f.kindeditor :description,:editor_id => 'homework_description_editor',:height => "150px",:owner_id => homework.id,:owner_type =>OwnerTypeHelper::HOMEWORKCOMMON %>
+ <% else %>
+ <%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
+ <%= f.kindeditor :description,:editor_id => 'homework_description_editor',:height => "150px" %>
+ <% end %>
+
+
+
+
+
+
+
+
+
+ <%= render :partial => 'attachments/new_form', :locals => {:container => homework} %>
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/users/user_homeworks.html.erb b/app/views/users/user_homeworks.html.erb
index db929d7ac..48666a0cb 100644
--- a/app/views/users/user_homeworks.html.erb
+++ b/app/views/users/user_homeworks.html.erb
@@ -19,54 +19,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ <% homework = HomeworkCommon.new %>
+ <%= labelled_form_for homework,:url => {:controller => 'homework_common',:action => 'create'} do |f| %>
+ <%= render :partial => 'users/user_homework_form', :locals => { :homework => homework,:f => f,:edit_mode => false } %>
+ <% end%>
<% end%>
diff --git a/public/javascripts/new_user.js b/public/javascripts/new_user.js
index 7fc515c4a..42a1271cd 100644
--- a/public/javascripts/new_user.js
+++ b/public/javascripts/new_user.js
@@ -11,6 +11,9 @@ $(function(){
$("#edit_user_file_btn").hide();
$("#watch_user_btn").hide();
});
+
+ //日历选择样式
+ //$(".ui-datepicker-trigger").replaceWith("")
});
//编辑个人简介
diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css
index fb16d39c5..4326dae41 100644
--- a/public/stylesheets/new_user.css
+++ b/public/stylesheets/new_user.css
@@ -834,6 +834,17 @@ a.FilesName02{ max-width:665px;overflow:hidden; white-space:nowrap; text-overflo
.ProResultUl li{ line-height:35px; border-bottom:1px solid #dddddd; }
.DateBorder{border:1px solid #d9d9d9; border-left:none; padding:7px 6px 6px 6px;}
+/*日历选择图*/
+img.ui-datepicker-trigger {
+ display:block;
+ background:url(../images/public_icon.png) -31px 0 no-repeat;
+ cursor: pointer;
+ vertical-align: middle;
+ width:16px;
+ height:15px;
+ float:left;
+}
+
diff --git a/public/stylesheets/users.css b/public/stylesheets/users.css
index 967c7770b..4a54724fd 100644
--- a/public/stylesheets/users.css
+++ b/public/stylesheets/users.css
@@ -135,16 +135,16 @@ a:hover.c_lgrey{ color:#3ca5c6;}
.users_r_h2{background:#64bdd9; color:#fff; height:33px; width:90px; text-align:center; font-weight:normal; padding-top:7px; font-size:16px;}
-a.hidepic>img{display:none;}
+/*a.hidepic>img{display:none;}*/
-div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
-span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
-span.ke-toolbar-icon-url{background-image:url( ../images/public_icon.png )}
-div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
-span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
-span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
-div.ke-toolbar .ke-outline{border:none;}
-.cr{clear: right;}
+/*div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}*/
+/*span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}*/
+/*span.ke-toolbar-icon-url{background-image:url( ../images/public_icon.png )}*/
+/*div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}*/
+/*span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}*/
+/*span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}*/
+/*div.ke-toolbar .ke-outline{border:none;}*/
+/*.cr{clear: right;}*/
div.content{padding-top:10px;}
.pcontent>.school_list,.content>.school_list { padding-left: 5px;}
\ No newline at end of file