From eae2b8ac4ba0681de21440359c6e126f52e2b5cc Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Sat, 22 Apr 2017 12:32:13 +0200 Subject: [PATCH] extended templates --- rowers/templates/400.html | 2 +- rowers/templates/403.html | 2 +- rowers/templates/404.html | 3 +- rowers/templates/500.html | 3 +- rowers/templates/base.html | 221 ++------------------------ rowers/templates/basebase.html | 219 +++++++++++++++++++++++++ rowers/templates/basefront.html | 238 +++------------------------- rowers/templates/basenofilters.html | 26 +++ 8 files changed, 279 insertions(+), 435 deletions(-) create mode 100644 rowers/templates/basebase.html create mode 100644 rowers/templates/basenofilters.html diff --git a/rowers/templates/400.html b/rowers/templates/400.html index 43d7e090..025dfc60 100644 --- a/rowers/templates/400.html +++ b/rowers/templates/400.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "basenofilters.html" %} {% load staticfiles %} {% load rowerfilters %} diff --git a/rowers/templates/403.html b/rowers/templates/403.html index 316b4872..3a3d7df7 100644 --- a/rowers/templates/403.html +++ b/rowers/templates/403.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "basenofilters.html" %} {% load staticfiles %} {% load rowerfilters %} diff --git a/rowers/templates/404.html b/rowers/templates/404.html index 0116bd84..33fd4812 100644 --- a/rowers/templates/404.html +++ b/rowers/templates/404.html @@ -1,6 +1,5 @@ -{% extends "base.html" %} +{% extends "basenofilters.html" %} {% load staticfiles %} -{% load rowerfilters %} {% block title %}Change Workout {% endblock %} diff --git a/rowers/templates/500.html b/rowers/templates/500.html index 258d606b..d60793eb 100644 --- a/rowers/templates/500.html +++ b/rowers/templates/500.html @@ -1,6 +1,5 @@ -{% extends "base.html" %} +{% extends "basenofilters.html" %} {% load staticfiles %} -{% load rowerfilters %} {% block title %}Change Workout {% endblock %} diff --git a/rowers/templates/base.html b/rowers/templates/base.html index 8e6487a2..77fa6213 100644 --- a/rowers/templates/base.html +++ b/rowers/templates/base.html @@ -1,149 +1,9 @@ -{% load cookielaw_tags %} -{% load analytical %} -{% load rowerfilters %} - - - - - {% analytical_head_top %} - {% if GOOGLE_ANALYTICS_PROPERTY_ID %} - {% include "ga.html" %} - {% endif %} - - +{% extends "basebase.html" %} +{% block filters %} + {% load rowerfilters %} +{% endblock %} - - - - - - - - Rowsandall - - - - - {% block meta %} {% endblock %} - {% analytical_head_bottom %} - - - {% analytical_body_top %} -
-
-   -
-
- -
-
-
- -
- -
- -
-
-

Free Data and Analysis. For Rowers. By Rowers.

-
-
- -
-
- {% if user.is_authenticated %} -

- {{ user.first_name }} -

- Edit user account, e.g. heart rate zones, power zones, email, teams - - {% else %} -

login

- {% endif %} -
-
- {% if user.is_authenticated %} -

logout

- {% else %} -

 

- {% endif %} -
-
-
- {% if user.rower.rowerplan == 'pro' or user.rower.rowerplan == 'coach' %} -
Pro Member
- {% else %} - - {% endif %} -
-
-
- - -
-
- {% if user.is_authenticated %} -

Upload

- Upload CSV, TCX, FIT data files to rowsandall.com - {% else %} -

Register (free)

- {% endif %} -
-
- {% if user.is_authenticated %} -

- Import -

- Import workouts from Strava, SportTracks, and C2 logbook - {% else %} -

 

- {% endif %} -
-
- {% if user.is_authenticated %} -

- Workouts -

- See your list of workouts - {% else %} -

 

- {% endif %} -
-
- {% if user.is_authenticated %} -

- Graphs -

- See your most recent charts - {% else %} -

 

- {% endif %} -
-
- {% if user.is_authenticated %} -

- Analysis -

- Analysis of workouts over a period of time - {% else %} -

 

- {% endif %} -
-
+{% block teams %} {% if user.is_authenticated and user|has_teams %} -
+{% endblock %} - -
-
- {% block message %} - {% if message %} -

- {{ message }} -

- {% endif %} - {% if successmessage %} -

- {{ successmessage }} -

- {% endif %} - {% endblock %} -
-
- {% load tz %} - - {% block content %}{% endblock %} -
-
- -
- {% block footer %} - - -
- -
-
- -
-
- -
-
- -
-
- -
- - - {% endblock %} -
- {% cookielaw_banner %} -
- - {% analytical_body_bottom %} - - +{% block content %} + +{% endblock %} diff --git a/rowers/templates/basebase.html b/rowers/templates/basebase.html new file mode 100644 index 00000000..a97bbb60 --- /dev/null +++ b/rowers/templates/basebase.html @@ -0,0 +1,219 @@ +{% load cookielaw_tags %} +{% load analytical %} +{% block filters %} +{% endblock %} + + + + + {% analytical_head_top %} + {% if GOOGLE_ANALYTICS_PROPERTY_ID %} + {% include "ga.html" %} + {% endif %} + + + + + + + + + + + Rowsandall + + + + + {% block meta %} {% endblock %} + {% analytical_head_bottom %} + + + {% analytical_body_top %} + {% block body_top %}{% endblock %} +
+
+   +
+
+ +
+
+
+ +
+ +
+ +
+
+

Free Data and Analysis. For Rowers. By Rowers.

+
+
+ +
+
+ {% if user.is_authenticated %} +

+ {{ user.first_name }} +

+ Edit user account, e.g. heart rate zones, power zones, email, teams + + {% else %} +

login

+ {% endif %} +
+
+ {% if user.is_authenticated %} +

logout

+ {% else %} +

 

+ {% endif %} +
+
+
+ {% if user.rower.rowerplan == 'pro' or user.rower.rowerplan == 'coach' %} +
Pro Member
+ {% else %} + + {% endif %} +
+
+
+ + +
+
+ {% if user.is_authenticated %} +

Upload

+ Upload CSV, TCX, FIT data files to rowsandall.com + {% else %} +

Register (free)

+ {% endif %} +
+
+ {% if user.is_authenticated %} +

+ Import +

+ Import workouts from Strava, SportTracks, and C2 logbook + {% else %} +

 

+ {% endif %} +
+
+ {% if user.is_authenticated %} +

+ Workouts +

+ See your list of workouts + {% else %} +

 

+ {% endif %} +
+
+ {% if user.is_authenticated %} +

+ Graphs +

+ See your most recent charts + {% else %} +

 

+ {% endif %} +
+
+ {% if user.is_authenticated %} +

+ Analysis +

+ Analysis of workouts over a period of time + {% else %} +

 

+ {% endif %} +
+
+ {% block teams %} + {% endblock %} +
+
+ + +
+
+ {% block message %} + {% if message %} +

+ {{ message }} +

+ {% endif %} + {% if successmessage %} +

+ {{ successmessage }} +

+ {% endif %} + {% endblock %} +
+
+ {% load tz %} + + {% block content %}{% endblock %} +
+
+ +
+ {% block footer %} + + +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ + + {% endblock %} +
+ {% cookielaw_banner %} +
+ + {% analytical_body_bottom %} + {% block body_bottom %}{% endblock %} + + diff --git a/rowers/templates/basefront.html b/rowers/templates/basefront.html index 15017318..9bf96b9c 100644 --- a/rowers/templates/basefront.html +++ b/rowers/templates/basefront.html @@ -1,34 +1,12 @@ -{% load cookielaw_tags %} -{% load analytical %} -{% load rowerfilters %} - - - - - {% analytical_head_top %} - {% if GOOGLE_ANALYTICS_PROPERTY_ID %} - {% include "ga.html" %} - {% endif %} - - - - - - - - - - - Rowsandall - - - - - {% block meta %} {% endblock %} - {% analytical_head_bottom %} - - +{% extends "basebase.html" %} +{% block filters %} + {% load rowerfilters %} +{% endblock %} +{% block meta %} +{% endblock %} + +{% block body_top %} - -
- {% analytical_body_top %} -
-
-
-   -
-
- -
-
-
- -
- -
- -
-
-

Free Data and Analysis. For Rowers. By Rowers.

-
-
-
-
- {% if user.is_authenticated %} -

- {{ user.first_name }} -

- Edit user account, e.g. heart rate zones, power zones, email, teams - - {% else %} -

login

- {% endif %} -
-
- {% if user.is_authenticated %} -

logout

- {% else %} -

 

- {% endif %} -
-
-
- {% if user.rower.rowerplan == 'pro' or user.rower.rowerplan == 'coach' %} -
Pro Member
- {% else %} - - {% endif %} -
-
-
- - -
-
- {% if user.is_authenticated %} -

Upload

- Upload CSV, TCX, FIT data files to rowsandall.com - {% else %} -

Register (free)

- {% endif %} -
-
- {% if user.is_authenticated %} -

- Import -

- Import workouts from Strava, SportTracks, and C2 logbook - {% else %} -

 

- {% endif %} -
-
- {% if user.is_authenticated %} -

- Workouts -

- See your list of workouts - {% else %} -

 

- {% endif %} -
-
- {% if user.is_authenticated %} -

- Graphs -

- See your most recent charts - {% else %} -

 

- {% endif %} -
-
- {% if user.is_authenticated %} -

- Analysis -

- Analysis of workouts over a period of time - {% else %} -

 

- {% endif %} -
-
- {% if user.is_authenticated and user|user_teams %} +
+ +
+{% endblock %} + +{% block teams %} + {% if user.is_authenticated and user|has_teams %} +{% endblock %} - -
-
- {% block message %} - {% if message %} -

- {{ message }} -

- {% endif %} - {% if successmessage %} -

- {{ successmessage }} -

- {% endif %} - {% endblock %} + +{% block body_bottom %}
-
- {% load tz %} - - {% block content %}{% endblock %} -
-
- -
- {% block footer %} - - -
- -
-
- -
-
- -
-
- -
-
- -
- - - {% endblock %} -
- {% cookielaw_banner %} -
-
- - {% analytical_body_bottom %} - - +{% endblock %} + diff --git a/rowers/templates/basenofilters.html b/rowers/templates/basenofilters.html new file mode 100644 index 00000000..04fad305 --- /dev/null +++ b/rowers/templates/basenofilters.html @@ -0,0 +1,26 @@ +{% extends "basebase.html" %} +{% block filters %} + {% load rowerfilters %} +{% endblock %} + +{% block teams %} + {% if user.is_authenticated and user.rower.team.all %} + + See recent workouts for your team + {% else %} +

 

+ {% endif %} +{% endblock %} + +{% block content %} + +{% endblock %}