Add empty hints for user pages
This commit is contained in:
parent
eb56ab87be
commit
499b525a0e
|
@ -1,4 +1,7 @@
|
|||
#questions
|
||||
- if @questions.empty?
|
||||
= render "shared/empty", icon: "fa-regular fa-comment", translation_key: ".user.questions"
|
||||
|
||||
- @questions.each do |q|
|
||||
= render 'shared/question', q: q, type: nil
|
||||
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
= render "answerbox", a:
|
||||
|
||||
#answers
|
||||
- if @answers.empty?
|
||||
= render "shared/empty", icon: "fa-regular fa-comments", translation_key: ".user.answers"
|
||||
|
||||
- @answers.each do |a|
|
||||
= render "answerbox", a:
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
- if @users.empty?
|
||||
= render "shared/empty", icon: "fa-regular fa-user", translation_key: ".user.#{type}"
|
||||
|
||||
.row.row-cols-1.row-cols-sm-2.row-cols-md-3#users
|
||||
- @users.each do |user|
|
||||
.col.pb-3
|
||||
|
|
|
@ -573,6 +573,11 @@ en:
|
|||
show: "Show full question"
|
||||
hide: "Hide full question"
|
||||
empty:
|
||||
user:
|
||||
answers: "This user hasn't answered any questions yet."
|
||||
questions: "This user hasn't asked any questions yet."
|
||||
follower: "This user has no followers."
|
||||
friend: "This user is not following anyone."
|
||||
formatting:
|
||||
body_html: |
|
||||
<p>%{app_name} uses <b>Markdown</b> for formatting</p>
|
||||
|
|
Loading…
Reference in New Issue