bigdir/app/views/bids/_project_list.html.erb

39 lines
1.3 KiB
Plaintext

<!-- fq -->
<%= render_flash_messages %>
<% if @bid.reward_type == 3 %>
<% if User.current.logged?%>
<% if User.current.user_extensions.identity == 1 %>
<div class="font_lighter">
<p><%= l(:label_homework_prompt) %></p>
<P><%= l(:label_homework_prompt_content) %></P>
</div>
<% end %>
<% end %>
<table width="1000px" border="0" style="padding-left: 15px">
<td class="font_lighter" style="font-size: 15px;"><%= l(:label_homework_project) %>(<%= bidding_project.count%>)</td>
<td>
<% 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 = ?', 5, 7)).size >0) %>
<div class='icon icon-add'>
<%= toggle_link l(:label_commit_homework), 'put-bid-form' %>
</div>
<% end %>
</td>
</table>
<% else %>
<table width="1000px" border="0" style="padding-left: 15px">
<td class="font_lighter" style="font-size: 15px;"><%= l(:label_bidding_project) %>(<%= bidding_project.count%>)</td>
<% if User.current.logged? %>
<td>
<div class='icon icon-add'>
<%= toggle_link l(:button_bidding), 'put-bid-form' %>
</div></td>
<% end %>
</table>
<% end %>
<%= render :partial=> "list_projects",:locals => {:bidding_project => bidding_project,:bid => @bid }%>