From 6a1e5bf2496df4418b62721960f861fd0d721bb9 Mon Sep 17 00:00:00 2001 From: joatu Date: Thu, 9 Aug 2018 12:23:25 -0400 Subject: [PATCH 1/6] Update models.py --- projects/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/models.py b/projects/models.py index 9bcb74c..e2d3a1a 100755 --- a/projects/models.py +++ b/projects/models.py @@ -41,7 +41,7 @@ class Project(models.Model): ('Hea_oth', 'Other activity'), ('Soc_foo', 'Food security'), ('Soc_chi', 'Childcare'), - ('Soc_eld', 'Eldercare'), + ('Soc_eld', 'Senior Friendly'), ('Soc_ani', 'Animalcare'), ('Soc_oth', 'Other activity'), ('Env_gar', 'Gardening'), From 380e8c75ec947af4381ee0e14e23d06ae282958a Mon Sep 17 00:00:00 2001 From: samiriaz135 <39318503+samiriaz135@users.noreply.github.com> Date: Thu, 9 Aug 2018 13:17:57 -0400 Subject: [PATCH 2/6] Update create_project.js --- static/js/projects/create_project.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/static/js/projects/create_project.js b/static/js/projects/create_project.js index 7e3062a..3e28ee8 100644 --- a/static/js/projects/create_project.js +++ b/static/js/projects/create_project.js @@ -512,15 +512,25 @@ $(document).ready(function () { $('#project_name').text($('#inputName').val()); var start = new Date($('#inputStartDate').val()),// convert string to date locale = "en-us",//english - month = start.toLocaleString(locale, { month: "long" });//month name - var date = month + ' ' + start.getDate(); + monthStart = start.toLocaleString(locale, { month: "long" });//month name + end = new Date($('#inputEndDate').val()), + monthEnd = end.toLocaleString(locale, { month: "long" });//month name + var dateStart = monthStart + ' ' + start.getDate(), + dateEnd = monthEnd + ' ' + end.getDate(); $('#date_start_template').text(date);//show date start minutes = start.getMinutes(); // get minutes if (minutes === 0) { //add another 0 if minutes = 0 minutes = '00'; + } + $('#date_end_template').text(dateEnd);//show date end + minutesEnd = end.getMinutes(); // get minutes + if (minutesEnd === 0) { //add another 0 if minutes = 0 + minutesEnd = '00'; } var start_time_conv = start.getHours() + 'H' + minutes; //format hours $('#time_start_template').text(start_time_conv);//show hours + var end_time_conv = end.getHours() + ':' + minutesEnd; //format hours + $('#time_end_template').text(end_time_conv);//show hours var address = $('#inputNumber').val() + ' ' + $('#inputStreet').val() + ', ' + $('#inputZip').val(); // format address $('#project_address').text(address); //show project address $('#icon_category').append( From 3f05e2ce768b63e130561eebd2dacf11db66c4f0 Mon Sep 17 00:00:00 2001 From: samiriaz135 <39318503+samiriaz135@users.noreply.github.com> Date: Thu, 9 Aug 2018 13:19:30 -0400 Subject: [PATCH 3/6] Update detail_project.html --- projects/templates/detail_project.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/projects/templates/detail_project.html b/projects/templates/detail_project.html index 518d372..e0cb4c2 100644 --- a/projects/templates/detail_project.html +++ b/projects/templates/detail_project.html @@ -29,9 +29,13 @@
+  -  +
+  -  +
@@ -141,4 +145,4 @@
Discussion:
-{% endblock script %} \ No newline at end of file +{% endblock script %} From 078d8bf3cc125e183f29a7ecee6373c08b115926 Mon Sep 17 00:00:00 2001 From: samiriaz135 <39318503+samiriaz135@users.noreply.github.com> Date: Thu, 9 Aug 2018 13:20:52 -0400 Subject: [PATCH 4/6] Update create_project.js --- static/js/projects/create_project.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/projects/create_project.js b/static/js/projects/create_project.js index 3e28ee8..98cd128 100644 --- a/static/js/projects/create_project.js +++ b/static/js/projects/create_project.js @@ -527,7 +527,7 @@ $(document).ready(function () { if (minutesEnd === 0) { //add another 0 if minutes = 0 minutesEnd = '00'; } - var start_time_conv = start.getHours() + 'H' + minutes; //format hours + var start_time_conv = start.getHours() + ':' + minutes; //format hours $('#time_start_template').text(start_time_conv);//show hours var end_time_conv = end.getHours() + ':' + minutesEnd; //format hours $('#time_end_template').text(end_time_conv);//show hours From 79b55829f56fa1ece7dd874bb72833b26213054d Mon Sep 17 00:00:00 2001 From: samiriaz135 <39318503+samiriaz135@users.noreply.github.com> Date: Thu, 9 Aug 2018 13:43:03 -0400 Subject: [PATCH 5/6] Update list_projects.js Changed date and time format on past activities page --- static/js/projects/list_projects.js | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/static/js/projects/list_projects.js b/static/js/projects/list_projects.js index 6832c6c..b2337dd 100644 --- a/static/js/projects/list_projects.js +++ b/static/js/projects/list_projects.js @@ -16,17 +16,27 @@ $(document).ready(function(){ function format_time(time){ var start = new Date(time),// convert string to date locale = "en-us",//english - month = start.toLocaleString(locale, { month: "short" });//month name - var date = month + ' ' + start.getDate(); + monthStart = start.toLocaleString(locale, { month: "short" });//month name + end = new Date($('#inputEndDate').val()), + monthEnd = end.toLocaleString(locale, { month: "short" }); //month name + var dateStart = monthStart + ' ' + start.getDate(), + dateEnd = monthEnd + ' ' + end.getDate(); - minutes = start.getMinutes(); // get minutes - if(minutes===0){ //add another 0 if minutes = 0 - minutes='00'; - } - var start_time = start.getHours() + 'H' + minutes; //format hours - return date +' '+start_time + minutesStart = start.getMinutes(); // get minutes + if (minutesStart === 0) { //add another 0 if minutes = 0 + minutesStart = '00'; + } + minutesEnd = end.getMinutes(); // get minutes + if (minutesEnd === 0) { //add another 0 if minutes = 0 + minutesEnd = '00'; + } + var start_time = start.getHours() + ':' + minutesStart; //format hours + return dateStart +' '+start_time + var end_time = end.getHours() + ':' + minutesEnd; + return dateEnd +' '+end_time } + function format_community(abb){ if(abb==='CP'){ return 'Community Project' From 3f91f8a9745b0770a0aff0e4487a44226932af85 Mon Sep 17 00:00:00 2001 From: samiriaz135 <39318503+samiriaz135@users.noreply.github.com> Date: Thu, 9 Aug 2018 13:57:45 -0400 Subject: [PATCH 6/6] Update create_project.html Created Leisure sub-category and changed name of ElderCare --- projects/templates/create_project.html | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/projects/templates/create_project.html b/projects/templates/create_project.html index 04dff67..8e31930 100644 --- a/projects/templates/create_project.html +++ b/projects/templates/create_project.html @@ -76,6 +76,14 @@
Organize a Community activity
+
+
+ +
+
@@ -901,4 +909,4 @@
Organize a Community activity
}); -{% endblock script %} \ No newline at end of file +{% endblock script %}