1 {extends file="page.tpl"}
4 <form action="{path_for name="mailings_filter"}" method="post" id="filtre">
6 <label for="start_date_filter">{_T string="since"}</label>
7 <input type="text" name="start_date_filter" id="start_date_filter" maxlength="10" size="10" value="{$history->filters->start_date_filter}"/>
8 <label for="end_date_filter">{_T string="until"}</label>
9 <input type="text" name="end_date_filter" id="end_date_filter" maxlength="10" size="10" value="{$history->filters->end_date_filter}"/>
11 {assign var="senders" value=$history->getSendersList()}
12 {if $senders|@count gt 0}
13 <label for="sender_filter">{_T string="Sender"}</label>
14 <select name="sender_filter" id="sender_filter">
15 <option value="0"{if $history->filters->sender_filter eq 0} selected="selected"{/if}>{_T string="Select a sender"}</option>
16 {foreach from=$senders item=$sender key=$key}
17 <option value="{$key}"{if $history->filters->sender_filter == $key} selected="selected"{/if}>{$sender}</option>
22 <input type="submit" class="inline" value="{_T string="Filter"}"/>
23 <input type="submit" name="clear_filter" class="inline" value="{_T string="Clear filter"}"/>
26 <label for="subject_filter">{_T string="Subject"}</label>
27 <input type="text" name="subject_filter" id="subject_filter" value="{$history->filters->subject_filter}"/>
28 {_T string="Sent mailings:"}
29 <input type="radio" name="sent_filter" id="filter_dc_sent" value="{Galette\Core\MailingHistory::FILTER_DC_SENT}"{if $history->filters->sent_filter eq constant('Galette\Core\MailingHistory::FILTER_DC_SENT')} checked="checked"{/if}>
30 <label for="filter_dc_sent" >{_T string="Don't care"}</label>
31 <input type="radio" name="sent_filter" id="filter_sent" value="{Galette\Core\MailingHistory::FILTER_SENT}"{if $history->filters->sent_filter eq constant('Galette\Core\MailingHistory::FILTER_SENT')} checked="checked"{/if}>
32 <label for="filter_sent" >{_T string="Yes"}</label>
33 <input type="radio" name="sent_filter" id="filter_not_sent" value="{Galette\Core\MailingHistory::FILTER_NOT_SENT}"{if $history->filters->sent_filter eq constant('Galette\Core\MailingHistory::FILTER_NOT_SENT')} checked="checked"{/if}>
34 <label for="filter_not_sent" >{_T string="No"}</label>
37 <table class="infoline">
39 <td class="left nowrap">
40 {_T string="%count entry" plural="%count entries" count=$history->getCount() pattern="/%count/" replace=$history->getCount()}
43 <label for="nbshow">{_T string="Records per page:"}</label>
44 <select name="nbshow" id="nbshow">
45 {html_options options=$nbshow_options selected=$numrows}
47 <noscript> <span><input type="submit" value="{_T string="Change"}" /></span></noscript>
48 {include file="forms_types/csrf.tpl"}
55 <table class="listing">
58 <th class="small_head">#</th>
59 <th class="left date_row">
60 <a href="{path_for name="mailings" data=["option" => "order", "value" => "Galette\Filters\MailingsList::ORDERBY_DATE"|constant]}">
62 {if $history->filters->orderby eq constant('Galette\Filters\MailingsList::ORDERBY_DATE')}
63 {if $history->filters->ordered eq constant('Galette\Filters\MailingsList::ORDER_ASC')}
64 <img src="{base_url}/{$template_subdir}images/down.png" width="10" height="6" alt="{_T string="Ascendent"}"/>
66 <img src="{base_url}/{$template_subdir}images/up.png" width="10" height="6" alt="{_T string="Descendant"}"/>
71 <th class="left username_row">
72 <a href="{path_for name="mailings" data=["option" => "order", "value" => "Galette\Filters\MailingsList::ORDERBY_SENDER"|constant]}">
74 {if $history->filters->orderby eq constant('Galette\Filters\MailingsList::ORDERBY_SENDER')}
75 {if $history->filters->ordered eq constant('Galette\Filters\MailingsList::ORDER_ASC')}
76 <img src="{base_url}/{$template_subdir}images/down.png" width="10" height="6" alt="{_T string="Ascendent"}"/>
78 <img src="{base_url}/{$template_subdir}images/up.png" width="10" height="6" alt="{_T string="Descendant"}"/>
83 <th class="left small_head">
84 {_T string="Recipients"}
87 <a href="{path_for name="mailings" data=["option" => "order", "value" => "Galette\Filters\MailingsList::ORDERBY_SUBJECT"|constant]}">
89 {if $history->filters->orderby eq constant('Galette\Filters\MailingsList::ORDERBY_SUBJECT')}
90 {if $history->filters->ordered eq constant('Galette\Filters\MailingsList::ORDER_ASC')}
91 <img src="{base_url}/{$template_subdir}images/down.png" width="10" height="6" alt="{_T string="Ascendent"}"/>
93 <img src="{base_url}/{$template_subdir}images/up.png" width="10" height="6" alt="{_T string="Descendant"}"/>
98 <th title="{_T string="Attachments"}" class="small_head">
101 <th class="left right small_head">
102 <a href="{path_for name="mailings" data=["option" => "order", "value" => "Galette\Filters\MailingsList::ORDERBY_SENT"|constant]}">
104 {if $history->filters->orderby eq constant('Galette\Filters\MailingsList::ORDERBY_SENT')}
105 {if $history->filters->ordered eq constant('Galette\Filters\MailingsList::ORDER_ASC')}
106 <img src="{base_url}/{$template_subdir}images/down.png" width="10" height="6" alt="{_T string="Ascendent"}"/>
108 <img src="{base_url}/{$template_subdir}images/up.png" width="10" height="6" alt="{_T string="Descendant"}"/>
113 <th class="small_head"></th>
117 {foreach from=$logs item=log name=eachlog}
118 <tr class="{if $smarty.foreach.eachlog.iteration % 2 eq 0}even{else}odd{/if}">
119 <td data-scope="row">
120 {if $preferences->pref_show_id}
123 {$smarty.foreach.eachlog.iteration}
125 <span class="row-title">
126 {_T string="Mailing entry %id" pattern="/%id/" replace=$log.mailing_id}
129 <td class="nowrap" data-title="{_T string="Date"}">{$log.mailing_date|date_format:{_T string="Y-m-d H:i:s"}}</td>
130 <td data-title="{_T string="Sender"}">{if $log.mailing_sender eq 0}{_T string="Superadmin"}{else}{$log.mailing_sender_name}{/if}</td>
131 <td data-title="{_T string="Recipients"}">{$log.mailing_recipients|unserialize|@count}</td>
132 <td data-title="{_T string="Subject"}">{$log.mailing_subject}</td>
133 <td class="center" data-title="{_T string="Attachments"}">{$log.attachments}</td>
134 <td class="center{if $log.mailing_sent == 1} use{/if}" data-title="{_T string="Sent"}">
135 {if $log.mailing_sent == 1}
136 <i class="fas fa-thumbs-up"></i>
138 <i class="fas fa-thumbs-down"></i>
141 <td class="center nowrap actions_row">
143 href="{path_for name="mailingPreview" data=["id" => $log.mailing_id]}"
144 class="showdetails tooltip"
146 <i class="fas fa-eye"></i>
147 <span class="sr-only">{_T string="Display mailing '%subject' details in preview window" pattern="/%subject/" replace=$log.mailing_subject}</span>
150 href="{path_for name="mailing"}?from={$log.mailing_id}"
153 <i class="fas fa-clone"></i>
154 <span class="sr-only">{_T string="Use mailing '%subject' as a template for a new one" pattern="/%subject/" replace=$log.mailing_subject}</span>
157 href="{path_for name="removeMailing" data=["id" => $log.mailing_id]}"
158 class="delete tooltip"
160 <i class="fas fa-trash"></i>
161 <span class="sr-only">{_T string="Delete mailing '%subject'" pattern="/%subject/" replace=$log.mailing_subject}</span>
166 <tr><td colspan="8" class="emptylist">{_T string="No sent mailing has been stored in the database yet."}</td></tr>
170 <div class="center cright">
171 {_T string="Pages:"}<br/>
172 <ul class="pages">{$pagination}</ul>
177 href="{path_for name="mailing"}?mailing_new=true"
179 <i class="fas fa-plus-square"></i>
180 {_T string="Create new mailing"}
185 {block name="javascripts"}
186 <script type="text/javascript">
187 {include file="js_removal.tpl"}
189 $('#start_date_filter, #end_date_filter').datepicker({
193 buttonText: '<i class="far fa-calendar-alt"></i> <span class="sr-only">{_T string="Select a date" escape="js"}</span>'
197 $('.showdetails').click(function(){
199 url: $(this).attr('href'),
204 {include file="js_loader.tpl"},
205 success: function(res){
206 _preview_dialog(res);
209 alert("{_T string="An error occurred displaying preview :(" escape="js"}");
215 var _preview_dialog = function(res){
216 var _el = $('<div id="ajax_preview" title="{_T string="Mailing preview" escape="js"}"> </div>');
217 _el.appendTo('body').dialog({
222 close: function(event, ui){
226 $('#ajax_preview').append( res );