close to getting all nonprofits to render

This commit is contained in:
Michael Q Larson
2015-03-30 20:08:29 -07:00
parent acea52dc1b
commit ca404e66e8
8 changed files with 60 additions and 135 deletions

2
app.js
View File

@ -361,6 +361,8 @@ app.get(
nonprofitController.showAllNonprofits nonprofitController.showAllNonprofits
); );
app.get('/nonprofits/getNonprofitsList', nonprofitController.showAllNonprofits);
app.get( app.get(
'/done-with-first-100-hours', '/done-with-first-100-hours',
passportConf.isAuthenticated, passportConf.isAuthenticated,

View File

@ -1,4 +1,5 @@
var async = require('async'), var async = require('async'),
Nonprofit = require('./../models/Nonprofit'),
resources = require('./resources.json'), resources = require('./resources.json'),
secrets = require('./../config/secrets'), secrets = require('./../config/secrets'),
moment = require('moment'), moment = require('moment'),
@ -116,13 +117,19 @@ exports.returnIndividualNonprofit = function(req, res, next) {
} }
res.render('nonprofits/show', { res.render('nonprofits/show', {
title: nonprofit.name, title: nonprofit.name,
description: nonprofit.description.join('') logoUrl: nonprofit.logoUrl,
projectDescription: nonprofit.projectDescription,
approvedDeliverables: nonprofit.approvedDeliverables,
websiteLink: nonprofit.websiteLink,
imageUrl: nonprofit.imageUrl,
whatDoesNonprofitDo: nonprofit.whatDoesNonprofitDo
}); });
}); });
}; };
exports.showAllNonprofits = function(req, res) { exports.showAllNonprofits = function(req, res) {
var data = {}; var data = {};
data.nonprofitList = resources.allNonprofitNames(); data.nonprofitsList = resources.allNonprofitNames();
console.log('here I am rock you like a hurricane', data);
res.send(data); res.send(data);
}; };

View File

@ -4,11 +4,13 @@ var async = require('async'),
Bonfire = require('./../models/Bonfire'), Bonfire = require('./../models/Bonfire'),
Story = require('./../models/Story'), Story = require('./../models/Story'),
Wiki = require('./../models/Wiki'), Wiki = require('./../models/Wiki'),
Nonprofit = require('./../models/Nonprofit'),
Comment = require('./../models/Comment'), Comment = require('./../models/Comment'),
resources = require('./resources.json'), resources = require('./resources.json'),
steps = resources.steps, steps = resources.steps,
secrets = require('./../config/secrets'), secrets = require('./../config/secrets'),
bonfires = require('../seed_data/bonfires.json'), bonfires = require('../seed_data/bonfires.json'),
nonprofits = require('../seed_data/nonprofits.json'),
coursewares = require('../seed_data/coursewares.json'), coursewares = require('../seed_data/coursewares.json'),
wikis = require('../seed_data/wikis.json'), wikis = require('../seed_data/wikis.json'),
moment = require('moment'), moment = require('moment'),
@ -261,6 +263,14 @@ module.exports = {
}) })
}, },
allNonprofitNames: function() {
return nonprofits.map(function(elem) {
return {
name: elem.name
}
})
},
getAllCourses: function() { getAllCourses: function() {
"use strict"; "use strict";
return coursewares; return coursewares;

View File

@ -9,11 +9,7 @@ var secrets = require('../config/secrets');
var nonprofitSchema = new mongoose.Schema({ var nonprofitSchema = new mongoose.Schema({
name: String, name: String,
registeredNonprofit: true,
requestedDeliverables: Array, requestedDeliverables: Array,
existingUserbase: true,
acceptJavascript: true,
agreeToTerms: true,
whatDoesNonprofitDo: String, whatDoesNonprofitDo: String,
websiteLink: String, websiteLink: String,
stakeholderName: String, stakeholderName: String,
@ -23,8 +19,6 @@ var nonprofitSchema = new mongoose.Schema({
projectDescription: String, projectDescription: String,
logoUrl: String, logoUrl: String,
imageUrl: String, imageUrl: String,
interestedCampers: Array,
confirmedCampers: Array,
estimatedHours: String estimatedHours: String
}); });

View File

@ -1,7 +1,6 @@
[ [
{ {
"id": "bd7157d8c441cbafaeb5bdef", "id": "bd7157d8c441cbafaeb5bdef",
"registeredNonprofit": true,
"requestedDeliverables": [ "requestedDeliverables": [
"Website", "Website",
"Donor Managment System", "Donor Managment System",
@ -9,9 +8,6 @@
"Volunteer Management System", "Volunteer Management System",
"Forms" "Forms"
], ],
"existingUserbase": true,
"acceptJavascript": true,
"agreeToTerms": true,
"whatDoesNonprofitDo": "We help the many less-fortunate Jewish families in our community, by providing them with nutritious food and energy to grow, learn, work, and give them hope for a better and brighter future.", "whatDoesNonprofitDo": "We help the many less-fortunate Jewish families in our community, by providing them with nutritious food and energy to grow, learn, work, and give them hope for a better and brighter future.",
"websiteLink": "http://chasdeikaduri.org/", "websiteLink": "http://chasdeikaduri.org/",
"stakeholderName": "Jonathan Tebeka", "stakeholderName": "Jonathan Tebeka",
@ -24,19 +20,13 @@
"projectDescription": "Campers will create a system will integrate the food inventory, donor and delivery driver management systems as well as replace the current application system with a custom form solution. System will include a more streamlined operations management, with user printable lists of inventory, drivers, and deliveries.", "projectDescription": "Campers will create a system will integrate the food inventory, donor and delivery driver management systems as well as replace the current application system with a custom form solution. System will include a more streamlined operations management, with user printable lists of inventory, drivers, and deliveries.",
"logoUrl": "https://trello-attachments.s3.amazonaws.com/54c7e02f2c173c37015b2f36/604x309/00580a0567a4b3afda29d52b09e7e829/rQQ6zwq31Uya8ie9QHC-MlvfXxqftm9UPPe524JUhmwSEaZjQ7oL7U1tVoHLUj-gVUwM-7uzBGFsAXD_A_cx_JyAZP4Td-GMBJ-AebJNRAQP0m0v253eKMkURp63aG4%3Ds0-d-e1-ft.png", "logoUrl": "https://trello-attachments.s3.amazonaws.com/54c7e02f2c173c37015b2f36/604x309/00580a0567a4b3afda29d52b09e7e829/rQQ6zwq31Uya8ie9QHC-MlvfXxqftm9UPPe524JUhmwSEaZjQ7oL7U1tVoHLUj-gVUwM-7uzBGFsAXD_A_cx_JyAZP4Td-GMBJ-AebJNRAQP0m0v253eKMkURp63aG4%3Ds0-d-e1-ft.png",
"imageUrl": "http://chasdeikaduri.org/images/523455_516325865106850_1885515210_n.jpg", "imageUrl": "http://chasdeikaduri.org/images/523455_516325865106850_1885515210_n.jpg",
"interestedCampers": [],
"confirmedCampers": [],
"estimatedHours": "200" "estimatedHours": "200"
}, },
{ {
"id": "bd7158d8c464cbafaeb4bdef", "id": "bd7158d8c464cbafaeb4bdef",
"registeredNonprofit": true,
"requestedDeliverables": [ "requestedDeliverables": [
"Other" "Other"
], ],
"existingUserbase": true,
"acceptJavascript": true,
"agreeToTerms": true,
"whatDoesNonprofitDo": "We connect simple technology with last mile communities to reduce poverty.", "whatDoesNonprofitDo": "We connect simple technology with last mile communities to reduce poverty.",
"websiteLink": "http://kopernik.info/", "websiteLink": "http://kopernik.info/",
"stakeholderName": "Amber Gregory", "stakeholderName": "Amber Gregory",
@ -49,19 +39,13 @@
"projectDescription": "Campers will create a Chrome browser extension to preserve sales data from a form, and upload in batches as the internet connection allows.", "projectDescription": "Campers will create a Chrome browser extension to preserve sales data from a form, and upload in batches as the internet connection allows.",
"logoUrl": "https://trello-attachments.s3.amazonaws.com/54d29f1e4c726fd765fa87ef/54d29f6388812dd367a243ab/x/018d9d3be5439870c56cccba5b3aa8bf/kopernik-logo-global.png", "logoUrl": "https://trello-attachments.s3.amazonaws.com/54d29f1e4c726fd765fa87ef/54d29f6388812dd367a243ab/x/018d9d3be5439870c56cccba5b3aa8bf/kopernik-logo-global.png",
"imageUrl": "http://kopernik.info/sites/default/files/updates/Presenting_the_low_carbon_t.jpg", "imageUrl": "http://kopernik.info/sites/default/files/updates/Presenting_the_low_carbon_t.jpg",
"interestedCampers": [],
"confirmedCampers": [],
"estimatedHours": "100" "estimatedHours": "100"
}, },
{ {
"id": "bd6274d8c464cbafaeb4bdef", "id": "bd6274d8c464cbafaeb4bdef",
"registeredNonprofit": true,
"requestedDeliverables": [ "requestedDeliverables": [
"Other" "Other"
], ],
"existingUserbase": true,
"acceptJavascript": true,
"agreeToTerms": true,
"whatDoesNonprofitDo": "No More Craptions seeks to improve upon automatic captioning on YouTube videos, by allowing users to edit captions to videos, even if they do not own the content.", "whatDoesNonprofitDo": "No More Craptions seeks to improve upon automatic captioning on YouTube videos, by allowing users to edit captions to videos, even if they do not own the content.",
"websiteLink": "http://nomorecraptions.com/", "websiteLink": "http://nomorecraptions.com/",
"stakeholderName": "Michael Lockrey", "stakeholderName": "Michael Lockrey",
@ -74,19 +58,13 @@
"projectDescription": "Campers will create a full stack JavaScript solution to allow users to edit captions from YouTube videos.", "projectDescription": "Campers will create a full stack JavaScript solution to allow users to edit captions from YouTube videos.",
"logoUrl": "https://trello-attachments.s3.amazonaws.com/54c1da1ba1fe2e325df5fc34/54c1dd31226b8111794d132f/x/b0402135d9ecce6d4ab45c4b5e5aeaa0/Turning-online-horse-manure-into-strawberry-jam---since-2009.png", "logoUrl": "https://trello-attachments.s3.amazonaws.com/54c1da1ba1fe2e325df5fc34/54c1dd31226b8111794d132f/x/b0402135d9ecce6d4ab45c4b5e5aeaa0/Turning-online-horse-manure-into-strawberry-jam---since-2009.png",
"imageUrl": "", "imageUrl": "",
"interestedCampers": [],
"confirmedCampers": [],
"estimatedHours": "200" "estimatedHours": "200"
}, },
{ {
"id": "bd1326d9c245cbafaeb4bdef", "id": "bd1326d9c245cbafaeb4bdef",
"registeredNonprofit": true,
"requestedDeliverables": [ "requestedDeliverables": [
"Website" "Website"
], ],
"existingUserbase": true,
"acceptJavascript": true,
"agreeToTerms": true,
"whatDoesNonprofitDo": "We distribute biodegradable toothbrushes globally to children in need.", "whatDoesNonprofitDo": "We distribute biodegradable toothbrushes globally to children in need.",
"websiteLink": "http://www.operationbrush.org/", "websiteLink": "http://www.operationbrush.org/",
"stakeholderName": "Dane Jonas", "stakeholderName": "Dane Jonas",
@ -99,19 +77,13 @@
"projectDescription": "Campers will create a mobile responsive website for the organization, with donation capabilities.", "projectDescription": "Campers will create a mobile responsive website for the organization, with donation capabilities.",
"logoUrl": "https://trello-attachments.s3.amazonaws.com/54d9810307b159a4d9027aa2/54d981bfe5eb145560fbb769/x/cf7f318bfe4aee631b0d0eeef272225c/logo.png", "logoUrl": "https://trello-attachments.s3.amazonaws.com/54d9810307b159a4d9027aa2/54d981bfe5eb145560fbb769/x/cf7f318bfe4aee631b0d0eeef272225c/logo.png",
"imageUrl": "http://www.operationbrush.org/images/temp/hands1.png", "imageUrl": "http://www.operationbrush.org/images/temp/hands1.png",
"interestedCampers": [],
"confirmedCampers": [],
"estimatedHours": "100" "estimatedHours": "100"
}, },
{ {
"id": "bd1325d8c464cbafaeb4bdef", "id": "bd1325d8c464cbafaeb5bdef",
"registeredNonprofit": true,
"requestedDeliverables": [ "requestedDeliverables": [
"Community Management Tool" "Community Management Tool"
], ],
"existingUserbase": true,
"acceptJavascript": true,
"agreeToTerms": true,
"whatDoesNonprofitDo": "We are the largest roller derby league in the world with around 250 adults and 150 junior skater members plus 500+ volunteers.", "whatDoesNonprofitDo": "We are the largest roller derby league in the world with around 250 adults and 150 junior skater members plus 500+ volunteers.",
"websiteLink": "http://www.rosecityrollers.com/about/our-charities/", "websiteLink": "http://www.rosecityrollers.com/about/our-charities/",
"stakeholderName": "Charity Kuahiwinui", "stakeholderName": "Charity Kuahiwinui",
@ -124,19 +96,13 @@
"projectDescription": "Campers will create a volunteer management system with multi-user access and reporting capabilities.", "projectDescription": "Campers will create a volunteer management system with multi-user access and reporting capabilities.",
"logoUrl": "https://trello-attachments.s3.amazonaws.com/54c1daf2d72d8eb868910b60/54c1dd4ecffcb09fc52b68a1/x/a8148f08769b449217e433bab8f39ddd/RCR-color.jpg", "logoUrl": "https://trello-attachments.s3.amazonaws.com/54c1daf2d72d8eb868910b60/54c1dd4ecffcb09fc52b68a1/x/a8148f08769b449217e433bab8f39ddd/RCR-color.jpg",
"imageUrl": "http://www.rosecityrollers.com/wp-content/uploads/2015/01/BZ7_5923-X3-675x375.jpg", "imageUrl": "http://www.rosecityrollers.com/wp-content/uploads/2015/01/BZ7_5923-X3-675x375.jpg",
"interestedCampers": [],
"confirmedCampers": [],
"estimatedHours": "200" "estimatedHours": "200"
}, },
{ {
"id": "bd1325d8c464cbafaeb4bdef", "id": "bd1325d8c464cbafaeb6bdef",
"registeredNonprofit": true,
"requestedDeliverables": [ "requestedDeliverables": [
"Website" "Website"
], ],
"existingUserbase": true,
"acceptJavascript": true,
"agreeToTerms": true,
"whatDoesNonprofitDo": "Save a Child's Heart provides urgently needed pediatric heart surgery and follow-up care for indigent children from developing countries", "whatDoesNonprofitDo": "Save a Child's Heart provides urgently needed pediatric heart surgery and follow-up care for indigent children from developing countries",
"websiteLink": "http://www.saveachildsheart.com/global/young-leadership-program/", "websiteLink": "http://www.saveachildsheart.com/global/young-leadership-program/",
"stakeholderName": "Shier Ziser", "stakeholderName": "Shier Ziser",
@ -149,19 +115,13 @@
"projectDescription": "Campers will create a single page fundraising website. In exchange for a donation, a user can customize a graphical 'heart' in someone's name or anonymously. The page will display all of the hearts on a 'wall of hearts.'", "projectDescription": "Campers will create a single page fundraising website. In exchange for a donation, a user can customize a graphical 'heart' in someone's name or anonymously. The page will display all of the hearts on a 'wall of hearts.'",
"logoUrl": "https://trello-attachments.s3.amazonaws.com/548b36629137780091a973cc/666x666/6c7a366ffb659649f6377d4a431687cd/country-logos-1-300dpi.jpg", "logoUrl": "https://trello-attachments.s3.amazonaws.com/548b36629137780091a973cc/666x666/6c7a366ffb659649f6377d4a431687cd/country-logos-1-300dpi.jpg",
"imageUrl": "http://www.saveachildsheart.com/wp-content/uploads/2013/10/7.2.5_Internation_Photograohy_Exhibition.jpg", "imageUrl": "http://www.saveachildsheart.com/wp-content/uploads/2013/10/7.2.5_Internation_Photograohy_Exhibition.jpg",
"interestedCampers": [],
"confirmedCampers": [],
"estimatedHours": "100" "estimatedHours": "100"
}, },
{ {
"id": "bd1325d8c464cbafaeb4bdef", "id": "bd1325d8c464cbafaeb4bdef",
"registeredNonprofit": true,
"requestedDeliverables": [ "requestedDeliverables": [
"Website" "Website"
], ],
"existingUserbase": true,
"acceptJavascript": true,
"agreeToTerms": true,
"whatDoesNonprofitDo": "Savvy Cyber Kids enables youth to be empowered with technology by providing age appropriate resources and education.", "whatDoesNonprofitDo": "Savvy Cyber Kids enables youth to be empowered with technology by providing age appropriate resources and education.",
"websiteLink": "http://savvycyberkids.org/", "websiteLink": "http://savvycyberkids.org/",
"stakeholderName": "Ben Halpert", "stakeholderName": "Ben Halpert",
@ -174,20 +134,14 @@
"projectDescription": "Campers will create a website where potential donors can view which schools already have the Savvy Cyber Kids books, and donate books to those schools that do not.", "projectDescription": "Campers will create a website where potential donors can view which schools already have the Savvy Cyber Kids books, and donate books to those schools that do not.",
"logoUrl": "https://trello-attachments.s3.amazonaws.com/54ee3c7bf205562680177b59/218x190/1dc460de4edc9fdd4b481b24e93cfb23/logo.png", "logoUrl": "https://trello-attachments.s3.amazonaws.com/54ee3c7bf205562680177b59/218x190/1dc460de4edc9fdd4b481b24e93cfb23/logo.png",
"imageUrl": "http://www.privatewifi.com/wp-content/uploads/2014/10/Halpert.jpg", "imageUrl": "http://www.privatewifi.com/wp-content/uploads/2014/10/Halpert.jpg",
"interestedCampers": [],
"confirmedCampers": [],
"estimatedHours": "200" "estimatedHours": "200"
}, },
{ {
"id": "bd1325d8c464cbafaeb4bdef", "id": "bd1325d8c464cbafaeb7bdef",
"registeredNonprofit": true,
"requestedDeliverables": [ "requestedDeliverables": [
"Other" "Other"
], ],
"existingUserbase": true, "whatDoesNonprofitDo": "Transcendent Pathways",
"acceptJavascript": true,
"agreeToTerms": true,
"whatDoesNonprofitDo": "Transcendent Pathways ",
"websiteLink": "http://transcendentpathways.org/", "websiteLink": "http://transcendentpathways.org/",
"stakeholderName": "Mark Ackerley", "stakeholderName": "Mark Ackerley",
"stakeholderEmail": "mackerley.music@gmail.com", "stakeholderEmail": "mackerley.music@gmail.com",
@ -199,19 +153,13 @@
"projectDescription": "Campers will build a website where medical facilities can list music therapy time slots, and musicians can sign up to fill these slots.", "projectDescription": "Campers will build a website where medical facilities can list music therapy time slots, and musicians can sign up to fill these slots.",
"logoUrl": "http://static1.squarespace.com/static/521b8957e4b024f66a58b214/t/521b8e9de4b093a8696eb9b8/1398718364447/?format=750w", "logoUrl": "http://static1.squarespace.com/static/521b8957e4b024f66a58b214/t/521b8e9de4b093a8696eb9b8/1398718364447/?format=750w",
"imageUrl": "https://trello-attachments.s3.amazonaws.com/54fdb0328917ca64e9e8a79f/54fdc3b710f67caf6da14719/x/49fbe0012179bf254928f3f2a44810b4/Screen_2BShot_2B2013-08-26_2Bat_2B1.32.35_2BPM.png", "imageUrl": "https://trello-attachments.s3.amazonaws.com/54fdb0328917ca64e9e8a79f/54fdc3b710f67caf6da14719/x/49fbe0012179bf254928f3f2a44810b4/Screen_2BShot_2B2013-08-26_2Bat_2B1.32.35_2BPM.png",
"interestedCampers": [],
"confirmedCampers": [],
"estimatedHours": "200" "estimatedHours": "200"
}, },
{ {
"id": "bd1325d8c464cbafaeb4bdef", "id": "bd1325d8c464cbafaeb8bdef",
"registeredNonprofit": true,
"requestedDeliverables": [ "requestedDeliverables": [
"Other" "Other"
], ],
"existingUserbase": true,
"acceptJavascript": true,
"agreeToTerms": true,
"whatDoesNonprofitDo": "Timeraiser is a volunteer matching fair, a silent art auction, and a night out on the town. The big Timeraiser twist is rather than bid money on artwork, participants bid volunteer hours. ", "whatDoesNonprofitDo": "Timeraiser is a volunteer matching fair, a silent art auction, and a night out on the town. The big Timeraiser twist is rather than bid money on artwork, participants bid volunteer hours. ",
"websiteLink": "http://www.timeraiser.ca/", "websiteLink": "http://www.timeraiser.ca/",
"stakeholderName": "Stephanie McAllister", "stakeholderName": "Stephanie McAllister",
@ -224,71 +172,6 @@
"projectDescription": "Campers will build a mobile responsive web form to allow Timeraiser eventgoers to select which nonprofit organizations they're interested in volunteering with. System will have Salesforce integration and reporting capabilities.", "projectDescription": "Campers will build a mobile responsive web form to allow Timeraiser eventgoers to select which nonprofit organizations they're interested in volunteering with. System will have Salesforce integration and reporting capabilities.",
"logoUrl": "http://www.timeraiser.ca/uploads/5/6/1/4/5614163/1277176.png?480", "logoUrl": "http://www.timeraiser.ca/uploads/5/6/1/4/5614163/1277176.png?480",
"imageUrl": "http://www.timeraiser.ca/uploads/5/6/1/4/5614163/______________4571248_orig.png", "imageUrl": "http://www.timeraiser.ca/uploads/5/6/1/4/5614163/______________4571248_orig.png",
"interestedCampers": [],
"confirmedCampers": [],
"estimatedHours": "100" "estimatedHours": "100"
},
{
"id": "bd1325d8c464cbafaeb4bdef",
"registeredNonprofit": true,
"requestedDeliverables": [],
"existingUserbase": true,
"acceptJavascript": true,
"agreeToTerms": true,
"whatDoesNonprofitDo": "string",
"websiteLink": "string",
"stakeholderName": "string",
"stakeholderEmail": "string",
"name": "string",
"endUser": "string",
"approvedDeliverables": [],
"projectDescription": "string",
"logoUrl": "string",
"imageUrl": "string",
"interestedCampers": [],
"confirmedCampers": [],
"estimatedHours": "string"
},
{
"id": "bd1325d8c464cbafaeb4bdef",
"registeredNonprofit": true,
"requestedDeliverables": [],
"existingUserbase": true,
"acceptJavascript": true,
"agreeToTerms": true,
"whatDoesNonprofitDo": "string",
"websiteLink": "string",
"stakeholderName": "string",
"stakeholderEmail": "string",
"name": "string",
"endUser": "string",
"approvedDeliverables": [],
"projectDescription": "string",
"logoUrl": "string",
"imageUrl": "string",
"interestedCampers": [],
"confirmedCampers": [],
"estimatedHours": "string"
},
{
"id": "bd1325d8c464cbafaeb4bdef",
"registeredNonprofit": true,
"requestedDeliverables": [],
"existingUserbase": true,
"acceptJavascript": true,
"agreeToTerms": true,
"whatDoesNonprofitDo": "string",
"websiteLink": "string",
"stakeholderName": "string",
"stakeholderEmail": "string",
"name": "string",
"endUser": "string",
"approvedDeliverables": [],
"projectDescription": "string",
"logoUrl": "string",
"imageUrl": "string",
"interestedCampers": [],
"confirmedCampers": [],
"estimatedHours": "string"
} }
] ]

View File

@ -2,16 +2,18 @@ require('dotenv').load();
var Bonfire = require('../models/Bonfire.js'), var Bonfire = require('../models/Bonfire.js'),
Courseware = require('../models/Courseware.js'), Courseware = require('../models/Courseware.js'),
Wiki = require('../models/Wiki.js'), Wiki = require('../models/Wiki.js'),
Nonprofit = require('../models/Nonprofit.js'),
mongoose = require('mongoose'), mongoose = require('mongoose'),
secrets = require('../config/secrets'), secrets = require('../config/secrets'),
coursewares = require('./coursewares.json'), coursewares = require('./coursewares.json'),
wikis = require('./wikis.json') wikis = require('./wikis.json'),
nonprofits = require('./nonprofits.json'),
bonfires = require('./bonfires.json'); bonfires = require('./bonfires.json');
mongoose.connect(secrets.db); mongoose.connect(secrets.db);
var counter = 0; var counter = 0;
var offerings = 3; var offerings = 4;
var CompletionMonitor = function() { var CompletionMonitor = function() {
counter++; counter++;
@ -75,3 +77,20 @@ Wiki.remove({}, function(err, data) {
}); });
console.log('wikis'); console.log('wikis');
}); });
Nonprofit.remove({}, function(err, data) {
if (err) {
console.error(err);
} else {
console.log('Deleted ', data);
}
Nonprofit.create(nonprofits, function(err, data) {
if (err) {
console.log(err);
} else {
console.log('Saved ', data);
}
CompletionMonitor();
});
console.log('nonprofits');
});

View File

@ -7,7 +7,17 @@ block content
.panel-heading.text-center .panel-heading.text-center
h1= title h1= title
.panel-body .panel-body
div!= description h3= whatDoesNonprofitDo
for deliverable in approvedDeliverables
p= deliverable
p Website:
a(href=websiteLink)= websiteLink
p Project Description:
= projectDescription
p Estimated Hours Per Camper
= estimatedHours
img.img-responsive(src=imageUrl)
img.img-responsive(src=logoUrl)
.spacer .spacer
.text-center .text-center
#showAllButton.btn.btn-info.btn-big Show all Nonprofits Projects #showAllButton.btn.btn-info.btn-big Show all Nonprofits Projects

View File

@ -8,7 +8,7 @@ h3
return name.toLowerCase().replace(/\s/g, '-'); return name.toLowerCase().replace(/\s/g, '-');
} }
$.ajax({ $.ajax({
url: '/wiki/getNonprofitsList', url: '/nonprofits/getNonprofitsList',
type: 'GET' type: 'GET'
}) })
.success( .success(
@ -17,7 +17,7 @@ h3
for (var i = 0; i < data.nonprofitsList.length; i++) { for (var i = 0; i < data.nonprofitsList.length; i++) {
var li = document.createElement("li"); var li = document.createElement("li");
var linkedName = getLinkedName(data.nonprofitsList[i].name); var linkedName = getLinkedName(data.nonprofitsList[i].name);
$(li).html("<a href='/nonprofits/" + linkedName + "'>" + data.wikiList[i].name + "</a></li>"); $(li).html("<a href='/nonprofits/" + linkedName + "'>" + data.nonprofitsList[i].name + "</a></li>");
docfrag.appendChild(li); docfrag.appendChild(li);
}; };
$('#nonprofitsList').append(docfrag); $('#nonprofitsList').append(docfrag);