Newer
Older
{namespace sgm=SGalinski\SgMail\ViewHelpers}

Torsten Oppermann
committed
<f:layout name="Queue" />
<f:section name="iconButtons">
</f:section>
<f:flashMessages />
<f:render partial="Queue/Filter" arguments="{filterFields: filterFields, filters: filters, languages: languages, templatesFilter: templatesFilter, selectedTemplateFilter: selectedTemplateFilter, selectedExtensionFilter: selectedExtensionFilter}" />

Torsten Oppermann
committed
<f:if condition="{queue -> f:count()} > 0">
<f:then>
<div class="panel panel-default recordlist">
<div class="table-fit">
<table data-table="tx_sgmail_domain_model_mail" class="table table-striped table-hover">
<sgm:backend.widget.paginate objects="{queue}" as="paginatedMails" configuration="{insertAbove: 1, itemsPerPage: 20}">

Torsten Oppermann
committed
<thead>
<tr>
<th></th>
<th><f:translate key="backend.from" /> <br> <f:translate key="backend.to" /></th>

Torsten Oppermann
committed
<th><f:translate key="backend.subject" /></th>
<th><f:translate key="backend.entry_date" /> <br>
<f:translate key="backend.last_sent" /></th>

Torsten Oppermann
committed
<th></th>
<th></th>
</tr>
</thead>

Torsten Oppermann
committed
<tbody>
<f:for each="{paginatedMails}" as="mail">
{sgm:backend.editOnClick(table: 'tx_sgmail_domain_model_mail', uid: mail.uid) -> sgm:set(name: 'editOnClick') -> f:format.raw()}

Torsten Oppermann
committed
<tr data-uid="{mail.uid}">
<td nowrap="nowrap" class="col-icon">
<f:format.raw>
<sgm:backend.icon table="tx_sgmail_domain_model_mail" row="{mail}" />
</f:format.raw>

Torsten Oppermann
committed
</td>

Torsten Oppermann
committed
<td>
<span>{mail.from_address}</span>
<br>

Torsten Oppermann
committed
<span>{mail.to_address}</span>
</td>
<td>
<span><f:format.crop maxCharacters="40" append="...">{mail.mail_subject}</f:format.crop></span>

Torsten Oppermann
committed
</td>
<td>
<span><f:format.date format="d.m.Y h:i">{mail.crdate}</f:format.date></span>
<span><f:format.date format="d.m.Y h:i">{mail.last_sending_time}</f:format.date></span>

Torsten Oppermann
committed
</td>

Torsten Oppermann
committed
<td nowrap="nowrap" class="col-control">
<f:format.raw>
<sgm:backend.control table="tx_sgmail_domain_model_mail" row="{mail}" />
</f:format.raw>

Torsten Oppermann
committed
</td>
<td>
<f:link.action class="btn btn-default btn-send-now" controller="Queue" action="sendMail" arguments="{uid: mail.uid, selectedTemplate: selectedTemplateKey, selectedExtension: selectedExtensionKey}">
<span class="t3js-icon icon icon-size-small icon-state-default actions-document-import-t3d">
<span class="icon-markup">
<img src="/typo3/sysext/core/Resources/Public/Icons/T3Icons/actions/actions-document-import-t3d.svg" width="16" height="16">
</span>
<f:translate key="backend.send_now" />
</f:link.action>

Torsten Oppermann
committed
<a class="btn btn-default btn-toggle" data-uid="{mail.uid}">
<span class="t3js-icon icon icon-size-small icon-state-default actions-document-view">
<span class="icon-markup">
<img src="/typo3/sysext/core/Resources/Public/Icons/T3Icons/actions/actions-document-view.svg" width="16" height="16">
</span>
</span>

Torsten Oppermann
committed
<f:translate key="backend.showBody" />
</a>
</td>
</tr><!-- Modal -->
<div class="modal fade" id="toggle-{mail.uid}" tabindex="-1" role="dialog" aria-labelledby="login-modal-label">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="login-modal-label">{mail.mail_subject}</h4>
</div>
<div class="modal-body" id="login-modal-body">
<div class="modalcol modalcol-left">
<f:format.html>
{mail.mail_body}
</f:format.html>
</div>
</div>
</div>
</div>
</div>

Torsten Oppermann
committed
</f:for>
</tbody>
</sgm:backend.widget.paginate>
</table>
</div>

Torsten Oppermann
committed
</f:then>
<f:else>
<f:render partial="Queue/Empty" />
</f:else>
<f:if condition="{pages}">
<div class="panel panel-default recordlist">
<div class="table-fit">
<table data-table="pages" class="table table-striped table-hover">
<tbody>
<f:for each="{pages}" as="page">
<tr data-uid="{page.pid}">
<td nowrap="nowrap" class="col-title">
<a href="#" onclick="sgMailGoToPage({page.uid}); return false;">
<sgm:backend.icon table="pages" row="{page}" clickMenu="0" />
{page._thePathFull}
</a>
</td>
</tr>
</f:for>
</tbody>
</table>
</div>
</div>
</f:if>