留言页面的动态内容不生成链接,留言回复的样式更改
This commit is contained in:
parent
c4a264f8a6
commit
3de8687440
|
@ -76,6 +76,7 @@ class WordsController < ApplicationController
|
||||||
@reply_type = params[:reply_type]
|
@reply_type = params[:reply_type]
|
||||||
@user_activity_id = params[:user_activity_id]
|
@user_activity_id = params[:user_activity_id]
|
||||||
@activity = JournalsForMessage.find(parent_id)
|
@activity = JournalsForMessage.find(parent_id)
|
||||||
|
@is_activity = params[:is_activity]
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -111,7 +111,7 @@
|
||||||
<% case user_activity.act_type.to_s %>
|
<% case user_activity.act_type.to_s %>
|
||||||
<% when 'JournalsForMessage' %>
|
<% when 'JournalsForMessage' %>
|
||||||
<% unless act.private == 1 && (!User.current || (User.current && act.jour_id != User.current.id && act.user_id != User.current.id)) %>
|
<% unless act.private == 1 && (!User.current || (User.current && act.jour_id != User.current.id && act.user_id != User.current.id)) %>
|
||||||
<%= render :partial => 'user_journalsformessage', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
|
<%= render :partial => 'user_journalsformessage', :locals => {:activity => act,:user_activity_id =>user_activity.id,:is_activity=>true} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -16,13 +16,22 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostTitle break_word list_style upload_img">
|
<% if is_activity %>
|
||||||
<% if activity.parent %>
|
<div class="homepagePostTitle break_word list_style upload_img">
|
||||||
<%= link_to activity.parent.notes.html_safe, feedback_path(activity.jour, :host=> Setting.host_user), :class => "postGrey" %>
|
<% if activity.parent %>
|
||||||
<% else %>
|
<%= link_to activity.parent.notes.html_safe, feedback_path(activity.jour, :host=> Setting.host_user), :class => "postGrey" %>
|
||||||
<%= link_to activity.notes.html_safe, feedback_path(activity.jour, :host=> Setting.host_user), :class => "postGrey" %>
|
<% else %>
|
||||||
<% end %>
|
<%= link_to activity.notes.html_safe, feedback_path(activity.jour, :host=> Setting.host_user), :class => "postGrey" %>
|
||||||
</div>
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<% else %>
|
||||||
|
<% if activity.parent %>
|
||||||
|
<% content = activity.parent.notes %>
|
||||||
|
<% else %>
|
||||||
|
<% content = activity.notes %>
|
||||||
|
<% end %>
|
||||||
|
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>content} %>
|
||||||
|
<% end %>
|
||||||
<div class="homepagePostDate fl">
|
<div class="homepagePostDate fl">
|
||||||
留言时间:<%= format_time(activity.created_on) %>
|
留言时间:<%= format_time(activity.created_on) %>
|
||||||
</div>
|
</div>
|
||||||
|
@ -85,10 +94,10 @@
|
||||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= user_activity_id %>">
|
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= user_activity_id %>">
|
||||||
<%= comment.notes.html_safe %>
|
<%= comment.notes.html_safe %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</li>
|
</li>
|
||||||
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -104,6 +113,7 @@
|
||||||
<%= hidden_field_tag 'show_name',params[:show_name],:value =>true %>
|
<%= hidden_field_tag 'show_name',params[:show_name],:value =>true %>
|
||||||
<%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>user_activity_id %>
|
<%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>user_activity_id %>
|
||||||
<%= hidden_field_tag 'reply_type',params[:reply_type],:value =>'user' %>
|
<%= hidden_field_tag 'reply_type',params[:reply_type],:value =>'user' %>
|
||||||
|
<%= hidden_field_tag 'is_activity',params[:is_activity],:value =>is_activity %>
|
||||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="user_notes"></textarea>
|
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="user_notes"></textarea>
|
||||||
<div nhname='toolbar_container_<%= user_activity_id%>' style="float:left;padding-top:3px; margin-left: 5px;"></div>
|
<div nhname='toolbar_container_<%= user_activity_id%>' style="float:left;padding-top:3px; margin-left: 5px;"></div>
|
||||||
<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>
|
<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>
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
init_activity_KindEditor_data(<%= jour.id%>, null, "87%", "<%=jour.class.to_s%>");
|
init_activity_KindEditor_data(<%= jour.id%>, null, "87%", "<%=jour.class.to_s%>");
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<%= render :partial => 'user_journalsformessage', :locals => {:activity => jour,:user_activity_id =>jour.id} %>
|
<%= render :partial => 'user_journalsformessage', :locals => {:activity => jour,:user_activity_id =>jour.id,:is_activity=>false} %>
|
||||||
<%#= render :partial => 'user_jours_new', :locals => {:jour => jour} %>
|
<%#= render :partial => 'user_jours_new', :locals => {:jour => jour} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%end%>
|
<%end%>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<% if @save_succ %>
|
<% if @save_succ %>
|
||||||
<% if @user_activity_id %>
|
<% if @user_activity_id %>
|
||||||
<% if @reply_type == 'user' %>
|
<% if @reply_type == 'user' %>
|
||||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id}) %>");
|
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id,:is_activity=>@is_activity}) %>");
|
||||||
<% else %>
|
<% else %>
|
||||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id}) %>");
|
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id,:is_activity=>@is_activity}) %>");
|
||||||
<% end %>
|
<% end %>
|
||||||
init_activity_KindEditor_data('<%= @user_activity_id%>', "", "87%", "UserActivity");
|
init_activity_KindEditor_data('<%= @user_activity_id%>', "", "87%", "UserActivity");
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|
Loading…
Reference in New Issue