
.m_event
  -img = ""
  -if @organisateur
    -img = m_event.circuit.logo.file.large.medium.url if m_event.circuit and m_event.circuit.logo
  -else
    -img = m_event.organisateur.logo.file.large.medium.url if m_event.organisateur and m_event.organisateur.logo
    
  
  =image_tag img, :class => "vertical_center"
  .desc
    .head
      %h3
        =link_to m_event.m_event_type_title, public_m_events_path(:search => {:m_event_type_title => [m_event.m_event_type_title]})
        ="-"
        =link_to m_event.circuit.name, public_m_events_path(:search => {:circuit_id => m_event.circuit.id})
        
      %span.date
        -if m_event.start_at.to_date == m_event.end_at.to_date
          le
          =l m_event.start_at, :format => :date
        -else
          du
          =l m_event.start_at, :format => :date
          au
          =l m_event.end_at, :format => :date
          
      .organisateur_name
        Organisé par
        %strong=link_to m_event.organisateur.name, public_organisateur_path(:id => m_event.organisateur.slug), :target => "_blank" if m_event.organisateur
      
      -if m_event.description?
        %br
        =link_to "+ d'infos", "#", :onclick => "$(this).next('.details').toggle();return false;"
        .details{:style => "display:none;"}=simple_format m_event.description
      
      %br
      %br
      .right_roulage.right
        =link_to "Réserver", m_event.link.to_s, :target => "_blank"
       
      
      .clear



