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>
<tr>
<th scope="col">Entry</th>
<th scope="col">Interaction</th>
<th scope="col">Created At</th>
</tr>
</thead>
{{ range .Interactions }}
<tr>
<td scope="row">
{{ .Interactions.EntryID }}
<a href="/posts/{{ .EntryID }}">{{ .EntryID }}</a>
</td>
<td>
{{ .Interactions.Content }}
</td>
<td>
{{ .Interactions.CreatedAt }}
{{ .CreatedAt.Format "2006-01-02 15:04:05" }}
</td>
</tr>
{{ end }}

View File

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