58 lines
2.8 KiB
Plaintext
58 lines
2.8 KiB
Plaintext
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
|
<% if journals.size > 0 %>
|
|
<% for journal in journals %>
|
|
<div class="ping_C" id='word_li_<%= journal.id.to_s %>'>
|
|
<div class="ping_dispic">
|
|
<%= link_to image_tag(url_to_avatar(journal.user),:width => '46',:height => '46'), user_path(journal.user) %>
|
|
</div>
|
|
<div class="ping_discon upload_img" style="width: 610px;">
|
|
<div class="ping_distop">
|
|
<!-- <a style=" font-weight:bold; color:#15bccf; margin-right:30px; background:none;" target="_blank" href="#">gugu01</a> -->
|
|
<span>
|
|
<%= link_to journal.user, user_path(journal.user),:class => 'c_blue fb fl mb10', :target => "_blank"%>
|
|
</span>
|
|
<span class="c_grey fr">
|
|
<%= format_time(journal.created_on) %>
|
|
</span>
|
|
<div class="cl"></div>
|
|
<p>
|
|
<%= journal.notes.html_safe %>
|
|
</p>
|
|
</div>
|
|
<div class="ping_disfoot">
|
|
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
|
|
|
<% if journal.user == User.current|| User.current.admin? || (@course && User.current.allowed_to?(:as_teacher,@course)) %>
|
|
<%= 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)) %>
|
|
<% end %>
|
|
<% if reply_allow %>
|
|
<%= link_to l(:label_bid_respond_quote),'',
|
|
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea')); $('##{ids} textarea') ;return false;"} %>
|
|
|
|
<% end %>
|
|
</div>
|
|
<div class="cl"></div>
|
|
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
|
<% if reply_allow %>
|
|
<div id='<%= ids %>' class="respond-form">
|
|
<%= render :partial => 'words/new_respond_course', :locals => {:journal => journal, :m_reply_id => journal,:show_name => true} %>
|
|
</div>
|
|
<% end %>
|
|
<div class="cl"></div>
|
|
|
|
<%= render :partial => "words/journal_reply", :locals => {:journal => journal, :show_name => true, :allow_delete => @course && User.current.allowed_to?(:as_teacher,@course)} %>
|
|
|
|
</div>
|
|
<div class="cl"></div>
|
|
</div>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|