Natural sorting of tags, add last 5 event to tags page.

This commit is contained in:
Roman Vynar
2018-03-06 22:23:52 +02:00
parent 1e0bb7d8ff
commit 9c73934382
6 changed files with 47 additions and 8 deletions

View File

@@ -185,6 +185,7 @@ func (a *apiClient) viewTags(c echo.Context) error {
data.Set("repo", repo)
data.Set("tags", tags)
data.Set("deleteAllowed", deleteAllowed)
data.Set("events", registry.GetEvents(repo))
return c.Render(http.StatusOK, "tags.html", data)
}
@@ -279,9 +280,8 @@ func (a *apiClient) checkDeletePermission(user string) bool {
// viewLog view events from sqlite.
func (a *apiClient) viewLog(c echo.Context) error {
events := registry.GetEvents()
data := jet.VarMap{}
data.Set("events", events)
data.Set("events", registry.GetEvents(""))
return c.Render(http.StatusOK, "event_log.html", data)
}