Sha256: 516bdeb8db401ac6ef1c5f9984e7bdc7437778e2c4c52805e21dbb80bbf17fe1
Contents?: true
Size: 733 Bytes
Versions: 9
Compression:
Stored size: 733 Bytes
Contents
# frozen_string_literal: true module Decidim module Budgets # This cell renders a checkmark with a text. class ProjectVotedHintCell < BaseCell 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-line", 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
9 entries across 9 versions & 1 rubygems