This commit is contained in:
2026-07-29 08:20:58 +02:00
parent b8e3c64868
commit 922ceed996
5 changed files with 31 additions and 5 deletions
+12
View File
@@ -41,6 +41,18 @@ ActiveAdmin.register Software do
filter :status, as: :select, collection: %w[development demo released archived]
filter :highlighted
sidebar "Quick Links", only: :show, priority: 0 do
site_url = ENV.fetch("SITE_URL", "https://teletypegames.hu")
catalog_url = "#{site_url}/catalog/#{resource.name}"
div style: "margin-bottom:8px;" do
a href: catalog_url, target: "_blank", style: "display:inline-flex;align-items:center;gap:6px;font-weight:bold;color:#5850ec;" do
span "🌐", style: "font-size:16px;"
text_node "View on site"
end
end
end
sidebar "Download Statistics", only: :show do
sw = resource
total = Download.joins(:release).where(releases: { software_id: sw.id }).count