<div class="row">
    <div class="col-xs-10">
        <h3>Profil von <%= TB.GUI.getValue( data.profile.first_name, '' ) %>&nbsp;<%= TB.GUI.getValue( data.profile.last_name ) %></h3>
    </div>
    <div class="col-xs-2">
        <h3>
            <button id="btn-coach-help"
                    class="btn btn-link pull-right coach-help">
                <i class="glyphicon glyphicon-question-sign"></i>&nbsp;Hilfe
            </button>
        </h3>
    </div>
</div>

<div class="panel panel-default">
    <div class="panel-body">
        <div class="row">
            <div class="col-md-6">
                <div class="profile-image">
                    <img src="<%= TB.GUI.getProfilePicUrl( data.profile ) %>" class="img-responsive img-circle img-thumbnail profile-pic-size"  />
                </div>
                <div class="profile-name">
                    <%= TB.GUI.getValue( data.profile.first_name, '' ) %>&nbsp;<%= TB.GUI.getValue( data.profile.last_name ) %>
                </div>
                <div class="profile-role">
                    - <%= TB.GUI.getRole( data.profile.role ) %> -
                </div>
            </div>
            <div class="col-md-6">
                <table class="table table-condensed table-player-profile" style="border: none">
                    <tr>
                        <td>Anschrift</td>
                        <td>
                            <%= TB.GUI.getValue( data.profile.street ) %><br />
                            <%= TB.GUI.getValue( data.profile.zip_code ) %>&nbsp;<%= TB.GUI.getValue( data.profile.city ) %><br />
                        </td>
                    </tr>
                    <tr>
                        <td>Telefon</td>
                        <td><%= TB.GUI.getValue( data.profile.phone ) %></td>
                    </tr>
                    <tr>
                        <td>Handy</td>
                        <td><%= TB.GUI.getValue( data.profile.mobile ) %></td>
                    </tr>
                    <tr>
                        <td>EMail</td>
                        <td><a href="mailto:<%= TB.GUI.getValue( data.account.email ) %>"><%= TB.GUI.getValue( data.account.email ) %></a></td>
                    </tr>
                    <tr>
                        <td>Geburtstag</td>
                        <td><%= ( data.profile.birthday ) ? TB.Utils.convertSQLDateToDatepickerDate( data.profile.birthday ) : '&nbsp;' %></td>
                    </tr>
                    <tr>
                        <td>Passnummer</td>
                        <td><%= TB.GUI.getValue( data.profile.player_pass_no ) %></td>
                    </tr>
                    <tr>
                        <td>Status</td>
                        <td><%= TB.GUI.getProfileStatusHtml( data.profile.status ) %></td>
                    </tr>
                    <tr>
                        <td>Sonstiges</td>
                        <td><%= TB.GUI.getValue( data.profile.misc ) %></td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
</div>


<div class="row">

    <% if ( ( TB.Client.profile.id == data.profile.id && TB.Client.can( TB.ACL.RIGHTS.PROFILE_UPDATEPIC ) ) || TB.Client.can( TB.ACL.RIGHTS.PROFILE_UPDATEPICBYTRAINER ) ) { %>
        <div class="col-md-4 col-sm-12">
            <button id="btn_playerpic_edit"
                    data-profile-id="<%= data.profile.id %>"
                    data-style="zoom-in"
                    data-size="l"
                    class="btn btn-premium btn-block ladda-button">
                Foto ändern <i class="glyphicon glyphicon-star"></i>
            </button>
        </div>
    <% } %>

    <% if ( ( TB.Client.profile.id == data.profile.id && TB.Client.can( TB.ACL.RIGHTS.PROFILE_UPDATE ) ) || TB.Client.can( TB.ACL.RIGHTS.PROFILE_UPDATEBYTRAINER ) ) { %>
        <div class="col-md-4 col-sm-12">
            <button id="btn_player_edit"
                    data-profile-id="<%= data.profile.id %>"
                    data-style="zoom-in"
                    data-size="l"
                    class="btn btn-block btn-primary ladda-button">
                Profil bearbeiten
            </button>
        </div>
    <% } %>

    <% if ( ( TB.Client.profile.id == data.profile.id && TB.Client.can( TB.ACL.RIGHTS.PROFILE_DELETE ) ) || TB.Client.can( TB.ACL.RIGHTS.PROFILE_DELETEBYTRAINER ) ) { %>
    <div class="col-md-4 col-sm-12">
        <button id="btn_player_delete"
                data-profile-id="<%= data.profile.id %>"
                data-style="zoom-in"
                data-size="l"
                class="btn btn-primary btn-block ladda-button">
            Profil löschen
        </button>
    </div>
    <% } %>
</div>