aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/views/dashboard.ejs
diff options
context:
space:
mode:
Diffstat (limited to 'views/dashboard.ejs')
-rw-r--r--views/dashboard.ejs256
1 files changed, 59 insertions, 197 deletions
diff --git a/views/dashboard.ejs b/views/dashboard.ejs
index 9678c9c..1c1c4df 100644
--- a/views/dashboard.ejs
+++ b/views/dashboard.ejs
@@ -71,207 +71,69 @@
<section class="overview">
<h1>Siste aktivitet</h1>
<div class="lastactivity">
- <div class="row-fluid act443 activity">
- <div class="span1 date">
- <div class="row-fluid">12</div>
- <div class="row-fluid info">MAR</div>
- </div>
- <div class="span7">
- <div class="row-fluid">
- <div class="span2 info text-right">prosjekt</div>
- <div class="span10"><a href="/turidl/Kosekveldene">turidl/<strong>Kosekveldene</strong></a></div>
- </div>
- <div class="row-fluid">
- <div class="span2 info text-right">av</div>
- <div class="span10">Turid Laila</div>
- </div>
- <div class="row-fluid">
- <div class="span2 info text-right">hva</div>
- <div class="span10">Mer kaviar</div>
- </div>
- </div>
- <div class="span1">
- <div class="row-fluid">&nbsp;</div>
- <div class="row-fluid">&nbsp;</div>
- <div class="row-fluid"><a href="http://i.minus.com/iJvlaTeLavINR.gif"><i class="icon-picture"></i></a></div>
- </div>
- <div class="span2">
- <div class="row-fluid">&nbsp;</div>
- <div class="row-fluid">
- <div class="span4 info text-right smallfullwidth">sum&nbsp;</div>
- <div class="span7 smallfullwidth"><strong>24 kr</strong></div>
- </div>
- </div>
- </div>
-
-
-
-
- <div class="row-fluid act443 activity">
- <div class="span8">
- <div class="row-fluid">
- <div class="span2 info text-right">prosjekt</div>
- <div class="span10"><a href="/kurt/Kollektivet">kurt/<strong>Kollektivet</strong></a></div>
- </div>
- <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">Stol!</div>
- </div>
- </div>
- <div class="span4">
- <div class="row-fluid">
- <div class="span3 info text-right">når</div>
- <div class="span9">2013-04-12 15:11</div>
- </div>
- <div class="row-fluid">
- <div class="span12">&nbsp;</div>
- </div>
- <div class="row-fluid">
- <div class="span1"><a href="http://i.imgur.com/PZzttmu.png" gtarget="_blank"><i class="icon-picture"></i></a></div>
- <div class="span4 info text-right">sum</div>
- <div class="span7">105 kr</div>
- </div>
- </div>
- </div>
-
-
-
-
- <div class="row-fluid act443 activity">
- <div class="span8">
- <div class="row-fluid">
- <div class="span2 info text-right">prosjekt</div>
- <div class="span10"><a href="/kurt/Kollektivet">kurt/<strong>Kollektivet</strong></a></div>
- </div>
- <div class="row-fluid">
- <div class="span2 info text-right">av</div>
- <div class="span10">Kurt Iversen</div>
- </div>
- <div class="row-fluid">
- <div class="span2 info text-right">hva</div>
- <div class="span10">Kjøpte no iskrem</div>
- </div>
- </div>
- <div class="span4">
- <div class="row-fluid">
- <div class="span3 info text-right">når</div>
- <div class="span9">2013-04-10 15:22</div>
- </div>
- <div class="row-fluid">
- <div class="span12">&nbsp;</div>
- </div>
- <div class="row-fluid">
- <div class="span1">&nbsp;</div>
- <div class="span4 info text-right">sum</div>
- <div class="span7">55 kr</div>
- </div>
- </div>
- </div>
-
-
-
-
- <div class="row-fluid act443 activity">
- <div class="span8">
- <div class="row-fluid">
- <div class="span2 info text-right">prosjekt</div>
- <div class="span10"><a href="/dennisse/hyttetur">dennisse/<strong>hyttetur</strong></a></div>
- </div>
- <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">En halvspist osteskive med kaviar</div>
- </div>
- </div>
- <div class="span4">
- <div class="row-fluid">
- <div class="span3 info text-right">når</div>
- <div class="span9">2013-04-04 22:39</div>
- </div>
- <div class="row-fluid">
- <div class="span12">&nbsp;</div>
- </div>
- <div class="row-fluid">
- <div class="span1">&nbsp;</div>
- <div class="span4 info text-right">sum</div>
- <div class="span7">23 kr</div>
- </div>
- </div>
- </div>
-
-
-
-
- <div class="row-fluid act443 activity">
- <div class="span8">
- <div class="row-fluid">
- <div class="span2 info text-right">prosjekt</div>
- <div class="span10"><a href="/dennisse/hyttetur">dennisse/<strong>hyttetur</strong></a></div>
- </div>
- <div class="row-fluid">
- <div class="span2 info text-right">av</div>
- <div class="span10">Robert Joramo</div>
- </div>
- <div class="row-fluid">
- <div class="span2 info text-right">hva</div>
- <div class="span10">kaviar</div>
- </div>
- </div>
- <div class="span4">
- <div class="row-fluid">
- <div class="span3 info text-right">når</div>
- <div class="span9">2013-04-04 22:37</div>
- </div>
- <div class="row-fluid">
- <div class="span12">&nbsp;</div>
+ <% posts.forEach(function(post) { %>
+ <div class="row-fluid post-<%= post._id %> activity">
+ <div class="row-fluid">
+ <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">&#9660;</a></div>
+ </div>
+ <div class="span6">
+ <div class="row-fluid">
+ <div class="span2 info text-right smallfullwidth">prosjekt</div>
+ <div class="span10 smallfullwidth"><a href="/project/<%= post.project.shortURL %>"><%= post.project.name %></a></div>
+ </div>
+ <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="row-fluid">
+ <div class="span2 info text-right smallfullwidth">hva</div>
+ <div class="span10 smallfullwidth"><%= post.what %></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><%= post.value %> <%= post.currency %></strong>
+ </div>
+ <div class="row-fluid text-right">
+ <i class="icon-picture"></i>
+ </div>
+ </div>
</div>
- <div class="row-fluid">
- <div class="span1">&nbsp;</div>
- <div class="span4 info text-right">sum</div>
- <div class="span7">5433 kr</div>
+ <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 class="span2">
+ <div class="row-fluid info">
+ </div>
+ </div>
</div>
</div>
- </div>
-
-
- <div class="row-fluid act443 activity">
- <div class="span8">
- <div class="row-fluid">
- <div class="span2 info text-right">prosjekt</div>
- <div class="span10"><a href="/turidl/Kosekveldene">turidl/<strong>Kosekveldene</strong></a></div>
- </div>
- <div class="row-fluid">
- <div class="span2 info text-right">av</div>
- <div class="span10">Kurt Sanandreas</div>
- </div>
- <div class="row-fluid">
- <div class="span2 info text-right">hva</div>
- <div class="span10">Tok med Turiid på restaurant og hadde det kjempekoselig. Var litt dyrt, men verdt det!</div>
- </div>
- </div>
- <div class="span4">
- <div class="row-fluid">
- <div class="span3 info text-right">når</div>
- <div class="span9">2013-03-05 11:48</div>
- </div>
- <div class="row-fluid">
- <div class="span12">&nbsp;</div>
- </div>
- <div class="row-fluid">
- <div class="span1"><a href="http://i.imgur.com/qYL2mLb.jpg" target="_blank"><i class="icon-picture"></i></a></div>
- <div class="span4 info text-right">sum</div>
- <div class="span7">534 kr</div>
- </div>
- </div>
- </div>
+ <% }); %>
</div>
</section>
</div><!-- /div.span7 -->