124 lines
6.1 KiB
PHP
124 lines
6.1 KiB
PHP
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/header.php"); ?>
|
|
|
|
<!-- start page title -->
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="page-title-box">
|
|
<div class="page-title-right">
|
|
<ol class="breadcrumb m-0">
|
|
<li class="breadcrumb-item"><a href="<?=self::getUrl("Dashboard")?>"><?=MFAPPNAME_SLUG?></a></li>
|
|
<li class="breadcrumb-item"><a href="<?=self::getUrl("Preordercampaign")?>">Vorbestellkampagnen</a></li>
|
|
<li class="breadcrumb-item active">Emailaussendungen</li>
|
|
</ol>
|
|
</div>
|
|
<h4 class="page-title">Emailaussendungen</h4>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- end page title -->
|
|
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
|
|
<div class="card">
|
|
<div class="card-body mb-3">
|
|
<h4 class="header-title mb-3">Filter</h4>
|
|
|
|
<form method="get" action="<?=self::getUrl("Preordernotification")?>">
|
|
<div class="row">
|
|
|
|
<div class="col-2">
|
|
<label class="form-label" for="filter_preordercampaign_id">Kampagne</label>
|
|
<select name="filter[preordercampaign_id]" id="filter_preordercampaign_id" class="form-control">
|
|
<option value="">Alle</option>
|
|
<?php foreach($my_campaigns as $c): ?>
|
|
<option value="<?=$c->id?>" <?=(isset($campaign) && $c->id == $campaign->id) ? "selected='selected'" : ""?>><?=$c->name?></option>
|
|
<?php endforeach; ?>
|
|
</select>
|
|
</div>
|
|
|
|
|
|
<div class="col-1">
|
|
<label class="form-label" for="filter_betreff">Betreff</label>
|
|
<input type="text" class="form-control" name="filter[betreff]" id="filter_betreff" value="<?=$filter['betreff']?>" />
|
|
</div>
|
|
|
|
<div class="col-2">
|
|
<label class="form-label" for="filter_sent_date">Status</label>
|
|
<select name="filter[sent_date]" id="filter_sent_date" class="form-control">
|
|
<option value="open">Offen</option>
|
|
<option value="sent">bereits versendet</option>
|
|
</select>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row mt-2">
|
|
<div class="col">
|
|
<button type="submit" class="btn btn-primary">Filter anwenden</button>
|
|
<a class="btn btn-secondary" href="<?=self::getUrl("Preordernotification")?>">Filter zurücksetzen</a>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="card">
|
|
<div class="card-body mb-3">
|
|
<div class="float-left">
|
|
<h4 class="header-title">Liste offener Aussendungen</h4>
|
|
</div>
|
|
<div class="float-right">
|
|
<?php if($filter['preordercampaign_id']): ?>
|
|
<a class="btn btn-primary mb-2" href="<?=self::getUrl("Preordernotification", "add", ['preordercampaign_id' => $filter['preordercampaign_id']])?>"><i class="fas fa-plus"></i> Neue Aussendung erstellen</a>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
<table class="table table-striped table-hover">
|
|
<tr>
|
|
<th class="text-center">Versendet</th>
|
|
<th>Kampagne</th>
|
|
<th>Betreff</th>
|
|
<th>Anzahl Empfänger</th>
|
|
<th>Geplanter Versand</th>
|
|
<th>Bearbeitet</th>
|
|
<th>Erstellt</th>
|
|
<th></th>
|
|
</tr>
|
|
<?php foreach($notifications as $notification): ?>
|
|
<tr>
|
|
<td class="text-center">
|
|
<?php if($notification->send_start && $notification->send_finish): ?>
|
|
<a href="<?=self::getUrl("Preordernotification", "EmailLog", ["id" => $notification->id])?>"><i class='fas fa-check text-success' title='Versand erfolgreich abgeschlossen'></i></a>
|
|
<?php elseif($notification->send_start && !$notification->send_finish): ?>
|
|
<i class='fas fa-loader text-info' title='Versand gestartet'></i>
|
|
<?php elseif(!$notification->send_start && !$notification->send_finish): ?>
|
|
<i class='fas fa-remove text-danger' title='Noch nicht versendet'></i>
|
|
<?php endif; ?>
|
|
<?=($notification->sent_date) ? date('d.m.Y', $notification->sent_date) : ""?>
|
|
</td>
|
|
<td><?=$notification->campaign->name?></td>
|
|
<td><?=$notification->subject?></td>
|
|
<td title="Anzahl berechnet am <?=date('d.m.Y H:i', $notification->edit)?>"><?=($notification->recipient_count) ? $notification->recipient_count : ""?></td>
|
|
<td><?=($notification->tosend_date) ? date('d.m.Y', $notification->tosend_date) : "" ?></td>
|
|
<td><?=date("d.m.Y H:i",$notification->edit)?> (<?=$notification->editor->name?>)</td>
|
|
<td><?=date("d.m.Y H:i",$notification->create)?> (<?=$notification->creator->name?>)</td>
|
|
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
|
<?php if(!$notification->sent_date): ?>
|
|
<a href="<?=self::getUrl("Preordernotification", "edit", ["id" => $notification->id])?>"><i class="far fa-edit" title="Aussendung bearbeiten"></i></a>
|
|
<a href="<?=self::getUrl("Preordernotification", "delete", ["id" => $notification->id])?>" class="text-danger" onclick="if(!confirm('Aussendung wirklich löschen?')) return false;" title="Aussendung Löschen"><i class="fas fa-trash"></i></a>
|
|
<?php endif; ?>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/footer.php"); ?>
|