- <%= l(:label_task_plural)%> |
+ <%= l(:label_task_plural)%>(<%= @homework_list.count%>) |
<%= text_field_tag 'student_id', params[:student_id], :size => 30 %>
@@ -18,7 +17,6 @@
<% if homework.attachments.any?%>
-
<%= image_tag(url_to_avatar(homework.user), :class => "avatar")%> |
@@ -28,7 +26,6 @@
<%= l(:label_bidding_user_studentcode) %> :<%= homework.user.user_extensions.student_id%> |
-
<% if (User.current == homework.user) || (!Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.nil? && (Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.roles&Role.where('id = ? or id = ? or id =?',3,7, 9)).size >0) %>
diff --git a/app/views/bids/_list_projects.html.erb b/app/views/bids/_list_projects.html.erb
index 6947f8ceb..dafec4d77 100644
--- a/app/views/bids/_list_projects.html.erb
+++ b/app/views/bids/_list_projects.html.erb
@@ -3,10 +3,7 @@
- <%= l(:label_task_plural)%> |
-
-
-
+ <%= l(:label_task_plural)%> |
<%= text_field_tag 'student_id', params[:student_id], :size => 30 %>
@@ -19,9 +16,6 @@
<% end %>
<% bidding_project.each do |b_project|%>
<% if b_project.project %>
-
-
-
@@ -38,7 +32,15 @@
|
<%= link_to(b_project.project.name, project_path(b_project.project)) %>
- <%= l(:label_join_bidding)%>
+
+ <% if @bid.reward_type == 2 %>
+ <%= l(:label_joined_contest)%>
+ <% end %>
+ <% if @bid.reward_type == 1 %>
+ <%= l(:label_join_bidding)%>
+ <% end %>
+
+
|
@@ -142,7 +144,7 @@
- <%= b_project.created_at%>
+ <%= format_time b_project.created_at%>
|
@@ -170,7 +172,13 @@
|
<% else %>
- <%= l(:label_bidding_user) %>
+
+ <% if @bid.reward_type == 2%>
+ <%= l(:label_contest_user) %>
+ <% end %>
+ <% if @bid.reward_type == 1 %>
+ <%= l(:label_bidding_user) %>
+ <% end %>
<% unless b_project.user.nil? %>
<%= b_project.user.lastname %><%= b_project.user.firstname %>
<% end %>
@@ -185,7 +193,15 @@
| |
- <%= l(:label_bidding_reason) %><%= b_project.description %> |
+
+
+ <% if @bid.reward_type == 2%>
+ <%= l(:label_contest_reason) %>
+ <% end %>
+ <% if @bid.reward_type == 1 %>
+ <%= l(:label_bidding_reason) %>
+ <% end %>
+ <%= b_project.description %> |
<% end %>
diff --git a/app/views/bids/_project_homework.html.erb b/app/views/bids/_project_homework.html.erb
index 5013e2a8d..952867b94 100644
--- a/app/views/bids/_project_homework.html.erb
+++ b/app/views/bids/_project_homework.html.erb
@@ -30,7 +30,7 @@
<%= b_project.project.description %> |
|
- <%= b_project.created_at%> |
+ <%= b_project.created_at %> |
|
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/contest.html.erb b/app/views/bids/contest.html.erb
index 57aabf2b4..6cd3df16e 100644
--- a/app/views/bids/contest.html.erb
+++ b/app/views/bids/contest.html.erb
@@ -30,7 +30,7 @@
-<%= sort_contest(@s_state)%>
+
-
+<% if @bids.size > 0%>
+<%= sort_contest(@s_state)%>
<%= render :partial => 'contest_show', :locals => {:bids => @bids, :bid_pages => @bid_pages} %>
+<% else %>
+ <%= render :partial => "layouts/no_content"%>
+<% end %>
diff --git a/app/views/bids/index.html.erb b/app/views/bids/index.html.erb
index 4c1daec49..bf405e6b5 100644
--- a/app/views/bids/index.html.erb
+++ b/app/views/bids/index.html.erb
@@ -27,27 +27,12 @@
|
<% end %>
-
-
-
-
- <%= sort_bid(@s_state, @project_type)%>
-
-
-
-
+ <% if @bids.size > 0 %>
- <%= render :partial => 'bid_show', :locals => {:bids => @bids, :bid_pages => @bid_pages} %>
+ <%= sort_bid(@s_state, @project_type)%>
+ <%= render :partial => 'bid_show', :locals => {:bids => @bids, :bid_pages => @bid_pages} %>
+ <% else %>
+ <%= render :partial => "layouts/no_content"%>
+ <% end %>
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/bids/show_bid_user.html.erb b/app/views/bids/show_bid_user.html.erb
index 2fd6205d0..f4d7b2642 100644
--- a/app/views/bids/show_bid_user.html.erb
+++ b/app/views/bids/show_bid_user.html.erb
@@ -1,5 +1,5 @@
- <% for user in @users %>
+ <% for user in @bid.watcher_users %>
-
diff --git a/app/views/bids/show_project.html.erb b/app/views/bids/show_project.html.erb
index be9c9db3b..502d07d46 100644
--- a/app/views/bids/show_project.html.erb
+++ b/app/views/bids/show_project.html.erb
@@ -70,7 +70,7 @@
:complete => '$("#put-bid-form").hide();' do |f| %>
- <%= select_tag 'bid', options_for_select(@option), :name => 'bid', :class => 'grayline' %> |
+ <%= select_tag 'bid', options_for_select(select_option_helper(@option)), :name => 'bid', :class => 'grayline' %> |
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/forums/index.html.erb b/app/views/forums/index.html.erb
index f6546778a..dc7c97b36 100644
--- a/app/views/forums/index.html.erb
+++ b/app/views/forums/index.html.erb
@@ -24,5 +24,8 @@
|
-
-<%= render :partial => 'forums/forum_list', :locals => {:forums => @forums} %>
+<% if @forums.size > 0 %>
+ <%= render :partial => 'forums/forum_list', :locals => {:forums => @forums} %>
+<% else %>
+ <%= render :partial => "layouts/no_content" %>
+<% end %>
diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb
index 8a82741cc..2019a7b45 100644
--- a/app/views/issues/_list.html.erb
+++ b/app/views/issues/_list.html.erb
@@ -38,12 +38,12 @@
<% end -%>
-
-
- <%if User.current.logged? %>
+ <% if User.current.logged? %>
<% if @bid.author.id == User.current.id %>
- <%= link_to l(:label_contest_modify_settings), {:controller => 'bids', :action => 'settings', :id => @bid} %>
+ <%= link_to l(:label_contest_modify_settings), {:controller => 'bids', :action => 'settings', :id => @bid} %>
<% end %>
<% end %>
|