exceptionHandle
yanxd 12 years ago
parent b29dcb0446
commit dcc47ae989

@ -1,4 +1,10 @@
####by fq ####by fq
=begin
bidreward_type
reward == 1
reward == 2
reward == 3
=end
class Bid < ActiveRecord::Base class Bid < ActiveRecord::Base
attr_accessible :author_id, :budget, :deadline, :name, :description, :homework_type, :password attr_accessible :author_id, :budget, :deadline, :name, :description, :homework_type, :password
include Redmine::SafeAttributes include Redmine::SafeAttributes

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

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

@ -1,5 +1,5 @@
<div class="content-title-top"> <div class="content-title-top">
<% flag = false %> <% flag = false %><!-- 8,23行分别调用测试代码看是否需要增加按钮隐藏掉分类查询看不懂改了flag试试就知道了 -->
<div style=""> <div style="">
<%= link_to l(:label_issue_new), { :controller => 'issues', :action => 'new', :copy_from => nil }, :param => :project_id, :caption => :label_issue_new, <%= 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' %> :html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) }, :class => 'icon icon-add' %>

Loading…
Cancel
Save