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