From dd9b9ac1c2f032e02757e7e4fa4aa588234933d4 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Fri, 13 Oct 2023 13:02:27 -0400 Subject: Admin comment page pagination --- app/assets/stylesheets/admin/dashboard.scss | 39 +++++++++++++++++++++++++++++ app/views/admin/comments/index.html.haml | 2 ++ 2 files changed, 41 insertions(+) diff --git a/app/assets/stylesheets/admin/dashboard.scss b/app/assets/stylesheets/admin/dashboard.scss index c75b95a..60c257a 100644 --- a/app/assets/stylesheets/admin/dashboard.scss +++ b/app/assets/stylesheets/admin/dashboard.scss @@ -1,3 +1,42 @@ // Place all the styles related to the Admin::Dashboard controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ + +.pagination { + background: #f1f1f1; + border: 1px solid #e5e5e5; + text-align: center; + padding: 1em; + cursor: default; + + a, span { + padding: 0.2em 0.3em; + } + + .disabled { + color: #aaaaaa; + } + + .current { + font-style: normal; + font-weight: bold; + background-color: #bebebe; + display: inline-block; + width: 1.4em; + height: 1.4em; + line-height: 1.5; + -moz-border-radius: 1em; + -webkit-border-radius: 1em; + border-radius: 1em; + text-shadow: rgba(255, 255, 255, 0.8) 1px 1px 1px; + } + + a { + text-decoration: none; + color: black; + + &:hover, &:focus { + text-decoration: underline; + } + } +} diff --git a/app/views/admin/comments/index.html.haml b/app/views/admin/comments/index.html.haml index 7b25c05..8cfa0bb 100644 --- a/app/views/admin/comments/index.html.haml +++ b/app/views/admin/comments/index.html.haml @@ -1,4 +1,5 @@ - title "Comments" += will_paginate @comments %table#entries %tr %th Text @@ -21,3 +22,4 @@ %ul.admin-actions %li= link_to "View", blog_url(comment.blog, anchor: "comment-#{comment.id}") %li= link_to "Delete", admin_comment_url(comment), method: :delete, data: { confirm: "Are you sure?" } += will_paginate @comments -- cgit 1.4.1