{% extends 'creme_core/bricks/base/paginated-table.html' %} {% load i18n creme_bricks creme_perms %} {% load print_field url from creme_core_tags %} {% block brick_extra_class %}{{block.super}} emails-sync_config_items-brick{% endblock %} {% block brick_header_title %} {% brick_header_title title=_('{count} Configured server for synchronization') plural=_('{count} Configured servers for synchronization') empty=_('Configured servers for synchronization') icon='email' %} {% endblock %} {% block brick_header_actions %} {% translate 'New server configuration' context 'emails' as new_label %} {% brick_header_action id='add' url='emails__create_sync_config_item'|url label=new_label enabled=user|has_perm_to_admin:'emails' %} {% endblock %} {% block brick_before_content %}
{% blocktranslate with sync_url='emails__sync_portal'|url asvar help_text %}Emails sent to these servers can be synchronized (i.e. transformed as Creme Email entities). The emails are retrieved and stored in a sandbox. Then users can choose to transform them as entities (or to drop them) in the view Synchronization of incoming emails. BEWARE: these mailboxes must be dedicated to the synchronisation, because emails are deleted once they have been retrieved (the synchronisation address is generally used as Carbon Copy).{% endblocktranslate %} {{help_text|linebreaksbr}}
{% endblock %} {% block brick_table_columns %} {% brick_table_column_for_field ctype=objects_ctype field='host' status='primary nowrap' %} {% brick_table_column_for_field ctype=objects_ctype field='type' %} {% brick_table_column_for_field ctype=objects_ctype field='default_user' %} {% brick_table_column_for_field ctype=objects_ctype field='username' %} {# NOPE {% brick_table_column_for_field ctype=objects_ctype field='password' %} #} {% brick_table_column_for_field ctype=objects_ctype field='port' %} {% brick_table_column_for_field ctype=objects_ctype field='use_ssl' %} {% brick_table_column_for_field ctype=objects_ctype field='keep_attachments' %} {% brick_table_column title=_('Actions') status='action' colspan=2 %} {% endblock %} {% block brick_table_rows %} {% translate 'Edit this configuration' context 'emails' as edit_label %}{% translate 'Delete this configuration' context 'emails' as del_label %} {% with admin_perm=user|has_perm_to_admin:'emails' delete_url='emails__delete_sync_config_item'|url %} {% for item in page.object_list %} {{item.host}} {% print_field object=item field='type' %} {{item.default_user|default_if_none:'—'}} {{item.username}} {% if item.port %}{% print_field object=item field='port' %}{% else %}{% trans 'Default port' %}{% endif %} {% print_field object=item field='use_ssl' %} {% print_field object=item field='keep_attachments' %} {% brick_table_action id='edit' url=item.get_edit_absolute_url label=edit_label enabled=admin_perm %} {% brick_table_action id='delete' url=delete_url __id=item.id label=del_label enabled=admin_perm %} {% endfor %} {% endwith %} {% endblock %} {% block brick_table_empty %} {% translate 'No server for the moment' context 'emails' %} {% endblock %}