about summary refs log tree commit diff
path: root/app/helpers
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-09-30 12:23:57 +0200
committerThibaut Girka <thib@sitedethib.com>2019-09-30 12:23:57 +0200
commit16ff7c5627c12a0c9658e9d2fac7c48002e1b788 (patch)
tree465a73fb9f42bc2b01127b2d477b0715fb6185b4 /app/helpers
parentfebcdad2e2c98aee62b55ee21bdf0debf7c6fd6b (diff)
parent3babf8464b0903b854ec16d355909444ef3ca0bc (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- Gemfile
- Gemfile.lock
- app/controllers/about_controller.rb
- app/controllers/auth/sessions_controller.rb
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/settings_helper.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/helpers/settings_helper.rb b/app/helpers/settings_helper.rb
index 2b3fd1263..ecc73baf5 100644
--- a/app/helpers/settings_helper.rb
+++ b/app/helpers/settings_helper.rb
@@ -87,4 +87,12 @@ module SettingsHelper
       'desktop'
     end
   end
+
+  def compact_account_link_to(account)
+    return if account.nil?
+
+    link_to ActivityPub::TagManager.instance.url_for(account), class: 'name-tag', title: account.acct do
+      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
 end