Sha256: a15146734c5e3b028fc9e1efceeab7a72a4714b3b0b3cf19b5abc8f066e0caa1

Contents?: true

Size: 643 Bytes

Versions: 27

Compression:

Stored size: 643 Bytes

Contents

module Pageflow
  module Admin
    class EntryUserBadgeList < ViewComponent
      builder_method :entry_user_badge_list

      def build(entry)
        ul :class => 'user_badge_list' do
          entry.users.each do |user|
            build_badge(user)
          end
        end
      end

      private

      def build_badge(user)
        li do
          span(user_initials(user), :class => 'initials')
          div :class => 'tooltip' do
            link_to(user.full_name, admin_user_path(user))
          end
        end
      end

      def user_initials(user)
        user.first_name[0] + user.last_name[0]
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
pageflow-0.11.4 app/views/components/pageflow/admin/entry_user_badge_list.rb
pageflow-0.11.3 app/views/components/pageflow/admin/entry_user_badge_list.rb
pageflow-0.11.2 app/views/components/pageflow/admin/entry_user_badge_list.rb
pageflow-0.11.1 app/views/components/pageflow/admin/entry_user_badge_list.rb
pageflow-0.11.0 app/views/components/pageflow/admin/entry_user_badge_list.rb
pageflow-0.10.0 app/views/components/pageflow/admin/entry_user_badge_list.rb
pageflow-0.9.2 app/views/components/pageflow/admin/entry_user_badge_list.rb
pageflow-0.9.1 app/views/components/pageflow/admin/entry_user_badge_list.rb
pageflow-0.9.0 app/views/components/pageflow/admin/entry_user_badge_list.rb
pageflow-0.8.2 app/views/components/pageflow/admin/entry_user_badge_list.rb
pageflow-0.8.1 app/views/components/pageflow/admin/entry_user_badge_list.rb
pageflow-0.8.0 app/views/components/pageflow/admin/entry_user_badge_list.rb
pageflow-0.7.2 app/views/components/pageflow/admin/entry_user_badge_list.rb
pageflow-0.7.1 app/views/components/pageflow/admin/entry_user_badge_list.rb
pageflow-0.7.0 app/views/components/pageflow/admin/entry_user_badge_list.rb
pageflow-0.6.0 app/views/components/pageflow/admin/entry_user_badge_list.rb
pageflow-0.5.0 app/views/components/pageflow/admin/entry_user_badge_list.rb
pageflow-0.4.0 app/views/components/pageflow/admin/entry_user_badge_list.rb
pageflow-0.3.0 app/views/components/pageflow/admin/entry_user_badge_list.rb
pageflow-0.2.1 app/views/components/pageflow/admin/entry_user_badge_list.rb