From 5d88dfcb9c618b810346fa9d078eed72ea802084 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Thu, 8 Sep 2022 00:48:01 +0200 Subject: [PATCH] Remove turbo-frame tags in user views --- app/views/user/questions.haml | 15 +++++++-------- app/views/user/show.haml | 17 ++++++++--------- app/views/user/show_follow.haml | 25 ++++++++++++------------- 3 files changed, 27 insertions(+), 30 deletions(-) diff --git a/app/views/user/questions.haml b/app/views/user/questions.haml index 08727c5a..7f237504 100644 --- a/app/views/user/questions.haml +++ b/app/views/user/questions.haml @@ -1,12 +1,11 @@ -= turbo_frame_tag "user_questions" do - #questions - - @questions.each do |q| - = render 'shared/question', q: q, type: nil +#questions + - @questions.each do |q| + = render 'shared/question', q: q, type: nil - - if @more_data_available - .d-flex.justify-content-center.justify-content-sm-start#paginator - = button_to show_user_questions_path(@user, last_id: @questions_last_id), class: "btn btn-light" do - = t("voc.load") +- if @more_data_available + .d-flex.justify-content-center.justify-content-sm-start#paginator + = button_to show_user_questions_path(@user, last_id: @questions_last_id), class: "btn btn-light" do + = t("voc.load") - provide(:title, questions_title(@user)) - parent_layout 'user/profile' diff --git a/app/views/user/show.haml b/app/views/user/show.haml index 442b414f..afbf2394 100644 --- a/app/views/user/show.haml +++ b/app/views/user/show.haml @@ -1,13 +1,12 @@ -= turbo_frame_tag "user_answers" do - - unless @user.banned? - #answers - - @answers.each do |a| - = render 'answerbox', a: a +- unless @user.banned? + #answers + - @answers.each do |a| + = render 'answerbox', a: a - - if @more_data_available - .d-flex.justify-content-center.justify-content-sm-start#paginator - = button_to user_path(@user, last_id: @answers_last_id), class: "btn btn-light" do - = t("voc.load") +- if @more_data_available + .d-flex.justify-content-center.justify-content-sm-start#paginator + = button_to user_path(@user, last_id: @answers_last_id), class: "btn btn-light" do + = t("voc.load") :ruby provide(:title, user_title(@user)) diff --git a/app/views/user/show_follow.haml b/app/views/user/show_follow.haml index 1d939922..78d9d02b 100644 --- a/app/views/user/show_follow.haml +++ b/app/views/user/show_follow.haml @@ -1,17 +1,16 @@ -= turbo_frame_tag "user_#{@type}" do - .row.row-cols-1.row-cols-sm-2.row-cols-md-3#users - - @users.each do |user| - .col.pb-3 - = render 'shared/userbox', user: user, type: @type +.row.row-cols-1.row-cols-sm-2.row-cols-md-3#users + - @users.each do |user| + .col.pb-3 + = render 'shared/userbox', user: user, type: @type - - if @more_data_available - .d-flex.justify-content-center.justify-content-sm-start#paginator - - if @type === :follower - = button_to show_user_followers_path(@user, last_id: @relationships_last_id), class: "btn btn-light" do - = t("voc.load") - - else - = button_to show_user_followings_path(@user, last_id: @relationships_last_id), class: "btn btn-light" do - = t("voc.load") +- if @more_data_available + .d-flex.justify-content-center.justify-content-sm-start#paginator + - if @type === :follower + = button_to show_user_followers_path(@user, last_id: @relationships_last_id), class: "btn btn-light" do + = t("voc.load") + - else + = button_to show_user_followings_path(@user, last_id: @relationships_last_id), class: "btn btn-light" do + = t("voc.load") - provide(:title, user_title(@user, 'friends and followers')) - parent_layout 'user/profile'