From 68d56a3a07e64d361d6043f8db5571455d1d00f3 Mon Sep 17 00:00:00 2001 From: John Carroll Date: Wed, 7 Dec 2022 22:58:57 -0500 Subject: [PATCH 1/2] reaction box for all templates and wagtail, add user-supplied tite,name,location and migration --- fec/data/templates/macros/reaction-box.jinja | 6 +-- fec/fec/static/js/data-init.js | 36 +++++++++++++ fec/fec/static/js/init.js | 37 +++++++++++++ .../js/{pages => modules}/reaction-box.js | 35 +----------- fec/home/blocks.py | 12 +++++ .../migrations/0125_auto_20221207_2254.py | 30 +++++++++++ fec/home/models.py | 3 +- fec/home/templates/blocks/reaction-block.html | 7 +++ fec/home/templates/home/custom_page.html | 5 +- fec/home/templates/home/home_page.html | 2 + fec/home/templates/home/resource_page.html | 5 ++ .../templates/partials/reaction-feedback.html | 42 +++++++++++++++ fec/home/templatetags/reaction_feedback.py | 53 +++++++++++++++++++ 13 files changed, 234 insertions(+), 39 deletions(-) rename fec/fec/static/js/{pages => modules}/reaction-box.js (76%) create mode 100644 fec/home/migrations/0125_auto_20221207_2254.py create mode 100644 fec/home/templates/blocks/reaction-block.html create mode 100644 fec/home/templates/partials/reaction-feedback.html create mode 100644 fec/home/templatetags/reaction_feedback.py diff --git a/fec/data/templates/macros/reaction-box.jinja b/fec/data/templates/macros/reaction-box.jinja index 8825ab1ddd..58533e6e49 100644 --- a/fec/data/templates/macros/reaction-box.jinja +++ b/fec/data/templates/macros/reaction-box.jinja @@ -1,8 +1,8 @@ -{% macro reaction_box(name, location) %} +{% macro reaction_box(title, name, location) %}
- What do you think of this chart? + {{ title }}
  • @@ -19,7 +19,7 @@