<%=raw app.core.View.getTemplate( 'configuration-nav', { activeTab : 'profile' } ) %>
<% var p = profile; %>
<div class="row">
    <div class="col-sm-12">
        <div class="card">
            <div class="card-body">
                <div class="row">
                    <div class="col text-center">
                        <img class="img-fluid rounded-circle profile-image-big img-thumbnail"
                             style="margin-bottom: 12px; padding: 6px"
                             src="<%= p.getProfileImg() %>" />
                    </div>
                </div>
                <div class="row">
                    <div class="col text-center">
                        <div style="font-size: 1.4rem">
                            <%=raw p.getName() %>
                        </div>
                        <div class="profile-header">
                            <%= _lc( 'PROFILE_STATUS' ) %>
                        </div>
                        <div class="profile-content">
                            <%= p.getStatus() %>
                        </div>
                        <div class="profile-header">
                            <%= _lc( 'BIRTHDAY' ) %>
                        </div>
                        <div class="profile-content">
                            <%= ( null != p.getMomentBirthday() ) ? p.getMomentBirthday().format( 'DD.MM.YYYY' ) : '---' %>
                        </div>
                        <div class="profile-header">
                            Unterprofile
                        </div>
                        <div class="profile-content">
                            <% let cp = p.getChildProfiles(); %>
                            <% if ( !cp || 0 === cp.length ) {  %>
                                - keine -
                            <% } else {   %>
                                <% for ( let cpi = 0; cpi < cp.length; cpi++ )  {   %>
                                    <% if ( false === cp[ cpi ].deleted )   {   %>
                                        <i class="<%= p.getChildProfileIconByType( cp[ cpi ].type )   %>"></i>&nbsp;<%= cp[ cpi ].name %><br />
                                    <% }    %>
                                <% }    %>
                            <% }    %>
                        </div>
                    </div>
                </div>
            </div>
            <div class="card-footer">
                <div class="row">
                    <div class="col">
                        <a href="#/configuration/profile/edit" class="btn btn-sm btn-primary">
                            <%= _lc( 'BTN_EDIT' ) %>
                        </a>
                        <button data-id="btn-update-pic"
                                class="btn btn-sm btn-primary">
                            <%= _lc( 'BTN_UPDATE_PROFILE_IMG' ) %>
                        </button>
                        <a href="#/configuration/subprofile/edit" class="btn btn-sm btn-primary">
                            Unterprofile bearbeiten
                        </a>
                        <a href="#/configuration/profile/delete" class="float-right btn btn-sm btn-danger">
                            <%= _lc( 'BTN_DELETE_PROFILE' ) %>
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>