2020-04-19 14:09:41 -07:00
|
|
|
.card.card-question{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
|
2015-05-12 11:48:06 -07:00
|
|
|
.media.question-media
|
|
|
|
- unless question.author_is_anonymous
|
|
|
|
%a.pull-left{href: unless hidden then show_user_profile_path(question.user.screen_name) end}
|
|
|
|
%img.img-rounded.answerbox--img{src: gravatar_url(question.user)}
|
|
|
|
.media-body.question-body
|
|
|
|
- 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
|
|
|
|
%ul.dropdown-menu.dropdown-menu-right{role: :menu}
|
|
|
|
- if current_user.mod? or question.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: question.id, redirect: if question.author_is_anonymous? then "/" else show_user_questions_path(question.user.screen_name) end }}
|
2015-05-12 11:48:06 -07:00
|
|
|
%i.fa.fa-trash-o
|
2015-05-26 19:31:28 -07:00
|
|
|
= t 'views.actions.delete'
|
2015-05-12 11:48:06 -07:00
|
|
|
- unless question.user == current_user
|
|
|
|
%li
|
2015-05-24 07:08:07 -07:00
|
|
|
%a{href: '#', tabindex: -1, data: { action: 'ab-question-report', q_id: question.id }}
|
2015-05-12 11:48:06 -07:00
|
|
|
%i.fa.fa-exclamation-triangle
|
2015-05-26 19:31:28 -07:00
|
|
|
= t 'views.actions.report'
|
2015-05-12 11:48:06 -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))
|
2015-05-12 11:48:06 -07:00
|
|
|
%p.answerbox--question-text= question.content
|