Sha256: 6b4d3eb8b115e265822cf422b901906aa6781c0ef1b3ac25eeecb3a933c70458

Contents?: true

Size: 1.94 KB

Versions: 11

Compression:

Stored size: 1.94 KB

Contents

.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{ id: 'pagination' }
          = 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
      )

    $('body').scrollTo('#pagination')

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
my_forum-0.0.1.beta43 app/views/my_forum/topics/show.haml
my_forum-0.0.1.beta42 app/views/my_forum/topics/show.haml
my_forum-0.0.1.beta41 app/views/my_forum/topics/show.haml
my_forum-0.0.1.beta40 app/views/my_forum/topics/show.haml
my_forum-0.0.1.beta39 app/views/my_forum/topics/show.haml
my_forum-0.0.1.beta38 app/views/my_forum/topics/show.haml
my_forum-0.0.1.beta37 app/views/my_forum/topics/show.haml
my_forum-0.0.1.beta36 app/views/my_forum/topics/show.haml
my_forum-0.0.1.beta35 app/views/my_forum/topics/show.haml
my_forum-0.0.1.beta34 app/views/my_forum/topics/show.haml
my_forum-0.0.1.beta33 app/views/my_forum/topics/show.haml