Sha256: 529d6fa958a107fcb59db4df6124f6b68224028bd43fd13a8f6a5c1aa2daa960

Contents?: true

Size: 769 Bytes

Versions: 3

Compression:

Stored size: 769 Bytes

Contents

module SocialStream
  module ToolbarConfig
    module Events
      def profile_toolbar_items(subject = current_subject)
        items = super

        items.find{ |i| i[:key] == :resources }[:items].unshift({
          :key => :resources_events,
          :name => image_tag("btn/btn_event.png")+t('conference.title'),
          :url => polymorphic_path([subject, Event.new])
        })

        if SocialStream.activity_forms.include?(:event) &&
           subject.is_a?(Event) &&
           subject.agenda.present?

           items.insert(1, {
             :key => :outline_info,
             :name => image_tag("btn/btn_outline.png")+t('menu.outline'),
             :url =>  agenda_path(subject)
           })
        end

        items
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
social_stream-0.12.0 events/lib/social_stream/toolbar_config/events.rb
social_stream-0.11.8 events/lib/social_stream/toolbar_config/events.rb
social_stream-events-0.0.15 lib/social_stream/toolbar_config/events.rb