|
16 | 16 | <p class="text-sm text-gray-500 dark:text-gray-300 mt-1">{{ 'settings.webhook.deliveries.subtitle'|trans }}</p> |
17 | 17 | </div> |
18 | 18 | </div> |
19 | | - <div class="mb-4"> |
| 19 | + <div class="mb-4 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4"> |
20 | 20 | <a href="{{ path('settings_webhook_endpoint_index') }}" |
21 | 21 | class="inline-flex items-center px-3 py-1.5 text-sm text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-600"> |
22 | 22 | {{ ux_icon('heroicons:arrow-left', {class: 'w-4 h-4 mr-1'}) }} {{ 'settings.webhook.actions.back'|trans }} |
23 | 23 | </a> |
| 24 | + <div class="flex items-center gap-2"> |
| 25 | + <label for="status-filter" class="text-sm text-gray-600 dark:text-gray-400">{{ 'settings.webhook.deliveries.filter.label'|trans }}:</label> |
| 26 | + <select id="status-filter" |
| 27 | + onchange="window.location.href = this.value" |
| 28 | + class="px-3 py-1.5 text-sm text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500"> |
| 29 | + <option value="{{ path('settings_webhook_delivery_index', {id: endpoint.id}) }}"{% if status == '' %} selected{% endif %}>{{ 'settings.webhook.deliveries.filter.all'|trans }}</option> |
| 30 | + <option value="{{ path('settings_webhook_delivery_index', {id: endpoint.id, status: 'success'}) }}"{% if status == 'success' %} selected{% endif %}>{{ 'settings.webhook.deliveries.status.delivered'|trans }}</option> |
| 31 | + <option value="{{ path('settings_webhook_delivery_index', {id: endpoint.id, status: 'failed'}) }}"{% if status == 'failed' %} selected{% endif %}>{{ 'settings.webhook.deliveries.status.failed'|trans }}</option> |
| 32 | + <option value="{{ path('settings_webhook_delivery_index', {id: endpoint.id, status: 'pending'}) }}"{% if status == 'pending' %} selected{% endif %}>{{ 'settings.webhook.deliveries.status.pending'|trans }}</option> |
| 33 | + </select> |
| 34 | + </div> |
24 | 35 | </div> |
25 | 36 | <div class="overflow-hidden"> |
26 | 37 | <div class="overflow-x-auto"> |
|
88 | 99 | </div> |
89 | 100 | <div class="flex gap-2"> |
90 | 101 | {% if page > 1 %} |
91 | | - <a href="{{ path('settings_webhook_delivery_index', {id: endpoint.id, page: page - 1}) }}" |
| 102 | + <a href="{{ path('settings_webhook_delivery_index', {id: endpoint.id, page: page - 1, status: status}|filter(v => v)) }}" |
92 | 103 | class="inline-flex items-center px-3 py-1.5 text-sm text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-600"> |
93 | 104 | {{ ux_icon('heroicons:chevron-left', {class: 'w-4 h-4 mr-1'}) }} {{ 'settings.webhook.deliveries.pagination.newer'|trans }} |
94 | 105 | </a> |
|
97 | 108 | {{ 'settings.webhook.deliveries.pagination.page'|trans({'%page%': page, '%totalPages%': totalPages}) }} |
98 | 109 | </span> |
99 | 110 | {% if page < totalPages %} |
100 | | - <a href="{{ path('settings_webhook_delivery_index', {id: endpoint.id, page: page + 1}) }}" |
| 111 | + <a href="{{ path('settings_webhook_delivery_index', {id: endpoint.id, page: page + 1, status: status}|filter(v => v)) }}" |
101 | 112 | class="inline-flex items-center px-3 py-1.5 text-sm text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-600"> |
102 | 113 | {{ 'settings.webhook.deliveries.pagination.older'|trans }} {{ ux_icon('heroicons:chevron-right', {class: 'w-4 h-4 ml-1'}) }} |
103 | 114 | </a> |
|
0 commit comments