From 5964bb091e28c966ed2f8112537212ef2cc1df76ca7504c020441432f1d4d4f2 Mon Sep 17 00:00:00 2001 From: nestict Date: Fri, 16 Jan 2026 15:44:39 +0100 Subject: [PATCH] Upload files to "base/announcement" Signed-off-by: nestict --- base/announcement/announcement_form.html | 38 ++++ base/announcement/announcement_one.html | 168 ++++++++++++++++++ .../announcement_update_form.html | 41 +++++ base/announcement/announcements_list.html | 41 +++++ base/announcement/as_p.html | 62 +++++++ base/announcement/comment_view.html | 100 +++++++++++ base/announcement/expiry_day.html | 25 +++ base/announcement/viewed_by.html | 23 +++ 8 files changed, 498 insertions(+) create mode 100644 base/announcement/announcement_form.html create mode 100644 base/announcement/announcement_one.html create mode 100644 base/announcement/announcement_update_form.html create mode 100644 base/announcement/announcements_list.html create mode 100644 base/announcement/as_p.html create mode 100644 base/announcement/comment_view.html create mode 100644 base/announcement/expiry_day.html create mode 100644 base/announcement/viewed_by.html diff --git a/base/announcement/announcement_form.html b/base/announcement/announcement_form.html new file mode 100644 index 0000000..f94a275 --- /dev/null +++ b/base/announcement/announcement_form.html @@ -0,0 +1,38 @@ +{% load i18n %} +{% if messages %} + + +{% endif %} +{% if form.errors %} +
+
+ {% for error in form.non_field_errors %} +
+ {{ error }} +
+ {% endfor %} +
+
+{% endif %} +
+

+ {% trans "Create " %} {{form.verbose_name}} +

+ +
+
+
+ {% csrf_token %} + {{form.as_p}} +
+ +
+
+
diff --git a/base/announcement/announcement_one.html b/base/announcement/announcement_one.html new file mode 100644 index 0000000..0af6bc0 --- /dev/null +++ b/base/announcement/announcement_one.html @@ -0,0 +1,168 @@ +{% load i18n %} +{% load static %} +{% load basefilters %} +{% if messages %} + + +{% endif %} +
+ +
+ {% trans "Announcement" %} +
+ + +
+
+ {% if instance_ids %} +
+ + + +
+ {% endif %} + {% if announcement %} +
+ {% if perms.base.change_announcement or perms.base.delete_announcement %} +
+ + +
+ {% endif %} +
+
{{ announcement.title }} + {% if perms.base.view_announcement %} +
+ {{announcement.get_views|length}} + + + +
+ {% endif %} +
+ + {% trans "Posted on" %}  {{ announcement.created_at|date:"F j, Y"}}   + {% trans "at" %}   {{ announcement.created_at|time:"g:i A"}} + +
+
+

{{ announcement.description|safe }}

+
+ + + +
+ {% else %} +
+ Page not found. 404. +

{% trans "No Records found." %}

+

{% trans "There are no announcements at the moment." %}

+
+ {% endif %} + + +
+ diff --git a/base/announcement/announcement_update_form.html b/base/announcement/announcement_update_form.html new file mode 100644 index 0000000..38110f0 --- /dev/null +++ b/base/announcement/announcement_update_form.html @@ -0,0 +1,41 @@ +{% load i18n %} +{% if messages %} + + + + +{% endif %} +{% if form.errors %} +
+
+ {% for error in form.non_field_errors %} +
+ {{ error }} +
+ {% endfor %} +
+
+{% endif %} +
+

+ {% trans "Update" %} {{form.verbose_name}} +

+ +
+
+
+ {% csrf_token %} + {{form.as_p}} +
+ +
+
+
diff --git a/base/announcement/announcements_list.html b/base/announcement/announcements_list.html new file mode 100644 index 0000000..b093a1c --- /dev/null +++ b/base/announcement/announcements_list.html @@ -0,0 +1,41 @@ +{% load static %} +{% load i18n %} +{% if not announcements %} +
+ Page not found. 404. +

{% trans "No Records found." %}

+

{% trans "There are no announcements at the moment." %}

+
+{% else %} + +{% endif %} diff --git a/base/announcement/as_p.html b/base/announcement/as_p.html new file mode 100644 index 0000000..fe6143c --- /dev/null +++ b/base/announcement/as_p.html @@ -0,0 +1,62 @@ +{% load static i18n widget_tweaks %} + +
+
{{ form.non_field_errors }}
+ {% for field in form.visible_fields %} + {% if field.field.widget.input_type != "checkbox" %} +
+
+ + {% if field.help_text %} + + {% endif %} +
+ {{ field|add_class:"form-control" }} + {{ field.errors }} + + {% if field.name == "attachments" and field.field.widget.input_type == "file" and field.field.widget.attrs.multiple %} + {% if form.instance.pk %} +
+ {% for file in form.instance.attachments.all %} + + + + + + {% endfor %} +
+ {% endif %} + {% endif %} +
+ {% endif %} + {% endfor %} +
+ {% for field in form.visible_fields %} + {% if field.field.widget.input_type == "checkbox" %} +
+
+ + {% if field.help_text %} + + {% endif %} +
+
+ {{ field|add_class:"oh-switch__checkbox" }} +
+ {{ field.errors }} +
+ {% endif %} + {% endfor %} +
+ + {# hidden fields #} + {% for hidden in form.hidden_fields %} + {{ hidden }} + {% endfor %} +
diff --git a/base/announcement/comment_view.html b/base/announcement/comment_view.html new file mode 100644 index 0000000..118b91e --- /dev/null +++ b/base/announcement/comment_view.html @@ -0,0 +1,100 @@ +{% load basefilters static %} +{% load i18n %} + + +{% if messages %} +
+ {% for message in messages %} +
{{ message }}
+ {% endfor %} +
+{% endif %} +
+ + + + {{announcement.title}}{% trans "'s comments" %} +
+ +{% if not announcement.disable_comments %} +
+ {% csrf_token %} + +
+ + +
+ + +
+ + {% if no_comments %} + +
+
+
+ {% trans "There are no comments to show." + %} + +
+
+
+ + {% else %} + +
    + {% for comment in comments %} +
  1. + {{ comment.comment }} + {% if perms.base.delete_announcementcomment or request.user == comment.created_by %} + + + {% endif %} + + + +
    + {% trans "By" %} +
    +
    + +
    + + {{ comment.employee_id }} + +
    +
    + +
    + {% trans "Date & Time" %} + + {% trans "on" %}  {{ comment.created_at|date:"F j, Y" }} +   + {% trans "at" %}   {{ comment.created_at|time:"g:i A" }} + +
    +
    +
  2. + + {% endfor %} +
+ + {% endif %} +{% else %} +
+ Page not found. 404. +
{% trans "Comments have been disabled for this announcement." %}
+
+{% endif %} diff --git a/base/announcement/expiry_day.html b/base/announcement/expiry_day.html new file mode 100644 index 0000000..84814e6 --- /dev/null +++ b/base/announcement/expiry_day.html @@ -0,0 +1,25 @@ +{% load i18n %} + +
+ {% csrf_token %} +
+

{% trans "Announcement Expire" %}

+
+
+
+ + + +
+ + {% if perms.payroll.change_payrollsettings %} + + {% endif %} +
+ + + +
diff --git a/base/announcement/viewed_by.html b/base/announcement/viewed_by.html new file mode 100644 index 0000000..4218842 --- /dev/null +++ b/base/announcement/viewed_by.html @@ -0,0 +1,23 @@ +{% load i18n %} +
+ {% trans "Viewed By" %} +
+
+
+ {% for instance in viewed_by %} +
+
+
+
+ +
+ + {{instance.user.employee_get}} + {{instance.created_at}} + +
+
+
+ {% endfor %} +
+