ozfortress/citadel

View on GitHub
app/views/forums/posts/search.html.haml

Summary

Maintainability
Test Coverage
- content_for(:title) { 'Search Posts | Forums' }

= render 'forums/head', object: nil, subheading: 'Search posts', root_navigable: true

%hr

.btn-toolbar.guttered.mb-3
  - if @user
    .card.bg-dark.px-3.py-2.m-1
      %b.text-white
        %span
          Showing posts by

        = present(@user).link

- if @posts.empty?
  = render 'forums/posts/empty'
- else
  - @posts.each do |post|
    .mb-4
      %small.font-weight-bold
        Thread: #{present(post.thread).link}

      = render post, quote_id: nil

= bootstrap_paginate @posts, list_classes: ['pagination justify-content-center mt-4']