<%= content_for :javascript do%> $(".links a").attr("href", "#"); /*jquery for assistants div*/ $(".list_assistants").livequery('click',function () { $("#assistants_lite").hide(); $("#all_assistants").hide(); $("#assistants_list").show(); return false; }); $(".more_assistants").livequery('click',function () { $("#assistants_lite").hide(); $("#assistants_list").hide(); $("#all_assistants").show(); return false; }); $(".less_assistants").livequery('click',function () { $("#all_assistants").hide(); $("#assistants_list").hide(); $("#assistants_lite").show(); return false; }); /*jquery for no-assistants div*/ $(".list_no_assistants").livequery('click',function () { $("#no_assistants_lite").hide(); $("#all_no_assistants").hide(); $("#no_assistants_list").show(); return false; }); $(".more_no_assistants").livequery('click',function () { $("#no_assistants_lite").hide(); $("#no_assistants_list").hide(); $("#all_no_assistants").show(); return false; }); $(".less_no_assistants").livequery('click',function () { $("#all_no_assistants").hide(); $("#no_assistants_list").hide(); $("#no_assistants_lite").show(); return false; }); /*jquery for no-responding div*/ $(".list_no_responding").livequery('click',function () { $("#no_responding_lite").hide(); $("#all_no_responding").hide(); $("#no_responding_list").show(); return false; }); $(".more_no_responding").livequery('click',function () { $("#no_responding_lite").hide(); $("#no_responding_list").hide(); $("#all_no_responding").show(); return false; }); $(".less_no_responding").livequery('click',function () { $("#all_no_responding").hide(); $("#no_responding_list").hide(); $("#no_responding_lite").show(); return false; }); <%end%>

<%= t('event.assistance_title') %>

<%if logged_in?%>
<%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%>
<%end%>
<%if @assistants.empty?%>
<%= t('user.assist') %>
<%=t("event.assistants_none")%>
<%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%>
>
<%= 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%>
>
<%= t('user.assist') %>
    <%for participant in @assistants%>
  • <%=link_to participant.user.name, user_path(participant.user)%>
  • <%end%>
<%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%>
>
<%= 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%>
>
<%= t('user.not_assist') %>
    <%for participant in @no_assistants%>
  • <%=link_to participant.user.name, user_path(participant.user)%>
  • <%end%>
<%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? %> <%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? %> <%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? %> <%end%>
<%end%>