Sha256: d7be154334197b724b89422ea8129d723edde850963dd84f4aeaf3855ee05d84
Contents?: true
Size: 907 Bytes
Versions: 9
Compression:
Stored size: 907 Bytes
Contents
module SimpleDiscussion::ForumPostsHelper # Override this to use avatars from other places than Gravatar def avatar_tag(email) gravatar_image_tag(email, gravatar: { size: 40 }, class: "rounded avatar") end def category_link(category) link_to category.name, simple_discussion.forum_category_forum_threads_path(category), style: "color: #{category.color}" end # Override this method to provide your own content formatting like Markdown def formatted_content(text) simple_format(text) end def forum_post_classes(forum_post) klasses = ["forum-post", "card", "mb-3"] klasses << "solved" if forum_post.solved? klasses << "original-poster" if forum_post.user == @forum_thread.user klasses end def forum_user_badge(user) if user.respond_to?(:moderator) && user.moderator? content_tag :span, "Mod", class: "badge badge-default" end end end
Version data entries
9 entries across 9 versions & 1 rubygems