<% if(!data) data = {}; if(!data['user']) { user = {}; } else { user = data.user; } %>
<% print('') %>

<%= user.username %>

<%= user.town %>

<% if(data && data.is_friend) { %>

Du bist mit <%= user.username %> befreundet

<% } else if (data.confirm) { %> <% } else { %> <% } %>

JET Stammtankstellen

<% if(user.stations && user.stations.length > 0) { _.each(user.stations, function(station) { station = Stations.getStation(station.station_id); var img = [''); %>
<% print(img.join('')); %>

JET Tankstelle
<%= station.street %>
<%= station.zip + ' ' + station.city %>

<% }); } else { %>

<%= user.username %> hat noch keine Stammtankstellen gespeichert.

<% } %>

Garage

<% if(user.cars && user.cars.length > 0) { _.each(user.cars, function(car) { %>

<%= car.brand_name +' '+car.model_name %>

<% print('') %>
<% if(car.fuel_type) { %>
Kraftstoff
<%= JET.pricecode(car.fuel_type) %>
<% } %> <% if(car.transmission) { %>
Getriebe
<% if(car.transmission == 'manual') { print('Schaltgetriebe') } else if(car.transmission == 'automatic') { print('Automatik') } else if(car.transmission == 'semiautomatic') { print('Halbautomatik') } else { print('unbekannt') } %>
<% } %> <% if(car.power) { %>
Leistung
<%= format('#.###', Math.round(car.power)) %><%= car.power_type || 'kw' %>
<% } %> <% if(car.km) { %>
KM-Stand
<%= format('#.###,0', car.km) %>
<% } %> <% if(car.pressure_front || car.pressure_back) { %>
Reifendruck (vorne / hinten)
<%= car.pressure_front || '-' %> / <%= car.pressure_back || '-' %>
<% } %> <% if(car.oil) { %>
Motoröl
<%= car.oil %>
<% } %> <% if(car.comment) { %>
Sonstiges
<%= car.comment %>
<% } %>
<% }); } else { %>

<%= user.username %> hat noch keine Autodaten hinterlegt.

<% } %> <% if(data && data.is_friend) { %>
<% } %>