censor_bear 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 995b08638f4f34912cf688f3e0bf2ca6989766119595d8bd84ae98c9daf85409
|
|
4
|
+
data.tar.gz: f7be07a68fe5aeefe1ef4f9da1cbc589fca9a42d110e7ba992d5b5a75038eee1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b0e1a136b46f06f977b400925cfa351ac2aa10f9ca546662cc5f9d5c6c69089b4b38f456b72aa76aec0dbe8f8affcbdd48dcf29a49db6f43fc05f3d3375ae164
|
|
7
|
+
data.tar.gz: 67abd4a402d55b81ae48e8942ecbef814c30f56f02f2da97c287ad5cacc7b612078461b3919f429d8e700d9ef56fa317882abec4aa9b71e8985c5e2b10016b7a
|
|
@@ -7,7 +7,6 @@ module CensorBear
|
|
|
7
7
|
# GET /mod_logs
|
|
8
8
|
def index
|
|
9
9
|
load_mod_logs
|
|
10
|
-
@mod_logs = ModLog.pending.all
|
|
11
10
|
end
|
|
12
11
|
|
|
13
12
|
# GET /mod_logs/1
|
|
@@ -85,7 +84,7 @@ module CensorBear
|
|
|
85
84
|
|
|
86
85
|
builder = builder.order(id: :desc)
|
|
87
86
|
|
|
88
|
-
@pagy, @
|
|
87
|
+
@pagy, @mod_logs = pagy(builder)
|
|
89
88
|
end
|
|
90
89
|
|
|
91
90
|
private
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
%div{class: "flex flex-col space-y-2 justify-center"}
|
|
2
2
|
%div{class: "flex justify-between"}
|
|
3
3
|
%div
|
|
4
|
-
= form_with(url:
|
|
4
|
+
= form_with(url: logs_path, method: :get, class: "flex items-center") do |f|
|
|
5
5
|
%div{class: "space-x-0.5"}
|
|
6
6
|
= f.text_field :q, value: params[:q], placeholder: "关键词", class: "border rounded-md m py-0.5 px-1"
|
|
7
7
|
= f.submit "检索", class: "rounded-md px-2 py-1 text-sm bg-black text-white cursor-pointer"
|
|
8
|
-
= link_to "重置",
|
|
8
|
+
= link_to "重置", logs_path, class: "text-sm"
|
|
9
9
|
|
|
10
10
|
%div="共 #{@pagy.count} 条"
|
|
11
11
|
%div
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
%div{class: "flex flex-col space-y-2 justify-center"}
|
|
2
2
|
%div{class: "flex justify-between"}
|
|
3
3
|
%div
|
|
4
|
-
= form_with(url:
|
|
4
|
+
= form_with(url: mod_logs_path, method: :get, class: "flex items-center") do |f|
|
|
5
5
|
%div{class: "space-x-0.5"}
|
|
6
6
|
= f.text_field :q, value: params[:q], placeholder: "关键词", class: "border rounded-md m py-0.5 px-1"
|
|
7
7
|
= f.submit "检索", class: "rounded-md px-2 py-1 text-sm bg-black text-white cursor-pointer"
|
|
8
|
-
= link_to "重置",
|
|
8
|
+
= link_to "重置", mod_logs_path, class: "text-sm"
|
|
9
9
|
|
|
10
10
|
%div="共 #{@pagy.count} 条"
|
|
11
11
|
%div
|
|
12
|
-
- if @
|
|
12
|
+
- if @mod_logs.blank?
|
|
13
13
|
%div{class: "flex justify-center text-gray-500 p-8 border rounded-md"} 空空如也
|
|
14
14
|
- else
|
|
15
|
-
- @
|
|
15
|
+
- @mod_logs.each do |log|
|
|
16
16
|
= render log
|
|
17
17
|
%div{class: "flex justify-center"}
|
|
18
18
|
= raw pagy_nav(@pagy)
|
data/lib/censor_bear/version.rb
CHANGED