diff options
author | jan <jan@ruken.pw> | 2016-10-10 10:01:28 (UTC) |
---|---|---|
committer | jan <jan@ruken.pw> | 2016-10-10 10:01:28 (UTC) |
commit | 0e17ffc1f088bb8ff2a4199bef5ab2a9247374bc (patch) | |
tree | 2f7694334552154f654f6fd0b11d14d43fb73c4a /modules/lists | |
parent | 2ec8084d1fd1e6cc1792acc99e7ef817f423ef8e (diff) |
isOwner ins template reinschreiben, Einstellungs-Button ins List view hinzufuegen
Diffstat (limited to 'modules/lists')
-rw-r--r-- | modules/lists/lists.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/lists/lists.go b/modules/lists/lists.go index 007e927..a219bcc 100644 --- a/modules/lists/lists.go +++ b/modules/lists/lists.go | |||
@@ -276,6 +276,11 @@ func (m *Module) viewList(w http.ResponseWriter, r *http.Request, p httprouter.P | |||
276 | data := m.g.Renderer.DefaultData() | 276 | data := m.g.Renderer.DefaultData() |
277 | data["user"] = user | 277 | data["user"] = user |
278 | data["list"] = list | 278 | data["list"] = list |
279 | if user != nil && user.ID == list.Owner.ID { | ||
280 | data["isOwner"] = true | ||
281 | } else { | ||
282 | data["isOwner"] = false | ||
283 | } | ||
279 | 284 | ||
280 | m.g.Renderer.RenderPage("list", w, data) | 285 | m.g.Renderer.RenderPage("list", w, data) |
281 | } | 286 | } |