|
|
@@ -3,27 +3,268 @@
|
|
|
<head>
|
|
|
<meta charset="UTF-8">
|
|
|
<title>Просмотр записи #{{ $submission->id }}</title>
|
|
|
- {{-- Вставьте сюда ваши теги <style> и <meta> --}}
|
|
|
+ <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;">
|
|
|
- <h3>Имя:</h3>
|
|
|
- <p>{{ $submission->name }}</p>
|
|
|
+
|
|
|
+ <p><strong>Имя:</strong> {{ $submission->name }}</p>
|
|
|
<hr style="margin: 15px 0;">
|
|
|
|
|
|
- <h3>Email:</h3>
|
|
|
- <p class="email-cell">{{ $submission->email }}</p>
|
|
|
+ <p><strong>Email:</strong> <span class="email-cell">{{ $submission->email }}</span></p>
|
|
|
<hr style="margin: 15px 0;">
|
|
|
|
|
|
- <h3>Сообщение:</h3>
|
|
|
- <pre class="message-cell">{{ $submission->message }}</pre>
|
|
|
+ {{-- НОВЫЕ ПОЛЯ --}}
|
|
|
+ <p><strong>Категория:</strong> {{ $submission->category->name ?? 'N/A' }}</p>
|
|
|
<hr style="margin: 15px 0;">
|
|
|
|
|
|
- <h3>Дата отправки:</h3>
|
|
|
- <p class="date-cell">{{ $submission->created_at->format('d.m.Y в H:i:s') }}</p>
|
|
|
+ <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>
|