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'), 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 %} 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 %} diff --git a/static/js/projects/create_project.js b/static/js/projects/create_project.js index 7e3062a..98cd128 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'; } - var start_time_conv = start.getHours() + 'H' + minutes; //format hours + $('#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() + ':' + 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( 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'