This commit is contained in:
2026-05-06 20:15:52 +02:00
parent 46de804a63
commit 5891729691
8 changed files with 73 additions and 11 deletions
+3 -3
View File
@@ -27,7 +27,7 @@ ActiveAdmin.register Member do
filter :real_nick
show title: proc { |m| m.nick } do
active_admin_form_for [:admin, resource], url: admin_member_path(resource), html: { method: :put } do |f|
active_admin_form_for [ :admin, resource ], url: admin_member_path(resource), html: { method: :put } do |f|
f.inputs "Edit Member" do
f.input :nick
f.input :real_nick
@@ -35,7 +35,7 @@ ActiveAdmin.register Member do
f.input :avatar_filename,
hint: "Fallback image filename (e.g. mr.zero.png) — only used when no image is selected above."
f.input :image_id, as: :select, label: "Image",
collection: Image.order(:original_filename).map { |img| [img.original_filename, img.id] },
collection: Image.order(:original_filename).map { |img| [ img.original_filename, img.id ] },
include_blank: "— no image (use avatar_filename) —"
end
f.actions
@@ -50,7 +50,7 @@ ActiveAdmin.register Member do
f.input :avatar_filename,
hint: "Fallback image filename (e.g. mr.zero.png) — only used when no image is selected above."
f.input :image_id, as: :select, label: "Image",
collection: Image.order(:original_filename).map { |img| [img.original_filename, img.id] },
collection: Image.order(:original_filename).map { |img| [ img.original_filename, img.id ] },
include_blank: "— no image (use avatar_filename) —"
end
f.actions
+1 -1
View File
@@ -12,7 +12,7 @@ ActiveAdmin.register Release do
column :version
column :html_folder_path
column :created_at
actions only: [:show]
actions only: [ :show ]
end
filter :version
+5 -5
View File
@@ -1,8 +1,8 @@
ActiveAdmin.register Software do
permit_params :name, :title, :author, :desc, :story,
:license, :platform, :status, :highlighted, :image_id,
external_links_attributes: [:id, :label, :url, :_destroy],
releases_attributes: [:id, :_destroy]
external_links_attributes: [ :id, :label, :url, :_destroy ],
releases_attributes: [ :id, :_destroy ]
menu priority: 2
@@ -35,7 +35,7 @@ ActiveAdmin.register Software do
filter :highlighted
show title: proc { |sw| sw.title } do
active_admin_form_for [:admin, resource], url: admin_software_path(resource), html: { method: :put } do |f|
active_admin_form_for [ :admin, resource ], url: admin_software_path(resource), html: { method: :put } do |f|
f.inputs "Details" do
f.input :name
f.input :title
@@ -45,7 +45,7 @@ ActiveAdmin.register Software do
f.input :highlighted
f.input :license
f.input :image_id, as: :select, label: "Image",
collection: Image.order(:original_filename).map { |img| [img.original_filename, img.id] },
collection: Image.order(:original_filename).map { |img| [ img.original_filename, img.id ] },
include_blank: "— no image —"
f.input :desc, as: :text, input_html: { rows: 4 }
f.input :story, as: :text, input_html: { rows: 8 }
@@ -83,7 +83,7 @@ ActiveAdmin.register Software do
f.input :highlighted
f.input :license
f.input :image_id, as: :select, label: "Image",
collection: Image.order(:original_filename).map { |img| [img.original_filename, img.id] },
collection: Image.order(:original_filename).map { |img| [ img.original_filename, img.id ] },
include_blank: "— no image —"
f.input :desc, as: :text, input_html: { rows: 4 }
f.input :story, as: :text, input_html: { rows: 8 }