From 78b19857c02ba9d7d67f2aa2e08d6c43d4b1d350 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Fri, 27 Feb 2026 14:05:17 +0000 Subject: [PATCH] Autosave: 20260227-140517 --- core/__pycache__/urls.cpython-311.pyc | Bin 2802 -> 2905 bytes core/__pycache__/views.cpython-311.pyc | Bin 42575 -> 43218 bytes core/templates/base.html | 13 ++- core/templates/core/donation_history.html | 116 ++++++++++++++++++++++ core/templates/core/index.html | 70 ++++++++----- core/urls.py | 1 + core/views.py | 11 ++ 7 files changed, 184 insertions(+), 27 deletions(-) create mode 100644 core/templates/core/donation_history.html diff --git a/core/__pycache__/urls.cpython-311.pyc b/core/__pycache__/urls.cpython-311.pyc index c1a2802d7e87af17121a4fc3842d28eb065a6f24..e2cd584fd20870728b87bc68e9d080bbc341432d 100644 GIT binary patch delta 209 zcmew)dQ(h&IWI340}%8qUYMD{!NBks#DM{MDC6_Hjp|34CvITXv`l5rl7mU7Sgm1O z#>~L58i*kvT{=oW#X6Wl(`NHGW-VroD#4Weyu^~s{5;)^%;J*#qDuW+0x+R?sF0tg z!enLkV@yR#lb^8%aOnVzVg%yi!*Og7s3Dl diff --git a/core/__pycache__/views.cpython-311.pyc b/core/__pycache__/views.cpython-311.pyc index 8462839b308896b27f21e240bf2403d7652bfcc1..7b85a88ed00941c12731768e30a26583e9c1803a 100644 GIT binary patch delta 1234 zcmaiyZD>x1hJjyW+}1vHVI90+jDQS zHKeBNi}ppfbZ1NjUnpf2+=orhUi=_#U-qrAq!c^hcT4m36AxSAobEfE=4ZQFcA4pn~^c|1rAE=h0 zY7w(98XQoqu&#E;qfs>+F)f1)s7ANiW%Tw%bxYS&&4>l9h!Hd0?JN#yn2BgYSb$`@ zx_QN+9$ZZJzh5zMs|IW(ZfQt9wH5tT*q$dukV*8>}zod8<6z`AC zS;d=E4lOE&mXs3<%8BerJsaxFDgBE||B{kiP?C8#O0u6ml%$Gg`nbTXeRJL+ZF2om z?#atFwwD}v2{3fviBnp=K2w{m*nMkrt}L)v7RcHIA`rPl9QCjRwv)>}ZrKCF2g28r zwAJiF^-V+rVjOnJyg1s8@bO%%j(GUfSnPkDQ%0@42NwM)zBe?P_(f%W2O*98K*A-r zfWA@06B7>d7XK?XLYlpzfsaCz8c$0 z$T)v+_B;7~&<%0@++EQ5*rc2I`8Sh(vX4KS^np@0)gX6*Wm0rc`R$G_7_!s+#wTGC z;u|u4a+4p+jFVRWYi5604+f9m*M_)jx=Lm+zbp<<-`9n$ye*- z3Gm+&-m4vi92TElE2X=zQ5iM|!;55iYYZ=k;e{|feTL`D@URNIVH13QrmFN3%;5(O gE*{NzY!!LxByW?vgnVd|=(^GB73pQM^$R!o8%9)1X#fBK delta 769 zcmah{Ur1A76u;ly?zBrz!v2>?Be3aOty;+DW?&gaqBS2((z$l$He%C#chodvF6Wrx z0(T&65K|Nv2~mB}Q_xezw`b3eed7NZ{Nt~ zN?n~Q;rLWqin_+;&AZv_C(Rqo7}};C0K42|I)#xX3m!STM{CYX16`OO%1W!)vqp_H z;Dvm|q%oglZ565^G9sQ|U1la5lO%o^LNU8y$MB0-h)o!pjuPu2I7X1ic7B|q69i6h zBy7wMLy5TMKT4ECVpqey`hceSuLXj^XgrXNj>h>(tZd+~dm$6{h)dj}Ft?bz-ols* zDk-bdiA7a>NX?p98~D@HtX+Id@1W|hsSc$Zs}AAGyfm;2V3;|m_>dSBwwbRobBX$V zJ7YKD{OmKOA9+pG-2RL_e4n#3H*7C>nFoA@He}`sPUSL6(&AOYYcvgG$o-%eBTNIm z=w++$w3ugS!3~|}2o<~ODm0AfSWt!oX5lf diff --git a/core/templates/base.html b/core/templates/base.html index 43113d2..1e0e226 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -38,6 +38,16 @@ overflow-x: hidden; } + /* Remove blue underline from links */ + a { + text-decoration: none !important; + color: inherit; + } + + a:hover { + color: var(--pulse-red); + } + @keyframes blink { 0% { opacity: 1; transform: scale(1); } 50% { opacity: 0.6; transform: scale(1.1); } @@ -63,13 +73,14 @@ #sidebar { width: var(--sidebar-width); background: var(--sidebar-bg); - min-height: 100vh; + height: 100vh; position: fixed; left: 0; top: 0; z-index: 1000; border-right: 1px solid var(--border-color); transition: all 0.3s; + overflow-y: auto; } #sidebar.collapsed { diff --git a/core/templates/core/donation_history.html b/core/templates/core/donation_history.html new file mode 100644 index 0000000..a1030ca --- /dev/null +++ b/core/templates/core/donation_history.html @@ -0,0 +1,116 @@ +{% extends 'core/base.html' %} +{% load static %} + +{% block content %} +
+
+
+

{{ title }}

+

A transparent record of every life saved through the community's generosity.

+
+
+
+ Total Impact + {{ donations.count }} Donations +
+
+
+ +
+
+
+
+
Detailed Logs
+
+
+ Showing all completed events +
+
+
+
+
+ + + + + + + + + + + + + {% for donation in donations %} + + + + + + + + + {% empty %} + + + + {% endfor %} + +
DonorBlood GroupRecipient/PatientLocationDateStatus
+
+
+ +
+
+
{{ donation.donor_user.username }}
+
Verified Hero
+
+
+
+ {{ donation.request.blood_group }} + +
{{ donation.request.patient_name }}
+
+
+ {{ donation.request.hospital }} +
+
{{ donation.request.location }}
+
+
{{ donation.date|date:"M d, Y" }}
+
{{ donation.date|time:"H:i" }}
+
+ + Completed + +
+
+ +
+
No donation history available yet.
+

When donations are completed, they will appear here.

+
+
+
+
+ + +
+ + +{% endblock %} diff --git a/core/templates/core/index.html b/core/templates/core/index.html index 81ed0ce..91940a3 100644 --- a/core/templates/core/index.html +++ b/core/templates/core/index.html @@ -106,6 +106,28 @@ background: var(--pulse-red); border-color: var(--pulse-red); } + + /* Scrollable Request Feed */ + .request-feed { + max-height: 500px; + overflow-y: auto; + padding-right: 10px; + scrollbar-width: thin; + scrollbar-color: rgba(230, 57, 70, 0.3) transparent; + } + .request-feed::-webkit-scrollbar { + width: 5px; + } + .request-feed::-webkit-scrollbar-track { + background: transparent; + } + .request-feed::-webkit-scrollbar-thumb { + background: rgba(230, 57, 70, 0.2); + border-radius: 10px; + } + .request-feed::-webkit-scrollbar-thumb:hover { + background: var(--pulse-red); + } {% endblock %} @@ -176,22 +198,22 @@
@@ -298,7 +320,7 @@
-
+

Vaccination & Eligibility

@@ -319,6 +341,23 @@
+ + +
+

{% trans "Top 5 Myths vs. Facts about Blood Donation" %}

+
+ {% for item in myths_vs_facts %} +
+
+
{% trans "MYTH" %}
+

"{{ item.myth }}"

+
{% trans "FACT" %}
+

{{ item.fact }}

+
+
+ {% endfor %} +
+
@@ -404,27 +443,6 @@
- - -
-
-
-

{% trans "Top 5 Myths vs. Facts about Blood Donation" %}

-
- {% for item in myths_vs_facts %} -
-
-
{% trans "MYTH" %}
-

"{{ item.myth }}"

-
{% trans "FACT" %}
-

{{ item.fact }}

-
-
- {% endfor %} -
-
-
-
{% endblock %} diff --git a/core/urls.py b/core/urls.py index ae63029..3cb4ff1 100644 --- a/core/urls.py +++ b/core/urls.py @@ -39,4 +39,5 @@ urlpatterns = [ path("hospitals/", views.hospital_list, name="hospital_list"), path("update-location/", views.update_location, name="update_location"), path("emergency-sms/", views.emergency_sms, name="emergency_sms"), + path("donation-history/", views.donation_history, name="donation_history"), ] diff --git a/core/views.py b/core/views.py index a5a995e..736ba8a 100644 --- a/core/views.py +++ b/core/views.py @@ -478,6 +478,17 @@ def request_blood(request): } return render(request, 'core/request_blood.html', context) +@login_required +def donation_history(request): + """View to display the full history of completed donations.""" + completed_donations = DonationEvent.objects.filter(is_completed=True).select_related('donor_user', 'request').order_by('-date') + + context = { + 'donations': completed_donations, + 'title': 'Donation History & Lives Saved' + } + return render(request, 'core/donation_history.html', context) + @login_required @login_required def vaccination_dashboard(request):