This commit is contained in:
yanxd 2013-12-12 17:18:55 +08:00
parent b29dcb0446
commit dcc47ae989
4 changed files with 28 additions and 22 deletions

View File

@ -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

View File

@ -9,29 +9,29 @@
</div>
<% end %>
<% end %>
<table width="100%" border="0" style="padding-left: 15px">
<td width="80%" class="font_lighter" style="font-size: 15px;"><%= l(:label_homework_project) %>(<%= bidding_project.count%>)</td>
<td width="20%">
<% 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) %>
<div class='icon icon-add'>
<%= toggle_link l(:label_commit_homework), 'put-bid-form' %>
</div>
<% end %>
</td>
</table>
<table width="100%" border="0" style="padding-left: 15px">
<td width="80%" class="font_lighter" style="font-size: 15px;"><%= l(:label_homework_project) %>(<%= bidding_project.count%>)</td>
<td width="20%">
<% 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) %>
<div class='icon icon-add'>
<%= toggle_link l(:label_commit_homework), 'put-bid-form' %>
</div>
<% end %>
</td>
</table>
<% else %>
<table width="100%" border="0" style="padding-left: 15px">
<td width="80%" class="font_lighter" style="font-size: 15px;"><%= l(:label_bidding_project) %>(<%= bidding_project.count%>)</td>
<% if User.current.logged? %>
<td width="20%">
<div class='icon icon-add'>
<%= toggle_link l(:button_bidding), 'put-bid-form' %>
</div></td>
<% end %>
</table>
<table width="100%" border="0" style="padding-left: 15px">
<td width="80%" class="font_lighter" style="font-size: 15px;"><%= l(:label_bidding_project) %>(<%= bidding_project.count%>)</td>
<% if User.current.logged? %>
<td width="20%">
<div class='icon icon-add'>
<%= toggle_link l(:button_bidding), 'put-bid-form' %>
</div></td>
<% end %>
</table>
<% end %>

View File

@ -104,7 +104,7 @@
<% end %>
</div>
<% end %>
<% logger.debug "=============@bidding_project=====================#{@bidding_project.count}" %>
<div id='bidding_project_list'>
<%= render :partial => 'project_list', :locals => {:bidding_project => @bidding_project,:bid => @bid} %>
</div>

View File

@ -1,5 +1,5 @@
<div class="content-title-top">
<% flag = false %>
<% flag = false %><!-- 8,23行分别调用测试代码看是否需要增加按钮隐藏掉分类查询看不懂改了flag试试就知道了 -->
<div style="">
<%= 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' %>