.container-fluid .row .col-md-12 #topic_header = render 'topic_header', topic: @topic .row .col-md-12 #posts .row .col-md-12.topic_posts_info =t('.messages_in_topic', count: @topic.posts.count) .row.post-list-container .box = render partial: 'post', collection: @topic_posts .row = will_paginate @topic_posts - if is_admin? .row - options = { method: :patch, data: { confirm: t('.are_you_sure?') } } - @topic.pinned? ? options.merge!(class: 'btn btn-sm btn-info') : options.merge!(class: 'btn btn-sm btn-warning') = link_to (@topic.pinned? ? t('.unpin_topic') : t('.pin_topic')), forum_topic_pin_path(@topic.forum, @topic), options - @topic.closed? ? options.merge!(class: 'btn btn-sm btn-info') : options.merge!(class: 'btn btn-sm btn-danger') = link_to (@topic.closed? ? t('.unlock_topic') : t('.lock_topic')), forum_topic_close_path(@topic.forum, @topic), options - options.merge!(class: 'btn btn-sm btn-danger') = link_to t('.delete_topic'), forum_topic_delete_path(@topic.forum, @topic), options - if can_quick_answer?(@topic) #quick_answer - if @topic.closed? .alert.alert-danger=t('.warning_closed_topic') = render 'quick_answer', forum: @forum, topic: @topic :coffee $(document).on 'ready page:load', -> $('.user_profile_popover').popover( trigger: 'click' html: true delay: 'show': 100 'hide': 200 ).on('mouseenter', -> _this = this $(this).popover("show") $(this).siblings(".popover").on('mouseleave', -> $(_this).popover('hide') ) ) .on('mouseleave', -> _this = this setTimeout (-> $(_this).popover("hide") if !$(".popover:hover").length ), 300 ) container = $('body') scroll_to = $('post_number_' + "#{params[:show_post]}") scroll_to = 'post_number_' + "#{params[:show_post]}" $('body').scrollTo(scroll_to)