admin.blade.php 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <!DOCTYPE html>
  2. <html lang="ru">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Все отправленные данные</title>
  7. <style>
  8. * { margin: 0; padding: 0; box-sizing: border-box; }
  9. body {
  10. font-family: Arial, sans-serif;
  11. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  12. min-height: 100vh;
  13. padding: 40px 20px;
  14. }
  15. .container {
  16. background: white;
  17. padding: 40px;
  18. border-radius: 10px;
  19. box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  20. max-width: 1200px;
  21. margin: 0 auto;
  22. }
  23. h1 {
  24. color: #333;
  25. margin-bottom: 10px;
  26. text-align: center;
  27. }
  28. .subtitle {
  29. color: #666;
  30. text-align: center;
  31. margin-bottom: 30px;
  32. font-size: 14px;
  33. }
  34. .header-actions {
  35. display: flex;
  36. justify-content: space-between;
  37. align-items: center;
  38. margin-bottom: 20px;
  39. flex-wrap: wrap;
  40. gap: 10px;
  41. }
  42. .btn {
  43. padding: 10px 20px;
  44. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  45. color: white;
  46. border: none;
  47. border-radius: 5px;
  48. font-size: 14px;
  49. font-weight: bold;
  50. cursor: pointer;
  51. text-decoration: none;
  52. display: inline-block;
  53. transition: transform 0.2s;
  54. }
  55. .btn:hover {
  56. transform: translateY(-2px);
  57. }
  58. .btn-secondary {
  59. background: linear-gradient(135deg, #a8a8a8 0%, #7f7f7f 100%);
  60. }
  61. .count-badge {
  62. background: #667eea;
  63. color: white;
  64. padding: 5px 15px;
  65. border-radius: 20px;
  66. font-size: 14px;
  67. font-weight: bold;
  68. }
  69. .table-wrapper {
  70. overflow-x: auto;
  71. margin-top: 20px;
  72. }
  73. table {
  74. width: 100%;
  75. border-collapse: collapse;
  76. background: white;
  77. }
  78. thead {
  79. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  80. }
  81. thead th {
  82. color: white;
  83. padding: 15px;
  84. text-align: left;
  85. font-weight: bold;
  86. font-size: 14px;
  87. }
  88. tbody tr {
  89. border-bottom: 1px solid #e1e1e1;
  90. transition: background-color 0.2s;
  91. }
  92. tbody tr:hover {
  93. background-color: #f8f9fa;
  94. }
  95. tbody tr:last-child {
  96. border-bottom: none;
  97. }
  98. td {
  99. padding: 15px;
  100. color: #333;
  101. font-size: 14px;
  102. }
  103. .message-cell {
  104. max-width: 300px;
  105. word-wrap: break-word;
  106. white-space: pre-wrap;
  107. }
  108. .date-cell {
  109. white-space: nowrap;
  110. color: #666;
  111. font-size: 13px;
  112. }
  113. .email-cell {
  114. color: #667eea;
  115. font-weight: 500;
  116. }
  117. .empty-state {
  118. text-align: center;
  119. padding: 60px 20px;
  120. color: #999;
  121. }
  122. .empty-state-icon {
  123. font-size: 64px;
  124. margin-bottom: 20px;
  125. }
  126. .alert {
  127. padding: 15px;
  128. border-radius: 5px;
  129. margin-bottom: 20px;
  130. }
  131. .alert-success {
  132. background: #d4edda;
  133. color: #155724;
  134. border: 1px solid #c3e6cb;
  135. }
  136. @media (max-width: 768px) {
  137. .container {
  138. padding: 20px;
  139. }
  140. table {
  141. font-size: 12px;
  142. }
  143. thead th, td {
  144. padding: 10px 8px;
  145. }
  146. .message-cell {
  147. max-width: 150px;
  148. }
  149. }
  150. </style>
  151. </head>
  152. <body>
  153. <div class="container">
  154. <h1>📋 Все отправленные данные</h1>
  155. <p class="subtitle">Laravel {{ app()->version() }} | Данные из формы</p>
  156. @if(session('success'))
  157. <div class="alert alert-success">
  158. {{ session('success') }}
  159. </div>
  160. @endif
  161. <div class="header-actions">
  162. <div class="count-badge">
  163. Всего записей: {{ $submissions->count() }}
  164. </div>
  165. <a href="{{ route('form') }}" class="btn btn-secondary">
  166. ← Вернуться к форме
  167. </a>
  168. </div>
  169. <div class="table-wrapper">
  170. @if($submissions->count() > 0)
  171. <table>
  172. <thead>
  173. <tr>
  174. <th>#</th>
  175. <th>Имя</th>
  176. <th>Email</th>
  177. <th>Сообщение</th>
  178. <th>Дата отправки</th>
  179. </tr>
  180. </thead>
  181. <tbody>
  182. @foreach($submissions as $index => $submission)
  183. <tr>
  184. <td>{{ $index + 1 }}</td>
  185. <td>{{ $submission->name }}</td>
  186. <td class="email-cell">{{ $submission->email }}</td>
  187. <td class="message-cell">{{ $submission->message }}</td>
  188. <td class="date-cell">
  189. {{ $submission->created_at->format('d.m.Y H:i') }}
  190. </td>
  191. </tr>
  192. @endforeach
  193. </tbody>
  194. </table>
  195. @else
  196. <div class="empty-state">
  197. <div class="empty-state-icon">📭</div>
  198. <h3>Данных пока нет</h3>
  199. <p style="margin-top: 10px; color: #999;">
  200. Отправьте форму, чтобы увидеть данные здесь
  201. </p>
  202. <a href="{{ route('form.index') }}" class="btn" style="margin-top: 20px;">
  203. Перейти к форме
  204. </a>
  205. </div>
  206. @endif
  207. </div>
  208. </div>
  209. </body>
  210. </html>