Skip to content

Commit b4bd4d2

Browse files
committed
Include a Mastodon link besides the user name below post titles
We show the Mastodon URL alongside the website URL and XMPP address. This crowds the user box even more and I think LinuxFR should switch to using a proper profile page instead. This was requested by Adrien Dorsaz.
1 parent 6bf9893 commit b4bd4d2

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

app/helpers/node_helper.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ def posted_by(content, user_link='Anonyme')
111111
user_infos = []
112112
user_infos << homesite_link(user)
113113
user_infos << jabber_link(user)
114+
user_infos << mastodon_link(user)
114115
user_infos.compact!
115116
user_link += (" (" + user_infos.join(', ') + ")").html_safe if user_infos.any?
116117
end

app/helpers/users_helper.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,8 @@ def jabber_link(user)
4040
link_to("adresse XMPP", "xmpp:" + user.jabber_id)
4141
end
4242

43+
def mastodon_link(user)
44+
return if user.mastodon_url.blank?
45+
link_to("Mastodon", user.mastodon_url)
46+
end
4347
end

0 commit comments

Comments
 (0)