diff --git a/kyokusui/controller.py b/kyokusui/controller.py index 59d14d0..178d25e 100644 --- a/kyokusui/controller.py +++ b/kyokusui/controller.py @@ -142,6 +142,16 @@ def retrieve(self, request): "boards": Board.list_subscribed(request.user) }) + def log(self, request): + template = self.view.get_template("log.html") + board = Board.retrieve(request.params['board']) + thread = Thread.retrieve(request.params['thread']) + return Response.render(template, { + "board": board, + "thread": thread, + "boards": Board.list_subscribed(request.user) + }) + def update(self, request): thread = Thread.retrieve(request.params['thread']) form = UpdateThreadForm(request.post()) @@ -214,6 +224,7 @@ def handle(self, request): }, "user": { "_id": res.user._id, + "icon": res.user.icon_to_dataurl(), "name": res.user.name, "screen_name": res.user.screen_name }, diff --git a/kyokusui/main.py b/kyokusui/main.py index cc2890f..f0a5168 100644 --- a/kyokusui/main.py +++ b/kyokusui/main.py @@ -17,6 +17,8 @@ class App(App): view("/settings", HomeController, 'settings'), view("/static/", static_files()), view("/", BoardController, 'retrieve'), + view("//logs", BoardController, 'logs'), + view("//logs/", ThreadController, 'log'), view("//", ThreadController, 'retrieve'), view("/user//icon", UserController, 'icon'), post("/api/v0/board", BoardController, 'create'), diff --git a/kyokusui/templates/board.html b/kyokusui/templates/board.html index 7a4d190..f3cd287 100644 --- a/kyokusui/templates/board.html +++ b/kyokusui/templates/board.html @@ -16,6 +16,11 @@

{{ board.name }}

+