Use icons with tooltips instead

This commit is contained in:
Karina Kwiatek 2023-02-11 21:23:07 +01:00 committed by Andreas Nedbal
parent dd3f86988a
commit 0c3e54de6b
2 changed files with 6 additions and 10 deletions

View File

@ -1,14 +1,5 @@
- type ||= nil - type ||= nil
.card.questionbox{ data: { id: q.id } } .card.questionbox{ data: { id: q.id } }
- if type.nil? && q.direct
- if user_signed_in? && q.user == current_user
.card-header
%i.fa.fa-eye-slash
= t(".visible_to_you")
- elsif moderation_view?
.card-header
%i.fa.fa-eye-slash
= t(".visible_mod_mode")
.card-body{ data: { controller: q.long? ? "collapse" : nil } } .card-body{ data: { controller: q.long? ? "collapse" : nil } }
.d-flex .d-flex
- if type == "discover" - if type == "discover"
@ -17,6 +8,11 @@
%img.avatar-md.me-2{ src: q.user&.profile_picture&.url(:small), loading: :lazy } %img.avatar-md.me-2{ src: q.user&.profile_picture&.url(:small), loading: :lazy }
.flex-grow-1 .flex-grow-1
%h6.text-muted.answerbox__question-user %h6.text-muted.answerbox__question-user
- if type.nil? && q.direct
- if user_signed_in? && q.user == current_user
%i.fa.fa-eye-slash{ data: { bs_toggle: "tooltip", bs_title: t(".visible_to_you") } }
- elsif moderation_view?
%i.fa.fa-eye-slash{ data: { bs_toggle: "tooltip", bs_title: t(".visible_mod_mode") } }
= t("answerbox.header.asked_html", user: user_screen_name(q.user), time: time_tooltip(q)) = t("answerbox.header.asked_html", user: user_screen_name(q.user), time: time_tooltip(q))
- if q.answer_count > 1 - if q.answer_count > 1
· ·

View File

@ -579,7 +579,7 @@ en:
deleted_question: "Deleted question" deleted_question: "Deleted question"
blocked: "blocked %{time} ago" blocked: "blocked %{time} ago"
question: question:
visible_to_you: "Only visible to you" visible_to_you: "Only visible to you as it was asked directly"
visible_mod_mode: "You can see this because you are in moderation view" visible_mod_mode: "You can see this because you are in moderation view"
tabs: tabs:
admin: admin: