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

62 lines
2.9 KiB
Plaintext
Raw Normal View History

2014-01-06 21:11:20 +08:00
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
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: 12px; "><%=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>
2014-01-06 21:11:20 +08:00
<% if reply_allow %>
2014-01-02 17:29:46 +08:00
<%= 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),'',
2014-03-13 22:06:49 +08:00
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea'), '#{l(:label_reply_plural)} #{journal.user.name}: '); $('##{ids} textarea') ;return false;"}
2014-01-02 17:29:46 +08:00
%>
2014-01-06 21:11:20 +08:00
<% end %>
2014-01-02 17:29:46 +08:00
<% 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%>
2014-01-06 21:11:20 +08:00
<% if reply_allow %>
2014-01-02 17:29:46 +08:00
<div id='<%= ids %>' class="respond-form">
<%= render :partial => 'words/new_respond', :locals => {:journal => journal, :m_reply_id => journal} %>
</div>
2014-01-06 21:11:20 +08:00
<% end %>
2014-01-02 17:29:46 +08:00
<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 %>