Fixes
This commit is contained in:
parent
0e4e9d0a51
commit
5ba102ec56
@ -1,59 +1,58 @@
|
|||||||
{% extends 'backend_base.html.twig' %}
|
{% extends 'backend_tailwind_base.html.twig' %}
|
||||||
{% trans_default_domain 'core_news_list' %}
|
{% trans_default_domain 'core_news_list' %}
|
||||||
|
{% block header %}
|
||||||
|
<div>
|
||||||
|
<h1 class="text-2xl font-bold tracking-tight">{{ 'News'|trans }} {{ 'List'|trans }}</h1>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-wrap items-center gap-4 justify-start shrink-0">
|
||||||
|
<a href="{{ path("psc_shop_news_backend_create") }}" class="inline-flex items-center justify-center py-1 gap-1 font-medium rounded-lg border transition-colors outline-none focus:ring-offset-2 focus:ring-2 focus:ring-inset min-h-[2.25rem] px-4 text-sm text-white shadow focus:ring-white border-transparent bg-psc-500 hover:bg-psc-600 focus:bg-psc-600 focus:ring-offset-psc-600"><span class="fa fa-edit"></span> {{ 'Addnews'|trans }}</a>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<div class="header">
|
<div class="border border-gray-300 shadow-sm bg-white rounded-xl filament-tables-container dark:bg-gray-800 dark:border-gray-700">
|
||||||
<div class="row">
|
<div class="flex items-center justify-between p-2 h-14">
|
||||||
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
|
<div class="flex items-center gap-2"></div>
|
||||||
<h3>
|
<div class="flex items-center justify-end w-full gap-2 md:max-w-md">
|
||||||
<i class="fa-fw fa fa-newspaper"></i>
|
<div class="filament-tables-search-container flex items-center justify-end flex-1">
|
||||||
{{'News'|trans}} <span>>
|
|
||||||
{{'List'|trans}} </span>
|
|
||||||
</h3>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="body">
|
<div class="overflow-x-auto relative dark:border-gray-700 border-t">
|
||||||
<div class="panel">
|
<table class="filament-tables-table w-full text-start divide-y table-auto dark:divide-gray-700">
|
||||||
<div class="body">
|
<thead>
|
||||||
<a class="btn btn-info btn-sm" href="{{ path("psc_shop_news_backend_create") }}">{{'Addnews'|trans}}</a>
|
<tr class="bg-gray-500/5">
|
||||||
</div>
|
<th class="p-0"><span class="items-center gap-x-1 w-full px-4 py-2 whitespace-nowrap font-medium text-sm text-gray-600 dark:text-gray-300">{{ knp_pagination_sortable(pagination, 'Uid'|trans, 'news.uid') }}</div></th>
|
||||||
</div>
|
<th>{{ knp_pagination_sortable(pagination, 'active'|trans, 'news.enable') }}</th>
|
||||||
<div class="panel">
|
<th>{{ knp_pagination_sortable(pagination, 'Name'|trans, 'news.title') }}</th>
|
||||||
<div class="body">
|
<th>{{ knp_pagination_sortable(pagination, 'Introduction'|trans, 'news.introduction') }}</th>
|
||||||
<table class="table">
|
<th>{{ knp_pagination_sortable(pagination, 'Sortdate'|trans, 'news.sortDate') }}</th>
|
||||||
<thead class="thead-dark">
|
<th></th>
|
||||||
<tr>
|
</tr>
|
||||||
<th>{{ knp_pagination_sortable(pagination, 'Uid'|trans, 'news.uid') }}</th>
|
</thead>
|
||||||
<th>{{ knp_pagination_sortable(pagination, 'active'|trans, 'news.enable') }}</th>
|
<tbody>
|
||||||
<th>{{ knp_pagination_sortable(pagination, 'Name'|trans, 'news.title') }}</th>
|
{% for news in pagination %}
|
||||||
<th>{{ knp_pagination_sortable(pagination, 'Introduction'|trans, 'news.introduction') }}</th>
|
<tr {% if loop.index is odd %}class="color"{% endif %}>
|
||||||
<th>{{ knp_pagination_sortable(pagination, 'Sortdate'|trans, 'news.sortDate') }}</th>
|
<td>{{ news.uid }}</td>
|
||||||
<th></th>
|
<td>{% if news.enable %}<span class="badge bg-success">{{'yes'|trans}}</span>{% else %}<span
|
||||||
</tr>
|
class="badge bg-warning">{{'no'|trans}}</span>{% endif %}</td>
|
||||||
</thead>
|
<td>{{ news.title }}</td>
|
||||||
<tbody>
|
<td>{{ news.introduction }}</td>
|
||||||
{% for news in pagination %}
|
<td>{{ news.sortDate|date('d.m.Y') }}</td>
|
||||||
<tr {% if loop.index is odd %}class="color"{% endif %}>
|
<td class="text-end">
|
||||||
<td>{{ news.uid }}</td>
|
<a href="{{ path("psc_shop_news_backend_edit", {uid: news.uid}) }}"
|
||||||
<td>{% if news.enable %}<span class="badge bg-success">{{'yes'|trans}}</span>{% else %}<span
|
class="btn btn-info btn-sm"><span class="fa fa-edit"></span></a>
|
||||||
class="badge bg-warning">{{'no'|trans}}</span>{% endif %}</td>
|
<a href="{{ path("psc_shop_news_backend_delete", {uid: news.uid}) }}"
|
||||||
<td>{{ news.title }}</td>
|
class="btn btn-danger btn-sm"><span class="fa fa-trash"></span></a>
|
||||||
<td>{{ news.introduction }}</td>
|
</td>
|
||||||
<td>{{ news.sortDate|date('d.m.Y') }}</td>
|
</tr>
|
||||||
<td class="text-end">
|
{% endfor %}
|
||||||
<a href="{{ path("psc_shop_news_backend_edit", {uid: news.uid}) }}"
|
</tbody>
|
||||||
class="btn btn-info btn-sm"><span class="fa fa-edit"></span></a>
|
</table>
|
||||||
<a href="{{ path("psc_shop_news_backend_delete", {uid: news.uid}) }}"
|
<div class="navigation">
|
||||||
class="btn btn-danger btn-sm"><span class="fa fa-trash"></span></a>
|
{{ knp_pagination_render(pagination) }}
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<div class="navigation">
|
|
||||||
{{ knp_pagination_render(pagination) }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|||||||
@ -394,9 +394,18 @@ class Mail implements QueueInterface, ConfigurableElementInterface
|
|||||||
if ($html) {
|
if ($html) {
|
||||||
$message->html($html->render($params));
|
$message->html($html->render($params));
|
||||||
}
|
}
|
||||||
|
$this->_logService->createLogEntry($shop, new Contact(), LogEntry::INFO, PSCShopQueueBundle::class, $queue->getName(), "Mail send", [
|
||||||
|
'message' => $message->getTextBody(),
|
||||||
|
'from' => $from->render($params),
|
||||||
|
'to' => $to->render($params),
|
||||||
|
'subject' => $subject->render($params)
|
||||||
|
]);
|
||||||
|
|
||||||
$this->_mailer->send($message);
|
$this->_mailer->send($message);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
$this->_logService->createLogEntry($shop, new Contact(), LogEntry::ERROR, PSCShopQueueBundle::class, $queue->getName(), "Request Mail error", [
|
||||||
|
'error' => $e->getMessage()
|
||||||
|
]);
|
||||||
$this->_error = $e->getMessage();
|
$this->_error = $e->getMessage();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -441,8 +450,17 @@ class Mail implements QueueInterface, ConfigurableElementInterface
|
|||||||
$message->html($html->render($params));
|
$message->html($html->render($params));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->_logService->createLogEntry($shop, new Contact(), LogEntry::INFO, PSCShopQueueBundle::class, $queue->getName(), "Mail send", [
|
||||||
|
'message' => "Nicht verfügbar da Passwort enhalten",
|
||||||
|
'from' => $from->render($params),
|
||||||
|
'to' => $to->render($params),
|
||||||
|
'subject' => $subject->render($params)
|
||||||
|
]);
|
||||||
$this->_mailer->send($message);
|
$this->_mailer->send($message);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
$this->_logService->createLogEntry($shop, new Contact(), LogEntry::ERROR, PSCShopQueueBundle::class, $queue->getName(), "Request Mail error", [
|
||||||
|
'error' => $e->getMessage()
|
||||||
|
]);
|
||||||
$this->_error = $e->getMessage();
|
$this->_error = $e->getMessage();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user