diff --git a/teamtemp/responses/forms.py b/teamtemp/responses/forms.py index bf3d5b28..9799b8a5 100644 --- a/teamtemp/responses/forms.py +++ b/teamtemp/responses/forms.py @@ -277,9 +277,8 @@ def clean_archive_schedule(self): def clean_next_archive_date(self): next_archive_date = self.cleaned_data['next_archive_date'] - if next_archive_date is not None: - if next_archive_date < timezone.now().date(): - raise forms.ValidationError('Next Archive Date must not be past') + if next_archive_date is not None and next_archive_date < timezone.now().date(): + raise forms.ValidationError('Next Archive Date must not be past') return next_archive_date def clean_survey_type(self): diff --git a/teamtemp/static/style.css b/teamtemp/static/style.css index 621b5184..53560115 100644 --- a/teamtemp/static/style.css +++ b/teamtemp/static/style.css @@ -93,3 +93,20 @@ ul { width: 167px; vertical-align: middle; } + +.centre { + text-align: center; +} + +.top { + vertical-align: top; +} + +.nowrap { + text-wrap: none; + white-space: nowrap; +} + +.filters>tbody>tr>td { + padding: 2px; +} diff --git a/teamtemp/templates/bvc.html b/teamtemp/templates/bvc.html index ea35afa8..36a6b8fe 100644 --- a/teamtemp/templates/bvc.html +++ b/teamtemp/templates/bvc.html @@ -96,7 +96,7 @@ {% block body %} -
+

@@ -137,9 +137,9 @@ {% csrf_token %}

- +
- - - -
+ {% if form.filter_dept_names.value %} {{ form.filter_dept_names.errors }}
@@ -147,7 +147,7 @@
{% endif %}
+ {% if form.filter_region_names.value %} {{ form.filter_region_names.errors }}
@@ -155,7 +155,7 @@
{% endif %}
+ {% if form.filter_site_names.value %} {{ form.filter_site_names.errors }}
@@ -164,11 +164,11 @@ {% endif %}
+ {% if form.filter_site_names.value or form.filter_region_names.value or form.filter_dept_names.value %} {% buttons %} {% endbuttons %} {% endif %} @@ -235,30 +235,30 @@ {% endif %}
-

{{ bvc_data.pretty_team_name }} {{ bvc_data.survey_type_title }}

+

{{ bvc_data.pretty_team_name }} {{ bvc_data.survey_type_title }}

{% if bvc_data.archived %} -

{{ bvc_data.archive_date|date:"M. d, Y" }}

+

{{ bvc_data.archive_date|date:"M. d, Y" }}

{% else %} -

{% now () %}

+

{% now () %}

{% if num_iterations != '0' %} {% if bvc_data.team_name == '' %} -
Current Results +
Current Results + {{ num_iterations }} Previous Iterations
{% else %} -
Current +
Current Results + {{ num_iterations }} Previous Iterations
{% endif %} {% else %} {% if bvc_data.team_name == '' %} -
Current Results
{% else %} -
Current Results
{% endif %} @@ -280,7 +280,7 @@
-

{{ bvc_data.stats.count }} Response{% if bvc_data.stats.count != 1 %}s{% endif %}:

+

{{ bvc_data.stats.count }} Response{% if bvc_data.stats.count != 1 %}s{% endif %}:

{% if bvc_data.word_cloud_url %} @@ -297,10 +297,10 @@

{{ bvc_data.stats.count }} Response{% if bvc_data.stats.count


-

{{ bvc_data.pretty_team_name }}

+

{{ bvc_data.pretty_team_name }}

-

Historical {{ bvc_data.survey_type_title }}

-

{% now () %}

+

Historical {{ bvc_data.survey_type_title }}

+

{% now () %}



diff --git a/teamtemp/templates/password.html b/teamtemp/templates/password.html index f4829b6b..e7f6562f 100644 --- a/teamtemp/templates/password.html +++ b/teamtemp/templates/password.html @@ -7,7 +7,7 @@ {% block body %}
-
+

Enter the admin password

diff --git a/teamtemp/templates/results.html b/teamtemp/templates/results.html index 8c3c26d2..e499d088 100644 --- a/teamtemp/templates/results.html +++ b/teamtemp/templates/results.html @@ -133,11 +133,11 @@

Individual Responses

This survey is configured to auto archive every {{ archive_schedule }} days and generate a summary from all collected results for the current iteration for all teams using this survey.

- Next scheduled archive will execute on {{ next_archive_date }}.
+ Next scheduled archive will execute on {{ next_archive_date }}. {% else %} Want to reuse your Survey Link? Would you like a BVC trending your results over time?
- Click here to clear all current results and generate a +
Click here to clear all current results and generate a summary from all collected results for the current iteration for all teams using this survey. {% endif %}

diff --git a/teamtemp/templates/user.html b/teamtemp/templates/user.html index 53a1c2c4..b077c9d4 100644 --- a/teamtemp/templates/user.html +++ b/teamtemp/templates/user.html @@ -6,7 +6,7 @@
{% if user %} -

User{% if user %} {{ user.id }}{% endif %}

+

User{% if user %} {{ user.id }}{% endif %}



@@ -23,18 +23,18 @@

User{% if user %} {{ user.id }}{% endif %}

{% endif %} {% if admin_surveys %} -

Survey Admin

+

Survey Admin



- + {% for survey in admin_surveys %} -
SurveySurvey Teams
{{ survey.id }} +
ADMIN BVC diff --git a/teamtemp/views.py b/teamtemp/views.py index 639212c0..83242121 100644 --- a/teamtemp/views.py +++ b/teamtemp/views.py @@ -560,10 +560,9 @@ def prune_word_cloud_cache(_): rows_deleted += rows for word_cloud_image in WordCloudImage.objects.all(): - if word_cloud_image.image_url: - if not os.path.isfile(media_file(word_cloud_image.image_url)): - rows, _ = word_cloud_image.delete() - rows_deleted += rows + if word_cloud_image.image_url and not os.path.isfile(media_file(word_cloud_image.image_url)): + rows, _ = word_cloud_image.delete() + rows_deleted += rows print("prune_word_cloud_cache: %d rows deleted" % rows_deleted, file=sys.stderr) print("prune_word_cloud_cache: Stop at %s" % utc_timestamp(), file=sys.stderr)