<% var data = this.stash; %> <% var currentUser = app.model.SessionUser.getUserProfile(); %> <% var groupsOwner = currentUser.getGroupsByRole( 'trainer' ), groupDataOwner = groupsOwner.length >= 1 ? groupsOwner[ 0 ] : null; %> <% if ( "" !== groupsNotActiveString ) { %>
<%= _lc( 'HOME_GROUPS_NOT_ACTIVE_TEXT1' ) %><%= groupsNotActiveString %>
<%= _lc( 'HOME_GROUPS_NOT_ACTIVE_TEXT2' ) %> -> <%= _lc( 'HOME_GROUPS_NOT_ACTIVE_BTN' ) %>
<% } %> <% if ( 0 === appointments.length ) { %>

<%= _lc( 'NO_APPOINTMENTS_AVAILABLE' ) %>

<% if ( groupDataOwner ) { %> <% var group = app.model.SessionUser.getGroupById( groupDataOwner.team_id );%>
ProTipp

<%=raw _lc( 'HINT_GROUP_WITH_NO_APPOINTMENTS', [ group.getName() ] ) %>

<% } %> <% } else { %> <% if ( true === currentUser.isOlderThanTwoWeeks() && false === currentUser.hasValidAddressData() ) { %>
 Bitte vervollständigen Sie Ihre Adressdaten. Adressdaten hinterlegen
<% } %> <% var monthHeader = null, weekHeader = null, currentMonth, currentWeek, currentWeekMoment, a, mStart, mEnd, mDeadline; %> <% for ( var ai = 0; ai < appointments.length; ai++ ) { %> <% a = appointments[ ai ]; %> <% mStart = a.getMomentStart(); %> <% mEnd = a.getMomentEnd(); %> <% mDeadline = a.getMomentDeadline(); %> <% currentMonth = mStart.format( 'MMMM YYYY' ); %> <% currentWeekMoment = mStart.clone(); %> <% currentWeek = currentWeekMoment.startOf( 'week' ).format( 'D.M.' ) + " - " + currentWeekMoment.endOf( 'week' ).format( 'D.M.' ); %> <% if ( monthHeader != currentMonth ) { %>

<%= currentMonth %> <% if ( monthHeader === null ) { %>
<% } %>

<% monthHeader = currentMonth; %> <% } %> <% if ( weekHeader != currentWeek ) { %>
<%= currentWeek %>
<% weekHeader = currentWeek; %> <% } %>
<%=raw app.core.View.getTemplate( 'home-appointment-item', { a : a } ) %>
<% } %> <% } %>