fix for interactions

This commit is contained in:
Niko Abeler 2024-02-24 20:11:09 +01:00
parent 0bf7c492c9
commit 8200e3384c
2 changed files with 9 additions and 13 deletions

View File

@ -12,20 +12,16 @@
<thead> <thead>
<tr> <tr>
<th scope="col">Entry</th> <th scope="col">Entry</th>
<th scope="col">Interaction</th>
<th scope="col">Created At</th> <th scope="col">Created At</th>
</tr> </tr>
</thead> </thead>
{{ range .Interactions }} {{ range .Interactions }}
<tr> <tr>
<td scope="row"> <td scope="row">
{{ .Interactions.EntryID }} <a href="/posts/{{ .EntryID }}">{{ .EntryID }}</a>
</td> </td>
<td> <td>
{{ .Interactions.Content }} {{ .CreatedAt.Format "2006-01-02 15:04:05" }}
</td>
<td>
{{ .Interactions.CreatedAt }}
</td> </td>
</tr> </tr>
{{ end }} {{ end }}

View File

@ -32,13 +32,13 @@ func (h *AdminInteractionHandler) HandleGet(c *fiber.Ctx) error {
c.Set(fiber.HeaderContentType, fiber.MIMETextHTML) c.Set(fiber.HeaderContentType, fiber.MIMETextHTML)
return render.RenderTemplateWithBase(c, siteConfig, "views/interaction_manager", fiber.Map{ return render.RenderTemplateWithBase(c, siteConfig, "views/interaction_manager", fiber.Map{
"Binaries": pageData.items, "Interactions": pageData.items,
"Page": pageData.page, "Page": pageData.page,
"NextPage": pageData.page + 1, "NextPage": pageData.page + 1,
"PrevPage": pageData.page - 1, "PrevPage": pageData.page - 1,
"FirstPage": pageData.page == 1, "FirstPage": pageData.page == 1,
"LastPage": pageData.lastPage, "LastPage": pageData.lastPage,
"Filter": filter, "Filter": filter,
}) })
} }