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
|
||||
|
||||
@@ -11,4 +11,16 @@ ActiveAdmin.setup do |config|
|
||||
config.filter_attributes = [:password, :password_confirmation, :current_password, :encrypted_password]
|
||||
|
||||
config.localize_format = :long
|
||||
|
||||
config.namespace :admin do |admin|
|
||||
admin.build_menu :utility_navigation do |menu|
|
||||
menu.add id: "site_link",
|
||||
label: "🏠",
|
||||
url: "/",
|
||||
html_options: { target: "_blank", title: "Open site", style: "font-size:18px;" },
|
||||
priority: 1
|
||||
|
||||
admin.add_logout_button_to_menu menu
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -145,6 +145,7 @@ export default {
|
||||
loading: 'Loading...',
|
||||
play: '▶ Play',
|
||||
downloads: 'downloads',
|
||||
links: 'Links',
|
||||
},
|
||||
team: {
|
||||
title: 'Our Team',
|
||||
|
||||
@@ -145,6 +145,7 @@ export default {
|
||||
loading: 'Betöltés...',
|
||||
play: '▶ Játék',
|
||||
downloads: 'letöltés',
|
||||
links: 'Linkek',
|
||||
},
|
||||
team: {
|
||||
title: 'Csapatunk',
|
||||
|
||||
@@ -63,11 +63,11 @@
|
||||
<dt class="text-xs font-bold text-gray-400 uppercase tracking-widest mb-1">{{ t('catalogShow.license') }}</dt>
|
||||
<dd class="text-gray-900 font-medium">{{ software.license }}</dd>
|
||||
</div>
|
||||
<div v-for="link in software.externalLinks" :key="link.url">
|
||||
<dt class="text-xs font-bold text-gray-400 uppercase tracking-widest mb-1">{{ link.label }}</dt>
|
||||
<dd>
|
||||
<a :href="link.url" target="_blank" class="text-purple-600 hover:text-purple-800 font-bold break-all">
|
||||
{{ link.url }} ↗
|
||||
<div v-if="software.externalLinks?.length">
|
||||
<dt class="text-xs font-bold text-gray-400 uppercase tracking-widest mb-1">{{ t('catalogShow.links') }}</dt>
|
||||
<dd class="flex flex-col gap-1.5">
|
||||
<a v-for="link in software.externalLinks" :key="link.url" :href="link.url" target="_blank" class="text-purple-600 hover:text-purple-800 font-bold inline-flex items-center gap-1">
|
||||
{{ link.label }} <span class="text-xs">↗</span>
|
||||
</a>
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user