settings_helper.rb 345 B

1234567891011
  1. # frozen_string_literal: true
  2. module Admin::SettingsHelper
  3. def site_upload_delete_hint(hint, var)
  4. upload = SiteUpload.find_by(var: var.to_s)
  5. return hint unless upload
  6. link = link_to t('admin.site_uploads.delete'), admin_site_upload_path(upload), data: { method: :delete }
  7. safe_join([hint, link], '<br/>'.html_safe)
  8. end
  9. end