.forum_topic#topic{:id => forum_topic.id}
  .comments
    
    %span
    
      -views = forum_topic.forum_user_topic_vieweds.count
      =views
      =i :eye
    
    %span
      =forum_topic.forum_messages.count - 1
      =i :"comment-o"
    
  
  =link_to image_tag(forum_avatar_url(forum_topic.forum_user), :class => "avatar" ),[:forum, forum_topic]
  %h2
    =link_to forum_topic.title, [:forum, forum_topic]
    =render :partial => "forum/forum_topics/follow", :locals => {:forum_topic => forum_topic}


    
  %p
    %span
      -if forum_topic.category
        =link_to forum_topic.category.title, [:forum, forum_topic.category] 
      -else
        Général
    
    
    %span
      Par
      = forum_topic.username
    %span
      =l forum_topic.created_at
    
  
  
    -if forum_topic.forum_messages.count > 1
      %span
        =i :"clock-o"
        =distance_of_time_in_words Time.now, forum_topic.forum_messages.order("created_at ASC").last.created_at
        =#forum_topic.forum_messages.order("created_at ASC").last.username
        
    -if @topic
      -if @topic.forum_user == current_fuser or moderator?
        %span
          =link_to i(:pencil), edit_forum_forum_topic_path(@topic) 
          =link_to i(:"trash-o"), [:forum, @topic], :data => {:confirm => "Supprimer ce fil de discussion ?"}, :method => :delete if moderator?
      
    
    
  .clear
       