.card.inbox-entry{ class: i.new? ? "inbox-entry--new" : "", data: { id: i.id } } .card-header .media - unless i.question.author_is_anonymous %a.pull-left{ href: user_path(i.question.user) } %img.answerbox__question-user-avatar.avatar-md{ src: i.question.user.profile_picture.url(:medium) } .media-body %h6.text-muted.media-heading.answerbox__question-user - if i.question.author_is_anonymous %i.fa.fa-user-secret{ title: t('.anon_hint') } = t(".asked_html", user: user_screen_name(i.question.user, context_user: i.user, author_identifier: i.question.author_is_anonymous ? i.question.author_identifier : nil), time: time_tooltip(i.question)) - if !i.question.author_is_anonymous && i.question.answer_count.positive? ยท %a{ href: question_path(i.question.user.screen_name, i.question.id) } = t(".answers", count: i.question.answer_count) .answerbox__question-text= question_markdown i.question.content - if i.question.user_id != current_user.id || current_user.has_role?(:administrator) .pull-right .btn-group %button.btn.btn-default.btn-sm.dropdown-toggle{ data: { toggle: :dropdown }, aria: { expanded: false } } %span.caret .dropdown-menu.dropdown-menu-right{ role: :menu } - if i.question.user_id != current_user.id %a.dropdown-item{ name: "ib-report", data: { q_id: i.question.id } } %i.fa.fa-fw.fa-warning = t("voc.report") - if current_user.mod? && i.question.anonymous? && !i.question.generated? %a.dropdown-item{ name: "mod-block-anon", data: { q_id: i.question.id } } %i.fa.fa-fw.fa-volume-off = t("voc.block_site_wide") %a.dropdown-item{ name: "ib-block-anon", data: { q_id: i.question.id } } %i.fa.fa-fw.fa-minus-circle = t("voc.block") - if current_user.has_role? :administrator %a.dropdown-item{ href: rails_admin_path_for_resource(i) } %i.fa.fa-fw.fa-gears = t("voc.view_in_rails_admin") - if current_user == i.user .card-body %textarea.form-control{ name: "ib-answer", placeholder: t(".placeholder"), data: { id: i.id } } %br/ %button.btn.btn-success{ name: "ib-answer", data: { ib_id: i.id } } = t("voc.answer") %button.btn.btn-danger{ name: "ib-destroy", data: { ib_id: i.id } } = t("voc.delete") %button.btn.btn-default{ name: "ib-options", data: { ib_id: i.id, state: :hidden } } %i.fa.fa-cog %span.sr-only= t(".options") .card-footer.d-none{ id: "ib-options-#{i.id}" } %h4= t(".sharing.heading") - if current_user.services.count.positive? .row - current_user.services.each do |service| .col-md-3.col-sm-4.col-xs-6 %label %input{ type: "checkbox", name: "ib-share", checked: :checked, data: { ib_id: i.id, service: service.provider } } = raw t(".sharing.post_to", service: service.provider.capitalize) - else %p= t(".sharing.none_html", settings: link_to(t(".sharing.settings"), services_path))