Merge pull request #1502 from Retrospring/bugfix/no-follower-note

Add note to question modal if current user has no followers
This commit is contained in:
Karina J. Kwiatek 2023-12-11 23:18:49 +01:00 committed by GitHub
commit 34d97ed7c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -8,6 +8,8 @@
.modal-body
- if @user
.alert.alert-info.d-sm-none= t(".user_note_html", user: @user.profile.safe_name)
- if current_user.followers.count.zero?
.alert.alert-warning= t(".follower_note_html")
.form-group.has-feedback
%textarea.form-control{ name: "qb-all-question", placeholder: t(".placeholder"), data: { "character-count-warning-target": "input" } }
.alert.alert-warning.mt-3.d-none{ data: { "character-count-warning-target": "warning" } }= t('.long_question_warning')

View File

@ -267,6 +267,9 @@ en:
This dialog asks a question to all your followers.
<a href="#question-card" data-controller="questionbox-focus" data-action="click">Click here</a>
to ask them a question directly!
follower_note_html: |
<strong>You don't have any followers!</strong>
Questions asked through this dialog will not arrive in anyone's inbox.
title: "Ask your followers"
placeholder: "Type your question here…"
action: "Ask"