Sha256: 3ef2eb3ccfd1ba51500fbc96e34a04786f20c83a1c072e0e34bda5128c519ca0

Contents?: true

Size: 640 Bytes

Versions: 92

Compression:

Stored size: 640 Bytes

Contents

module Pageflow
  module Admin
    class EntryPublicationStateIndicator < ViewComponent
      builder_method :entry_publication_state_indicator

      def build(entry)
        if entry.published?
          span(class: css_class(entry)) do
            span(tooltip_text(entry), class: 'tooltip_bubble')
          end
        end
      end

      private

      def css_class(entry)
        ['publication_state_indicator', entry.publication_state] * ' '
      end

      def tooltip_text(entry)
        I18n.t(entry.publication_state,
               scope: 'activerecord.values.pageflow/entry.publication_states')
      end
    end
  end
end

Version data entries

92 entries across 92 versions & 1 rubygems

Version Path
pageflow-17.0.4 app/views/components/pageflow/admin/entry_publication_state_indicator.rb
pageflow-17.0.3 app/views/components/pageflow/admin/entry_publication_state_indicator.rb
pageflow-17.0.2 app/views/components/pageflow/admin/entry_publication_state_indicator.rb
pageflow-17.0.1 app/views/components/pageflow/admin/entry_publication_state_indicator.rb
pageflow-17.0.0 app/views/components/pageflow/admin/entry_publication_state_indicator.rb
pageflow-16.2.0 app/views/components/pageflow/admin/entry_publication_state_indicator.rb
pageflow-16.1.0 app/views/components/pageflow/admin/entry_publication_state_indicator.rb
pageflow-16.0.0 app/views/components/pageflow/admin/entry_publication_state_indicator.rb
pageflow-15.8.0 app/views/components/pageflow/admin/entry_publication_state_indicator.rb
pageflow-14.5.2 app/views/components/pageflow/admin/entry_publication_state_indicator.rb
pageflow-15.7.1 app/views/components/pageflow/admin/entry_publication_state_indicator.rb
pageflow-15.7.0 app/views/components/pageflow/admin/entry_publication_state_indicator.rb
pageflow-15.6.1 app/views/components/pageflow/admin/entry_publication_state_indicator.rb
pageflow-15.6.0 app/views/components/pageflow/admin/entry_publication_state_indicator.rb
pageflow-15.5.0 app/views/components/pageflow/admin/entry_publication_state_indicator.rb
pageflow-15.4.0 app/views/components/pageflow/admin/entry_publication_state_indicator.rb
pageflow-15.3.0 app/views/components/pageflow/admin/entry_publication_state_indicator.rb
pageflow-15.2.2 app/views/components/pageflow/admin/entry_publication_state_indicator.rb
pageflow-15.2.1 app/views/components/pageflow/admin/entry_publication_state_indicator.rb
pageflow-15.2.0 app/views/components/pageflow/admin/entry_publication_state_indicator.rb