Refactor and remove sqlite and replace with MySQL
This commit is contained in:
29
web/templates/account/notifications/index.html
Normal file
29
web/templates/account/notifications/index.html
Normal file
@@ -0,0 +1,29 @@
|
||||
{{ define "content" }}
|
||||
<div class="container py-4">
|
||||
<h2 class="mb-4">Your Notifications</h2>
|
||||
|
||||
{{ if .Notifications }}
|
||||
<ul class="list-group">
|
||||
{{ range .Notifications }}
|
||||
<li class="list-group-item d-flex justify-content-between align-items-start {{ if not .IsRead }}bg-light{{ end }}">
|
||||
<div class="ms-2 me-auto">
|
||||
<div class="fw-bold">
|
||||
<a href="/account/notifications/read?id={{ .ID }}" class="{{ if not .IsRead }}text-primary fw-bold{{ end }}">
|
||||
{{ .Subject }}
|
||||
</a>
|
||||
</div>
|
||||
<small class="text-muted">{{ .CreatedAt.Format "Jan 2, 2006 15:04" }}</small>
|
||||
</div>
|
||||
{{ if not .IsRead }}
|
||||
<span class="badge bg-warning text-dark">New</span>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ else }}
|
||||
<div class="alert alert-info text-center">
|
||||
You don’t have any notifications.
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
13
web/templates/account/notifications/read.html
Normal file
13
web/templates/account/notifications/read.html
Normal file
@@ -0,0 +1,13 @@
|
||||
{{ define "content" }}
|
||||
<div class="container py-4">
|
||||
{{ if .Notification }}
|
||||
<h2>{{ .Notification.Subject }}</h2>
|
||||
<p>{{ .Notification.Body }}</p>
|
||||
{{ else }}
|
||||
<div class="alert alert-danger text-center">
|
||||
Notification not found or access denied.
|
||||
</div>
|
||||
{{ end }}
|
||||
<a href="/account/notifications" class="btn btn-secondary mt-4">Back to Notifications</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user