<%if @event.participants.map(&:user).include?(current_user)%>
<%= t('event.will_attend') %>
<%if get_user_state(@event,current_user) %>
<%=link_to ("").html_safe, space_event_participant_path(@space,@event,get_participant(@event,current_user),:participant => {:attend => false}),:method => :put, :class => "participant" %>
<%else%>
<%=link_to ("").html_safe, space_event_participant_path(@space,@event,get_participant(@event,current_user),:participant => {:attend => true}),:method => :put, :class => "participant" %>
<%end%>
<%else%>
<%if @space.authorize?([:read, :content], :to => current_user) && logged_in? && !@event.past?%>
<%= t('event.will_attend') %>
<%=link_to ("").html_safe, space_event_participants_path(@space,@event,:participant => {:attend => true}),:method => :post, :class => "participant" %>
<%=link_to ("").html_safe, space_event_participants_path(@space,@event,:participant => {:attend => false}),:method => :post, :class => "participant" %>
<%end%>
<%end%>
<%if @assistants.empty?%>
<%= t('user.assist') %>
<%end%>
<%unless @assistants.empty?%>
>
<%= t('user.assist') %>
<%for participant in @assistants.first(12)%>
<%=link_to logo(participant.user, {:size=>32, :title=> participant.user.name }).html_safe, user_path(participant.user)%>
<%end%>
<%=link_to t('show_list_version_arrows'), space_event_path(@space,@event, :list_assistants => true),:class => "list_assistants"%>
<%=link_to t('more_arrows'), space_event_path(@space,@event, :all_assistants => true),:class => "more_assistants" if @assistants.size > 6%>
>
<%= t('user.assist') %>
<%for participant in @assistants%>
<%=link_to logo(participant.user, {:size=>32, :title=> participant.user.name }).html_safe, user_path(participant.user)%>
<%end%>
<%=link_to t('show_list_version_arrows'), space_event_path(@space,@event, :list_assistants => true),:class => "list_assistants"%>
<%=link_to t('collapse_arrows'), space_event_path(@space,@event), :class => "less_assistants"%>
>
<%= t('user.assist') %>
<%for participant in @assistants%>
- <%=link_to participant.user.name, user_path(participant.user)%>
<%end%>
<%=link_to t('photos_view_arrows'), space_event_path(@space,@event), :class => "less_assistants"%>
<%end%>
<%unless @no_assistants.empty?%>
>
<%= t('user.not_assist') %>
<%for participant in @no_assistants.first(12)%>
<%if participant.user%>
<%=link_to logo(participant.user, {:size=>32, :title=> participant.user.name }).html_safe, user_path(participant.user)%>
<%else%>
<%=image_tag("avatars/undefined.png", :title=> participant.email )%>
<%end%>
<%end%>
<%=link_to t('show_list_version_arrows'), space_event_path(@space,@event, :list_no_assistants => true), :class => "list_no_assistants"%>
<%=link_to t('more_arrows'), space_event_path(@space,@event, :all_no_assistants => true), :class => "more_no_assistants" if @no_assistants.size > 6%>
>
<%= t('user.not_assist') %>
<%for participant in @assistants%>
<%=link_to logo(participant.user, {:size=>32, :title=> participant.user.name }).html_safe, user_path(participant.user)%>
<%end%>
<%=link_to t('show_list_version_arrows'), space_event_path(@space,@event, :list_no_assistants => true), :class => "list_no_assistants"%>
<%=link_to t('collapse_arrows'), space_event_path(@space,@event), :class => "less_no_assistants"%>
>
<%= t('user.not_assist') %>
<%for participant in @no_assistants%>
- <%=link_to participant.user.name, user_path(participant.user)%>
<%end%>
<%=link_to t('photos_view_arrows'), space_event_path(@space,@event), :class => "less_no_assistants"%>
<%end%>
<%if current_user.superuser? or @space.role_for?(current_user, :name => 'Admin') or @event.authorize?([:update], :to=>current_user) %>
>
<%if !@not_responding_candidates.empty? or !@not_responding_emails.empty? %>
<%= t('user.not_confirmed') %>
<%end%>
<%if !@not_responding_candidates.empty?%>
<%for event_inv in @not_responding_candidates.first(6)%>
<%=link_to logo(event_inv.candidate, {:size=>32, :title=> event_inv.candidate.name }).html_safe, user_path(event_inv.candidate)%>
<%end%>
<%end%>
<%if !@not_responding_emails.empty? and @not_responding_candidates.size < 5 %>
<%for event_inv in @not_responding_emails.first(6 -@not_responding_candidates.size) %>
<%=image_tag("avatars/undefined.png", :title=> event_inv.email )%>
<%end%>
<%end%>
<%if !@not_responding_candidates.empty? or !@not_responding_emails.empty? %>
<%=link_to t('show_list_version_arrows'), space_event_path(@space,@event, :list_no_responding => true), :class => "list_no_responding"%>
<%=link_to t('more_arrows'), space_event_path(@space,@event, :all_no_responding => true), :class => "more_no_responding" if (@not_responding_candidates.size + @not_responding_emails.size) > 6%>
<%end%>
>
<%if !@not_responding_candidates.empty? or !@not_responding_emails.empty? %>
<%= t('user.not_confirmed') %>
<%end%>
<%if !@not_responding_candidates.empty?%>
<%for event_inv in @not_responding_candidates%>
<%=link_to logo(event_inv.candidate, {:size=>32, :title=> event_inv.candidate.name }).html_safe, user_path(event_inv.candidate)%>
<%end%>
<%end%>
<%if !@not_responding_emails.empty?%>
<%for event_inv in @not_responding_emails%>
<%=image_tag("avatars/undefined.png", :title=> event_inv.email )%>
<%end%>
<%end%>
<%if !@not_responding_candidates.empty? or !@not_responding_emails.empty? %>
<%=link_to t('show_list_version_arrows'), space_event_path(@space,@event, :list_no_responding => true), :class => "list_no_responding"%>
<%=link_to t('more_arrows'), space_event_path(@space,@event), :class => "less_no_responding"%>
<%end%>
>
<%if !@not_responding_candidates.empty? or !@not_responding_emails.empty? %>
<%= t('user.not_confirmed') %>
<%end%>
<%if !@not_responding_candidates.empty?%>
<%for event_inv in @not_responding_candidates%>
- <%=link_to event_inv.candidate.name, user_path(event_inv.candidate)%>
<%end%>
<%end%>
<%if !@not_responding_emails.empty?%>
<%for event_inv in @not_responding_emails%>
- <%=event_inv.email%>
<%end%>
<%end%>
<%if !@not_responding_candidates.empty? or !@not_responding_emails.empty? %>
<%=link_to t('photos_view_arrows'), space_event_path(@space,@event) , :class => "less_no_responding"%>
<%end%>
<%end%>