add hikes/map pulls hikes out of db and renders

This commit is contained in:
Berkeley Martinez
2015-07-13 00:25:01 -07:00
parent 8f738fb1d0
commit de1d931b82
13 changed files with 161 additions and 54 deletions

View File

@@ -6,6 +6,14 @@ var utils = require('../utils');
var allFieldGuideNamesAndIds = utils.allFieldGuideNamesAndIds();
// order here determine order on all-articles page
const categories = [
'orientation',
'FYI',
'outreach',
'contact'
];
module.exports = function(app) {
var router = app.loopback.Router();
var FieldGuide = app.models.FieldGuide;
@@ -88,14 +96,6 @@ module.exports = function(app) {
completedFieldGuides = req.user.completedFieldGuides;
}
// order here determine order on page
const categories = [
'orientation',
'FYI',
'outreach',
'contact'
];
// produces an array of arrays of field guides ordered by the above
// i.e. [[...orientFieldGuides][...FYIfieldGuides]...]
const orderFieldGuides = categories