From 06f7d9714a6d9570c65e13fb6100828a7a9a3914 Mon Sep 17 00:00:00 2001
From: Owen Graham <ohgraham1@madisoncollege.edu>
Date: Tue, 26 Jul 2022 16:17:27 -0500
Subject: [PATCH] Change page title scheme

---
 visualizer/plotting.py            | 6 +++---
 visualizer/templates/plotter.html | 8 +++++---
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/visualizer/plotting.py b/visualizer/plotting.py
index 5f34aa3..d389113 100644
--- a/visualizer/plotting.py
+++ b/visualizer/plotting.py
@@ -49,7 +49,7 @@ class TimeSeries(Plotter):
 
     name = 'time-series'
     nav_title = 'Time Series'
-    page_title = 'Plot Data'
+    page_title = None
     onsubmit_fn = 'timeSeriesVisualize'
     selectors = (
         Selector(type='measurement', name='measurement', id='measurement',
@@ -107,7 +107,7 @@ class Overlay(Plotter):
 
     name = 'overlay'
     nav_title = 'Overlay'
-    page_title = 'Overlay Stations'
+    page_title = 'Overlay'
     onsubmit_fn = 'overlayVisualize'
     selectors = (
         Selector(type='measurement', name='measurement', id='measurement',
@@ -202,7 +202,7 @@ class Boxplot(Plotter):
 
     name = 'boxplot'
     nav_title = 'Boxplot'
-    page_title = 'Boxplot Years'
+    page_title = 'Boxplot'
     onsubmit_fn = 'boxplotVisualize'
     selectors = (
         Selector(type='measurement', name='measurement', id='measurement',
diff --git a/visualizer/templates/plotter.html b/visualizer/templates/plotter.html
index 434a919..7c1ec3d 100644
--- a/visualizer/templates/plotter.html
+++ b/visualizer/templates/plotter.html
@@ -11,9 +11,11 @@
     {{- url_for(endpoint, name=g.plotter.name, _external=True) -}}
   ">
   <title>
-    {{- g.plotter.page_title -}}
-    {%- if g.embedded %} | Embed{% endif -%}
-    {#- #} | AMRDC Data Visualizer{# -#}
+    {%- if g.plotter.page_title is not none -%}
+      {{ g.plotter.page_title }} | {# #}
+    {%- endif -%}
+    AMRDC Data Visualizer
+    {%- if g.embedded %} (Embed){% endif -%}
   </title>
   <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
   <link rel="stylesheet" href="https://amrdc.ssec.wisc.edu/wp-test/wp-content/themes/amrdc-theme/dist/fonts/uw160/fonts.css?ver=1.0.0">
-- 
GitLab