From c07c6311ca2879e5a0ed50e1bc7d7664bf470ef8 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Fri, 3 Nov 2017 12:37:26 +0100 Subject: [PATCH] reload only on selected pages Doesn't refresh page when a form has been edited --- rowers/templates/async_tasks.html | 5 +++++ rowers/templates/list_graphs.html | 4 ++++ rowers/templates/monitorjobs.html | 30 ++++++++++++++++++++++++++ rowers/templates/otwrankings.html | 4 ++++ rowers/templates/rankings.html | 3 +++ rowers/templates/workflow.html | 5 +++++ rowers/templates/workout_comments.html | 4 ++++ rowers/templates/workout_form.html | 12 +++++++++-- rowers/templates/workout_view.html | 3 +++ templates/basebase.html | 27 +---------------------- 10 files changed, 69 insertions(+), 28 deletions(-) create mode 100644 rowers/templates/monitorjobs.html diff --git a/rowers/templates/async_tasks.html b/rowers/templates/async_tasks.html index dedf883d..9dbfeebc 100644 --- a/rowers/templates/async_tasks.html +++ b/rowers/templates/async_tasks.html @@ -51,6 +51,11 @@ {% endblock %} +{% block scripts %} +{% include "monitorjobs.html" %} +{% endblock %} + + {% block content %} diff --git a/rowers/templates/list_graphs.html b/rowers/templates/list_graphs.html index dc05fc5e..70339c9e 100644 --- a/rowers/templates/list_graphs.html +++ b/rowers/templates/list_graphs.html @@ -4,6 +4,10 @@ {% block title %}Rowsandall Recent Graphs{% endblock %} +{% block scripts %} +{% include "monitorjobs.html" %} +{% endblock %} + {% block content %}

Recent Graphs

diff --git a/rowers/templates/monitorjobs.html b/rowers/templates/monitorjobs.html new file mode 100644 index 00000000..6cebfa20 --- /dev/null +++ b/rowers/templates/monitorjobs.html @@ -0,0 +1,30 @@ + + + diff --git a/rowers/templates/otwrankings.html b/rowers/templates/otwrankings.html index 35c6069d..84d78408 100644 --- a/rowers/templates/otwrankings.html +++ b/rowers/templates/otwrankings.html @@ -2,6 +2,10 @@ {% load staticfiles %} {% load rowerfilters %} +{% block scripts %} +{% include "monitorjobs.html" %} +{% endblock %} + {% block title %}Workouts{% endblock %} {% block content %} diff --git a/rowers/templates/rankings.html b/rowers/templates/rankings.html index dc3ac9a6..e5625f95 100644 --- a/rowers/templates/rankings.html +++ b/rowers/templates/rankings.html @@ -3,6 +3,9 @@ {% load rowerfilters %} {% block title %}Workouts{% endblock %} +{% block scripts %} +{% include "monitorjobs.html" %} +{% endblock %} {% block content %} diff --git a/rowers/templates/workflow.html b/rowers/templates/workflow.html index 87bae1e9..af5e31ed 100644 --- a/rowers/templates/workflow.html +++ b/rowers/templates/workflow.html @@ -23,6 +23,11 @@ {% endfor %} {% endblock %} +{% block scripts %} +{% include "monitorjobs.html" %} +{% endblock %} + + {% block content %}
diff --git a/rowers/templates/workout_comments.html b/rowers/templates/workout_comments.html index d806ef63..c8e82ed1 100644 --- a/rowers/templates/workout_comments.html +++ b/rowers/templates/workout_comments.html @@ -3,6 +3,10 @@ {% load rowerfilters %} {% load tz %} +{% block scripts %} +{% include "monitorjobs.html" %} +{% endblock %} + {% block title %}Change Workout {% endblock %} {% block content %} diff --git a/rowers/templates/workout_form.html b/rowers/templates/workout_form.html index 3aa03f88..d4e2985b 100644 --- a/rowers/templates/workout_form.html +++ b/rowers/templates/workout_form.html @@ -13,6 +13,13 @@ {% block og_description %}{{ workout.name }} {{ workout.date }} - {{ workout.distance }}m - {{ workout.duration |durationprint:"%H:%M:%S.%f" }}{% endblock %} +{% block scripts %} +{% include "monitorjobs.html" %} + +{% endblock %} + {% block content %}
@@ -89,8 +96,9 @@
-
-
+
+ {{ form.as_table }}
diff --git a/rowers/templates/workout_view.html b/rowers/templates/workout_view.html index 00b070f5..cba3ccce 100644 --- a/rowers/templates/workout_view.html +++ b/rowers/templates/workout_view.html @@ -1,6 +1,9 @@ {% extends "base.html" %} {% load staticfiles %} {% load rowerfilters %} +{% block scripts %} +{% include "monitorjobs.html" %} +{% endblock %} {% block title %}{{ workout.name }} {% endblock %} {% block og_title %}{{ workout.name }} {% endblock %} diff --git a/templates/basebase.html b/templates/basebase.html index f3ca6ebb..ec85bb4f 100644 --- a/templates/basebase.html +++ b/templates/basebase.html @@ -9,32 +9,7 @@ - - - - - - + {% block scripts %} {% endblock %} {% analytical_head_top %}