Sha256: 8dea67a710b8350420fd3a6bc311a3a65cc1932d307cabe72d9cf8262fb7aba8

Contents?: true

Size: 925 Bytes

Versions: 3

Compression:

Stored size: 925 Bytes

Contents

<%=
  if @comment.parent.nil?
    partial = 'threads'
    extra_locals = {}
  else
    partial = 'comments'
    extra_locals = { comment: @comment.parent }
  end

  render partial: "commontator/#{partial}/show", locals: extra_locals.merge(
    user: @commontator_user,
    thread: @commontator_thread,
    page: @commontator_page,
    show_all: @commontator_show_all
  )
%>

<% if @commontator_new_comment.nil? %>
  $("#commontator-thread-<%= @commontator_thread.id %>-new-comment").hide();

  $("#commontator-thread-<%= @commontator_thread.id %>-new-comment-link").fadeIn();
<% else %>
  $("#commontator-thread-<%= @commontator_thread.id %>-new-comment").html("<%= escape_javascript(
    render partial: 'form', locals: {
      comment: @commontator_new_comment, thread: @commontator_thread
    }
  ) %>");
<% end %>

$("#commontator-comment-<%= @comment.id %>").hide().fadeIn()[0].scrollIntoView();

<%= javascript_proc %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
commontator-6.0.1 app/views/commontator/comments/create.js.erb
commontator-6.0.0 app/views/commontator/comments/create.js.erb
commontator-6.0.0.pre.2 app/views/commontator/comments/create.js.erb