| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274 |
- <!DOCTYPE html>
- <html lang="ru">
- <head>
- <meta charset="UTF-8">
- <title>Просмотр записи #{{ $submission->id }}</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;
- }
- }
-
- .status-badge {
- padding: 4px 8px;
- border-radius: 12px;
- color: white;
- font-size: 12px;
- font-weight: bold;
- white-space: nowrap;
- }
- .status-primary { background-color: #007bff; }
- .status-warning { background-color: #ffc107; color: #212529; }
- .status-success { background-color: #28a745; }
- .status-danger { background-color: #dc3545; }
- .status-secondary { background-color: #6c757d; }
- </style>
- </head>
- <body>
- <div class="container">
- <h1>Просмотр записи #{{ $submission->id }}</h1>
- <div style="background: #f8f9fa; padding: 20px; border-radius: 8px;">
-
- <p><strong>Имя:</strong> {{ $submission->name }}</p>
- <hr style="margin: 15px 0;">
- <p><strong>Email:</strong> <span class="email-cell">{{ $submission->email }}</span></p>
- <hr style="margin: 15px 0;">
- {{-- НОВЫЕ ПОЛЯ --}}
- <p><strong>Категория:</strong> {{ $submission->category->name ?? 'N/A' }}</p>
- <hr style="margin: 15px 0;">
- <p><strong>Статус:</strong>
- <span class="status-badge status-{{ $submission->status->color_class ?? 'secondary' }}">
- {{ $submission->status->name ?? 'Неизвестен' }}
- </span>
- </p>
- <hr style="margin: 15px 0;">
- <p><strong>Сообщение:</strong></p>
- <pre class="message-cell" style="background: #fff; padding: 10px; border: 1px solid #ddd; border-radius: 4px;">{{ $submission->message }}</pre>
- <hr style="margin: 15px 0;">
- <p><strong>Дата отправки:</strong> <span class="date-cell">{{ $submission->created_at->format('d.m.Y в H:i:s') }}</span></p>
- </div>
- <div class="notes-section" style="margin-top: 30px;">
- <h2>Заметки к записи</h2>
- <div class="notes-list" style="margin-top: 15px;">
- @forelse($submission->notes as $note)
- <div style="background: #fff3cd; padding: 15px; border-radius: 5px; margin-bottom: 10px; border-left: 4px solid #ffeeba;">
- <p>{{ $note->body }}</p>
- <small style="color: #666; display: block; text-align: right; margin-top: 5px;">
- Добавлено: {{ $note->created_at->diffForHumans() }}
- </small>
- </div>
- @empty
- <p style="color: #888;">Заметок пока нет.</p>
- @endforelse
- </div>
-
- <form action="{{ route('admin.notes.add', $submission) }}" method="POST" style="margin-top: 20px;">
- @csrf
- <label for="note_body">Добавить заметку:</label>
- <textarea name="body" id="note_body" rows="3" required style="width: 100%; padding: 10px; border-radius: 5px; border: 1px solid #ccc;"></textarea>
- <button type="submit" class="btn" style="margin-top: 10px; width: auto;">Сохранить заметку</button>
- </form>
- </div>
- <div style="margin-top: 30px;">
- <a href="{{ route('admin.index') }}" class="btn btn-secondary">← Назад к списку</a>
- <a href="{{ route('admin.edit', $submission) }}" class="btn" style="background: #f1c40f; margin-left: 10px;">Редактировать</a>
- </div>
- </div>
- </body>
- </html>
|