{% extends "@templates/"~template~"/view/emailFront.html.twig" %}

{% block title %}{{ subject }}{% endblock %}
{% block short %}Aktywuj swoje konto{% endblock %}

{% set profile = (( user.profile.count > 0 ) ? user.profile.first : null ) %}
{% if profile %}
    {% set userNazwa = profile.firstName ~ ' ' ~ profile.lastName %}
{% else %}
    {% set userNazwa = user.email %}
{% endif %}

{% block content %}
    <!-- MODULE ROW // -->
    <tr>
        <td align="center" valign="top">
            <!-- CENTERING TABLE // -->
            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                    <td align="center" valign="top">
                        <!-- FLEXIBLE CONTAINER // -->
                        <table border="0" cellpadding="0" cellspacing="0" width="500" class="flexibleContainer">
                            <tr>
                                <td align="center" valign="top" width="500" class="flexibleContainerCell">
                                    <table border="0" cellpadding="30" cellspacing="0" width="100%">
                                        <tr>
                                            <td align="center" valign="top">

                                                <!-- CONTENT TABLE // -->
                                                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                                    <tr>
                                                        <td valign="top" class="textContent">
                                                            <h3 style="color:#5F5F5F;line-height:125%;font-family:Helvetica,Arial,sans-serif;font-size:20px;font-weight:normal;margin-top:0;margin-bottom:3px;text-align:left;">
                                                                Witaj {{ userNazwa }},
                                                            </h3>
                                                            <br>
                                                            <div style="text-align:left;font-family:Helvetica,Arial,sans-serif;font-size:15px;margin-bottom:0;color:#5F5F5F;line-height:135%;">
                                                                Aktywuj swoje konto klikając w poniższy link:<br><br>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="center" valign="top" class="flexibleContainerBox" style="">
                                                            <table border="0" cellpadding="0" cellspacing="0" width="50%" class="emailButton" style="background-color: #5a910d;">
                                                                <tr>
                                                                    <td align="center" valign="middle" class="buttonContent" style="padding-top:15px;padding-bottom:15px;padding-right:15px;padding-left:15px;">
                                                                        <a style="color:#FFFFFF;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:20px;line-height:135%;" href="{{ url('wi_front_user_activate', {'hashCode': user.hashCode}) }}" target="_blank">Aktywuj konto</a>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                    </tr>
                                                </table>
                                                <!-- // CONTENT TABLE -->

                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                        <!-- // FLEXIBLE CONTAINER -->
                    </td>
                </tr>
            </table>
            <!-- // CENTERING TABLE -->
        </td>
    </tr>
    <!-- // MODULE ROW -->
{% endblock %}
