mpdified project and contest message

This commit is contained in:
nieguanghui 2014-01-02 15:21:03 +08:00
parent 3dd3578bcb
commit f77ecf71f1
1 changed files with 35 additions and 50 deletions

View File

@ -1,20 +1,12 @@
<!-- 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"> <table width="660px" border="0" align="center" style="padding-left: 26px">
<tr><td> <tr><td>
<!-- modified by huang -->
<% if @bid.reward_type ==3 %> <% if @bid.reward_type ==3 %>
<td class="font_lighter" style="font-size: 15px;"><%=l(:label_student_response)%></td> <td class="font_lighter" style="font-size: 15px;"><%=l(:label_student_response)%></td>
<% else %> <% else %>
<td class="font_lighter" style="font-size: 15px;"><%=l(:label_user_response)%></td> <td class="font_lighter" style="font-size: 15px;"><%=l(:label_user_response)%></td>
<% end %> <% end %>
</td> </td>
<!-- end -->
</tr></table> </tr></table>
@ -24,46 +16,39 @@
<% if journals.size >0 %> <% if journals.size >0 %>
<ul class="message-for-user">
<% for journal in journals%> <% for journal in journals%>
<table width="660px" border="0" align="center"> <li id='word_li_<%= journal.id.to_s %>' class="outer-message-for-user">
<tr> <span class="portrait"><%= image_tag(url_to_avatar(journal.user), :class => "avatar") %></span>
<td colspan="2" valign="top" width="50" ><%= image_tag(url_to_avatar(journal.user), :class => "avatar") %></td> <% label = '';
<td><table width="580px" border="0"> case @bid.reward_type
<tr> when 1
<% label = ''; label = l(:label_respond_requirement)
case @bid.reward_type when 2
when 1 label = l(:label_contest_requirement)
label = l(:label_respond_requirement) when 3
when 2 label = l(:label_question_requirement)
label = l(:label_contest_requirement) else
when 3 end
label = l(:label_question_requirement) %>
else <span class="body">
<span class="user"><%= link_to journal.user, user_path(journal.user)%></span>
end <span class="font_lighter"><%= label %></span>
%> <%= textilizable journal.notes%>
<td colspan="2" valign="top"><strong> <%=link_to journal.user, user_path(journal.user)%></strong> <span class="font_lighter"><%= label %></span></td> <span class="font_lighter"><%= l(:label_bids_published) %>&nbsp;<%= time_tag(journal.created_on).html_safe %>&nbsp;<%= l(:label_bids_published_ago) %></span>
</tr> <span><% if @user==User.current|| User.current.admin? %>
<%= link_to(l(:label_bid_respond_quote), {:controller => 'bids', :action => 'new', :id => bid, :journal_id => journal}, :remote => true,
<tr> :method => 'post', :title => l(:button_quote))%>
<td colspan="2" width="580px" ><p class="font_description"><%= textilizable journal.notes%></p></td> <%= link_to(l(:label_bid_respond_delete), {:controller => 'bids', :action => 'destroy', :object_id => journal, :id => bid},:confirm => l(:label_delete_confirm),
</tr> :remote => true, :method => 'delete', :class => "delete", :confirm => l(:text_are_you_sure), :title => l(:button_delete)) %>
<tr> <% else %>
<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> <%= link_to(l(:label_bid_respond_quote), {:controller => 'bids', :action => 'new', :id => bid, :journal_id => journal}, :remote => true,
<% if @user==User.current|| User.current.admin? %> :method => 'post', :title => l(:button_quote))%>
<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, <% end %>
:method => 'post', :title => l(:button_quote))%> </span>
<%= link_to(l(:label_bid_respond_delete), {:controller => 'bids', :action => 'destroy', :object_id => journal, :id => bid},:confirm => l(:label_delete_confirm), </span>
:remote => true, :method => 'delete', :class => "delete", :confirm => l(:text_are_you_sure), :title => l(:button_delete)) %></td> <div style="clear: both;"></div>
<% else %> </li>
<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, <% end %>
:method => 'post', :title => l(:button_quote))%> </ul>
<% end %>
</tr>
</table></td>
</tr>
</table>
<div class="line_under"></div>
<% end %>
<% end %> <% end %>