2015-04-25 18:36:25 -07:00
|
|
|
.panel.panel-default.questionbox{data: { id: q.id }}
|
2014-12-19 14:03:03 -08:00
|
|
|
.panel-body
|
|
|
|
.media
|
2015-05-13 15:45:01 -07:00
|
|
|
- if type == "discover"
|
|
|
|
.pull-left
|
|
|
|
%a{href: show_user_profile_path(q.user.screen_name)}
|
|
|
|
%img.answerbox--img{src: q.user.profile_picture.url(:medium)}
|
2014-12-19 14:03:03 -08:00
|
|
|
.media-body
|
2015-04-25 18:36:25 -07:00
|
|
|
- if user_signed_in?
|
|
|
|
.pull-right
|
|
|
|
.btn-group
|
|
|
|
%button.btn.btn-link.btn-sm.dropdown-toggle{data: { toggle: :dropdown }, aria: { expanded: :false }}
|
|
|
|
%span.caret
|
|
|
|
%ul.dropdown-menu.dropdown-menu-right{role: :menu}
|
|
|
|
- if current_user.mod? or q.user == current_user
|
|
|
|
%li.text-danger
|
|
|
|
%a{href: '#', data: { action: 'ab-question-destroy', q_id: q.id }}
|
|
|
|
%i.fa.fa-trash-o
|
|
|
|
Delete Question
|
|
|
|
- unless q.user == current_user
|
|
|
|
%li
|
|
|
|
%a{href: '#', data: { action: 'ab-question-report', q_id: q.id }}
|
|
|
|
%i.fa.fa-exclamation-triangle
|
|
|
|
Report
|
2014-12-19 14:03:03 -08:00
|
|
|
%h6.media-heading.text-muted.answerbox--question-user
|
|
|
|
= user_screen_name q.user
|
|
|
|
asked
|
2014-12-19 17:14:27 -08:00
|
|
|
%a{href: show_user_question_path(q.user.screen_name, q.id)}
|
2015-02-19 15:40:41 -08:00
|
|
|
%span{title: q.created_at, data: { toggle: :tooltip, placement: :bottom }}
|
2014-12-19 17:14:27 -08:00
|
|
|
= time_ago_in_words(q.created_at)
|
|
|
|
ago
|
2014-12-19 14:03:03 -08:00
|
|
|
- if q.answer_count > 1
|
|
|
|
·
|
|
|
|
%a{href: show_user_question_path(q.user.screen_name, q.id)}
|
|
|
|
#{q.answer_count} answers
|
|
|
|
%p.answerbox--question-text
|
2015-04-25 18:36:25 -07:00
|
|
|
= q.content
|