50 lines
3.9 KiB
Plaintext
50 lines
3.9 KiB
Plaintext
<% if @type == 'Message' %>
|
|
<% if @user_activity_id.to_i != @root.id %>
|
|
<% if @is_project %>
|
|
$("#activity_post_reply_<%= @user_activity_id%>").html("<%= escape_javascript(render :partial => 'projects/project_message_post_reply', :locals => {:activity => @root,:user_activity_id =>@user_activity_id}) %>");
|
|
<% elsif @org_subfield %>
|
|
$("#activity_post_reply_<%= @user_activity_id%>").html("<%= escape_javascript(render :partial => 'organizations/org_message_post_reply', :locals => {:activity => @root,:user_activity_id =>@user_activity_id}) %>");
|
|
<% else %>
|
|
$("#activity_post_reply_<%= @user_activity_id%>").html("<%= escape_javascript(render :partial => 'users/course_message_post_reply', :locals => {:activity => @root,:user_activity_id =>@user_activity_id}) %>");
|
|
<% end %>
|
|
<% else %>
|
|
window.location.href = "<%=board_message_path(@root.board_id, @root) %>";
|
|
<% end %>
|
|
<% elsif @type == 'HomeworkCommon' %>
|
|
$("#homework_post_reply_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/homework_post_reply', :locals => {:activity => @root, :user_activity_id => @user_activity_id, :is_teacher => @is_teacher}) %>");
|
|
<% elsif @type == 'BlogComment' %>
|
|
<% if @user_activity_id.to_i != @root.id %>
|
|
$("#activity_post_reply_<%= @user_activity_id%>").html("<%= escape_javascript(render :partial => 'users/user_blog_post_reply', :locals => {:activity => @root,:user_activity_id =>@user_activity_id}) %>");
|
|
<% else %>
|
|
window.location.href = "<%=user_blog_blog_comment_path(:user_id => @root.author_id,:blog_id=>@root.blog_id,:id=>@root.id) %>";
|
|
<% end %>
|
|
<% elsif @type == 'News' || params[:type] == 'Comment' %>
|
|
<% if @user_activity_id.to_i != @root.id %>
|
|
$("#activity_post_reply_<%= @user_activity_id %>").html("<%= escape_javascript(render :partial => 'users/course_news_post_reply', :locals => {:activity => @root,:user_activity_id =>@user_activity_id}) %>");
|
|
<% else %>
|
|
window.location.href = "<%=news_path(@root) %>";
|
|
<% end %>
|
|
<% elsif @type == 'JournalsForMessage' %>
|
|
$("#activity_post_reply_<%= @user_activity_id%>").html("<%= escape_javascript(render :partial => 'users/user_journal_post_reply', :locals => {:activity => @root,:user_activity_id =>@user_activity_id}) %>");
|
|
<% elsif @type == 'Issue' || params[:type] == 'Journal' %>
|
|
<% if @user_activity_id.to_i != @root.id %>
|
|
<% if @is_project %>
|
|
$("#div_user_issue_reply_<%=@user_activity_id%>").html("<%= escape_javascript(render :partial => 'projects/project_issue_reply', :locals => {:activity => @root, :user_activity_id => @user_activity_id}) %>");
|
|
<% else %>
|
|
$("#div_user_issue_reply_<%=@user_activity_id%>").html("<%= escape_javascript(render :partial => 'users/project_issue_reply', :locals => {:activity => @root, :user_activity_id => @user_activity_id}) %>");
|
|
<% end %>
|
|
<% else %>
|
|
window.location.href = "<%=issue_path(@root) %>";
|
|
<% end %>
|
|
<% elsif @type == 'OrgDocumentComment' %>
|
|
<% if @user_activity_id.to_i != @root.id %>
|
|
$("#activity_post_reply_<%= @user_activity_id %>").html("<%= escape_javascript(render :partial => 'organizations/org_document_post_reply', :locals => {:activity => @root, :user_activity_id => @user_activity_id}) %>");
|
|
<% else %>
|
|
window.location.href = "<%=org_document_comment_path(:id => @root.id, :organization_id => @root.organization.id) %>";
|
|
<% end %>
|
|
<% elsif @type == 'Syllabus' %>
|
|
$("#activity_post_reply_<%= @user_activity_id %>").html("<%= escape_javascript(render :partial => 'syllabuses/syllabus_post_reply', :locals => {:activity => @root, :user_activity_id => @user_activity_id}) %>");
|
|
<% elsif @type == 'Memo' %>
|
|
window.location.href = "<%=forum_memo_path(@root.forum_id, @root) %>";
|
|
<% end %>
|
|
sd_create_editor_from_data(<%= @user_activity_id%>,"","100%", "UserActivity"); |