socialforge/app/views/users/_course_journalsformessage....

111 lines
6.1 KiB
Plaintext
Raw Normal View History

2015-09-24 16:30:14 +08:00
<div class="resources mt10" id="user_activity_<%= user_activity_id%>">
<div class="homepagePostBrief">
2015-08-25 19:24:23 +08:00
<div class="homepagePostPortrait">
2015-09-24 16:30:14 +08:00
<%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user_id), :alt => "用户头像" %>
2016-01-14 17:52:48 +08:00
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
2015-09-24 16:30:14 +08:00
</div>
2015-08-25 19:24:23 +08:00
<div class="homepagePostDes">
2015-10-16 11:01:52 +08:00
<div class="homepagePostTo break_word mt-4">
2015-10-13 16:51:44 +08:00
<% if activity.try(:user).try(:realname) == ' ' %>
2015-09-24 16:30:14 +08:00
<%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %>
<% else %>
<%= link_to activity.try(:user).try(:realname), user_path(activity.user_id), :class => "newsBlue mr15" %>
<% end %> TO
<% course=Course.find(activity.jour_id) %>
<%= link_to course.name.to_s+" | 课程留言", course_feedback_path(course), :class => "newsBlue ml15" %>
</div>
2015-09-28 10:51:24 +08:00
<div class="homepagePostTitle break_word list_style upload_img">
2015-09-30 10:49:04 +08:00
<% if activity.parent %>
<%= link_to activity.parent.notes.html_safe, course_feedback_path(course), :class => "postGrey" %>
2015-09-25 16:29:47 +08:00
<% else %>
2015-09-30 10:49:04 +08:00
<%= link_to activity.notes.html_safe, course_feedback_path(course), :class => "postGrey" %>
2015-09-25 16:29:47 +08:00
<% end %>
2015-08-25 19:24:23 +08:00
</div>
<div class="homepagePostDate fl">
2015-09-24 16:30:14 +08:00
留言时间:<%= format_time(activity.created_on) %>
2015-08-25 19:24:23 +08:00
</div>
<div class="homepagePostDate fl ml15">
更新时间:<%= format_time(CourseActivity.where("course_act_type='#{activity.class}' and course_act_id =#{activity.id}").first.updated_at) %>
</div>
<div class="cl"></div>
2015-08-25 19:24:23 +08:00
</div>
<div class="cl"></div>
</div>
2015-12-18 16:21:27 +08:00
<% count = fetch_user_leaveWord_reply(activity).count %>
2015-09-24 16:30:14 +08:00
<div class="homepagePostReply">
<div class="topBorder" style="display: <%= count>0 ? 'none': '' %>"></div>
<div class="homepagePostReplyBanner" style="display: <%= count>0 ? '': 'none' %>">
2015-10-13 16:51:44 +08:00
<div class="homepagePostReplyBannerCount">
2015-09-24 16:30:14 +08:00
回复(<%= count %>
</div>
<div class="homepagePostReplyBannerTime"></div>
<%if count>3 %>
2015-09-24 16:30:14 +08:00
<div class="homepagePostReplyBannerMore">
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
展开更多
</a>
</div>
<% end %>
</div>
<% replies_all_i = 0 %>
<% if count > 0 %>
<div class="" id="reply_div_<%= user_activity_id %>">
<ul>
2015-12-18 16:21:27 +08:00
<% fetch_user_leaveWord_reply(activity).each do |comment| unless fetch_user_leaveWord_reply(activity).nil? %>
<script type="text/javascript">
$(function(){
showNormalImage('reply_content_<%= comment.id %>');
});
</script>
2015-09-24 16:30:14 +08:00
<% replies_all_i = replies_all_i + 1 %>
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i > 3 ? 'none' : '' %>">
2015-09-24 16:30:14 +08:00
<div class="homepagePostReplyPortrait">
<%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33", :class =>"mt8"), user_path(comment.user_id), :alt => "用户头像" %>
</div>
<div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher">
<% if comment.try(:user).try(:realname) == ' ' %>
<%= link_to comment.try(:user), user_path(comment.user_id), :class => "newsBlue mr10 f14" %>
<% else %>
<%= link_to comment.try(:user).try(:realname), user_path(comment.user_id), :class => "newsBlue mr10 f14" %>
<% end %>
<%= format_time(comment.created_on) %>
</div>
2015-10-26 15:26:05 +08:00
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
2015-12-18 16:21:27 +08:00
<%= comment.notes.html_safe %>
</div>
2015-09-24 16:30:14 +08:00
</div>
<div class="cl"></div>
</li>
2015-12-18 16:21:27 +08:00
<% end %>
2015-09-24 16:30:14 +08:00
<% end %>
</ul>
</div>
<% end %>
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer mb10">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => {:controller => 'words', :action => 'create_reply', :id => activity.id}, :method => "post", :remote => true) do |f|%>
2015-09-24 16:30:14 +08:00
<%= hidden_field_tag 'reference_id', params[:reference_id], :value => activity.id %>
<%= hidden_field_tag 'reference_user_id', params[:reference_user_id], :value => activity.user.id %>
<%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => activity.id %>
<%= hidden_field_tag 'show_name',params[:show_name],:value =>true %>
2015-09-25 16:29:47 +08:00
<%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>user_activity_id %>
2016-01-29 16:55:07 +08:00
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
2015-09-24 16:30:14 +08:00
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="user_notes"></textarea>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<div class="cl"></div>
<p nhname='contentmsg_<%= user_activity_id%>'></p>
<% end%>
</div>
<div class="cl"></div>
</div>
<div class="cl"></div>
</div>
</div>
</div>