Add admin area

This commit is contained in:
2023-05-06 17:11:54 +10:00
parent 08943a3f93
commit c4bd903e74
21 changed files with 258 additions and 5 deletions

View File

@@ -0,0 +1,7 @@
module Admin
module Views
class Index < Admin::View
end
end
end

View File

@@ -0,0 +1,22 @@
module Admin
module Views
module Tags
class Index < Admin::View
include Deps["repos.tag_repo"]
expose :tags do
tag_repo.list.to_a
end
expose :unused_tags do |tags|
tags.partition {|t| t.posts.count == 0}.first
end
expose :used_tags do |tags|
tags.partition {|t| t.posts.count == 0}.last
end
end
end
end
end