diff --git a/templates/index.html b/templates/index.html index 9a96cdb..cb9afdd 100644 --- a/templates/index.html +++ b/templates/index.html @@ -465,7 +465,7 @@
-
Детали поста
+
Детали поста
@@ -1643,7 +1643,13 @@ const formatDate = (dateStr) => { if (!dateStr) return 'Не указано'; const date = new Date(dateStr); - return date.toLocaleString('ru-RU'); + return date.toLocaleString('ru-RU', { + year: 'numeric', + month: '2-digit', + day: '2-digit', + hour: '2-digit', + minute: '2-digit' + }); }; // Загружаем связанные события const linkedEvents = await fetch(`${PREFIX}/api/posts/${postId}/linked_events`) @@ -1656,7 +1662,7 @@ let detailsHtml = `
-

Пост #${post.vk_post_id}

+
-
-
- -
${post.shortname || 'Не указано'}
-
-
- -
${post.action_number || 'Не указан'}
-
-
-
- -
${post.text || 'Нет текста'}
-
- ${post.image_url ? ` -
- -
- -
-
` : ''} -
-
- -
${formatDate(post.published_at)}
-
-
- -
${formatDate(post.tg_publication_date)}
-
-
- -
${post.vk_post_url || 'Не указана'}
-
-
- -
${post.tg_message_id || 'Не указан'}
-
-
- -
-
- -
-
+
+
+
+
+ ${post.marked_for_publication && !post.published_in_tg ? 'Для публикации' : ''} + ${post.published_in_tg ? 'Опубликовано' : ''} ${post.is_event ? 'Событие' : ''} - ${post.is_poll ? 'Опрос' : ''} - ${!post.is_event && !post.is_poll ? 'Обычный' : ''} + ${post.is_poll ? 'Опрос' : ''} + ${!post.marked_for_publication && !post.published_in_tg && !post.is_event && !post.is_poll ? 'Никакое' : ''}
+ +
+ ${formatDate(post.published_at)} +
+ ${post.published_in_tg ? ` +
+ Телеграм ${post.tg_message_id || 'Не указан'} ${formatDate(post.tg_publication_date)} +
` : ''}
+
+ ${post.image_url ? ` +
+ +
` : ''} +
+
+
+
${post.text || 'Нет текста'}
${post.is_poll ? `
@@ -1817,6 +1803,8 @@ } detailsHtml += `
`; detailsPanel.innerHTML = detailsHtml; + // Обновляем заголовок панели + document.getElementById('post-details-header').textContent = `Пост #${post.vk_post_id}: ${post.shortname || 'Без названия'}`; // Обработчик для кнопки публикации document.getElementById('toggle-pub-btn').addEventListener('click', () => { togglePublication(post.id);