diff options
author | Dennis Eriksen <dennis.se@gmail.com> | 2013-05-23 15:09:16 +0200 |
---|---|---|
committer | Dennis Eriksen <dennis.se@gmail.com> | 2013-05-23 15:09:16 +0200 |
commit | 5b50f81268279abc01ecb0113d20f577ab3810e5 (patch) | |
tree | 102f40272805c8805056a7d7d9f2f9b12a101ee7 /views/project.ejs | |
parent | added loadProject function that gets all posts that belong to that (diff) | |
download | Divid-5b50f81268279abc01ecb0113d20f577ab3810e5.tar.gz |
fixed last activity on project page, and bug when posting new items
Diffstat (limited to 'views/project.ejs')
-rw-r--r-- | views/project.ejs | 840 |
1 files changed, 42 insertions, 798 deletions
diff --git a/views/project.ejs b/views/project.ejs index a3e9802..cd78500 100644 --- a/views/project.ejs +++ b/views/project.ejs @@ -93,822 +93,66 @@ <section class="overview"> <h2>Siste aktivitet</h2> <div class="lastactivity" id="lastactivity"> - <div class="row-fluid act443 activity"> - <div class="span5"> + <% posts.forEach(function(post) { %> + <div class="row-fluid post-<%= post._id %> activity"> <div class="row-fluid"> - <div class="span2 info text-right">av</div> - <div class="span10">Truls Hyttebakken</div> - </div> - <div class="row-fluid"> - <div class="span2 info text-right">hva</div> - <div class="span10">Taxi fra flyplass til Club 4</div> - </div> - </div> - <div class="span2"> - <div class="row-fluid"> - <div class="span4 info text-right"> - delt på - </div> - <div class="span8 text-small"> - Stian, Helene, Truls, Robert - </div> - </div> - </div> - <div class="span2"> - <div class="row-fluid"> - <div class="span4 info text-right"> - kategori - </div> - <div class="span8 text-small"> - Transport - </div> - </div> - </div> - <div class="span2"> - <div class="row-fluid"> - <div class="span3 info text-right"> - når - </div> - <div class="span9 text-small"> - 2013-04-19 - </div> - </div> - <div class="row-fluid"> - <div class="span3 info text-right"> - sum - </div> - <div class="span9"> - <strong>2901 kr</strong> - </div> - </div> - </div> - <div class="span1"> - <div class="row-fluid"> - <a href="http://i.imgur.com/0I6SHwu.jpg" target="_blank"><i class="icon-picture"></i></a> - </div> - <div class="row-fluid info"> - </div> - </div> - </div> - - - <div class="row-fluid act443 activity"> - <div class="row-fluid"> - <div class="span1 date"> - <div class="row-fluid">24</div> - <div class="row-fluid info">APR</div> - <div class="row-fluid"><a href="#details-443" data-toggle="collapse" class="no-text-decoration" data-parent="#lastactivity">▼</a></div> - </div> - <div class="span6"> - <div class="row-fluid"> - <div class="span2 info text-right smallfullwidth">for</div> - <div class="span10 smallfullwidth">Robert Joramo</div> - </div> - <div class="row-fluid"> - <div class="span2 info text-right smallfullwidth">hva</div> - <div class="span10 smallfullwidth">Tre horer, fire kaviartuber og alt for mye krem</div> + <div class="span1 date"> + <% + var d = new Date(post.when); + var month = ['JAN', 'FEB', 'MAR', 'APR', 'MAI', 'JUN', 'JUL', 'AUG', 'SEP', 'OKT', 'NOV', 'DES']; + %> + <div class="row-fluid"><%= d.getDate() %></div> + <div class="row-fluid info"><%= month[d.getMonth()] %></div> + <div class="row-fluid"><a href="#details-<%= post._id %>" data-toggle="collapse" class="no-text-decoration" data-parent="#lastactivity">▼</a></div> </div> - </div> - <div class="span2"> - <div class="row-fluid"> - <div class="span4 info text-right smallfullwidth"> - delt på + <div class="span6"> + <div class="row-fluid"> + <div class="span2 info text-right smallfullwidth">av</div> + <div class="span10 smallfullwidth"><%= post.user.name === undefined ? post.user.email + ' <span class="muted">(ikke registrert)</span>' : post.user.name %></div> </div> - <div class="span8 text-small smallfullwidth"> - Helene, Robert + <div class="row-fluid"> + <div class="span2 info text-right smallfullwidth">hva</div> + <div class="span10 smallfullwidth"><%= post.what %></div> </div> </div> - </div> - <div class="span2"> - <div class="row-fluid text-right"> - <span class="info">sum</span> - <strong>583 kr</strong> - </div> - <div class="row-fluid text-right"> - <i class="icon-picture"></i> - </div> - </div> - </div> - <div class="fluid-row collapse details" id="details-443"> - <div class="span7"> - <div class="row-fluid"> - <div class="span2 info text-right smallfullwidth">av</div> - <div class="span10 smallfullwidth">Dennis Eriksen</div> - </div> - <div class="row-fluid"> - <div class="span2 info text-right smallfullwidth">kommentar</div> - <div class="span10"> - Helene og robert hadde seg en hyggetur på byen og fant ut at det ble nødvendig med horer. Da er det selvsagt obligatorisk med kaviar. Hva de skulle med kremen er fortsatt uvisst, men jeg måtte betale for den... + <div class="span2"> + <div class="row-fluid"> + <div class="span4 info text-right smallfullwidth"> + delt på + </div> + <div class="span8 text-small smallfullwidth"> + Helene, Robert + </div> </div> </div> - </div> - <div class="span2"> - <div class="row-fluid"> - <div class="span4 info text-right smallfullwidth"> - kategori + <div class="span2"> + <div class="row-fluid text-right"> + <span class="info">sum</span> + <strong><%= post.value %> <%= post.currency %></strong> </div> - <div class="span8 text-small smallfullwidth"> - Div + <div class="row-fluid text-right"> + <i class="icon-picture"></i> </div> </div> - <div class="row-fluid info"> - <a href="#edit">[edit]</a> - </div> </div> - - </div> - </div> - - - <div class="row-fluid act443 activity"> - <div class="row-fluid"> - <div class="span1 date"> - <div class="row-fluid"> - <div class="span12"> - <div class="row-fluid">24</div> - <div class="row-fluid info">APR</div> - <div class="row-fluid"><a href="#details-443" data-toggle="collapse" class="no-text-decoration" data-parent="#lastactivity">▼</a></div> - </div> - </div> - </div> - <div class="span6"> - <div class="row-fluid"> - <div class="span2 info text-right smallfullwidth">for</div> - <div class="span10 smallfullwidth">Robert Joramo</div> - </div> - <div class="row-fluid"> - <div class="span2 info text-right smallfullwidth">hva</div> - <div class="span10 smallfullwidth">Tre horer, fire kaviartuber og alt for mye krem</div> - </div> - </div> - <div class="span2"> - <div class="row-fluid"> - <div class="span4 info text-right smallfullwidth"> - delt på - </div> - <div class="span8 text-small smallfullwidth"> - Helene, Robert - </div> - </div> - </div> - <div class="span2"> - <div class="row-fluid text-right"> - <span class="info">sum</span> - <strong>583 kr</strong> - </div> - <div class="row-fluid text-right"> - <i class="icon-picture"></i> - </div> - </div> - </div> - <div class="fluid-row collapse details" id="details-443"> - <div class="span7"> - <div class="row-fluid"> - <div class="span2 info text-right smallfullwidth">av</div> - <div class="span10 smallfullwidth">Dennis Eriksen</div> - </div> - <div class="row-fluid"> - <div class="span2 info text-right smallfullwidth">kommentar</div> - <div class="span10"> - Helene og robert hadde seg en hyggetur på byen og fant ut at det ble nødvendig med horer. Da er det selvsagt obligatorisk med kaviar. Hva de skulle med kremen er fortsatt uvisst, men jeg måtte betale for den... + <div class="fluid-row collapse details" id="details-<%= post._id %>"> + <div class="span7"> + <div class="row-fluid"> + <div class="span2 info text-right smallfullwidth">kommentar</div> + <div class="span10"> + <%= post.comment %> + </div> </div> </div> - </div> - <div class="span2"> - <div class="row-fluid"> - <div class="span4 info text-right smallfullwidth"> - kategori - </div> - <div class="span8 text-small smallfullwidth"> - Div + <div class="span2"> + <div class="row-fluid info"> + <a href="#edit">[edit]</a> </div> </div> - <div class="row-fluid info"> - <a href="#edit">[edit]</a> - </div> </div> - </div> - </div> - - - <div class="row-fluid act443 activity"> - <div class="row-fluid"> - <div class="span1 date"> - <div class="row-fluid"> - <div class="span12"> - <div class="row-fluid">24</div> - <div class="row-fluid info">APR</div> - <div class="row-fluid"><a href="#details-443" data-toggle="collapse" class="no-text-decoration" data-parent="#lastactivity">▼</a></div> - </div> - </div> - </div> - <div class="span6"> - <div class="row-fluid"> - <div class="span2 info text-right smallfullwidth">for</div> - <div class="span10 smallfullwidth">Robert Joramo</div> - </div> - <div class="row-fluid"> - <div class="span2 info text-right smallfullwidth">hva</div> - <div class="span10 smallfullwidth">Tre horer, fire kaviartuber og alt for mye krem</div> - </div> - </div> - <div class="span2"> - <div class="row-fluid"> - <div class="span4 info text-right smallfullwidth"> - delt på - </div> - <div class="span8 text-small smallfullwidth"> - Helene, Robert - </div> - </div> - </div> - <div class="span2"> - <div class="row-fluid text-right"> - <span class="info">sum</span> - <strong>583 kr</strong> - </div> - <div class="row-fluid text-right"> - <i class="icon-picture"></i> - </div> - </div> - </div> - <div class="fluid-row collapse details" id="details-443"> - <div class="span7"> - <div class="row-fluid"> - <div class="span2 info text-right smallfullwidth">av</div> - <div class="span10 smallfullwidth">Dennis Eriksen</div> - </div> - <div class="row-fluid"> - <div class="span2 info text-right smallfullwidth">kommentar</div> - <div class="span10"> - Helene og robert hadde seg en hyggetur på byen og fant ut at det ble nødvendig med horer. Da er det selvsagt obligatorisk med kaviar. Hva de skulle med kremen er fortsatt uvisst, men jeg måtte betale for den... - </div> - </div> - </div> - <div class="span2"> - <div class="row-fluid"> - <div class="span4 info text-right smallfullwidth"> - kategori - </div> - <div class="span8 text-small smallfullwidth"> - Div - </div> - </div> - <div class="row-fluid info"> - <a href="#edit">[edit]</a> - </div> - </div> - - </div> - </div> - - - <div class="row-fluid act443 activity"> - <div class="row-fluid"> - <div class="span1 date"> - <div class="row-fluid"> - <div class="span12"> - <div class="row-fluid">24</div> - <div class="row-fluid info">APR</div> - <div class="row-fluid"><a href="#details-443" data-toggle="collapse" class="no-text-decoration" data-parent="#lastactivity">▼</a></div> - </div> - </div> - </div> - <div class="span6"> - <div class="row-fluid"> - <div class="span2 info text-right smallfullwidth">for</div> - <div class="span10 smallfullwidth">Robert Joramo</div> - </div> - <div class="row-fluid"> - <div class="span2 info text-right smallfullwidth">hva</div> - <div class="span10 smallfullwidth">Tre horer, fire kaviartuber og alt for mye krem</div> - </div> - </div> - <div class="span2"> - <div class="row-fluid"> - <div class="span4 info text-right smallfullwidth"> - delt på - </div> - <div class="span8 text-small smallfullwidth"> - Helene, Robert - </div> - </div> - </div> - <div class="span2"> - <div class="row-fluid text-right"> - <span class="info">sum</span> - <strong>583 kr</strong> - </div> - <div class="row-fluid text-right"> - <i class="icon-picture"></i> - </div> - </div> - </div> - <div class="fluid-row collapse details" id="details-443"> - <div class="span7"> - <div class="row-fluid"> - <div class="span2 info text-right smallfullwidth">av</div> - <div class="span10 smallfullwidth">Dennis Eriksen</div> - </div> - <div class="row-fluid"> - <div class="span2 info text-right smallfullwidth">kommentar</div> - <div class="span10"> - Helene og robert hadde seg en hyggetur på byen og fant ut at det ble nødvendig med horer. Da er det selvsagt obligatorisk med kaviar. Hva de skulle med kremen er fortsatt uvisst, men jeg måtte betale for den... - </div> - </div> - </div> - <div class="span2"> - <div class="row-fluid"> - <div class="span4 info text-right smallfullwidth"> - kategori - </div> - <div class="span8 text-small smallfullwidth"> - Div - </div> - </div> - <div class="row-fluid info"> - <a href="#edit">[edit]</a> - </div> - </div> - - </div> - </div> - - - <div class="row-fluid act443 activity"> - <div class="row-fluid"> - <div class="span1 date"> - <div class="row-fluid"> - <div class="span12"> - <div class="row-fluid">24</div> - <div class="row-fluid info">APR</div> - <div class="row-fluid"><a href="#details-443" data-toggle="collapse" class="no-text-decoration" data-parent="#lastactivity">▼</a></div> - </div> - </div> - </div> - <div class="span6"> - <div class="row-fluid"> - <div class="span2 info text-right smallfullwidth">for</div> - <div class="span10 smallfullwidth">Robert Joramo</div> - </div> - <div class="row-fluid"> - <div class="span2 info text-right smallfullwidth">hva</div> - <div class="span10 smallfullwidth">Tre horer, fire kaviartuber og alt for mye krem</div> - </div> - </div> - <div class="span2"> - <div class="row-fluid"> - <div class="span4 info text-right smallfullwidth"> - delt på - </div> - <div class="span8 text-small smallfullwidth"> - Helene, Robert - </div> - </div> - </div> - <div class="span2"> - <div class="row-fluid text-right"> - <span class="info">sum</span> - <strong>583 kr</strong> - </div> - <div class="row-fluid text-right"> - <i class="icon-picture"></i> - </div> - </div> - </div> - <div class="fluid-row collapse details" id="details-443"> - <div class="span7"> - <div class="row-fluid"> - <div class="span2 info text-right smallfullwidth">av</div> - <div class="span10 smallfullwidth">Dennis Eriksen</div> - </div> - <div class="row-fluid"> - <div class="span2 info text-right smallfullwidth">kommentar</div> - <div class="span10"> - Helene og robert hadde seg en hyggetur på byen og fant ut at det ble nødvendig med horer. Da er det selvsagt obligatorisk med kaviar. Hva de skulle med kremen er fortsatt uvisst, men jeg måtte betale for den... - </div> - </div> - </div> - <div class="span2"> - <div class="row-fluid"> - <div class="span4 info text-right smallfullwidth"> - kategori - </div> - <div class="span8 text-small smallfullwidth"> - Div - </div> - </div> - <div class="row-fluid info"> - <a href="#edit">[edit]</a> - </div> - </div> - - </div> - </div> - - - <div class="row-fluid act443 activity"> - <div class="row-fluid"> - <div class="span1 date"> - <div class="row-fluid"> - <div class="span12"> - <div class="row-fluid">24</div> - <div class="row-fluid info">APR</div> - <div class="row-fluid"><a href="#details-443" data-toggle="collapse" class="no-text-decoration" data-parent="#lastactivity">▼</a></div> - </div> - </div> - </div> - <div class="span6"> - <div class="row-fluid"> - <div class="span2 info text-right smallfullwidth">for</div> - <div class="span10 smallfullwidth">Robert Joramo</div> - </div> - <div class="row-fluid"> - <div class="span2 info text-right smallfullwidth">hva</div> - <div class="span10 smallfullwidth">Tre horer, fire kaviartuber og alt for mye krem</div> - </div> - </div> - <div class="span2"> - <div class="row-fluid"> - <div class="span4 info text-right smallfullwidth"> - delt på - </div> - <div class="span8 text-small smallfullwidth"> - Helene, Robert - </div> - </div> - </div> - <div class="span2"> - <div class="row-fluid text-right"> - <span class="info">sum</span> - <strong>583 kr</strong> - </div> - <div class="row-fluid text-right"> - <i class="icon-picture"></i> - </div> - </div> - </div> - <div class="fluid-row collapse details" id="details-443"> - <div class="span7"> - <div class="row-fluid"> - <div class="span2 info text-right smallfullwidth">av</div> - <div class="span10 smallfullwidth">Dennis Eriksen</div> - </div> - <div class="row-fluid"> - <div class="span2 info text-right smallfullwidth">kommentar</div> - <div class="span10"> - Helene og robert hadde seg en hyggetur på byen og fant ut at det ble nødvendig med horer. Da er det selvsagt obligatorisk med kaviar. Hva de skulle med kremen er fortsatt uvisst, men jeg måtte betale for den... - </div> - </div> - </div> - <div class="span2"> - <div class="row-fluid"> - <div class="span4 info text-right smallfullwidth"> - kategori - </div> - <div class="span8 text-small smallfullwidth"> - Div - </div> - </div> - <div class="row-fluid info"> - <a href="#edit">[edit]</a> - </div> - </div> - - </div> - </div> - - - - <div class="row-fluid act443 activity"> - <div class="row-fluid"> - <div class="span1 date"> - <div class="row-fluid"> - <div class="span12"> - <div class="row-fluid">24</div> - <div class="row-fluid info">APR</div> - <div class="row-fluid"><a href="#details-443" data-toggle="collapse" class="no-text-decoration" data-parent="#lastactivity">▼</a></div> - </div> - </div> - </div> - <div class="span6"> - <div class="row-fluid"> - <div class="span2 info text-right smallfullwidth">for</div> - <div class="span10 smallfullwidth">Robert Joramo</div> - </div> - <div class="row-fluid"> - <div class="span2 info text-right smallfullwidth">hva</div> - <div class="span10 smallfullwidth">Tre horer, fire kaviartuber og alt for mye krem</div> - </div> - </div> - <div class="span2"> - <div class="row-fluid"> - <div class="span4 info text-right smallfullwidth"> - delt på - </div> - <div class="span8 text-small smallfullwidth"> - Helene, Robert - </div> - </div> - </div> - <div class="span2"> - <div class="row-fluid text-right"> - <span class="info">sum</span> - <strong>583 kr</strong> - </div> - <div class="row-fluid text-right"> - <i class="icon-picture"></i> - </div> - </div> - </div> - <div class="fluid-row collapse details" id="details-443"> - <div class="span7"> - <div class="row-fluid"> - <div class="span2 info text-right smallfullwidth">av</div> - <div class="span10 smallfullwidth">Dennis Eriksen</div> - </div> - <div class="row-fluid"> - <div class="span2 info text-right smallfullwidth">kommentar</div> - <div class="span10"> - Helene og robert hadde seg en hyggetur på byen og fant ut at det ble nødvendig med horer. Da er det selvsagt obligatorisk med kaviar. Hva de skulle med kremen er fortsatt uvisst, men jeg måtte betale for den... - </div> - </div> - </div> - <div class="span2"> - <div class="row-fluid"> - <div class="span4 info text-right smallfullwidth"> - kategori - </div> - <div class="span8 text-small smallfullwidth"> - Div - </div> - </div> - <div class="row-fluid info"> - <a href="#edit">[edit]</a> - </div> - </div> - - </div> - </div> - - - - - <div class="row-fluid act443 activity"> - <div class="span5"> - <div class="row-fluid"> - <div class="span2 info text-right">av</div> - <div class="span10">Dennis Eriksen</div> - </div> - <div class="row-fluid"> - <div class="span2 info text-right">hva</div> - <div class="span10">Plumbo</div> - </div> - </div> - <div class="span2"> - <div class="row-fluid"> - <div class="span4 info text-right"> - delt på - </div> - <div class="span8 text-small"> - Stian, Dennis, Truls, Helene, Robert - </div> - </div> - </div> - <div class="span2"> - <div class="row-fluid"> - <div class="span4 info text-right"> - kategori - </div> - <div class="span8 text-small"> - Nødvendigheter - </div> - </div> - </div> - <div class="span2"> - <div class="row-fluid"> - <div class="span3 info text-right"> - når - </div> - <div class="span9 text-small"> - 2013-04-13 - </div> - </div> - <div class="row-fluid"> - <div class="span3 info text-right"> - sum - </div> - <div class="span9"> - 49 kr - </div> - </div> - </div> - <div class="span1"> - <div class="row-fluid"> - <a href="http://i.imgur.com/0I6SHwu.jpg" target="_blank"><i class="icon-picture"></i></a> - </div> - <div class="row-fluid info"> - </div> - </div> - </div> - - - - - <div class="row-fluid act443 activity"> - <div class="span5"> - <div class="row-fluid"> - <div class="span2 info text-right">for</div> - <div class="span10">Stian Rabaldertusten</div> - </div> - <div class="row-fluid"> - <div class="span2 info text-right">av</div> - <div class="span10 info">Dennis Eriksen</div> - </div> - <div class="row-fluid"> - <div class="span2 info text-right">hva</div> - <div class="span10">Indisk take-away</div> - </div> - </div> - <div class="span2"> - <div class="row-fluid"> - <div class="span4 info text-right"> - delt på - </div> - <div class="span8 text-small"> - Stian, Dennis, Truls - </div> - </div> - </div> - <div class="span2"> - <div class="row-fluid"> - <div class="span4 info text-right"> - kategori - </div> - <div class="span8 text-small"> - Mat - </div> - </div> - </div> - <div class="span2"> - <div class="row-fluid"> - <div class="span3 info text-right"> - når - </div> - <div class="span9 text-small"> - 2013-04-13 - </div> - </div> - <div class="row-fluid"> </div> - <div class="row-fluid"> - <div class="span3 info text-right"> - sum - </div> - <div class="span9"> - 601 kr - </div> - </div> - </div> - <div class="span1"> - <div class="row-fluid"> - <a href="http://i.imgur.com/0I6SHwu.jpg" target="_blank"><i class="icon-picture"></i></a> - </div> - <div class="row-fluid"> </div> - <div class="row-fluid info"> - </div> - </div> - </div> - - - - - - <div class="row-fluid act443 activity"> - <div class="span5"> - <div class="row-fluid"> - <div class="span2 info text-right">av</div> - <div class="span10">Dennis Eriksen</div> - </div> - <div class="row-fluid"> - <div class="span2 info text-right">hva</div> - <div class="span10">Hulsholdningsartikkler og ny mopp til Stian, slik at han får vasket gulvet</div> - </div> - </div> - <div class="span2"> - <div class="row-fluid"> - <div class="span4 info text-right"> - delt på - </div> - <div class="span8 text-small"> - Stian, Dennis - </div> - </div> - </div> - <div class="span2"> - <div class="row-fluid"> - <div class="span4 info text-right"> - kategori - </div> - <div class="span8 text-small"> - Mat, vask, møbler - </div> - </div> - </div> - <div class="span2"> - <div class="row-fluid"> - <div class="span3 info text-right"> - når - </div> - <div class="span9 text-small"> - 2013-04-03 - </div> - </div> - <div class="row-fluid"> - <div class="span3 info text-right"> - sum - </div> - <div class="span9"> - 231 kr - </div> - </div> - </div> - <div class="span1"> - <div class="row-fluid"> - - </div> - <div class="row-fluid info"> - </div> - </div> - </div> - - - - - <div class="row-fluid act443 activity"> - <div class="span5"> - <div class="row-fluid"> - <div class="span2 info text-right">for</div> - <div class="span10">Helene Apelort</div> - </div> - <div class="row-fluid"> - <div class="span2 info text-right">av</div> - <div class="span10 info">Robert Joramo</div> - </div> - <div class="row-fluid"> - <div class="span2 info text-right">hva</div> - <div class="span10">Dopapir, klær</div> - </div> - </div> - <div class="span2"> - <div class="row-fluid"> - <div class="span4 info text-right"> - delt på - </div> - <div class="span8 text-small"> - Stian, Dennis, Truls, Robert, Helene - </div> - </div> - </div> - <div class="span2"> - <div class="row-fluid"> - <div class="span4 info text-right"> - kategori - </div> - <div class="span8 text-small"> - Underholdning - </div> - </div> - </div> - <div class="span2"> - <div class="row-fluid"> - <div class="span3 info text-right"> - når - </div> - <div class="span9 text-small"> - 2013-03-21 - </div> - </div> - <div class="row-fluid"> </div> - <div class="row-fluid"> - <div class="span3 info text-right"> - sum - </div> - <div class="span9"> - 583 kr - </div> - </div> - </div> - <div class="span1"> - <div class="row-fluid"> - <a href="http://i.imgur.com/0I6SHwu.jpg" target="_blank"><i class="icon-picture"></i></a> - </div> - <div class="row-fluid"> </div> - <div class="row-fluid info"> - </div> - </div> - </div> + <% }); %> </div> </section> </div><!-- /div.span7 --> |