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. --- views/project.ejs | 220 ------------------------------------------------------ 1 file changed, 220 deletions(-) delete mode 100644 views/project.ejs (limited to 'views/project.ejs') diff --git a/views/project.ejs b/views/project.ejs deleted file mode 100644 index dedd5e4..0000000 --- a/views/project.ejs +++ /dev/null @@ -1,220 +0,0 @@ -<% include header %> - - - - <% include navbar %> - - -
-
-
-
-
- prosjekt -
-
-

<%= project.name %>

-
-
-
-
- opprettet -
-
-

- <% var d = new Date(project.created); %> - <%= d.getFullYear() + '-' + ('0' + (d.getMonth()+1)).slice(-2) + '-' + ('0' + d.getDate()).slice(-2) + ' ' + d.toLocaleTimeString().slice(0, 5) %> -

-
-
-
-
- deltakere -
-
- <% access.forEach(function(participants) { %> - <%- participants.user.name %><% if (participants.permissions >= 6) { %> (<%= participants.permissions === 9 ? 'eier' : 'admin' %>)<% } %>
- <% }); %> - Legg til flere deltakere -
-
-
- -
-
- - - - - - - - -
-
-
-
-

Status total

-
-
-
- - - - - - -
<%= pro.user[req.user._id].total %><%= pro.total %><%= pro.user[req.user._id].diff %>
-
-
-
-
-

Det er til sammen brukt <%= (pro.total).toFixed(2) %> <%= project.currency %>. Deltakerne skal altså betale <%= (pro.each).toFixed(2) %> <%= project.currency %> hver.

- <% for (var i in pro.user) { %> - <%- pro.user[i].name %> har betalt <%= pro.user[i].total %> <%= project.currency %>, og <%- pro.user[i].diff >= 0 ? 'skyldes ' + pro.user[i].diff : 'skylder ' + Math.abs(pro.user[i].diff) %> <%= project.currency %>
- <% } %> -

Eksempel på hvordan oppgjøret kan gjøres

-
-
- - <% - // FUGLY LAST-MINUTE CODE - var i = 1; - for (var u in pro.user) { - if (pro.user[u].coeff === 0) { - if (i === 1) {%> - - - <% for (var p in pro.user) { %> - <%- pro.user[p].coeff > 0 ? '' : '' %> - <% } %> - - <% } %> - - - <% for (var p in pro.user) { %> - <%- pro.user[p].coeff > 0 ? '' : '' %> - <% } %> - -<% i++; - }} %> -
' + pro.user[p].name + '
<%- pro.user[u].name %>' + (Math.abs(pro.user[u].diff) * pro.user[p].coeff).toFixed(2) + '
- -
-
- -
-
-
-
- - - - - - - - -
-
-
-

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()] %>
- -
-
-
-
av
-
<%- post.user.name %>
-
-
-
hva
-
<%= post.what %>
-
-
-
-
-   -
-
-
-
- sum - <%= post.value %> <%= post.currency %> -
-
- -
-
-
-
-
-
-
kommentar
-
- <%= post.comment %> -
-
-
- <% if (String(post.user._id) === String(req.user._id) || req.user.permissions >= 6) { %> -
- [edit] -
-
- [delete] -
- <% } %> -
-
- - <% }); %> -
-
-
- - -
-
- - -<% include footer %> - - - - -- cgit v1.2.3