From e582c3b84c6090b08f33d599c354968fcd868d14 Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Sat, 25 May 2013 11:17:42 +0200 Subject: moved and renamed files to match the filesetup we want. havebeen using a dev-setup till now. --- app/views/dashboard.ejs | 154 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 app/views/dashboard.ejs (limited to 'app/views/dashboard.ejs') diff --git a/app/views/dashboard.ejs b/app/views/dashboard.ejs new file mode 100644 index 0000000..f2979b3 --- /dev/null +++ b/app/views/dashboard.ejs @@ -0,0 +1,154 @@ +<% include templates/header %> + + + + <% include templates/navbar %> + + +
+
+ +
+

Prosjekter

+
+ <% if (projects.length === 0) { %> +

Du har ingen aktive prosjekt. Du kan starte et prosjekt ved å klikke her.

+ <% } else { projects.forEach(function(projects) { %> +
+
+
+

<%= projects.project.name %>

+
+
+ + <% var ppl = 'Meg'; + participants.forEach(function(participant) { + if (String(participant.project) === String(projects.project._id) && String(participant.user._id) !== String(user._id)) { + ppl += ', ' + participant.user.name; + } + }); %> + <%- ppl %> + +
+
+ <% s = (pro.project[projects.project._id].user - (pro.project[projects.project._id].total / pro.project[projects.project._id].users)).toFixed(2); %> + Oppgjør: <%- s >= 0 ? '' + s : '' + s %> <%= projects.project.currency %> +
+
+
+ +
+
+ <% }); } %> + + +
+
+ + + + + + + + +
+
+

Status total

+ +
+
+

Siste aktivitet

+
+ <% posts.forEach(function(post) { %> +
+
+
+ <% + var d = new Date(post.when); + var month = ['JAN', 'FEB', 'MAR', 'APR', 'MAI', 'JUN', 'JUL', 'AUG', 'SEP', 'OKT', 'NOV', 'DES']; + %> +
<%= d.getDate() %>
+
<%= month[d.getMonth()] %>
+ +
+
+
+
prosjekt
+ +
+
+
av
+
<%= post.user.name === undefined ? post.user.email + ' (ikke registrert)' : post.user.name %>
+
+
+
hva
+
<%= post.what %>
+
+
+
+
+ sum + <%= post.value %> <%= post.currency %> +
+
+ +
+
+
+
+
+
+
kommentar
+
+ <%= post.comment %> +
+
+
+
+
+
+
+
+
+ + <% }); %> +
+
+
+ + +
+
+ + +<% include templates/footer %> + + + + -- cgit v1.2.3