<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <!--
            Make sure that there is a minimum of 1,019 characters before closing head tag
            to avoid display issues on IOS devices, so give some lorem ipsum.

            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi cursus
            lacus quis lectus lobortis semper. Suspendisse ornare convallis convallis.
            Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
            Mauris tincidunt, lectus in consectetur ultricies, orci ligula pellentesque sem,
            vitae faucibus enim neque sed urna. Nunc sodales libero in nulla aliquet porta.
            Vivamus tempor orci vitae massa varius, id placerat nibh viverra. Duis adipiscing erat velit,
            at egestas orci consectetur in. Fusce non orci nisi. Suspendisse a sapien
            ut est dignissim vehicula bibendum pretium lectus. Mauris interdum urna id
            turpis accumsan, eget hendrerit sem euismod. Proin vulputate placerat augue,
            in imperdiet mi porttitor ac. Maecenas in lacus magna. Fusce lacinia ligula dui,
            id ullamcorper erat faucibus a.
        -->
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
        <title>{{ subject }}</title>
    </head>
    <body style="margin:0;padding:0;background-color:#f2f2f2;">
        <table width="100%" bgcolor="#f2f2f2;" cellpadding="0" cellspacing="0" border="0" style="margin:0; padding:0; width:100% !important; line-height: 120% !important;background-color:#f2f2f2;">
            <tr>
                <td height="40" valign="center" align="center" style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size:12px; font-weight:normal; color:#999999;line-height:15px;">
                    {{ 'Si cet email contient des liens non cliquables, copiez/collez ces liens dans votre navigateur.' | trans }}
                </td>
            </tr>
            <tr>
                <td valign="center" align="center">
                    <!-- Wrapper Table: to control the width and the background color consistently, instead of setting attributes on the body tag. -->
                    <table width="90%" bgcolor="#ffffff;" cellpadding="0" cellspacing="0" border="0" style="margin:0; padding:0;  width:90% !important; line-height: 120% !important;background-color:#ffffff;">
                        <tr>
                            <td style="border-bottom: 1px solid #f2f2f2;">
                                <!-- Header table -->
                                <table width="80%" cellpadding="0" cellspacing="0" border="0" align="center" style="width:80% !important;">
                                    <tr>
                                        <td height="180" valign="center" align="center" style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size:22px;  line-height:27px; font-weight:normal; color:#000;">
                                            {% if logoUrl is not none %}
                                                <img src="{{ logoUrl }}" alt="{{ logoText }}" title="{{ logoText }}" height="180" style="display:block; outline:none; text-decoration:none; -ms-interpolation-mode: bicubic;" />
                                            {% else %}
                                                {{ logoText }}
                                            {% endif %}
                                        </td>
                                    </tr>
                                </table>
                                <!-- End of header table -->
                                <!-- Subject table -->
                                <table width="90%" cellpadding="0" cellspacing="0" border="0" align="center" style="width:90% !important;">
                                    <tr style=
                                        {% if mailSkin == constant('Alchemy\\Phrasea\\Notification\\Mail\\MailRequestAccountDelete::MAIL_SKIN') %}
                                            "background: linear-gradient(to bottom, #ee5f5b, #bd362f)"
                                        {% elseif mailSkin == constant('Alchemy\\Phrasea\\Notification\\Mail\\AbstractMail::MAIL_SKIN') %}
                                            "background-color:#a6aab0"
                                        {% endif %}
                                    >
                                        <td height="50" valign="center" align="center" style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size:16px;  line-height:19px; font-weight:bold; color:#ffffff;">
                                            {{ subject }}
                                        </td>
                                    </tr>
                                </table>
                                <!-- End of subject table -->
                                <!-- Content table -->
                                <table width="90%" bgcolor="#ffffff;" cellpadding="0" cellspacing="0" border="0" align="center" style="background-color:#ffffff;width:90% !important;">
                                    <tr>
                                        <td height="130" valign="center" align="center">
                                            <!-- Message Table -->
                                            <table cellpadding="0" cellspacing="0" border="0" align="center">
                                                <tr>
                                                    <td height="15" valign="center" align="center" style="font-size:0px;"></td>
                                                </tr>
                                                <tr>
                                                    <td height="115" valign="center" align="left" style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size:15px; line-height:18px; color:#999999;">
                                                        {% if senderName is not none and senderMail is not none %}
                                                            {{ senderName }} - <a href="mailto:{{ senderMail }}" target="_blank" style="color:#FFA500; color:#FFA500 !important; text-decoration:underline; cursor:pointer;">
                                                            <span style="color:#FFA500; color:#FFA500 !important; text-decoration:underline; cursor:pointer;">{{ senderMail }}</span></a><br/>
                                                        {% endif %}
                                                        <br/>
                                                        {{ messageText | raw | nl2br }}
                                                        <br/>
                                                    </td>
                                                </tr>
                                            </table>
                                            <!-- End of message table -->
                                        </td>
                                    </tr>
                                    {% if buttonText is not none and buttonUrl is not none %}
                                    <tr>
                                        <td height="70" valign="center" align="center" style="">
                                            <!-- Button Table -->
                                            <table cellpadding="0" cellspacing="0" border="0" align="center" style="width:50% !important;">
                                                <tr>
                                                    <td colspan="3" height="15" valign="center" align="center" style="font-size:0px;"></td>
                                                </tr>
                                                <tr>
                                                    <td height="50" valign="center" align="center" style="background-color:#80cc68; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size:14px; font-weight:bold; color:#ffffff;">
                                                        <a href="{{ buttonUrl }}" target="_blank" style="color:#ffffff; color:#ffffff !important; text-decoration:none; cursor:pointer;">
                                                            <span style=" color:#ffffff !important; text-decoration:none; cursor:pointer;">{{ buttonText }}</span>
                                                        </a>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="3" height="15" valign="center" align="center" style="font-size:0px;"></td>
                                                </tr>
                                            </table>
                                            <!-- End of button table -->
                                        </td>
                                    </tr>
                                    {% endif %}
                                    {% if expiration is not none %}
                                    <tr>
                                        <td height="60" valign="center" align="center" style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size:13px; line-height:16px; color:#999999;">
                                            {{ 'This link is valid until' | trans  }} {{ app['date-formatter'].getDate(expiration) }} {{ app['date-formatter'].getTime(expiration) }}
                                        </td>
                                    </tr>
                                    {% endif %}
                                </table>
                                <!-- End of content table -->
                            </td>
                        </tr>
                        <tr>
                            <td height="60" valign="center" align="center" style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size:13px; font-style:italic; color:#dc4848;">
                                {{ 'Le contenu de cet email est confidentiel, ne le divulguez pas.' | trans }}
                            </td>
                        </tr>
                    </table>
                    <!-- End of wrapper table -->
                </td>
            </tr>
            <tr>
                <td height="50" valign="center" align="center" style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size:12px; line-height: 15px; color:#999999;">
                    {{ 'Message automatique de Phraseanet' | trans }}<br />
                    {% set link %}
                    <a href="{{ phraseanetURL }}" target="_blank" style="font-weight:bold; cursor:pointer; color:#999999;">
                        {{ phraseanetTitle }}
                    </a>
                    {% endset %}
                    {% trans with {'%link%' : link} %}Pour gérer l'envoi d'email automatique, connectez-vous à %link%{% endtrans %}
                </td>
            </tr>
        </table>
    </body>
</html>
