Sha256: 608d1476433794788987a69ac8ed7b020217c5af943867d01a4d0f02f57071bf
Contents?: true
Size: 1.07 KB
Versions: 7
Compression:
Stored size: 1.07 KB
Contents
# frozen_string_literal: true module Decidim # A Helper to find and render the author of a version. module TraceabilityHelper include Decidim::SanitizeHelper # Renders the avatar and author name of the author of the last version of the given # resource. # # resource - an object implementing `Decidim::Traceable` # # Returns an HTML-safe String representing the HTML to render the author. def render_resource_last_editor(resource) render partial: "decidim/shared/version_author", locals: { author: Decidim.traceability.last_editor(resource) } end # Renders the avatar and author name of the author of the given version. # # version - an object that responds to `whodunnit` and returns a String. # # Returns an HTML-safe String representing the HTML to render the author. def render_resource_editor(version) render partial: "decidim/shared/version_author", locals: { author: Decidim.traceability.version_editor(version) } end end end
Version data entries
7 entries across 7 versions & 1 rubygems