Sha256: 3aeda8e56ac53a0b87821c9cf79b53938261542f52903fdbedf36c02df7db133
Contents?: true
Size: 1.04 KB
Versions: 15
Compression:
Stored size: 1.04 KB
Contents
# frozen_string_literal: true module Decidim # A Helper to find and render the author of a version. module TraceabilityHelper include Decidim::SanitizeHelper include Decidim::ApplicationHelper # 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) cell "decidim/version_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) cell "decidim/version_author", present(Decidim.traceability.version_editor(version)), context_actions: [:date], layout: :compact, has_actions: true, from: version end end end
Version data entries
15 entries across 15 versions & 1 rubygems