<%= render_flash_messages %> <% if @bid.reward_type == 3 %> <% if User.current.logged? %> <% 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 = ?', 5, 7)).size >0) %>
<%= toggle_link l(:label_commit_homework), 'put-bid-form' %>
<% end %>
<% @bidding_project.each do |b_project|%>
<%= link_to image_tag(url_to_avatar(b_project.project), :class => 'avatar3'), :class => "avatar" %>
<%= link_to(b_project.project.name, project_path(b_project.project)) %><%= l(:label_jion_bidding_homework)%>
<%= b_project.project.description %>
<%=format_time(b_project.created_at) %>
<%= l(:label_bidding_user_studentcode) %> : <%= @user.user_extensions.student_id %>
<%= l(:label_bidding_user_homework) %> : <%= link_to(b_project.user.name, user_path(b_project.user)) %>
<%= l(:label_bidding_reason_homewrok) %> : <%= b_project.description %>
<% end %> <% else %> <% if User.current.logged? %> <% end %>
<%= l(:label_bidding_project) %>(<%= @bidding_project.count%>)
<%= toggle_link l(:button_bidding), 'put-bid-form' %>
<% @bidding_project.each do |b_project|%>
<%= link_to image_tag(url_to_avatar(b_project.project), :class => 'avatar3'), :class => "avatar" %>
<%= link_to(b_project.project.name, project_path(b_project.project)) %><%= l(:label_join_bidding)%>
<%= b_project.project.description %>
<%= b_project.created_at%>
<%= l(:label_bidding_user) %><%= link_to(b_project.user.name, user_path(b_project.user)) %>
<%= l(:label_bidding_reason) %><%= b_project.description %>
<% end %> <% end %>