Retrospring/app/views/discover/_userbox.html.haml

23 lines
970 B
Plaintext
Raw Normal View History

2020-05-06 17:12:44 -07:00
.card{data: { id: u.id }}
2020-04-19 14:09:41 -07:00
.card-body
2015-05-13 14:55:10 -07:00
.media
.pull-left
2015-05-13 15:45:01 -07:00
%a{href: show_user_profile_path(u.screen_name)}
2020-05-06 17:12:44 -07:00
%img.avatar-md.mr-2{src: u.profile_picture.url(:medium)}
2015-05-13 14:55:10 -07:00
.media-body
2020-05-06 17:12:44 -07:00
%h6.media-heading.answerbox__question-user
2015-05-13 14:55:10 -07:00
- if u.display_name.blank?
2015-05-13 15:45:01 -07:00
%a{href: show_user_profile_path(u.screen_name)}
%span= "@#{u.screen_name}"
2015-05-13 14:55:10 -07:00
- else
2015-05-13 15:45:01 -07:00
%a{href: show_user_profile_path(u.screen_name)}
%span= u.display_name
%span.text-muted= "@#{u.screen_name}"
%p.answerbox__question-text
2015-05-13 14:55:10 -07:00
- if type == "new"
= t('views.discover.userbox.new', time: time_ago_in_words(u.created_at))
- elsif type == "most"
= t('views.discover.userbox.answers', questions: pluralize(a, t('views.general.question')))
2015-05-13 14:55:10 -07:00
- else
2015-06-17 03:07:51 -07:00
= t('views.discover.userbox.questions', questions: pluralize(q, t('views.general.question')))