From 6baefcb98cc02116d54c6d9cc3e690701d342e09 Mon Sep 17 00:00:00 2001 From: Raniere Silva Date: Tue, 31 Oct 2017 11:27:09 +0000 Subject: [PATCH 1/5] Merge Software Carpentry and Data Carpentry --- lowfat/migrations/0111_auto_20171031_1122.py | 33 ++++++++++++++++++++ lowfat/models.py | 3 +- 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 lowfat/migrations/0111_auto_20171031_1122.py diff --git a/lowfat/migrations/0111_auto_20171031_1122.py b/lowfat/migrations/0111_auto_20171031_1122.py new file mode 100644 index 00000000..b4afeaa2 --- /dev/null +++ b/lowfat/migrations/0111_auto_20171031_1122.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.5 on 2017-10-31 11:22 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('lowfat', '0110_auto_20171003_1358'), + ] + + operations = [ + migrations.RenameField( + model_name='claimant', + old_name='software_carpentry_instructor', + new_name='carpentries_instructor', + ), + migrations.RenameField( + model_name='historicalclaimant', + old_name='software_carpentry_instructor', + new_name='carpentries_instructor', + ), + migrations.RemoveField( + model_name='claimant', + name='data_carpentry_instructor', + ), + migrations.RemoveField( + model_name='historicalclaimant', + name='data_carpentry_instructor', + ), + ] diff --git a/lowfat/models.py b/lowfat/models.py index e3bce4ed..581ba026 100644 --- a/lowfat/models.py +++ b/lowfat/models.py @@ -275,8 +275,7 @@ class Meta: ) ) selected = models.BooleanField(default=False) - software_carpentry_instructor = models.BooleanField(default=False) - data_carpentry_instructor = models.BooleanField(default=False) + carpentries_instructor = models.BooleanField(default=False) claimantship_grant = models.DecimalField( max_digits=MAX_DIGITS, decimal_places=2, From eeba26f853a7c3be06e0172883ae2c5578ad026c Mon Sep 17 00:00:00 2001 From: Raniere Silva Date: Tue, 31 Oct 2017 11:32:19 +0000 Subject: [PATCH 2/5] squash! Merge Software Carpentry and Data Carpentry --- fixtures/demo.json | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/fixtures/demo.json b/fixtures/demo.json index 30e786d0..8c2bf7a8 100644 --- a/fixtures/demo.json +++ b/fixtures/demo.json @@ -158,8 +158,7 @@ "application_year": 2014, "inauguration_grant_expiration": "2019-03-31", "selected": true, - "software_carpentry_instructor": false, - "data_carpentry_instructor": false, + "carpentries_instructor": false, "claimantship_grant": "3000.00", "notes_from_admin": "", "added": "2016-07-07T14:59:46.412", @@ -205,8 +204,7 @@ "application_year": 2016, "inauguration_grant_expiration": "2019-03-31", "selected": false, - "software_carpentry_instructor": false, - "data_carpentry_instructor": false, + "carpentries_instructor": false, "claimantship_grant": "0.00", "notes_from_admin": "", "added": "2016-09-01T12:39:56.259", @@ -252,8 +250,7 @@ "application_year": 2015, "inauguration_grant_expiration": "2019-03-31", "selected": true, - "software_carpentry_instructor": false, - "data_carpentry_instructor": false, + "carpentries_instructor": false, "claimantship_grant": "3000.00", "notes_from_admin": "", "added": "2016-07-07T14:59:46.412", @@ -299,8 +296,7 @@ "application_year": 2015, "inauguration_grant_expiration": "2019-03-31", "selected": true, - "software_carpentry_instructor": false, - "data_carpentry_instructor": false, + "carpentries_instructor": false, "claimantship_grant": "3000.00", "notes_from_admin": "", "added": "2016-07-07T14:59:46.412", @@ -346,8 +342,7 @@ "application_year": 2016, "inauguration_grant_expiration": "2019-03-31", "selected": true, - "software_carpentry_instructor": false, - "data_carpentry_instructor": false, + "carpentries_instructor": false, "claimantship_grant": "3000.00", "notes_from_admin": "", "added": "2016-07-07T14:59:46.412", @@ -393,8 +388,7 @@ "application_year": 2016, "inauguration_grant_expiration": "2019-03-31", "selected": true, - "software_carpentry_instructor": false, - "data_carpentry_instructor": false, + "carpentries_instructor": false, "claimantship_grant": "3000.00", "notes_from_admin": "", "added": "2016-07-07T14:59:46.412", @@ -440,8 +434,7 @@ "application_year": 2014, "inauguration_grant_expiration": "2019-03-31", "selected": true, - "software_carpentry_instructor": false, - "data_carpentry_instructor": false, + "carpentries_instructor": false, "claimantship_grant": "3000.00", "notes_from_admin": "", "mentor": null, @@ -482,8 +475,7 @@ "application_year": 2015, "inauguration_grant_expiration": "2019-03-31", "selected": true, - "software_carpentry_instructor": false, - "data_carpentry_instructor": false, + "carpentries_instructor": false, "claimantship_grant": "3000.00", "notes_from_admin": "", "mentor": null, @@ -524,8 +516,7 @@ "application_year": 2015, "inauguration_grant_expiration": "2019-03-31", "selected": true, - "software_carpentry_instructor": false, - "data_carpentry_instructor": false, + "carpentries_instructor": false, "claimantship_grant": "3000.00", "notes_from_admin": "", "mentor": null, @@ -566,8 +557,7 @@ "application_year": 2016, "inauguration_grant_expiration": "2019-03-31", "selected": true, - "software_carpentry_instructor": false, - "data_carpentry_instructor": false, + "carpentries_instructor": false, "claimantship_grant": "3000.00", "notes_from_admin": "", "mentor": 1, @@ -608,8 +598,7 @@ "application_year": 2016, "inauguration_grant_expiration": "2019-03-31", "selected": true, - "software_carpentry_instructor": false, - "data_carpentry_instructor": false, + "carpentries_instructor": false, "claimantship_grant": "3000.00", "notes_from_admin": "", "mentor": 2, @@ -650,8 +639,7 @@ "application_year": 2016, "inauguration_grant_expiration": "2019-03-31", "selected": false, - "software_carpentry_instructor": false, - "data_carpentry_instructor": false, + "carpentries_instructor": false, "claimantship_grant": "0.00", "notes_from_admin": "", "mentor": null, From 775bd48161a2d087b3fb0a725df326431ae2272a Mon Sep 17 00:00:00 2001 From: Raniere Silva Date: Tue, 31 Oct 2017 11:35:55 +0000 Subject: [PATCH 3/5] Add field for research software engineer --- fixtures/demo.json | 12 ++++++++++ lowfat/migrations/0112_auto_20171031_1133.py | 25 ++++++++++++++++++++ lowfat/models.py | 1 + 3 files changed, 38 insertions(+) create mode 100644 lowfat/migrations/0112_auto_20171031_1133.py diff --git a/fixtures/demo.json b/fixtures/demo.json index 8c2bf7a8..8cb445a5 100644 --- a/fixtures/demo.json +++ b/fixtures/demo.json @@ -159,6 +159,7 @@ "inauguration_grant_expiration": "2019-03-31", "selected": true, "carpentries_instructor": false, + "research_software_engineer": false, "claimantship_grant": "3000.00", "notes_from_admin": "", "added": "2016-07-07T14:59:46.412", @@ -205,6 +206,7 @@ "inauguration_grant_expiration": "2019-03-31", "selected": false, "carpentries_instructor": false, + "research_software_engineer": false, "claimantship_grant": "0.00", "notes_from_admin": "", "added": "2016-09-01T12:39:56.259", @@ -251,6 +253,7 @@ "inauguration_grant_expiration": "2019-03-31", "selected": true, "carpentries_instructor": false, + "research_software_engineer": false, "claimantship_grant": "3000.00", "notes_from_admin": "", "added": "2016-07-07T14:59:46.412", @@ -297,6 +300,7 @@ "inauguration_grant_expiration": "2019-03-31", "selected": true, "carpentries_instructor": false, + "research_software_engineer": false, "claimantship_grant": "3000.00", "notes_from_admin": "", "added": "2016-07-07T14:59:46.412", @@ -343,6 +347,7 @@ "inauguration_grant_expiration": "2019-03-31", "selected": true, "carpentries_instructor": false, + "research_software_engineer": false, "claimantship_grant": "3000.00", "notes_from_admin": "", "added": "2016-07-07T14:59:46.412", @@ -389,6 +394,7 @@ "inauguration_grant_expiration": "2019-03-31", "selected": true, "carpentries_instructor": false, + "research_software_engineer": false, "claimantship_grant": "3000.00", "notes_from_admin": "", "added": "2016-07-07T14:59:46.412", @@ -435,6 +441,7 @@ "inauguration_grant_expiration": "2019-03-31", "selected": true, "carpentries_instructor": false, + "research_software_engineer": false, "claimantship_grant": "3000.00", "notes_from_admin": "", "mentor": null, @@ -476,6 +483,7 @@ "inauguration_grant_expiration": "2019-03-31", "selected": true, "carpentries_instructor": false, + "research_software_engineer": false, "claimantship_grant": "3000.00", "notes_from_admin": "", "mentor": null, @@ -517,6 +525,7 @@ "inauguration_grant_expiration": "2019-03-31", "selected": true, "carpentries_instructor": false, + "research_software_engineer": false, "claimantship_grant": "3000.00", "notes_from_admin": "", "mentor": null, @@ -558,6 +567,7 @@ "inauguration_grant_expiration": "2019-03-31", "selected": true, "carpentries_instructor": false, + "research_software_engineer": false, "claimantship_grant": "3000.00", "notes_from_admin": "", "mentor": 1, @@ -599,6 +609,7 @@ "inauguration_grant_expiration": "2019-03-31", "selected": true, "carpentries_instructor": false, + "research_software_engineer": false, "claimantship_grant": "3000.00", "notes_from_admin": "", "mentor": 2, @@ -640,6 +651,7 @@ "inauguration_grant_expiration": "2019-03-31", "selected": false, "carpentries_instructor": false, + "research_software_engineer": false, "claimantship_grant": "0.00", "notes_from_admin": "", "mentor": null, diff --git a/lowfat/migrations/0112_auto_20171031_1133.py b/lowfat/migrations/0112_auto_20171031_1133.py new file mode 100644 index 00000000..d8e1a95d --- /dev/null +++ b/lowfat/migrations/0112_auto_20171031_1133.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.5 on 2017-10-31 11:33 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('lowfat', '0111_auto_20171031_1122'), + ] + + operations = [ + migrations.AddField( + model_name='claimant', + name='research_software_engineer', + field=models.BooleanField(default=False), + ), + migrations.AddField( + model_name='historicalclaimant', + name='research_software_engineer', + field=models.BooleanField(default=False), + ), + ] diff --git a/lowfat/models.py b/lowfat/models.py index 581ba026..81570d96 100644 --- a/lowfat/models.py +++ b/lowfat/models.py @@ -276,6 +276,7 @@ class Meta: ) selected = models.BooleanField(default=False) carpentries_instructor = models.BooleanField(default=False) + research_software_engineer = models.BooleanField(default=False) claimantship_grant = models.DecimalField( max_digits=MAX_DIGITS, decimal_places=2, From 39b6c95d8f26a6268678304e7b89fd28ad73e442 Mon Sep 17 00:00:00 2001 From: Raniere Silva Date: Tue, 31 Oct 2017 11:41:05 +0000 Subject: [PATCH 4/5] Add SortTable to the footnote. --- lowfat/templates/lowfat/base.html | 1 + 1 file changed, 1 insertion(+) diff --git a/lowfat/templates/lowfat/base.html b/lowfat/templates/lowfat/base.html index d66a59a5..ca5d5608 100644 --- a/lowfat/templates/lowfat/base.html +++ b/lowfat/templates/lowfat/base.html @@ -129,6 +129,7 @@

{{ flatpage.title }}

Bootstrap, Garlic.js, Selectize.js, + SortTable, Font Awesome, and Academicons. Running version {{ settings.VERSION }} From 777ddcc54ea4369142db99eb12ffbacb0b6c9bd1 Mon Sep 17 00:00:00 2001 From: Raniere Silva Date: Tue, 31 Oct 2017 20:19:26 +0000 Subject: [PATCH 5/5] Fix table sorting on date column --- lowfat/templates/lowfat/blogs.html | 2 +- lowfat/templates/lowfat/expenses.html | 2 +- lowfat/templates/lowfat/funds.html | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lowfat/templates/lowfat/blogs.html b/lowfat/templates/lowfat/blogs.html index 71f02682..b339823e 100644 --- a/lowfat/templates/lowfat/blogs.html +++ b/lowfat/templates/lowfat/blogs.html @@ -73,7 +73,7 @@

{% endif %} > {% if user.is_staff or claimant and user == claimant.user or fund.claimant and user == fund.claimant.user %} - + {{ blog.added }} {% endif %} diff --git a/lowfat/templates/lowfat/expenses.html b/lowfat/templates/lowfat/expenses.html index 64093ac1..48c14b73 100644 --- a/lowfat/templates/lowfat/expenses.html +++ b/lowfat/templates/lowfat/expenses.html @@ -71,7 +71,7 @@

{% endif %} > {% if user.is_staff or claimant and user == claimant.user %} - + {{ expense.added }} {% endif %} diff --git a/lowfat/templates/lowfat/funds.html b/lowfat/templates/lowfat/funds.html index 890890d2..00df23a7 100644 --- a/lowfat/templates/lowfat/funds.html +++ b/lowfat/templates/lowfat/funds.html @@ -67,7 +67,9 @@ {% endif %} > {% if user.is_staff or claimant and user == claimant.user %} - {{ fund.added }} + + {{ fund.added }} + {% endif %} {% if user.is_staff %} @@ -108,8 +110,8 @@ {{ fund.claimant.fullname }} {% endif %} - {{fund.start_date}} - {{fund.end_date}} + {{ fund.start_date }} + {{fund.end_date}} {% if user.is_staff or claimant and user == claimant.user %} {{ fund.get_status_display }}