diff --git a/app/models/bid.rb b/app/models/bid.rb index 97a81fe03..e1b6b799a 100644 --- a/app/models/bid.rb +++ b/app/models/bid.rb @@ -1,4 +1,10 @@ ####by fq +=begin +bid一类多用,根据reward_type字段分类 +reward == 1 企业众包需求 +reward == 2 创新竞赛 +reward == 3 课程中布置的作业 +=end class Bid < ActiveRecord::Base attr_accessible :author_id, :budget, :deadline, :name, :description, :homework_type, :password include Redmine::SafeAttributes diff --git a/app/views/bids/_project_list.html.erb b/app/views/bids/_project_list.html.erb index 2057de64c..7b178fb78 100644 --- a/app/views/bids/_project_list.html.erb +++ b/app/views/bids/_project_list.html.erb @@ -9,29 +9,29 @@ <% end %> <% end %> - - - -
<%= l(:label_homework_project) %>(<%= bidding_project.count%>) - <% if User.current.logged? && (!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 = ?',5, 10, 7)).size >0) %> - -
- <%= toggle_link l(:label_commit_homework), 'put-bid-form' %> -
- <% end %> -
+ + + +
<%= l(:label_homework_project) %>(<%= bidding_project.count%>) + <% if User.current.logged? && (!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 = ?',5, 10, 7)).size >0) %> + +
+ <%= toggle_link l(:label_commit_homework), 'put-bid-form' %> +
+ <% end %> +
<% else %> - - - <% if User.current.logged? %> - - <% end %> -
<%= l(:label_bidding_project) %>(<%= bidding_project.count%>) -
- <%= toggle_link l(:button_bidding), 'put-bid-form' %> -
+ + + <% if User.current.logged? %> + + <% end %> +
<%= l(:label_bidding_project) %>(<%= bidding_project.count%>) +
+ <%= toggle_link l(:button_bidding), 'put-bid-form' %> +
<% end %> diff --git a/app/views/bids/show_project.html.erb b/app/views/bids/show_project.html.erb index 7e015e712..68744ee28 100644 --- a/app/views/bids/show_project.html.erb +++ b/app/views/bids/show_project.html.erb @@ -104,7 +104,7 @@ <% end %> <% end %> - +<% logger.debug "=============@bidding_project=====================#{@bidding_project.count}" %>
<%= render :partial => 'project_list', :locals => {:bidding_project => @bidding_project,:bid => @bid} %>
diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index 3ce726a20..63ceb19bc 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -1,5 +1,5 @@
- <% flag = false %> + <% flag = false %>
<%= link_to l(:label_issue_new), { :controller => 'issues', :action => 'new', :copy_from => nil }, :param => :project_id, :caption => :label_issue_new, :html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) }, :class => 'icon icon-add' %>