socialforge/app/views/bids/_history.html.erb

62 lines
2.6 KiB
Plaintext

<!-- added by fq -->
<!--
modified by william 2012-8-30
here used to end the bid;
when the manager closed it or to the deadline.
-->
<table width="660px" border="0" align="center" style="padding-left: 26px">
<tr><td>
<!-- modified by huang -->
<% if @bid.reward_type ==3 %>
<td class="font_lighter" style="font-size: 15px;"><%=l(:label_student_response)%></td>
<% else %>
<td class="font_lighter" style="font-size: 15px;"><%=l(:label_user_response)%></td>
<% end %>
</td>
<!-- end -->
</tr></table>
<div id='leave-message'>
<%= render :partial => 'new', :locals => {:bid => @bid, :sta => @state} %>
</div>
<% if journals.size >0 %>
<% for journal in journals%>
<table width="660px" border="0" align="center">
<tr>
<td colspan="2" valign="top" width="50" ><%= image_tag(url_to_avatar(journal.user), :class => "avatar") %></td>
<td><table width="580px" border="0">
<tr>
<% if @bid.reward_type == 3 %>
<td colspan="2" valign="top"><strong> <%=link_to journal.user, user_path(journal.user)%></strong> <span class="font_lighter"><%= l(:label_question_requirement) %></span></td>
<% else %>
<td colspan="2" valign="top"><strong> <%=link_to journal.user, user_path(journal.user)%></strong> <span class="font_lighter"><%= l(:label_respond_requirement) %></span></td>
<% end %>
</tr>
<tr>
<td colspan="2" width="580px" ><p class="font_description"><%= textilizable journal.notes%></p></td>
</tr>
<tr>
<td align="left"><span class="font_lighter"><%= l(:label_bids_published) %>&nbsp;<%= time_tag(journal.created_on).html_safe %>&nbsp;<%= l(:label_bids_published_ago) %></span></td>
<% if @user==User.current|| User.current.admin? %>
<td width="200" align="right" class="a"><%= link_to(l(:label_bid_respond_quote), {:controller => 'bids', :action => 'new', :id => bid, :journal_id => journal}, :remote => true,
:method => 'post', :title => l(:button_quote))%>
<%= link_to(l(:label_bid_respond_delete), {:controller => 'bids', :action => 'destroy', :object_id => journal, :id => bid},:confirm => l(:label_delete_confirm),
:remote => true, :method => 'delete', :class => "delete", :confirm => l(:text_are_you_sure), :title => l(:button_delete)) %></td>
<% else %>
<td width="200" align="right" class="a"><%= link_to(l(:label_bid_respond_quote), {:controller => 'bids', :action => 'new', :id => bid, :journal_id => journal}, :remote => true,
:method => 'post', :title => l(:button_quote))%>
<% end %>
</tr>
</table></td>
</tr>
</table>
<div class="line_under"></div>
<% end %>
<% end %>