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

57 lines
2.8 KiB
Plaintext
Raw Normal View History

2014-01-02 15:37:12 +08:00
<% tip1 = (@bid.reward_type == 3) ? l(:label_student_response) : l(:label_user_response) %>
<p class="font_lighter" style="font-size: 15px; padding-left: 85px; "><%=tip1%></p>
2013-08-09 16:26:26 +08:00
<div id='leave-message'>
<%= render :partial => 'new', :locals => {:bid => @bid, :sta => @state} %>
</div>
2014-01-02 17:29:46 +08:00
<% label = '';
case @bid.reward_type
when 1
label = l(:label_respond_requirement)
when 2
label = l(:label_contest_requirement)
when 3
label = l(:label_question_requirement)
else
end
%>
<% if journals.size >0 %>
2014-01-02 15:21:03 +08:00
<ul class="message-for-user">
2014-01-02 17:29:46 +08:00
<% for journal in journals%>
<li id='word_li_<%= journal.id.to_s %>' class="outer-message-for-user">
<span class="portrait"><%= image_tag(url_to_avatar(journal.user), :class => "avatar") %></span>
2014-01-02 15:21:03 +08:00
<span class="body">
<span class="user"><%= link_to journal.user, user_path(journal.user)%></span>
<span class="font_lighter"><%= label %></span>
2014-01-02 17:29:46 +08:00
<div> <%= textilizable journal.notes%> </div>
2014-01-02 15:21:03 +08:00
<span class="font_lighter"><%= l(:label_bids_published) %>&nbsp;<%= time_tag(journal.created_on).html_safe %>&nbsp;<%= l(:label_bids_published_ago) %></span>
2014-01-02 17:29:46 +08:00
<% ids = 'project_respond_form_'+ journal.id.to_s%>
<span>
<%= link_to(l(:button_quote), {:controller => 'bids', :action => 'new', :id => bid, :journal_id => journal}, :remote => true,
:method => 'post', :title => l(:button_quote))%>
<%= link_to l(:label_bid_respond_quote),'',
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea'), '#{l(:label_reply_plural)} #{journal.user.show_name}: '); $('##{ids} textarea') ;return false;"}
%>
<% if @user==User.current|| User.current.admin? %>
<%#= link_to(l(:label_bid_respond_delete), {:controller => 'bids', :action => 'destroy', :object_id => journal, :id => bid},:confirm => l(:label_delete_confirm),
2014-01-02 15:21:03 +08:00
:remote => true, :method => 'delete', :class => "delete", :confirm => l(:text_are_you_sure), :title => l(:button_delete)) %>
<%= link_to(l(:label_bid_respond_delete), {:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => @user}, :remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) %>
2014-01-02 17:29:46 +08:00
<% end %>
2014-01-02 15:21:03 +08:00
</span>
</span>
<div style="clear: both;"></div>
2014-01-02 17:29:46 +08:00
<% ids = 'project_respond_form_'+ journal.id.to_s%>
<div id='<%= ids %>' class="respond-form">
<%= render :partial => 'words/new_respond', :locals => {:journal => journal, :m_reply_id => journal} %>
</div>
<div style="clear: both;"></div>
<div>
<%= render :partial => "words/journal_reply", :locals => {:journal => journal } %>
</div>
2014-01-02 15:21:03 +08:00
</li>
<% end %>
</ul>
2013-08-01 10:33:49 +08:00
<% end %>