From 11c3fdd0edf43a05e3b5c169b699a08b814dd3f6 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 1 Oct 2014 17:33:44 -0400 Subject: get rid of iframes, show a few pix instead --- views/projects/list-projects.ejs | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'views') diff --git a/views/projects/list-projects.ejs b/views/projects/list-projects.ejs index 537d409..c110934 100644 --- a/views/projects/list-projects.ejs +++ b/views/projects/list-projects.ejs @@ -5,7 +5,14 @@ [[ projects.forEach(function(project, i) { ]] - + + [[ mediaCount = 0 ]] + [[ project.media.some(function(media){ ]] + [[ if (media.media.type != "image") { return false } ]] + [[ if (++mediaCount > 3) { return true } ]] + + [[ }) ]] + [[ if (String(user._id) == String(project.user_id)) { ]]
edit
[[ } ]] @@ -21,3 +28,19 @@ [[ } ]] + + -- cgit v1.2.3-70-g09d2