{% if not block.isDecrypted %}
    <div style="font-size:large; text-align:center; padding-top:20pt;">
        {% i18n "This message is encrypted." %}
    </div>
    <div style="text-align:center; padding-bottom:20pt;">

        <a href="kmail:decryptMessage" style="display: inline-flex; align-items: center;"> <img src="{{block.decryptIcon}}" height="{{global.iconSize}}" width="{{global.iconSize}}"/> {% i18n "Decrypt Message" %} </a>
    </div>
{% else %}
    <table cellspacing="1" cellpadding="1" class="encr">
        <tr class="encrH">
            <td dir="{{global.dir}}">
            {% if block.inProgress %}
                {% i18n "Please wait while the message is being decrypted..." %}
            {% elif block.isDecryptable %}
                {% if block.detailHeader %}
                    <div class="enc-details">
                        {% i18n "The message is encrypted for the following keys:" %}
                        {% if not block.isPrinting %}
                            <a href="kmail:hideEncryptionDetails" style="display:block;float:right;">{% i18n "Hide Details" %}</a>
                        {% endif %}
                        <ul style="list-style-type: none;">
                        {% for recipient in decryptedRecipients %}
                            {%if recipient.mainID %}
                                <li>{{recipient.id}} (<a href="key:{{recipient.mainID}}">0x{{recipient.mainID}}</a>)</li>
                            {% else %}
                                <li><a href="key:{{recipient.keyID}}">0x{{recipient.keyID}}</a> ({% i18n "unknown key" %})</li>
                            {% endif %}
                        {% endfor %}
                        </ul>
                        {% if block.compliance %}
                            {% i18nc "Compliance: status/type of compliance" "Compliance: %1" block.compliance %}
                        {% endif %}
                    </div>
                {% else %}
                    <div class="enc-simple">
                    {% if block.compliance %}
                        {% i18nc "Encrypted message (status/type of compliance)" "Encrypted message (%1)" block.compliance %}
                    {% else %}
                        {% i18n "Encrypted message" %}
                    {% endif %}
                    {% if not block.isPrinting %}
                        <a href="kmail:showEncryptionDetails" style="display:block;float:right;">{% i18n "Show Details" %}</a>
                    {% endif %}
                    </div>
                {% endif %}
            {% else %}
                {% i18n "Encrypted message (decryption not possible)" %}
                {% if block.errorText %}
                    <br />
                    {%  i18n "Reason: " %}{{block.errorText|safe}}
                {% endif %}
            {% endif %}
            </td>
        </tr>
       <tr class="encrB">
            <td>
            {% if block.isDecryptable %}
                {% callback content %}
            {% else %}
                <div style="font-size:x-large; text-align:center; padding:20pt;">
                {% if block.noSecKey %}
                    {% i18n "No secret key found to decrypt the message. The message is encrypted for the following keys:" %}
                    <ul style="list-style-type: none;">
                    {% for recipient in decryptedRecipients %}
                        {%if recipient.mainID %}
                            <li>{{recipient.id}} (<a href="key:{{recipient.mainID}}">0x{{recipient.mainID}}</a>)</li>
                        {% else %}
                            <li><a href="key:{{recipient.keyID}}">0x{{recipient.keyID}}</a> ({% i18n "unknown key" %})</li>
                        {% endif %}
                    {% endfor %}
                    </ul>
                {% elif not block.inProgress %}
                    {% i18n "Could not decrypt the data." %}
                {% endif %}
                </div>
            {% endif %}
            </td>
        </tr>
        <tr class="encrH">
            <td dir="{{global.dir}}">{% i18n "End of encrypted message" %}</td>
        </tr>
    </table>
{% endif %}
