links
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user