aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDennis Eriksen <dennis.se@gmail.com>2013-05-23 11:59:38 +0200
committerDennis Eriksen <dennis.se@gmail.com>2013-05-23 11:59:38 +0200
commit173be97bf7bf0fe8c9b7c4585514490dd01b13db (patch)
treebb4981e2f9fb7548f3b4f55ee6012a3cb3327e81
parentadded link to post (diff)
downloadDivid-173be97bf7bf0fe8c9b7c4585514490dd01b13db.tar.gz
you now get a message if you have no active projects
-rw-r--r--views/dashboard.ejs42
1 files changed, 4 insertions, 38 deletions
diff --git a/views/dashboard.ejs b/views/dashboard.ejs
index 5136551..9678c9c 100644
--- a/views/dashboard.ejs
+++ b/views/dashboard.ejs
@@ -12,7 +12,9 @@
<div class="smallfullwidth span5">
<h1>Prosjekter</h1>
<section class="projects">
- <% projects.forEach(function(projects) { %>
+ <% if (projects.length === 0) { %>
+ <p>Du har ingen aktive prosjekt. Du kan starte et prosjekt ved å klikke <a href="/project/new">her</a>.</p>
+ <% } else { projects.forEach(function(projects) { %>
<section class="project">
<div class="row-fluid">
<div class="span11">
@@ -31,43 +33,7 @@
</div>
</div>
</section>
- <% }); %>
- <section class="project">
- <div class="row-fluid">
- <div class="span11">
- <h1><a href="/kurt/Kollektivet">kurt/<strong>Kollektivet</strong></a></h1>
- <div class="row-fluid">
- <div class="span8">
- <small>Meg, Robert, Heidi, Anette, Kristine</small>
- </div>
- <div class="span4">
- <small>Oppgjør: <span class="text-error">-2314 kr</span></small>
- </div>
- </div>
- </div>
- <div class="span1">
- <p class="flip">Før utgift</p>
- </div>
- </div>
- </section>
- <section class="project">
- <div class="row-fluid">
- <div class="span11">
- <h1><a href="/turidl/Kosekveldene">turidl/<strong>Kosekveldene</strong></a></h1>
- <div class="row-fluid">
- <div class="span8">
- <small>Meg, Turid-Laila</small>
- </div>
- <div class="span4">
- <small>Oppgjør: <span class="text-success">551 kr</span></small>
- </div>
- </div>
- </div>
- <div class="span1">
- <p>+</p>
- </div>
- </div>
- </section>
+ <% }); } %>
<a href="/project/new" class="btn btn-large btn-block" type="button">+</a>
</section>
</div><!-- /div.span5 -->