mirror of
https://github.com/manyfold3d/manyfold.git
synced 2026-10-21 19:22:18 -05:00
23 lines
426 B
Ruby
23 lines
426 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Components::ReportButton < Components::Base
|
|
def initialize(object:, path:)
|
|
@object = object
|
|
@path = path
|
|
end
|
|
|
|
def view_template
|
|
GoButton(
|
|
icon: "flag",
|
|
href: @path,
|
|
label: t("general.report", type: @object.model_name.human),
|
|
variant: "outline-warning",
|
|
nofollow: true
|
|
)
|
|
end
|
|
|
|
def render?
|
|
SiteSettings.multiuser_enabled?
|
|
end
|
|
end
|