<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>FTP Deploy</title>
</head>
<body style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.428571429; color: #333333; background-color: #ffffff;">
    <table cellspacing="0" cellpadding="0" border="0" width="500px" style="margin:0 auto; ">
        <tr>
            <td style="border:0;border-bottom:1px solid #eeeeee; padding-bottom: 8px;">
                <span class="label label-success" style="background-color: #5cb85c; display: inline; padding: .2em .6em .3em; font-size: 75%; font-weight: bold; line-height: 1; color: #ffffff; text-align: center; white-space: nowrap; vertical-align: baseline; border-radius: .25em;">Success</span>
            </td> 

            <td align="right" style="border:0;border-bottom:1px solid #eeeeee; padding-bottom: 8px;">
                <a href="https://bitbucket.org/" style="color: #ffffff; background-color: #428bca; border-color: #357ebd; display: inline-block; text-align: center; vertical-align: middle; cursor: pointer; border: 1px solid transparent; white-space: nowrap; padding: 1px 5px; font-size: 12px; line-height: 1.5; border-radius: 3px; text-decoration: none;" >Bitbucket</a> 

                <a href="{{host}}{% url 'ftpdeploy_dashboard' %}" style="color: #ffffff; background-color: #428bca; border-color: #357ebd; display: inline-block; text-align: center; vertical-align: middle; cursor: pointer; border: 1px solid transparent; white-space: nowrap; padding: 1px 5px; font-size: 12px; line-height: 1.5; border-radius: 3px; text-decoration: none;" >FTP Deploy</a> 
            </td>    
        </tr>
        <tr >
            <td colspan="2">
                <h1 style="font-size: 22px; font-weight: bold; line-height: 1.1; border:0;border-bottom:1px solid #eeeeee; padding-bottom: 8px; margin:8px 0">{{service.repo_name}}</h1> 
                <small style="font-size: 12px;">Deploy User: <b>{{service.latest_log_user}}</b></small><br>
                <small style="font-size: 12px;">Deploy Date: <b>{{service.latest_log_date}}</b></small><br>
            </td>
        </tr>
        <tr>
            <td colspan="2" style="padding-top:20px">
                <h4  style="font-size: 18px;   font-weight: 500; line-height: 1.1; margin-bottom: 5px;"> Commits ({{commits_info|length}}) </h4>
                <pre style="font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; display: block; padding: 9.5px; margin: 0 0 10px; font-size: 13px; line-height: 1.428571429; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: 1px solid #cccccc; border-radius: 4px;">{% for commits in commits_info %}<span>'{{commits.0}}'({{commits.1}})</span><br><small>{{commits.2}}</small> <br><br>{% endfor %}</pre> 
            </td>
        </tr>

        <tr>
            <td colspan="2" style="padding-top:10px">
                <h4 style="font-size: 18px; font-weight: 500; line-height: 1.1; margin-bottom: 5px;"> Files </h4>
                {% spaceless %}
                <pre style="font-family: Monaco, Menlo, Consolas, 'Courier New', monospace;   display: block; padding: 9.5px; margin: 0 0 10px; font-size: 13px; line-height: 1.428571429; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: 1px solid #cccccc; border-radius: 4px;">
                	{% if files_added %}
                        <h5><span style="background-color: #5cb85c; display: inline; padding: .2em .6em .3em; font-weight: bold; line-height: 1; color: #ffffff; text-align: center; white-space: nowrap; vertical-align: baseline; border-radius: .25em;">New</span></h5>
                        {% for file in files_added  %}
                            <span>{{file}}</span><br>
                        {% endfor %}
                    {% endif %}
                    {% if files_modified %}
                        <h5><span style="background-color: #f0ad4e; display: inline; padding: .2em .6em .3em; font-weight: bold; line-height: 1; color: #ffffff; text-align: center; white-space: nowrap; vertical-align: baseline; border-radius: .25em;">Modified</span></h5>
                        {% for file in files_modified  %}
                            <span>{{file}}</span><br>
                        {% endfor %}
                    {% endif %}
                    {% if files_removed %}
                        <h5><span style=" display: inline; background-color:#d9534f; padding: .2em .6em .3em; font-weight: bold; line-height: 1; color: #ffffff; text-align: center; white-space: nowrap; vertical-align: baseline; border-radius: .25em;">Removed</span></h5>
                        {% for file in files_removed  %}
                            <span>{{file}}</span><br>
                        {% endfor %}
                    {% endif %}
                </pre>{% endspaceless %}
            </td>
        </tr>
       
    </table>
   
</body>
</html>