From a94912e1247bf6ab62a828a9e20c013f6f02f18b Mon Sep 17 00:00:00 2001
From: Sander Roosendaal
Date: Sun, 11 Mar 2018 10:54:57 +0100
Subject: [PATCH] wrapping text in some tables
---
rowers/templates/panel_notes.html | 6 ++++++
rowers/templates/panel_shortcomment.html | 13 +++++++++++++
rowers/templates/plannedsessionview.html | 6 +++---
rowers/utils.py | 2 ++
rowers/views.py | 3 ++-
static/css/rowsandall.css | 14 ++++++++++++++
6 files changed, 40 insertions(+), 4 deletions(-)
create mode 100644 rowers/templates/panel_notes.html
create mode 100644 rowers/templates/panel_shortcomment.html
diff --git a/rowers/templates/panel_notes.html b/rowers/templates/panel_notes.html
new file mode 100644
index 00000000..fb6cd880
--- /dev/null
+++ b/rowers/templates/panel_notes.html
@@ -0,0 +1,6 @@
+Notes
+
+
+ {{ workout.notes }}
+
+
diff --git a/rowers/templates/panel_shortcomment.html b/rowers/templates/panel_shortcomment.html
new file mode 100644
index 00000000..6774494b
--- /dev/null
+++ b/rowers/templates/panel_shortcomment.html
@@ -0,0 +1,13 @@
+{% load rowerfilters %}
+{% load tz %}
+
diff --git a/rowers/templates/plannedsessionview.html b/rowers/templates/plannedsessionview.html
index b704261a..e77d4add 100644
--- a/rowers/templates/plannedsessionview.html
+++ b/rowers/templates/plannedsessionview.html
@@ -33,15 +33,15 @@
Session {{ psdict.name.1 }}
-
+
{% for attr in attrs %}
{% for key,value in psdict.items %}
{% if key == attr %}
{% if key == 'comment' %}
- | {{ value.0 }} | {{ value.1|linebreaks }} |
+ {{ value.0 }} | {{ value.1|linebreaks }} |
{% else %}
- {{ value.0 }} | {{ value.1 }} |
+ {{ value.0 }} | {{ value.1 }} |
{% endif %}
{% endif %}
diff --git a/rowers/utils.py b/rowers/utils.py
index 003a41ab..e1588ffe 100644
--- a/rowers/utils.py
+++ b/rowers/utils.py
@@ -22,6 +22,8 @@ workflowmiddlepanel = (
('panel_summary.html','Summary'),
('panel_map.html','Map'),
('panel_comments.html','Basic Info and Links'),
+ ('panel_notes.html','Workout Notes'),
+ ('panel_shortcomment.html','Comment Link'),
('panel_middlesocial.html','Social Media Share Buttons'),
)
diff --git a/rowers/views.py b/rowers/views.py
index 5eb16dc4..2c565621 100644
--- a/rowers/views.py
+++ b/rowers/views.py
@@ -6194,6 +6194,7 @@ def workouts_view(request,message='',successmessage='',
startdate=timezone.now()-datetime.timedelta(days=365),
enddate=timezone.now()+datetime.timedelta(days=1),
teamid=0,rankingonly=False,rowerid=0,userid=0):
+
request.session['referer'] = absolute(request)['PATH']
try:
if rowerid != 0:
@@ -6259,7 +6260,7 @@ def workouts_view(request,message='',successmessage='',
if theteam.viewing == 'allmembers' or theteam.manager == request.user:
workouts = Workout.objects.filter(team=theteam,
startdatetime__gte=startdate,
- startdatetime__lte=enddate).order_by("-startdatetime")
+ startdatetime__lte=enddate).order_by("-date","-starttime")
g_workouts = Workout.objects.filter(team=theteam,
startdatetime__gte=activity_startdate,
startdatetime__lte=activity_enddate).order_by("-date", "-starttime")
diff --git a/static/css/rowsandall.css b/static/css/rowsandall.css
index f8d66d68..60918ee3 100644
--- a/static/css/rowsandall.css
+++ b/static/css/rowsandall.css
@@ -841,3 +841,17 @@ a.wh:hover {
color: #000;
}
+
+.wrapwords{
+ -ms-word-break: break-all;
+ word-break: break-all;
+
+ /* Non standard for webkit */
+ word-break: break-word;
+
+ -webkit-hyphens: auto;
+ -moz-hyphens: auto;
+ -ms-hyphens: auto;
+ hyphens: auto;
+
+}