diff --git a/app/views/bids/add_homework.js.erb b/app/views/bids/add_homework.js.erb
index 90085a502..42b22392e 100644
--- a/app/views/bids/add_homework.js.erb
+++ b/app/views/bids/add_homework.js.erb
@@ -1,5 +1,7 @@
$('#bidding_project_list').html('<%= escape_javascript(render(:partial => 'homework_list', :locals => {:homework => @homework_list})) %>');
-$('#put-bid-form-partial').html(' <%= escape_javascript( render( :partial => 'attachments/form', :locals => {:container => @homework}) )%>')
+$('#put-bid-form-partial').html(' <%= escape_javascript( render( :partial => 'attachments/form') )%>')
+$('#flash_notice').remove()
$("#project_id").val("请选择项目");
$("#bid_message").val( "<%= l(:label_bid_reason) %>" );
-$("#put-bid-form").hide();
\ No newline at end of file
+$("#put-bid-form").hide();
+alert('<%= @homework_flag %>');
\ No newline at end of file
diff --git a/app/views/bids/new_submit_homework.html.erb b/app/views/bids/new_submit_homework.html.erb
new file mode 100644
index 000000000..dd06af643
--- /dev/null
+++ b/app/views/bids/new_submit_homework.html.erb
@@ -0,0 +1,15 @@
+<%= l :label_bidding_homework %>
+
\ No newline at end of file
diff --git a/app/views/common/_project.html.erb b/app/views/common/_project.html.erb
index 516ed0f5e..9109c3fd6 100644
--- a/app/views/common/_project.html.erb
+++ b/app/views/common/_project.html.erb
@@ -1,58 +1,58 @@
-
-
- <%= content_tag('div', tag('img', {:src => '../images/logo-only_med.png', :class => 'img_ta'}, false, false), :class => 'img-tag') %>
-
-
-
- Claimed by <%= content_tag('a', project.name) %> | Analyzed about 11 hours ago
-
-
- <%= textilizable(project.short_description, :project => project) %>
-
-
-
-
- <%= content_tag('a', tag('img', {:src => '../images/pai.png', :class => 'img-ta'}, false, false), :class => 'img-tag3') %>
- <%= content_tag('div', "Vert High Activity", :class => 'img-tag4') %>
- <%= content_tag('div', tag('img', {:src => '../images/stars_ro.png', :class => 'img-ta'}, false, false), :class => 'img-tag2') %>
- <%= content_tag('div', "#{WatchersOfProjects.watcher_count(project)}Reviews", :class => 'img-tag1') %>
-
-
-
-
- <%= content_tag('a', 'Mostly written in C++') %>
-
-
- <%= content_tag('a', 'Licenses:') %><%= content_tag('span', 'GPL-2.0+, LGPL, MPL-1.1') %>
-
-
-
- <%= tag('img', {:src => "../images/user.png"}, false, false) %>
- <% tags = ProjectTags.find_tag(project.id)
- tags.each do |t_tag|
- content = t_tag.tag.content
- description = t_tag.description -%>
- <%= content_tag('a', content, :class => 'tag', :title => description) %>
- <% end -%>
- <%= content_tag('a', 'css', :class => 'tag') %>
- <%= content_tag('a', 'web_browser', :class => 'tag') %>
- <%= content_tag('a', 'development', :class => 'tag') %>
- <%= content_tag('a', 'client', :class => 'tag') %>
- <%= content_tag('a', 'web', :class => 'tag') %>
- <%= content_tag('a', 'xhtml', :class => 'tag') %>
- <%= content_tag('a', 'tabbed', :class => 'tag') %>
- <%= content_tag('a', 'and more') %>
-
+
+
+ <%= content_tag('div', tag('img', {:src => '../images/logo-only_med.png', :class => 'img_ta'}, false, false), :class => 'img-tag') %>
+
+
+
+ Claimed by <%= content_tag('a', project.name) %> | Analyzed about 11 hours ago
+
+
+ <%= textilizable(project.short_description, :project => project) %>
+
+
+
+
+ <%= content_tag('a', tag('img', {:class => 'img-ta'}, false, false), :class => 'img-tag3') %>
+ <%= content_tag('div', "Vert High Activity", :class => 'img-tag4') %>
+ <%= content_tag('div', tag('img', {:src => '../images/stars_ro.png', :class => 'img-ta'}, false, false), :class => 'img-tag2') %>
+ <%= content_tag('div', "#{WatchersOfProjects.watcher_count(project)}Reviews", :class => 'img-tag1') %>
+
+
+
+
+ <%= content_tag('a', 'Mostly written in C++') %>
+
+
+ <%= content_tag('a', 'Licenses:') %><%= content_tag('span', 'GPL-2.0+, LGPL, MPL-1.1') %>
+
+
+
+ <%= tag('img', {:src => "../images/user.png"}, false, false) %>
+ <% tags = ProjectTags.find_tag(project.id)
+ tags.each do |t_tag|
+ content = t_tag.tag.content
+ description = t_tag.description -%>
+ <%= content_tag('a', content, :class => 'tag', :title => description) %>
+ <% end -%>
+ <%= content_tag('a', 'css', :class => 'tag') %>
+ <%= content_tag('a', 'web_browser', :class => 'tag') %>
+ <%= content_tag('a', 'development', :class => 'tag') %>
+ <%= content_tag('a', 'client', :class => 'tag') %>
+ <%= content_tag('a', 'web', :class => 'tag') %>
+ <%= content_tag('a', 'xhtml', :class => 'tag') %>
+ <%= content_tag('a', 'tabbed', :class => 'tag') %>
+ <%= content_tag('a', 'and more') %>
+
diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb
index 5934733cd..a72eb4b41 100644
--- a/app/views/issues/index.html.erb
+++ b/app/views/issues/index.html.erb
@@ -4,7 +4,7 @@
:html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) }, :class => 'icon icon-add' %>
<%= link_to l(:label_query), '#', :class => 'icon icon-help',
- :onclick => '$("#custom_query").toggle(); ' if User.current.logged? %>
+ :onclick => '$("#custom_query").slideToggle(); ' if User.current.logged? %>
diff --git a/app/views/layouts/base_homework.html.erb b/app/views/layouts/base_homework.html.erb
index 82cceaaec..827874d55 100644
--- a/app/views/layouts/base_homework.html.erb
+++ b/app/views/layouts/base_homework.html.erb
@@ -8,7 +8,7 @@
<%= csrf_meta_tag %>
<%= favicon %>
- <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', :media => 'all' %>
+ <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', 'nyan', :media => 'all' %>
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
<%= javascript_heads %>
<%= heads_for_theme %>
diff --git a/app/views/memos/_reply_box.html.erb b/app/views/memos/_reply_box.html.erb
index 32c03d2ad..a8991b572 100644
--- a/app/views/memos/_reply_box.html.erb
+++ b/app/views/memos/_reply_box.html.erb
@@ -1,4 +1,4 @@
-<%= form_for(@mome_new, url: forum_memos_path) do |f| %>
+<%= form_for(@mome_new, url: forum_memos_path, :html => {:multipart => true}) do |f| %>
<%= f.hidden_field :subject, :required => true, value: @memo.subject %>
<%= f.hidden_field :forum_id, :required => true, value: @memo.forum_id %>
<%= f.hidden_field :parent_id, :required => true, value: @memo.id %>
@@ -8,7 +8,7 @@
<%= l(:label_attachment_plural) %>
- <%= render :partial => 'attachments/form', :locals => {:container => @mome_new} %>
+ <%= render :partial => 'attachments/form' %>
<%= f.submit value: l(:label_reply_plural), class: "replies" %>
<% end %>
\ No newline at end of file
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 3d83fbd2a..6947fc04d 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -1331,6 +1331,7 @@ zh:
label_bidding_succeed: 应标成功
label_bidding_contest_succeed: 竞赛提交成功 #added by bai
label_bidding_homework_succeed: 作业提交成功 #added by bai
+ label_bidding_homework_failed: 作业提交失败 #added by bai
label_bidding_fail: 应标失败,该项目已经应标
label_bidding_homework_fail: 作业提交失败,该作业已经被提交!
diff --git a/config/routes.rb b/config/routes.rb
index 8d1156bff..d4d9b4f92 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -466,7 +466,8 @@ RedmineApp::Application.routes.draw do
match 'calls/:id/show_project', :controller => 'bids', :action => 'show_project', :as => 'project_for_bid'
match 'calls/:id/show_project_homework', :controller => 'bids', :action => 'show_project_homework', :as => 'project_for_bid_homework' # by huang
match 'calls/:id/add', :controller => 'bids', :action => 'add'
- match 'calls/:id/add_homework', :controller => 'bids', :action => 'add_homework'
+ match 'calls/:id/add_homework', :controller => 'bids', :action => 'add_homework', via: :post
+ match 'calls/:id/new_submit_homework', to: 'bids#new_submit_homework', via: :get, as: 'new_submit_homework'
match 'words/add_project_respond', :controller => 'words', :action => 'add_project_respond'
match 'words/:id/leave_project_message', :controller => 'words', :action => 'leave_project_message'
@@ -499,7 +500,7 @@ RedmineApp::Application.routes.draw do
match 'new_join_in_contest', :to => 'bids#new_join', :as => 'try_join_in_contest'
match 'projects/:id/respond', :to => 'projects#project_respond', :via => :post
match 'calls/:id/manage',:to => 'bids#manage',:via => [:get,:post]
- match 'project/course', :to => 'projects#course', :as => 'course' #nyan
+ match 'project/course', :to => 'projects#course', :as => 'course'
#added by william
# match 'calls/:id/set_results',:controller => 'bids', :action => 'set_results',:via => [:get,:post],:as => 'set_results'
diff --git a/public/javascripts/attachments.js b/public/javascripts/attachments.js
index 86bf06336..7b8394fe8 100644
--- a/public/javascripts/attachments.js
+++ b/public/javascripts/attachments.js
@@ -141,7 +141,7 @@ function uploadAndAttachFiles(files, inputEl) {
var sizeExceeded = false;
$.each(files, function() {
- if (this.size && maxFileSize && this.size > parseInt(maxFileSize)) {sizeExceeded=true;}
+ if (this.size && maxFileSize != null && this.size > parseInt(maxFileSize)) {sizeExceeded=true;}
});
if (sizeExceeded) {
window.alert(maxFileSizeExceeded);
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index 9ae70566f..9f0f648ba 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -211,7 +211,7 @@ div.forums-line{
}
div.forums-info{
- background-image: url(../images/sidebar/forums.png);
+ /*background-image: url(../images/sidebar/forums.png); */
border-bottom: solid 1px #15bccf;
height: 100px;
width: 214px;
diff --git a/public/themes/redpenny-master/stylesheets/application.css b/public/themes/redpenny-master/stylesheets/application.css
index c8870221c..cf1a76d72 100644
--- a/public/themes/redpenny-master/stylesheets/application.css
+++ b/public/themes/redpenny-master/stylesheets/application.css
@@ -36,7 +36,7 @@
@media only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and (min-device-pixel-ratio: 2) {
#header > h1 {
- background-image:ol url(../images/logo-2x.png);
+ /*background-image:ol url(../images/logo-2x.png);*/
background-size: 43px 30px;
}
}
@@ -1251,7 +1251,7 @@ a.root {
a.img-tag3{
float: left;
- background-image: url("../images/pai.png");
+ /*background-image: url("../images/pai.png");*/
background-position: 0px 0px;
background-repeat: no-repeat;
position: absolute;
@@ -1891,7 +1891,7 @@ div.tableline{
*
* @2013-09-27
/*added by bai*/
-input[type="submit"] {
+input[type="submit"], .button_submit {
padding-bottom: 5px;
width: auto;
height: 25px;