Corp/backend/templates/feed/employee_feed.html
Игорь Надеин 35f365a1b0 feat: Add department-based document distribution with department picker in UI
- Added departments ManyToMany field to Document model
- Implemented department selection in document create/edit modals
- Added automatic notification creation for all department employees
- Fixed document filtering to include uploaded documents in 'My Documents'
- Fixed acknowledgements API to include department recipients
- Added bulk notification support with configurable threshold
- Removed acknowledge button, added visual highlighting for unread documents
- Implemented server-side acknowledgment flow with redirect to file
- Fixed mobile responsive layout for document actions
- Removed temporary test files and documentation
2025-11-21 12:46:43 +03:00

48 lines
1.7 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{# feed/employee_feed.html #}
{% load static django_bootstrap5 %}
<div class="d-flex align-items-center gap-3 mb-3">
<i class="bi-megaphone display-6 text-primary"></i>
<h2 class="mb-0 fw-bold" style="letter-spacing:0.5px;">
Публикации: {{ employee.get_full_name }}
</h2>
</div>
{% if posts %}
<div class="row g-4">
{% for post in posts %}
<div class="col-12">
<div class="card shadow-sm border-0">
<div class="row g-0">
{% if post.image %}
<div class="col-md-4 d-none d-md-block">
<img src="{{ post.image.url }}" class="img-fluid rounded-start" alt="{{ post.title }}" style="height: 100%; object-fit: cover;">
</div>
{% endif %}
<div class="{% if post.image %}col-md-8{% else %}col-12{% endif %}">
<div class="card-body">
<h5 class="card-title fw-semibold">
{{ post.title }}
{% if post.pinned %}
<span class="badge bg-warning text-dark ms-2"></span>
{% endif %}
</h5>
<p class="card-text mb-2">{{ post.body|truncatewords:32 }}</p>
<div class="small text-muted mb-2">
{{ post.created_at|date:"d.m.Y H:i" }}
</div>
<a href="{% url 'feed:post_detail' post.pk %}" class="btn btn-sm btn-outline-primary rounded-pill px-3">
Подробнее
</a>
</div>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
{% else %}
<div class="alert alert-info shadow-sm mt-4">
У сотрудника пока нет публикаций.
</div>
{% endif %}