Skip to content

Commit

Permalink
Remove close date logic from banner
Browse files Browse the repository at this point in the history
We previously added logic in #1934 to automatically take down the banner at a specified close date.
However, this didn't work as expected due to templates being cached when they are requested by Slimmer. Bypassing this caching would be more challenging and as there isn't an immediate use case for this work (we can manually remove the banner instead) we're going to remove this logic for now.

If this feature is requested in the future, we now know that this is more difficult to implement than we first thought and can scope accordingly.
  • Loading branch information
Vanita Barrett committed Dec 2, 2019
1 parent 105339b commit 873f3f3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions app/views/notifications/_global_bar.html.erb
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
<%
require 'date'

show_global_bar ||= false # Toggles the appearance of the global bar
title = "Register to vote"
title_href = "/register-to-vote"
link_text = "Register by 26 November to vote in the General Election on 12 December."
link_href = false
close_date = false # DateTime after which the bar will automatically disappear, or false to unset
-%>

<% if show_global_bar && (!close_date || DateTime.now() < close_date) %>
<% if show_global_bar %>
<% content_for :head do %>
<!--[if gt IE 7]><!-->
<script>
Expand Down

0 comments on commit 873f3f3

Please sign in to comment.