2015-07-25 10:48:27 -07:00
|
|
|
- type ||= nil
|
2020-04-19 14:31:24 -07:00
|
|
|
.card.questionbox{data: { id: q.id }}
|
2020-04-19 14:09:41 -07:00
|
|
|
.card-body
|
2014-12-19 14:03:03 -08:00
|
|
|
.media
|
2015-05-13 15:45:01 -07:00
|
|
|
- if type == "discover"
|
|
|
|
.pull-left
|
2017-03-31 06:04:58 -07:00
|
|
|
%a{href: user_screen_name(q.user, link_only: true)}
|
2017-03-31 06:13:52 -07:00
|
|
|
%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
|
2015-05-24 07:08:07 -07:00
|
|
|
%a{href: '#', tabindex: -1, data: { action: 'ab-question-destroy', q_id: q.id }}
|
2015-04-25 18:36:25 -07:00
|
|
|
%i.fa.fa-trash-o
|
2015-05-26 19:13:13 -07:00
|
|
|
= t 'views.actions.delete'
|
2015-04-25 18:36:25 -07:00
|
|
|
- unless q.user == current_user
|
|
|
|
%li
|
2015-05-24 07:08:07 -07:00
|
|
|
%a{href: '#', tabindex: -1, data: { action: 'ab-question-report', q_id: q.id }}
|
2015-04-25 18:36:25 -07:00
|
|
|
%i.fa.fa-exclamation-triangle
|
2015-05-26 19:13:13 -07:00
|
|
|
= t 'views.actions.report'
|
2014-12-19 14:03:03 -08:00
|
|
|
%h6.media-heading.text-muted.answerbox--question-user
|
2015-05-26 19:13:13 -07:00
|
|
|
= raw t('views.answerbox.asked', user: user_screen_name(q.user), time: time_tooltip(q))
|
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)}
|
2015-05-26 19:13:13 -07:00
|
|
|
= pluralize(q.answer_count, t('views.general.answer'))
|
2020-05-02 11:35:48 -07:00
|
|
|
%p.answerbox__question-text
|
2015-04-25 18:36:25 -07:00
|
|
|
= q.content
|