Adjust what content gets hidden on banned user profiles

This commit is contained in:
Andreas Nedbal 2024-02-28 23:53:22 +01:00 committed by Andreas Nedbal
parent c864c14355
commit 1914c56b05
3 changed files with 16 additions and 15 deletions

View File

@ -8,8 +8,9 @@
.d-none.d-sm-block= render 'shared/links'
.col-lg-9.col-md-8.col-xs-12.col-sm-8
= render 'questionbox', user: @user
= render 'tabs/profile', user: @user
= yield
- unless @user.banned?
= render 'tabs/profile', user: @user
= yield
- if user_signed_in?
= render 'modal/list', user: @user
- if current_user.mod? && @user != current_user

View File

@ -37,4 +37,5 @@
.profile__location
%i.fa.fa-fw.fa-location-arrow
= user.profile.location
= render "user/actions", user: user, type: :follower
- unless user.banned?
= render "user/actions", user: user, type: :follower

View File

@ -1,17 +1,16 @@
- unless @user.banned?
%div{ data: { controller: "navigation" } }
%button.d-none{ data: { hotkey: "j", action: "navigation#down" } }
%button.d-none{ data: { hotkey: "k", action: "navigation#up" } }
#pinned-answers
- @pinned_answers.each do |a|
= render "answerbox", a:
%div{ data: { controller: "navigation" } }
%button.d-none{ data: { hotkey: "j", action: "navigation#down" } }
%button.d-none{ data: { hotkey: "k", action: "navigation#up" } }
#pinned-answers
- @pinned_answers.each do |a|
= render "answerbox", a:
#answers
- if @answers.empty?
= render "shared/empty", icon: "fa-regular fa-comments", translation_key: ".user.answers"
#answers
- if @answers.empty?
= render "shared/empty", icon: "fa-regular fa-comments", translation_key: ".user.answers"
- @answers.each do |a|
= render "answerbox", a:
- @answers.each do |a|
= render "answerbox", a:
- if @more_data_available
.d-flex.justify-content-center.justify-content-sm-start#paginator