Skip to content

Commit

Permalink
#635 fix events show
Browse files Browse the repository at this point in the history
  • Loading branch information
kalashnikovisme committed Apr 2, 2017
1 parent a6772da commit fc32e3a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/decorators/event_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,21 @@ def place_name
end

def organizer_link
if object.organizer_type == 'Member'
organizer_name = if object.organizer_type == 'Member'
h.content_tag :a, href: member_path(object.organizer.ticket) do
object.organizer.decorate.short_name
end
elsif object.organizer_type == 'User'
object.organizer.decorate.short_name
elsif object.organizer_type == 'Team'
#h.content_tag :a, href: team_path(object.organizer_id) do
object.organizer.decorate.full_title
#end
end
brackets = if object.organizer_type == 'User' && ::ActivityLines::Lider::YaLider::ParticipantEvent.where(event_id: object.id).any?
"(#{t('activerecord.models.activity_lines/lider/ya_lider/participant')})"
end
"#{organizer_name}\n#{brackets}"
end

def online_conference_title
Expand Down

0 comments on commit fc32e3a

Please sign in to comment.