From 0d28152f3e0e1da0185c8984003ed2f7e5b5d56d Mon Sep 17 00:00:00 2001 From: Georg Gadinger Date: Sat, 9 May 2020 04:51:14 +0200 Subject: [PATCH] Fix items being inserted after "Load More" button --- app/views/group/index.haml | 8 ++++---- app/views/inbox/show.html.haml | 8 ++++---- app/views/public/index.haml | 10 +++++----- app/views/static/index.haml | 10 +++++----- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/app/views/group/index.haml b/app/views/group/index.haml index 61e139a3..73d45b12 100644 --- a/app/views/group/index.haml +++ b/app/views/group/index.haml @@ -2,11 +2,11 @@ - @timeline.each do |answer| = render 'answerbox', a: answer - = render 'shared/cursored_pagination_dummy', more_data_available: @more_data_available, last_id: @timeline_last_id += render 'shared/cursored_pagination_dummy', more_data_available: @more_data_available, last_id: @timeline_last_id - - if @more_data_available - %button#load-more-btn.btn.btn-default{type: :button, data: { last_id: @timeline_last_id }} - = t 'views.actions.load' +- if @more_data_available + %button#load-more-btn.btn.btn-default{type: :button, data: { last_id: @timeline_last_id }} + = t 'views.actions.load' - provide(:title, group_title(@group)) - parent_layout "feed" diff --git a/app/views/inbox/show.html.haml b/app/views/inbox/show.html.haml index be2abe85..89e14824 100644 --- a/app/views/inbox/show.html.haml +++ b/app/views/inbox/show.html.haml @@ -5,8 +5,8 @@ - if @inbox.empty? = t 'views.inbox.empty' - = render 'shared/cursored_pagination_dummy', more_data_available: @more_data_available, last_id: @inbox_last_id += render 'shared/cursored_pagination_dummy', more_data_available: @more_data_available, last_id: @inbox_last_id - - if @more_data_available - %button#load-more-btn.btn.btn-default{type: :button, data: { last_id: @inbox_last_id }} - = t 'views.actions.load' +- if @more_data_available + %button#load-more-btn.btn.btn-default{type: :button, data: { last_id: @inbox_last_id }} + = t 'views.actions.load' diff --git a/app/views/public/index.haml b/app/views/public/index.haml index 18a8e660..c73a0c30 100644 --- a/app/views/public/index.haml +++ b/app/views/public/index.haml @@ -2,11 +2,11 @@ - @timeline.each do |answer| = render 'answerbox', a: answer - = render 'shared/cursored_pagination_dummy', more_data_available: @more_data_available, last_id: @timeline_last_id += render 'shared/cursored_pagination_dummy', more_data_available: @more_data_available, last_id: @timeline_last_id - - if @more_data_available - %button#load-more-btn.btn.btn-default{type: :button, data: { last_id: @timeline_last_id }} - Load more +- if @more_data_available + %button#load-more-btn.btn.btn-default{type: :button, data: { last_id: @timeline_last_id }} + Load more - provide(:title, generate_title("Public Timeline")) -- parent_layout "feed" \ No newline at end of file +- parent_layout "feed" diff --git a/app/views/static/index.haml b/app/views/static/index.haml index 5b4eda6d..30b7be95 100644 --- a/app/views/static/index.haml +++ b/app/views/static/index.haml @@ -2,11 +2,11 @@ - @timeline.each do |answer| = render 'answerbox', a: answer - = render 'shared/cursored_pagination_dummy', more_data_available: @more_data_available, last_id: @timeline_last_id += render 'shared/cursored_pagination_dummy', more_data_available: @more_data_available, last_id: @timeline_last_id - - if @more_data_available - %button#load-more-btn.btn.btn-default{type: :button, data: { last_id: @timeline_last_id }} - Load more +- if @more_data_available + %button#load-more-btn.btn.btn-default{type: :button, data: { last_id: @timeline_last_id }} + Load more - provide(:title, "#{APP_CONFIG['site_name']}") -- parent_layout "feed" \ No newline at end of file +- parent_layout "feed"