<%= render partial: 'topic', locals: { topic: @topic, refresh_heads_bar: @refresh_heads_bar } -%>
<% if @topic.likers_count.to_i > 0 -%>
  <%= hub_topic_likers_heads_bar(@topic) -%>
<% end -%>
<% if @topic.replies_count.to_i > 0 -%>
  <div class="topic-detail-replies">
    <% @topic.replies.each do |r| -%>
      <% next if r.new_record? -%>
      <%= render partial: 'hub/replies/reply', locals: {reply: r} %>
    <% end -%>
  </div>
<% end -%>
<div class="hub_kong"></div>
<% if @current_customer -%>
  <div class="topic-footer-bar">
    <%= form_for @reply, as: :reply, url: reply_topic_path(id: @topic.uid), remote: true do |f| %>
      <span class="reply-bar">
        <%= image_tag 'hubs/emotion.png', class: 'emotion' -%>
        <%= f.text_area :body, rows: '1', placeholder: '输入评论', autofocus: true %>
      </span>
      <%= submit_tag '发送', id: 'btn_reply', data: { disable_with: '发送中' } -%>
      <%= f.hidden_field :reply_to_customer_id, value: '', id: :reply_to %>
    <% end -%>
  </div>
<% end -%>
<%= render partial: 'topic', locals: { topic: @topic, refresh_heads_bar: @refresh_heads_bar } -%>
<% if @topic.likers_count.to_i > 0 -%>
  <%= hub_topic_likers_heads_bar(@topic) -%>
<% end -%>
<div class="topic-detail-replies">
  <% if @topic.replies_count.to_i > 0 -%>
    <% @topic.replies.each do |r| -%>
      <% next if r.new_record? -%>
      <%= render partial: 'hub/replies/reply', locals: {reply: r} %>
    <% end -%>
  <% end -%>
</div>
<div class="hub_kong"></div>
<% if @current_customer -%>
  <div class="topic-footer-bar">
    <%= form_for @reply, as: :reply, url: reply_topic_path(id: @topic.uid), remote: true do |f| %>
      <span class="reply-bar">
        <%= image_tag 'hubs/emotion.png', class: 'emotion' -%>
        <%= f.text_area :body, rows: '1', placeholder: '输入评论', autofocus: true %>
      </span>
      <%= submit_tag '发送', id: 'btn_reply', data: { disable_with: '发送中' } -%>
      <%= f.hidden_field :reply_to_customer_id, value: '', id: :reply_to %>
    <% end -%>
  </div>
<% end -%>
Fix can not append on zero replies.
Fix can not append on zero replies.
