<script id="upload-image-template-add" type="text/x-mustache-template">
    {{ var isArchive = filename && filename.toLowerCase().endsWith('.zip'); }}
    <tr>
        <td {{=isArchive ? 'colspan="4"' : '' }}>
        {{ if(preview) { }}
        <img src="{{= preview }}" style="max-width: 250px; max-height: 250px; width: auto; height: auto; margin: 20px;" border="0"/>
        {{ } else { }}
        <img src="<c:url value='/assets/core/images/facelift/no_preview.svg'/>"
             style="max-width: 250px; max-height: 250px; width: auto; height: auto; margin: 20px;" border="0"/>
        {{ } }}
        </td>
        {{ if(!isArchive) { }}
        <td>
            <input type="text" name="images[{{= count }}].description" value="" class="form-control">
        </td>
        <td>
            <input type="text" name="images[{{= count }}].link" value="" class="form-control">
        </td>
        <td>
            <select name="images[{{= count }}].mobileBase" class="form-control js-select">
                <option value="" selected="selected"><mvc:message code="default.none"/></option>
                <c:forEach items="${images}" var="image">
                    <c:if test="${image.type == MAILING_COMPONENT_IMAGE_TYPE  
                               || image.type == MAILING_COMPONENT_HOSTED_IMAGE_TYPE && !image.mobile}">
                        <option value="${image.name}">${image.name}</option>
                    </c:if>
                </c:forEach>
            </select>
        </td>
        {{ } }}
    </tr>
</script>
