about summary refs log tree commit diff
path: root/app/helpers
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2020-04-20 16:45:40 +0200
committerThibaut Girka <thib@sitedethib.com>2020-04-20 16:45:40 +0200
commit63dc7cfa904d83b92151597aa745963996a9c926 (patch)
tree1cf2d3225374c6d8f55bcf1c36f0b4ce5aee0911 /app/helpers
parentd5530827c984238f93100ee737ed209d61e316c0 (diff)
parentf2cf91277119c63044bdd45e599f37dc829b6eb2 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/settings_helper.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/helpers/settings_helper.rb b/app/helpers/settings_helper.rb
index 825aa974d..74544bad9 100644
--- a/app/helpers/settings_helper.rb
+++ b/app/helpers/settings_helper.rb
@@ -105,4 +105,13 @@ module SettingsHelper
       safe_join([image_tag(account.avatar.url, width: 15, height: 15, alt: display_name(account), class: 'avatar'), content_tag(:span, account.acct, class: 'username')], ' ')
     end
   end
+
+  def picture_hint(hint, picture)
+    if picture.original_filename.nil?
+      hint
+    else
+      link = link_to t('generic.delete'), settings_profile_picture_path(picture.name.to_s), data: { method: :delete }
+      safe_join([hint, link], '<br/>'.html_safe)
+    end
+  end
 end