| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280 |
- <!DOCTYPE html>
- <html lang="ru">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Все отправленные данные</title>
- <style>
- * { margin: 0; padding: 0; box-sizing: border-box; }
- body {
- font-family: Arial, sans-serif;
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- min-height: 100vh;
- padding: 40px 20px;
- }
- .container {
- background: white;
- padding: 40px;
- border-radius: 10px;
- box-shadow: 0 10px 40px rgba(0,0,0,0.2);
- max-width: 1200px;
- margin: 0 auto;
- }
- h1 {
- color: #333;
- margin-bottom: 10px;
- text-align: center;
- }
- .subtitle {
- color: #666;
- text-align: center;
- margin-bottom: 30px;
- font-size: 14px;
- }
- .header-actions {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 20px;
- flex-wrap: wrap;
- gap: 10px;
- }
- .btn {
- padding: 10px 20px;
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- color: white;
- border: none;
- border-radius: 5px;
- font-size: 14px;
- font-weight: bold;
- cursor: pointer;
- text-decoration: none;
- display: inline-block;
- transition: transform 0.2s;
- }
- .btn:hover {
- transform: translateY(-2px);
- }
- .btn-secondary {
- background: linear-gradient(135deg, #a8a8a8 0%, #7f7f7f 100%);
- }
- .count-badge {
- background: #667eea;
- color: white;
- padding: 5px 15px;
- border-radius: 20px;
- font-size: 14px;
- font-weight: bold;
- }
- .table-wrapper {
- overflow-x: auto;
- margin-top: 20px;
- }
- table {
- width: 100%;
- border-collapse: collapse;
- background: white;
- }
- thead {
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- }
- thead th {
- color: white;
- padding: 15px;
- text-align: left;
- font-weight: bold;
- font-size: 14px;
- }
- tbody tr {
- border-bottom: 1px solid #e1e1e1;
- transition: background-color 0.2s;
- }
- tbody tr:hover {
- background-color: #f8f9fa;
- }
- tbody tr:last-child {
- border-bottom: none;
- }
- td {
- padding: 15px;
- color: #333;
- font-size: 14px;
- }
- .message-cell {
- max-width: 300px;
- word-wrap: break-word;
- white-space: pre-wrap;
- }
- .date-cell {
- white-space: nowrap;
- color: #666;
- font-size: 13px;
- }
- .email-cell {
- color: #667eea;
- font-weight: 500;
- }
- .empty-state {
- text-align: center;
- padding: 60px 20px;
- color: #999;
- }
- .empty-state-icon {
- font-size: 64px;
- margin-bottom: 20px;
- }
- .alert {
- padding: 15px;
- border-radius: 5px;
- margin-bottom: 20px;
- }
- .alert-success {
- background: #d4edda;
- color: #155724;
- border: 1px solid #c3e6cb;
- }
- /* Стили для кнопок действий */
- .action-btn {
- padding: 5px 10px;
- font-size: 16px;
- border: none;
- border-radius: 5px;
- cursor: pointer;
- text-decoration: none;
- display: inline-block;
- margin: 0 2px;
- transition: all 0.2s;
- }
- .action-btn:hover {
- transform: scale(1.1);
- box-shadow: 0 2px 8px rgba(0,0,0,0.2);
- }
- .btn-view {
- background: #3498db;
- color: white;
- }
- .btn-view:hover {
- background: #2980b9;
- }
- .btn-edit {
- background: #f1c40f;
- color: white;
- }
- .btn-edit:hover {
- background: #f39c12;
- }
- .btn-delete {
- background: #e74c3c;
- color: white;
- }
- .btn-delete:hover {
- background: #c0392b;
- }
-
- @media (max-width: 768px) {
- .container {
- padding: 20px;
- }
- table {
- font-size: 12px;
- }
- thead th, td {
- padding: 10px 8px;
- }
- .message-cell {
- max-width: 150px;
- }
- .action-btn {
- font-size: 14px;
- padding: 4px 8px;
- margin: 1px;
- }
- }
- </style>
- </head>
- <body>
- <div class="container">
- <h1>📋 Все отправленные данные</h1>
- <p class="subtitle">Laravel {{ app()->version() }} | Данные из формы</p>
- @if(session('success'))
- <div class="alert alert-success">
- {{ session('success') }}
- </div>
- @endif
- <div class="table-wrapper">
- @if($submissions->count() > 0)
- <table>
- <thead>
- <tr>
- <th>#</th>
- <th>Имя</th>
- <th>Email</th>
- <th>Сообщение</th>
- <th>Дата отправки</th>
- <th style="text-align: right;">Действия</th>
- </tr>
- </thead>
- <tbody>
- @foreach($submissions as $submission)
- <tr>
- <td>{{ $loop->iteration }}</td>
- <td>{{ $submission->name }}</td>
- <td class="email-cell">{{ $submission->email }}</td>
- <td class="message-cell">{{ $submission->message }}</td>
- <td class="date-cell">
- {{ $submission->created_at->format('d.m.Y H:i') }}
- </td>
- <td style="text-align: right; white-space: nowrap;">
- {{-- Просмотр --}}
- <a href="{{ route('admin.show', $submission->id) }}"
- class="action-btn btn-view"
- title="Просмотр">
- 👁️
- </a>
- {{-- Редактирование --}}
- <a href="{{ route('admin.edit', $submission->id) }}"
- class="action-btn btn-edit"
- title="Редактировать">
- ✏️
- </a>
- {{-- Удаление --}}
- <form action="{{ route('admin.delete', $submission) }}"
- method="POST"
- style="display: inline;"
- onsubmit="return confirm('⚠️ Вы уверены?\n\nЗапись будет перемещена в корзину.')">
- @csrf
- @method('DELETE')
- <button type="submit"
- class="action-btn btn-delete"
- title="Удалить">
- 🗑️
- </button>
- </form>
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- @else
- <div class="empty-state">
- <div class="empty-state-icon">📭</div>
- <h3>Пока нет отправленных данных</h3>
- <p style="margin-top: 10px;">Заполните форму, чтобы увидеть данные здесь</p>
- </div>
- @endif
- </div>
- </div>
- </body>
- </html>
|