Sha256: 946de9ff5733409d6c44515d38f928400f111ae16326885c776e1848da9801db
Contents?: true
Size: 763 Bytes
Versions: 31
Compression:
Stored size: 763 Bytes
Contents
# frozen_string_literal: true module Decidim module Budgets # This cell renders a checkmark with a text. class ProjectVotedHintCell < BaseCell include Decidim::IconHelper delegate :voted_for?, :current_order, to: :controller def show return unless voted_for?(model) content_tag :span, safe_join(hint), class: css_class end private def hint contents = [] contents << icon("check", role: "img", "aria-hidden": true) contents << " " contents << t("decidim.budgets.projects.project.you_voted") end def css_class css = ["text-sm", "text-success"] css << options[:class] if options[:class] css.join(" ") end end end end
Version data entries
31 entries across 31 versions & 1 rubygems