From 34de351866385b1cb021dc3f873a622c134a2a61 Mon Sep 17 00:00:00 2001 From: drusepth Date: Tue, 29 Mar 2022 14:19:21 -0700 Subject: [PATCH] april fools announcement --- app/views/layouts/forum.html.erb | 58 ++++++++++++++++++++++++- app/views/thredded/posts/_post.html.erb | 8 +++- 2 files changed, 64 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/forum.html.erb b/app/views/layouts/forum.html.erb index 2901e560..34202927 100644 --- a/app/views/layouts/forum.html.erb +++ b/app/views/layouts/forum.html.erb @@ -35,9 +35,65 @@ <%= render 'layouts/ganalytics' %> - +
+

+ + Important Notebook.ai News + +

+
+ + + + <%= react_component("Footer") unless defined?(@show_footer) && !@show_footer %> <%= render 'layouts/quick_add_fab' unless defined?(@show_footer) && !@show_footer %> <%= render partial: 'content/keyboard_controls_help_modal' %> diff --git a/app/views/thredded/posts/_post.html.erb b/app/views/thredded/posts/_post.html.erb index fda41c46..88a2be44 100644 --- a/app/views/thredded/posts/_post.html.erb +++ b/app/views/thredded/posts/_post.html.erb @@ -19,7 +19,13 @@ <%= content_tag :article, id: dom_id(post), class: "thredded--post thredded--#{post.read_state}--post #{muted_post ? muted_post_classes : 'card'}" do %> <%= render 'thredded/posts_common/actions', post: post, actions: local_assigns[:actions] %> <%= render 'thredded/posts_common/header', post: post %> - <%= ForumReplacementService.replace(content) || render('thredded/posts/content', post: post) %> + <%= + if user_signed_in && current_user.enabled_april_fools != false + ForumReplacementService.replace(content) || render('thredded/posts/content', post: post) + else + render('thredded/posts/content', post: post) + end + %> <% if post.pending_moderation? && !Thredded.content_visible_while_pending_moderation %>

<%= t 'thredded.posts.pending_moderation_notice' %>

<% elsif post.blocked? && post.can_moderate? %>