i18n: перевод ленты новостей (news/news-detail/news-edit) ru/uk/en
Список публикаций, форма создания/редактирования, детальная (комментарии,
публикация в Mattermost, важное/закреплённое), JS-строки (загрузка картинок,
свернуть/развернуть) помечены {% trans %} и переведены на uk/en.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Binary file not shown.
+126
-27
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2026-07-27 16:17+0300\n"
|
||||
"POT-Creation-Date: 2026-07-27 21:58+0300\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@@ -488,9 +488,10 @@ msgstr ""
|
||||
msgid "Мережа"
|
||||
msgstr ""
|
||||
|
||||
#: apps/feed/models.py:36
|
||||
#: apps/feed/models.py:36 templates/pages/news-edit.html:26
|
||||
#: templates/pages/news.html:29
|
||||
msgid "Заголовок"
|
||||
msgstr ""
|
||||
msgstr "Title"
|
||||
|
||||
#: apps/feed/models.py:37
|
||||
msgid "Текст"
|
||||
@@ -956,7 +957,8 @@ msgstr ""
|
||||
msgid "Заполняется автоматически из полей выше"
|
||||
msgstr ""
|
||||
|
||||
#: apps/locations/models/base.py:60 templates/pages/task-detail.html:98
|
||||
#: apps/locations/models/base.py:60 templates/pages/news-detail.html:78
|
||||
#: templates/pages/task-detail.html:98
|
||||
msgid "Комментарии"
|
||||
msgstr "Comments"
|
||||
|
||||
@@ -1671,7 +1673,7 @@ msgstr "Main menu"
|
||||
msgid "Главная"
|
||||
msgstr "Home"
|
||||
|
||||
#: templates/index.html:239
|
||||
#: templates/index.html:239 templates/pages/news.html:6
|
||||
msgid "Новости"
|
||||
msgstr "News"
|
||||
|
||||
@@ -1858,11 +1860,11 @@ msgstr "records"
|
||||
msgid "Последние новости"
|
||||
msgstr "Latest news"
|
||||
|
||||
#: templates/pages/dashboard.html:82
|
||||
#: templates/pages/dashboard.html:82 templates/pages/news.html:7
|
||||
msgid "Объявления и важные события компании"
|
||||
msgstr "Announcements and important company events"
|
||||
|
||||
#: templates/pages/dashboard.html:103
|
||||
#: templates/pages/dashboard.html:103 templates/pages/news.html:169
|
||||
msgid "Публикаций пока нет"
|
||||
msgstr "No publications yet"
|
||||
|
||||
@@ -2078,8 +2080,8 @@ msgstr "Showing"
|
||||
msgid "Нет записей"
|
||||
msgstr "No records"
|
||||
|
||||
#: templates/pages/employee-detail.html:21 templates/pages/task-detail.html:41
|
||||
#: templates/pages/tasks.html:127
|
||||
#: templates/pages/employee-detail.html:21 templates/pages/news-detail.html:17
|
||||
#: templates/pages/task-detail.html:41 templates/pages/tasks.html:127
|
||||
msgid "Редактировать"
|
||||
msgstr "Edit"
|
||||
|
||||
@@ -2158,7 +2160,7 @@ msgid "сотрудников, из них"
|
||||
msgstr "employees, of them"
|
||||
|
||||
#: templates/pages/employees.html:48 templates/pages/hr-portal.html:122
|
||||
#: templates/pages/tasks.html:60
|
||||
#: templates/pages/news.html:111 templates/pages/tasks.html:60
|
||||
msgid "Все"
|
||||
msgstr "All"
|
||||
|
||||
@@ -2406,7 +2408,8 @@ msgstr "New hiring request"
|
||||
|
||||
#: templates/pages/hr-portal.html:416
|
||||
msgid "Сразу создаёт личный учётный запис кандидата на срок испытания."
|
||||
msgstr "Immediately creates a personal candidate account for the probation period."
|
||||
msgstr ""
|
||||
"Immediately creates a personal candidate account for the probation period."
|
||||
|
||||
#: templates/pages/hr-portal.html:422
|
||||
msgid "Фамилия "
|
||||
@@ -2508,6 +2511,118 @@ msgstr "IT request:"
|
||||
msgid "Заявок на найм пока нет"
|
||||
msgstr "No hiring requests yet"
|
||||
|
||||
#: templates/pages/news-detail.html:12
|
||||
msgid "Ко всем новостям"
|
||||
msgstr "Back to all news"
|
||||
|
||||
#: templates/pages/news-detail.html:21
|
||||
msgid "Удалить публикацию"
|
||||
msgstr "Delete publication"
|
||||
|
||||
#: templates/pages/news-detail.html:21
|
||||
msgid "Это необратимо."
|
||||
msgstr "This is irreversible."
|
||||
|
||||
#: templates/pages/news-detail.html:24 templates/pages/task-detail.html:48
|
||||
#: templates/pages/tasks.html:135
|
||||
msgid "Удалить"
|
||||
msgstr "Delete"
|
||||
|
||||
#: templates/pages/news-detail.html:29
|
||||
msgid "Обновить"
|
||||
msgstr "Update"
|
||||
|
||||
#: templates/pages/news-detail.html:29
|
||||
msgid "в чате Mattermost?"
|
||||
msgstr "in Mattermost chat?"
|
||||
|
||||
#: templates/pages/news-detail.html:32
|
||||
msgid "Обновить в чате"
|
||||
msgstr "Update in chat"
|
||||
|
||||
#: templates/pages/news-detail.html:40
|
||||
msgid "Опубликовано в чат Mattermost"
|
||||
msgstr "Published to Mattermost chat"
|
||||
|
||||
#: templates/pages/news-detail.html:48
|
||||
msgid "Закреплено"
|
||||
msgstr "Pinned"
|
||||
|
||||
#: templates/pages/news-detail.html:50 templates/pages/news-edit.html:82
|
||||
#: templates/pages/news.html:90
|
||||
msgid "Важно"
|
||||
msgstr "Important"
|
||||
|
||||
#: templates/pages/news-detail.html:89
|
||||
msgid "из Mattermost"
|
||||
msgstr "from Mattermost"
|
||||
|
||||
#: templates/pages/news-detail.html:96
|
||||
msgid "Комментариев пока нет — будьте первым"
|
||||
msgstr "No comments yet — be the first"
|
||||
|
||||
#: templates/pages/news-detail.html:104 templates/pages/task-detail.html:125
|
||||
msgid "Написать комментарий..."
|
||||
msgstr "Write a comment..."
|
||||
|
||||
#: templates/pages/news-detail.html:108 templates/pages/task-detail.html:127
|
||||
msgid "Отправить"
|
||||
msgstr "Send"
|
||||
|
||||
#: templates/pages/news-edit.html:10
|
||||
msgid "К публикации"
|
||||
msgstr "Back to publication"
|
||||
|
||||
#: templates/pages/news-edit.html:14
|
||||
msgid "Редактирование публикации"
|
||||
msgstr "Edit publication"
|
||||
|
||||
#: templates/pages/news-edit.html:66 templates/pages/news-edit.html:68
|
||||
#: templates/pages/news.html:74 templates/pages/news.html:76
|
||||
msgid "Ошибка загрузки изображения"
|
||||
msgstr "Image upload error"
|
||||
|
||||
#: templates/pages/news-edit.html:85 templates/pages/news.html:93
|
||||
msgid "Закрепить"
|
||||
msgstr "Pin"
|
||||
|
||||
#: templates/pages/news-edit.html:87 templates/pages/news.html:95
|
||||
msgid "Опубликовать в чат:"
|
||||
msgstr "Publish to chat:"
|
||||
|
||||
#: templates/pages/news-edit.html:93 templates/pages/profile.html:104
|
||||
#: templates/pages/task-edit.html:46
|
||||
msgid "Сохранить изменения"
|
||||
msgstr "Save changes"
|
||||
|
||||
#: templates/pages/news.html:24
|
||||
msgid "Новая публикация"
|
||||
msgstr "New publication"
|
||||
|
||||
#: templates/pages/news.html:30
|
||||
msgid "Текст публикации..."
|
||||
msgstr "Post text..."
|
||||
|
||||
#: templates/pages/news.html:101
|
||||
msgid "Опубликовать"
|
||||
msgstr "Publish"
|
||||
|
||||
#: templates/pages/news.html:113
|
||||
msgid "Важные"
|
||||
msgstr "Important"
|
||||
|
||||
#: templates/pages/news.html:136
|
||||
msgid "Свернуть"
|
||||
msgstr "Collapse"
|
||||
|
||||
#: templates/pages/news.html:136
|
||||
msgid "Показать полностью"
|
||||
msgstr "Show full"
|
||||
|
||||
#: templates/pages/news.html:169
|
||||
msgid "По этому фильтру публикаций нет"
|
||||
msgstr "No publications for this filter"
|
||||
|
||||
#: templates/pages/pharmacies.html:38
|
||||
msgid "Средняя ФА на аптеку"
|
||||
msgstr "Avg pharmacists per pharmacy"
|
||||
@@ -2681,10 +2796,6 @@ msgstr ""
|
||||
"Applies to all portal tables unless a size is chosen manually for a specific "
|
||||
"table."
|
||||
|
||||
#: templates/pages/profile.html:104 templates/pages/task-edit.html:46
|
||||
msgid "Сохранить изменения"
|
||||
msgstr "Save changes"
|
||||
|
||||
#: templates/pages/settings.html:6
|
||||
msgid "Конфигурация портала"
|
||||
msgstr "Portal configuration"
|
||||
@@ -2773,10 +2884,6 @@ msgstr "overdue"
|
||||
msgid "Удалить задачу"
|
||||
msgstr "Delete task"
|
||||
|
||||
#: templates/pages/task-detail.html:48 templates/pages/tasks.html:135
|
||||
msgid "Удалить"
|
||||
msgstr "Delete"
|
||||
|
||||
#: templates/pages/task-detail.html:66
|
||||
msgid "Описание не добавлено"
|
||||
msgstr "No description"
|
||||
@@ -2789,14 +2896,6 @@ msgstr "Checklist"
|
||||
msgid "Комментариев пока нет"
|
||||
msgstr "No comments yet"
|
||||
|
||||
#: templates/pages/task-detail.html:125
|
||||
msgid "Написать комментарий..."
|
||||
msgstr "Write a comment..."
|
||||
|
||||
#: templates/pages/task-detail.html:127
|
||||
msgid "Отправить"
|
||||
msgstr "Send"
|
||||
|
||||
#: templates/pages/task-detail.html:156
|
||||
msgid "Вернуть в работу"
|
||||
msgstr "Return to progress"
|
||||
|
||||
Binary file not shown.
+126
-27
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2026-07-27 16:17+0300\n"
|
||||
"POT-Creation-Date: 2026-07-27 21:58+0300\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@@ -491,9 +491,10 @@ msgstr ""
|
||||
msgid "Мережа"
|
||||
msgstr ""
|
||||
|
||||
#: apps/feed/models.py:36
|
||||
#: apps/feed/models.py:36 templates/pages/news-edit.html:26
|
||||
#: templates/pages/news.html:29
|
||||
msgid "Заголовок"
|
||||
msgstr ""
|
||||
msgstr "Заголовок"
|
||||
|
||||
#: apps/feed/models.py:37
|
||||
msgid "Текст"
|
||||
@@ -959,7 +960,8 @@ msgstr ""
|
||||
msgid "Заполняется автоматически из полей выше"
|
||||
msgstr ""
|
||||
|
||||
#: apps/locations/models/base.py:60 templates/pages/task-detail.html:98
|
||||
#: apps/locations/models/base.py:60 templates/pages/news-detail.html:78
|
||||
#: templates/pages/task-detail.html:98
|
||||
msgid "Комментарии"
|
||||
msgstr "Коментарі"
|
||||
|
||||
@@ -1674,7 +1676,7 @@ msgstr "Головне меню"
|
||||
msgid "Главная"
|
||||
msgstr "Головна"
|
||||
|
||||
#: templates/index.html:239
|
||||
#: templates/index.html:239 templates/pages/news.html:6
|
||||
msgid "Новости"
|
||||
msgstr "Новини"
|
||||
|
||||
@@ -1861,11 +1863,11 @@ msgstr "записів"
|
||||
msgid "Последние новости"
|
||||
msgstr "Останні новини"
|
||||
|
||||
#: templates/pages/dashboard.html:82
|
||||
#: templates/pages/dashboard.html:82 templates/pages/news.html:7
|
||||
msgid "Объявления и важные события компании"
|
||||
msgstr "Оголошення та важливі події компанії"
|
||||
|
||||
#: templates/pages/dashboard.html:103
|
||||
#: templates/pages/dashboard.html:103 templates/pages/news.html:169
|
||||
msgid "Публикаций пока нет"
|
||||
msgstr "Публікацій поки немає"
|
||||
|
||||
@@ -2081,8 +2083,8 @@ msgstr "Показано"
|
||||
msgid "Нет записей"
|
||||
msgstr "Немає записів"
|
||||
|
||||
#: templates/pages/employee-detail.html:21 templates/pages/task-detail.html:41
|
||||
#: templates/pages/tasks.html:127
|
||||
#: templates/pages/employee-detail.html:21 templates/pages/news-detail.html:17
|
||||
#: templates/pages/task-detail.html:41 templates/pages/tasks.html:127
|
||||
msgid "Редактировать"
|
||||
msgstr "Редагувати"
|
||||
|
||||
@@ -2161,7 +2163,7 @@ msgid "сотрудников, из них"
|
||||
msgstr "співробітників, з них"
|
||||
|
||||
#: templates/pages/employees.html:48 templates/pages/hr-portal.html:122
|
||||
#: templates/pages/tasks.html:60
|
||||
#: templates/pages/news.html:111 templates/pages/tasks.html:60
|
||||
msgid "Все"
|
||||
msgstr "Всі"
|
||||
|
||||
@@ -2409,7 +2411,8 @@ msgstr "Нова заявка на найм"
|
||||
|
||||
#: templates/pages/hr-portal.html:416
|
||||
msgid "Сразу создаёт личный учётный запис кандидата на срок испытания."
|
||||
msgstr "Одразу створює особистий обліковий запис кандидата на термін випробування."
|
||||
msgstr ""
|
||||
"Одразу створює особистий обліковий запис кандидата на термін випробування."
|
||||
|
||||
#: templates/pages/hr-portal.html:422
|
||||
msgid "Фамилия "
|
||||
@@ -2511,6 +2514,118 @@ msgstr "Заявка IT:"
|
||||
msgid "Заявок на найм пока нет"
|
||||
msgstr "Заявок на найм поки немає"
|
||||
|
||||
#: templates/pages/news-detail.html:12
|
||||
msgid "Ко всем новостям"
|
||||
msgstr "До всіх новин"
|
||||
|
||||
#: templates/pages/news-detail.html:21
|
||||
msgid "Удалить публикацию"
|
||||
msgstr "Видалити публікацію"
|
||||
|
||||
#: templates/pages/news-detail.html:21
|
||||
msgid "Это необратимо."
|
||||
msgstr "Це незворотньо."
|
||||
|
||||
#: templates/pages/news-detail.html:24 templates/pages/task-detail.html:48
|
||||
#: templates/pages/tasks.html:135
|
||||
msgid "Удалить"
|
||||
msgstr "Видалити"
|
||||
|
||||
#: templates/pages/news-detail.html:29
|
||||
msgid "Обновить"
|
||||
msgstr "Оновити"
|
||||
|
||||
#: templates/pages/news-detail.html:29
|
||||
msgid "в чате Mattermost?"
|
||||
msgstr "в чаті Mattermost?"
|
||||
|
||||
#: templates/pages/news-detail.html:32
|
||||
msgid "Обновить в чате"
|
||||
msgstr "Оновити в чаті"
|
||||
|
||||
#: templates/pages/news-detail.html:40
|
||||
msgid "Опубликовано в чат Mattermost"
|
||||
msgstr "Опубліковано в чат Mattermost"
|
||||
|
||||
#: templates/pages/news-detail.html:48
|
||||
msgid "Закреплено"
|
||||
msgstr "Закріплено"
|
||||
|
||||
#: templates/pages/news-detail.html:50 templates/pages/news-edit.html:82
|
||||
#: templates/pages/news.html:90
|
||||
msgid "Важно"
|
||||
msgstr "Важливо"
|
||||
|
||||
#: templates/pages/news-detail.html:89
|
||||
msgid "из Mattermost"
|
||||
msgstr "з Mattermost"
|
||||
|
||||
#: templates/pages/news-detail.html:96
|
||||
msgid "Комментариев пока нет — будьте первым"
|
||||
msgstr "Коментарів поки немає — будьте першим"
|
||||
|
||||
#: templates/pages/news-detail.html:104 templates/pages/task-detail.html:125
|
||||
msgid "Написать комментарий..."
|
||||
msgstr "Написати коментар..."
|
||||
|
||||
#: templates/pages/news-detail.html:108 templates/pages/task-detail.html:127
|
||||
msgid "Отправить"
|
||||
msgstr "Надіслати"
|
||||
|
||||
#: templates/pages/news-edit.html:10
|
||||
msgid "К публикации"
|
||||
msgstr "До публікації"
|
||||
|
||||
#: templates/pages/news-edit.html:14
|
||||
msgid "Редактирование публикации"
|
||||
msgstr "Редагування публікації"
|
||||
|
||||
#: templates/pages/news-edit.html:66 templates/pages/news-edit.html:68
|
||||
#: templates/pages/news.html:74 templates/pages/news.html:76
|
||||
msgid "Ошибка загрузки изображения"
|
||||
msgstr "Помилка завантаження зображення"
|
||||
|
||||
#: templates/pages/news-edit.html:85 templates/pages/news.html:93
|
||||
msgid "Закрепить"
|
||||
msgstr "Закріпити"
|
||||
|
||||
#: templates/pages/news-edit.html:87 templates/pages/news.html:95
|
||||
msgid "Опубликовать в чат:"
|
||||
msgstr "Опублікувати в чат:"
|
||||
|
||||
#: templates/pages/news-edit.html:93 templates/pages/profile.html:104
|
||||
#: templates/pages/task-edit.html:46
|
||||
msgid "Сохранить изменения"
|
||||
msgstr "Зберегти зміни"
|
||||
|
||||
#: templates/pages/news.html:24
|
||||
msgid "Новая публикация"
|
||||
msgstr "Нова публікація"
|
||||
|
||||
#: templates/pages/news.html:30
|
||||
msgid "Текст публикации..."
|
||||
msgstr "Текст публікації..."
|
||||
|
||||
#: templates/pages/news.html:101
|
||||
msgid "Опубликовать"
|
||||
msgstr "Опублікувати"
|
||||
|
||||
#: templates/pages/news.html:113
|
||||
msgid "Важные"
|
||||
msgstr "Важливі"
|
||||
|
||||
#: templates/pages/news.html:136
|
||||
msgid "Свернуть"
|
||||
msgstr "Згорнути"
|
||||
|
||||
#: templates/pages/news.html:136
|
||||
msgid "Показать полностью"
|
||||
msgstr "Показати повністю"
|
||||
|
||||
#: templates/pages/news.html:169
|
||||
msgid "По этому фильтру публикаций нет"
|
||||
msgstr "За цим фільтром публікацій немає"
|
||||
|
||||
#: templates/pages/pharmacies.html:38
|
||||
msgid "Средняя ФА на аптеку"
|
||||
msgstr "Середня ФА на аптеку"
|
||||
@@ -2684,10 +2799,6 @@ msgstr ""
|
||||
"Застосовується до всіх таблиць порталу, якщо для конкретної таблиці розмір "
|
||||
"не вибрано вручну."
|
||||
|
||||
#: templates/pages/profile.html:104 templates/pages/task-edit.html:46
|
||||
msgid "Сохранить изменения"
|
||||
msgstr "Зберегти зміни"
|
||||
|
||||
#: templates/pages/settings.html:6
|
||||
msgid "Конфигурация портала"
|
||||
msgstr "Конфігурація порталу"
|
||||
@@ -2776,10 +2887,6 @@ msgstr "прострочено"
|
||||
msgid "Удалить задачу"
|
||||
msgstr "Видалити задачу"
|
||||
|
||||
#: templates/pages/task-detail.html:48 templates/pages/tasks.html:135
|
||||
msgid "Удалить"
|
||||
msgstr "Видалити"
|
||||
|
||||
#: templates/pages/task-detail.html:66
|
||||
msgid "Описание не добавлено"
|
||||
msgstr "Опис не додано"
|
||||
@@ -2792,14 +2899,6 @@ msgstr "Чек-лист"
|
||||
msgid "Комментариев пока нет"
|
||||
msgstr "Коментарів поки немає"
|
||||
|
||||
#: templates/pages/task-detail.html:125
|
||||
msgid "Написать комментарий..."
|
||||
msgstr "Написати коментар..."
|
||||
|
||||
#: templates/pages/task-detail.html:127
|
||||
msgid "Отправить"
|
||||
msgstr "Надіслати"
|
||||
|
||||
#: templates/pages/task-detail.html:156
|
||||
msgid "Вернуть в работу"
|
||||
msgstr "Повернути в роботу"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{% load common_tags %}
|
||||
{% load i18n %}
|
||||
<div class="page-content">
|
||||
|
||||
<!-- Назад + дії -->
|
||||
@@ -8,27 +9,27 @@
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>
|
||||
</svg>
|
||||
До всіх новин
|
||||
{% trans "Ко всем новостям" %}
|
||||
</a>
|
||||
<div style="display:flex; align-items:center; gap:0.375rem;">
|
||||
{% if can_edit %}
|
||||
<a href="/news/{{ post.pk }}/edit/" hx-get="/news/{{ post.pk }}/edit/" hx-target="#main-content" hx-push-url="/news/{{ post.pk }}/edit/" hx-indicator="#loader"
|
||||
class="btn btn-secondary" style="font-size:0.8125rem; padding:0.3rem 0.75rem; text-decoration:none;">Редагувати</a>
|
||||
class="btn btn-secondary" style="font-size:0.8125rem; padding:0.3rem 0.75rem; text-decoration:none;">{% trans "Редактировать" %}</a>
|
||||
{% endif %}
|
||||
{% if can_delete %}
|
||||
<form hx-post="/news/{{ post.pk }}/delete/" hx-target="#main-content" hx-push-url="/news/" hx-indicator="#loader"
|
||||
hx-confirm="Видалити публікацію «{{ post.title }}»? Це незворотньо."
|
||||
hx-confirm="{% trans 'Удалить публикацию' %} «{{ post.title }}»? {% trans 'Это необратимо.' %}"
|
||||
style="display:inline; margin:0;">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="btn btn-ghost" style="font-size:0.8125rem; padding:0.3rem 0.75rem; color:var(--color-destructive);">Видалити</button>
|
||||
<button type="submit" class="btn btn-ghost" style="font-size:0.8125rem; padding:0.3rem 0.75rem; color:var(--color-destructive);">{% trans "Удалить" %}</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% if request.user.is_staff and post.mattermost_targets %}
|
||||
<form hx-post="/news/{{ post.pk }}/publish-mattermost/" hx-target="#main-content" hx-push-url="/news/{{ post.pk }}/" hx-indicator="#loader"
|
||||
hx-confirm="Оновити «{{ post.title }}» в чаті Mattermost?"
|
||||
hx-confirm="{% trans 'Обновить' %} «{{ post.title }}» {% trans 'в чате Mattermost?' %}"
|
||||
style="display:inline; margin:0;">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="btn btn-secondary" style="font-size:0.8125rem; padding:0.3rem 0.75rem;">💬 Оновити в чаті</button>
|
||||
<button type="submit" class="btn btn-secondary" style="font-size:0.8125rem; padding:0.3rem 0.75rem;">💬 {% trans "Обновить в чате" %}</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
@@ -36,7 +37,7 @@
|
||||
|
||||
{% if post.mattermost_posted_at %}
|
||||
<div style="font-size:0.75rem; color:var(--color-muted-foreground); margin-top:-0.75rem; margin-bottom:1.25rem;">
|
||||
✓ Опубліковано в чат Mattermost {{ post.mattermost_posted_at|date:"d.m.Y H:i" }}
|
||||
✓ {% trans "Опубликовано в чат Mattermost" %} {{ post.mattermost_posted_at|date:"d.m.Y H:i" }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@@ -44,9 +45,9 @@
|
||||
<div style="background:var(--color-card); border-radius:0.75rem; border:1px solid var(--color-border); box-shadow:0 1px 2px rgb(0 0 0/0.05); padding:2rem; margin-bottom:1.25rem;">
|
||||
<div style="display:flex; gap:0.5rem; margin-bottom:0.875rem; align-items:center; flex-wrap:wrap;">
|
||||
{% if post.is_pinned %}
|
||||
<span style="font-size:0.6875rem; font-weight:600; text-transform:uppercase; letter-spacing:0.05em; color:var(--color-primary); background:hsl(0 72% 44% / 0.1); border-radius:999px; padding:0.1875rem 0.625rem;">📌 Закріплено</span>
|
||||
<span style="font-size:0.6875rem; font-weight:600; text-transform:uppercase; letter-spacing:0.05em; color:var(--color-primary); background:hsl(0 72% 44% / 0.1); border-radius:999px; padding:0.1875rem 0.625rem;">📌 {% trans "Закреплено" %}</span>
|
||||
{% endif %}
|
||||
{% if post.is_important %}<span class="badge badge-danger">Важливо</span>{% endif %}
|
||||
{% if post.is_important %}<span class="badge badge-danger">{% trans "Важно" %}</span>{% endif %}
|
||||
<span class="badge {{ post.badge_class }}">{{ post.get_category_display }}</span>
|
||||
</div>
|
||||
|
||||
@@ -74,7 +75,7 @@
|
||||
<!-- Комментарии -->
|
||||
<div style="background:var(--color-card); border-radius:0.75rem; border:1px solid var(--color-border); box-shadow:0 1px 2px rgb(0 0 0/0.05); overflow:hidden;">
|
||||
<div style="padding:0.875rem 1.25rem; border-bottom:1px solid var(--color-border);">
|
||||
<span style="font-size:0.8125rem; font-weight:500; color:var(--color-foreground);">Коментарі · {{ comments|length }}</span>
|
||||
<span style="font-size:0.8125rem; font-weight:500; color:var(--color-foreground);">{% trans "Комментарии" %} · {{ comments|length }}</span>
|
||||
</div>
|
||||
|
||||
{% for comment in comments %}
|
||||
@@ -85,14 +86,14 @@
|
||||
<span style="font-size:0.8125rem; font-weight:500; color:var(--color-card-foreground);">{{ comment.author.get_full_name|default:"—" }}</span>
|
||||
<span style="font-size:0.75rem; color:var(--color-muted-foreground);">{{ comment.created_at|date:"d.m.Y H:i" }}</span>
|
||||
{% if comment.mattermost_source_id %}
|
||||
<span style="font-size:0.6875rem; color:var(--color-muted-foreground); opacity:0.75;">· з Mattermost</span>
|
||||
<span style="font-size:0.6875rem; color:var(--color-muted-foreground); opacity:0.75;">· {% trans "из Mattermost" %}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div style="font-size:0.875rem; color:var(--color-foreground); line-height:1.55; white-space:pre-line;">{{ comment.text }}</div>
|
||||
</div>
|
||||
</div>
|
||||
{% empty %}
|
||||
<div style="padding:1.5rem; text-align:center; color:var(--color-muted-foreground); font-size:0.8125rem;">Коментарів поки немає — будьте першим</div>
|
||||
<div style="padding:1.5rem; text-align:center; color:var(--color-muted-foreground); font-size:0.8125rem;">{% trans "Комментариев пока нет — будьте первым" %}</div>
|
||||
{% endfor %}
|
||||
|
||||
<!-- Форма комментария -->
|
||||
@@ -100,11 +101,11 @@
|
||||
style="padding:1rem 1.25rem; border-top:1px solid var(--color-border); display:flex; gap:0.75rem; align-items:flex-start; margin:0;">
|
||||
{% csrf_token %}
|
||||
<div style="width:2rem; height:2rem; border-radius:50%; background:var(--color-accent); color:var(--color-accent-foreground); display:flex; align-items:center; justify-content:center; font-size:0.625rem; font-weight:700; flex-shrink:0;">{{ request.user|initials }}</div>
|
||||
<textarea name="text" required placeholder="Написати коментар..."
|
||||
<textarea name="text" required placeholder="{% trans 'Написать комментарий...' %}"
|
||||
style="flex:1; min-height:2.5rem; resize:vertical; background:var(--color-muted); border:1px solid var(--color-border); border-radius:var(--radius); padding:0.5rem 0.75rem; font-size:0.875rem; color:var(--color-foreground); font-family:var(--font-sans); outline:none; box-sizing:border-box;"></textarea>
|
||||
<button type="submit" class="btn btn-primary" style="flex-shrink:0;">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="m22 2-7 20-4-9-9-4Z"/><path d="M22 2 11 13"/></svg>
|
||||
Надіслати
|
||||
{% trans "Отправить" %}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{% load i18n %}
|
||||
<div class="page-content">
|
||||
|
||||
<!-- Назад -->
|
||||
@@ -6,11 +7,11 @@
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>
|
||||
</svg>
|
||||
До публікації
|
||||
{% trans "К публикации" %}
|
||||
</a>
|
||||
|
||||
<div style="margin-bottom:1.25rem;">
|
||||
<h1 style="font-size:1.25rem; font-weight:500; color:var(--color-foreground);">Редагування публікації</h1>
|
||||
<h1 style="font-size:1.25rem; font-weight:500; color:var(--color-foreground);">{% trans "Редактирование публикации" %}</h1>
|
||||
</div>
|
||||
|
||||
{% if form_error %}
|
||||
@@ -22,7 +23,7 @@
|
||||
<form id="post-edit-form" hx-post="/news/{{ post.pk }}/edit/" hx-target="#main-content" hx-push-url="/news/{{ post.pk }}/" hx-indicator="#loader"
|
||||
style="background:var(--color-card); border:1px solid var(--color-border); border-radius:0.75rem; padding:1.25rem; display:flex; flex-direction:column; gap:0.875rem;">
|
||||
{% csrf_token %}
|
||||
<input type="text" name="title" required maxlength="250" value="{{ post.title }}" placeholder="Заголовок" class="input" style="width:100%; font-weight:500;">
|
||||
<input type="text" name="title" required maxlength="250" value="{{ post.title }}" placeholder="{% trans 'Заголовок' %}" class="input" style="width:100%; font-weight:500;">
|
||||
<textarea name="body" id="post-edit-editor" style="width:100%; min-height:6rem;">{{ post.body }}</textarea>
|
||||
<script>
|
||||
(function() {
|
||||
@@ -62,9 +63,9 @@
|
||||
return r.json().then(function (j) { return {ok: r.ok, j: j}; });
|
||||
}).then(function (res) {
|
||||
if (res.ok && res.j.location) resolve(res.j.location);
|
||||
else reject(res.j.error || 'Помилка завантаження зображення');
|
||||
else reject(res.j.error || '{% trans "Ошибка загрузки изображения" %}');
|
||||
}).catch(function () {
|
||||
reject('Помилка завантаження зображення');
|
||||
reject('{% trans "Ошибка загрузки изображения" %}');
|
||||
});
|
||||
});
|
||||
},
|
||||
@@ -78,18 +79,18 @@
|
||||
{% endfor %}
|
||||
</select>
|
||||
<label style="display:flex; align-items:center; gap:0.375rem; font-size:0.8125rem; color:var(--color-foreground); cursor:pointer;">
|
||||
<input type="checkbox" name="is_important" {% if post.is_important %}checked{% endif %}> Важливо
|
||||
<input type="checkbox" name="is_important" {% if post.is_important %}checked{% endif %}> {% trans "Важно" %}
|
||||
</label>
|
||||
<label style="display:flex; align-items:center; gap:0.375rem; font-size:0.8125rem; color:var(--color-foreground); cursor:pointer;">
|
||||
<input type="checkbox" name="is_pinned" {% if post.is_pinned %}checked{% endif %}> Закріпити
|
||||
<input type="checkbox" name="is_pinned" {% if post.is_pinned %}checked{% endif %}> {% trans "Закрепить" %}
|
||||
</label>
|
||||
<span style="font-size:0.75rem; color:var(--color-muted-foreground);">Опублікувати в чат:</span>
|
||||
<span style="font-size:0.75rem; color:var(--color-muted-foreground);">{% trans "Опубликовать в чат:" %}</span>
|
||||
{% for code, label in mattermost_target_teams %}
|
||||
<label style="display:flex; align-items:center; gap:0.375rem; font-size:0.8125rem; color:var(--color-foreground); cursor:pointer;">
|
||||
<input type="checkbox" name="mattermost_targets" value="{{ code }}" {% if code in post.mattermost_targets %}checked{% endif %}> {{ label }}
|
||||
</label>
|
||||
{% endfor %}
|
||||
<button type="submit" class="btn btn-primary" style="margin-left:auto;">Зберегти зміни</button>
|
||||
<button type="submit" class="btn btn-primary" style="margin-left:auto;">{% trans "Сохранить изменения" %}</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
+16
-15
@@ -1,9 +1,10 @@
|
||||
{% load i18n %}
|
||||
<div class="page-content">
|
||||
|
||||
<div style="display:flex; align-items:center; justify-content:space-between; margin-bottom:1.5rem;">
|
||||
<div>
|
||||
<h1 style="font-size:1.25rem; font-weight:500; color:var(--color-foreground);">Новини</h1>
|
||||
<p style="font-size:0.875rem; color:var(--color-muted-foreground); margin-top:0.25rem;">Оголошення та важливі події компанії</p>
|
||||
<h1 style="font-size:1.25rem; font-weight:500; color:var(--color-foreground);">{% trans "Новости" %}</h1>
|
||||
<p style="font-size:0.875rem; color:var(--color-muted-foreground); margin-top:0.25rem;">{% trans "Объявления и важные события компании" %}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -20,13 +21,13 @@
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<line x1="12" x2="12" y1="5" y2="19"/><line x1="5" x2="19" y1="12" y2="12"/>
|
||||
</svg>
|
||||
Нова публікація
|
||||
{% trans "Новая публикация" %}
|
||||
</summary>
|
||||
<form id="post-create-form" hx-post="/news/" hx-target="#main-content" hx-indicator="#loader"
|
||||
style="margin-top:0.75rem; background:var(--color-card); border:1px solid var(--color-border); border-radius:0.75rem; padding:1.25rem; display:flex; flex-direction:column; gap:0.875rem;">
|
||||
{% csrf_token %}
|
||||
<input type="text" name="title" required maxlength="250" placeholder="Заголовок" class="input" style="width:100%; font-weight:500;">
|
||||
<textarea name="body" id="post-body-editor" placeholder="Текст публікації..."
|
||||
<input type="text" name="title" required maxlength="250" placeholder="{% trans 'Заголовок' %}" class="input" style="width:100%; font-weight:500;">
|
||||
<textarea name="body" id="post-body-editor" placeholder="{% trans 'Текст публикации...' %}"
|
||||
style="width:100%; min-height:6rem;"></textarea>
|
||||
<script>
|
||||
(function() {
|
||||
@@ -70,9 +71,9 @@
|
||||
return r.json().then(function (j) { return {ok: r.ok, j: j}; });
|
||||
}).then(function (res) {
|
||||
if (res.ok && res.j.location) resolve(res.j.location);
|
||||
else reject(res.j.error || 'Помилка завантаження зображення');
|
||||
else reject(res.j.error || '{% trans "Ошибка загрузки изображения" %}');
|
||||
}).catch(function () {
|
||||
reject('Помилка завантаження зображення');
|
||||
reject('{% trans "Ошибка загрузки изображения" %}');
|
||||
});
|
||||
});
|
||||
},
|
||||
@@ -86,18 +87,18 @@
|
||||
{% endfor %}
|
||||
</select>
|
||||
<label style="display:flex; align-items:center; gap:0.375rem; font-size:0.8125rem; color:var(--color-foreground); cursor:pointer;">
|
||||
<input type="checkbox" name="is_important"> Важливо
|
||||
<input type="checkbox" name="is_important"> {% trans "Важно" %}
|
||||
</label>
|
||||
<label style="display:flex; align-items:center; gap:0.375rem; font-size:0.8125rem; color:var(--color-foreground); cursor:pointer;">
|
||||
<input type="checkbox" name="is_pinned"> Закріпити
|
||||
<input type="checkbox" name="is_pinned"> {% trans "Закрепить" %}
|
||||
</label>
|
||||
<span style="font-size:0.75rem; color:var(--color-muted-foreground);">Опублікувати в чат:</span>
|
||||
<span style="font-size:0.75rem; color:var(--color-muted-foreground);">{% trans "Опубликовать в чат:" %}</span>
|
||||
{% for code, label in mattermost_target_teams %}
|
||||
<label style="display:flex; align-items:center; gap:0.375rem; font-size:0.8125rem; color:var(--color-foreground); cursor:pointer;">
|
||||
<input type="checkbox" name="mattermost_targets" value="{{ code }}"> {{ label }}
|
||||
</label>
|
||||
{% endfor %}
|
||||
<button type="submit" class="btn btn-primary" style="margin-left:auto;">Опублікувати</button>
|
||||
<button type="submit" class="btn btn-primary" style="margin-left:auto;">{% trans "Опубликовать" %}</button>
|
||||
</div>
|
||||
</form>
|
||||
</details>
|
||||
@@ -107,9 +108,9 @@
|
||||
<div style="display:flex; gap:0.25rem; margin-bottom:1.25rem; background:var(--color-muted); border-radius:var(--radius); padding:0.25rem; width:fit-content;">
|
||||
{% with base_style="display:inline-flex; align-items:center; gap:0.375rem; padding:0.375rem 0.875rem; border-radius:calc(var(--radius) - 2px); font-size:0.8125rem; font-weight:500; text-decoration:none; cursor:pointer;" %}
|
||||
<a href="/news/" hx-get="/news/" hx-target="#main-content" hx-push-url="/news/" hx-indicator="#loader"
|
||||
style="{{ base_style }} {% if not active_filter %}background:var(--color-primary); color:var(--color-primary-foreground);{% else %}background:transparent; color:var(--color-muted-foreground);{% endif %}">Всі</a>
|
||||
style="{{ base_style }} {% if not active_filter %}background:var(--color-primary); color:var(--color-primary-foreground);{% else %}background:transparent; color:var(--color-muted-foreground);{% endif %}">{% trans "Все" %}</a>
|
||||
<a href="/news/?category=important" hx-get="/news/?category=important" hx-target="#main-content" hx-push-url="/news/?category=important" hx-indicator="#loader"
|
||||
style="{{ base_style }} {% if active_filter == 'important' %}background:var(--color-primary); color:var(--color-primary-foreground);{% else %}background:transparent; color:var(--color-muted-foreground);{% endif %}">Важливі</a>
|
||||
style="{{ base_style }} {% if active_filter == 'important' %}background:var(--color-primary); color:var(--color-primary-foreground);{% else %}background:transparent; color:var(--color-muted-foreground);{% endif %}">{% trans "Важные" %}</a>
|
||||
{% for value, label in categories %}
|
||||
<a href="/news/?category={{ value }}" hx-get="/news/?category={{ value }}" hx-target="#main-content" hx-push-url="/news/?category={{ value }}" hx-indicator="#loader"
|
||||
style="{{ base_style }} {% if active_filter == value %}background:var(--color-primary); color:var(--color-primary-foreground);{% else %}background:transparent; color:var(--color-muted-foreground);{% endif %}">{{ label }}</a>
|
||||
@@ -132,7 +133,7 @@
|
||||
window.feedTogglePost = function (btn) {
|
||||
var wrap = btn.previousElementSibling;
|
||||
var expanded = wrap.classList.toggle('expanded');
|
||||
btn.textContent = expanded ? 'Згорнути ↑' : 'Показати повністю ↓';
|
||||
btn.textContent = expanded ? '{% trans "Свернуть" %} ↑' : '{% trans "Показать полностью" %} ↓';
|
||||
if (!expanded) wrap.scrollIntoView({block: 'nearest'});
|
||||
};
|
||||
(function () {
|
||||
@@ -165,7 +166,7 @@
|
||||
{% empty %}
|
||||
{% if not pinned_posts %}
|
||||
<div style="background:var(--color-card); border-radius:0.75rem; border:1px solid var(--color-border); padding:2.5rem; text-align:center; color:var(--color-muted-foreground); font-size:0.875rem;">
|
||||
{% if active_filter %}За цим фільтром публікацій немає{% else %}Публікацій поки немає{% endif %}
|
||||
{% if active_filter %}{% trans "По этому фильтру публикаций нет" %}{% else %}{% trans "Публикаций пока нет" %}{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user