2020-04-29 15:44:43 -07:00
|
|
|
.card.question--fixed{class: if hidden then 'question--hidden' end, tabindex: if hidden then '-1' end, aria: { hidden: if hidden then :true end }}
|
2015-05-12 11:48:06 -07:00
|
|
|
.container
|
2020-04-19 14:09:41 -07:00
|
|
|
.card-body
|
2020-05-08 19:10:40 -07:00
|
|
|
.media
|
2015-05-12 11:48:06 -07:00
|
|
|
- unless question.author_is_anonymous
|
|
|
|
%a.pull-left{href: unless hidden then show_user_profile_path(question.user.screen_name) end}
|
2020-05-08 19:10:40 -07:00
|
|
|
%img.answerbox__question-user-avatar.avatar-md{src: question.user.profile_picture.url(:medium)}
|
|
|
|
.media-body
|
2015-05-12 11:48:06 -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
|
|
|
|
- unless hidden
|
2020-05-08 20:39:01 -07:00
|
|
|
.dropdown-menu.dropdown-menu-right{role: :menu}
|
2015-05-12 11:48:06 -07:00
|
|
|
- if current_user.mod? or question.user == current_user
|
2020-05-08 20:39:01 -07:00
|
|
|
%a.dropdown-item.text-danger{href: '#', tabindex: -1, data: { action: 'ab-question-destroy', q_id: question.id, redirect: if question.author_is_anonymous? then "/" else show_user_questions_path(question.user.screen_name) end }}
|
|
|
|
%i.fa.fa-trash-o
|
|
|
|
= t 'views.actions.delete'
|
2015-05-12 11:48:06 -07:00
|
|
|
- unless question.user == current_user
|
2020-05-08 20:39:01 -07:00
|
|
|
%a.dropdown-item{href: '#', tabindex: -1, data: { action: 'ab-question-report', q_id: question.id }}
|
|
|
|
%i.fa.fa-exclamation-triangle
|
|
|
|
= t 'views.actions.report'
|
2020-05-08 19:10:40 -07:00
|
|
|
%h6.text-muted.media-heading.answerbox__question-user
|
2015-05-26 19:40:11 -07:00
|
|
|
- if hidden
|
2017-03-30 10:17:25 -07:00
|
|
|
= user_screen_name question.user, anonymous: question.author_is_anonymous, url: false
|
2015-05-26 19:40:11 -07:00
|
|
|
- else
|
2017-03-30 10:17:25 -07:00
|
|
|
= raw t('views.answerbox.asked', user: user_screen_name(question.user, anonymous: question.author_is_anonymous), time: time_tooltip(question))
|
2020-05-02 11:35:48 -07:00
|
|
|
%p.answerbox__question-text= question.content
|