app/views/users/show.html.haml
- set_meta_tags title: @user.username
%section.worldMap
%header#sectionHeader
%hgroup.userHeader
%h1
%span
Mon
profil
%nav#secondaryNav
%div#secondaryNavContainer
.theContent
#theUserName
= image_tag @user.gravatar_url(size: 42)
= @user.username
#theUserAddressAndSocial
%p
Site :
%a(href="#{@user.website}" target="_blank") #{@user.website}
%br
Github :
= link_to @user.github, "https://github.com/#{@user.github}", target: "_blank"
%br
Twitter :
= link_to @user.twitter, "http://twitter.com/#{@user.twitter}", target: "_blank"
%p
Ville :
%span= @user.city
%br
Date d'inscription :
%span= l(@user.created_at, format: :tiny)
#questionsEventsTabs
#questionTab
#questionTabAsk
%h2
Questions posées :
%span
= @user.questions_count
- @presenter.recent_questions.each do |q|
%div
= link_to q.title, question_path(q)
%p
%span
Posée il y a
= distance_of_time_in_words(q.created_at, Time.now)
#questionTabAnswer
%h2
Réponses apportées :
%span
= @user.answers_count
- @presenter.recent_answers.each do |a|
%div
= link_to truncate(a.description, length: 50), question_path(a.question)
%p
%span
Postée il y a
= distance_of_time_in_words(a.created_at, Time.now)