From 3a969bf7c7ab6f1b33d9e42c433439055a68ba81 Mon Sep 17 00:00:00 2001 From: Rosie Storey Date: Thu, 13 Jun 2019 13:11:11 -0400 Subject: [PATCH] Use simple content blocks for prototype and classic quicktips sections if feature flag is enabled --- concordia/settings_template.py | 6 +- concordia/templates/action-app.html | 157 +++++++++--------- .../transcriptions/asset_detail.html | 23 ++- .../templatetags/simple_content_block.py | 11 ++ 4 files changed, 113 insertions(+), 84 deletions(-) create mode 100644 concordia/templatetags/simple_content_block.py diff --git a/concordia/settings_template.py b/concordia/settings_template.py index dbdf7573a..6a4f58c20 100644 --- a/concordia/settings_template.py +++ b/concordia/settings_template.py @@ -310,7 +310,11 @@ DEFAULT_PAGE_TTL = 5 * 60 # Feature flag for social share -FLAGS = {"ACTIVITY_UI_ENABLED": [], "ADVERTISE_ACTIVITY_UI": []} +FLAGS = { + "ACTIVITY_UI_ENABLED": [], + "ADVERTISE_ACTIVITY_UI": [], + "SIMPLE_CONTENT_BLOCKS": [], +} ASGI_APPLICATION = "concordia.routing.application" CHANNEL_LAYERS = { diff --git a/concordia/templates/action-app.html b/concordia/templates/action-app.html index 5ccfe6b97..08dd3ed78 100644 --- a/concordia/templates/action-app.html +++ b/concordia/templates/action-app.html @@ -1,6 +1,8 @@ {% extends "base.html" %} {% load concordia_sharing_tags %} +{% load feature_flags %} +{% load simple_content_block %} {% load staticfiles %} @@ -77,6 +79,7 @@ {% block site-footer %}{% endblock site-footer %} {% block site-main %} + {% flag_enabled 'SIMPLE_CONTENT_BLOCKS' as SIMPLE_CONTENT_BLOCKS %} {% csrf_token %}