amigo
This commit is contained in:
parent
b29dcb0446
commit
dcc47ae989
|
@ -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
|
||||
|
|
|
@ -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 %>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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' %>
|
||||
|
|
Loading…
Reference in New Issue