From c49e4365dcabaac518fc1275d92705af7dbfde63 Mon Sep 17 00:00:00 2001 From: Renard Date: Sat, 28 Mar 2020 14:12:36 -0300 Subject: Cambios en vista de posts recientes --- cgi/manage.py | 2 +- cgi/templates/manage/recent.html | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'cgi') diff --git a/cgi/manage.py b/cgi/manage.py index f5b417e..7d569a1 100644 --- a/cgi/manage.py +++ b/cgi/manage.py @@ -159,7 +159,7 @@ def manage(self, path_split): template_filename = "mod.html" template_values = {"mode": 2, "dir": board["dir"], "threads": threads} elif path_split[2] == "recent": - posts = FetchAll("SELECT posts.id, posts.subject, dir, parentid, file, thumb, timestamp_formatted, timestamp, posts.message, INET_NTOA(ip) AS ip, posts.name, email, tripcode FROM posts INNER JOIN boards ON posts.boardid = boards.id WHERE posts.timestamp > UNIX_TIMESTAMP() - 86400 ORDER BY timestamp DESC") + posts = FetchAll("SELECT posts.id, posts.subject, dir, parentid, file, thumb, timestamp_formatted, timestamp, posts.message, INET_NTOA(ip) AS ip, posts.name, email, tripcode, boards.name AS board_name FROM posts INNER JOIN boards ON posts.boardid = boards.id WHERE posts.timestamp > UNIX_TIMESTAMP() - 86400 ORDER BY timestamp DESC") template_filename = "recent.html" template_values = {"posts": posts} elif path_split[2] == 'staff': diff --git a/cgi/templates/manage/recent.html b/cgi/templates/manage/recent.html index 3fed05f..38d9a75 100644 --- a/cgi/templates/manage/recent.html +++ b/cgi/templates/manage/recent.html @@ -4,8 +4,6 @@
ID | -Board | Archivo | Timestamp | Mensaje | @@ -15,8 +13,6 @@
---|---|---|---|---|
#{post['id']} | -/#{post['dir']}/ |
@@ -26,8 +22,9 @@
#{post['timestamp_formatted']}
|
- #{post['subject']} #{post['name']}
+ #{post['email']}
- #{post['tripcode']}
+
+ #{post['id']} #{post['subject']} en #{post['board_name']}
+ #{post['name']}
#{post['email']} #{post['tripcode']}
#{post['message']}
@@ -35,6 +32,7 @@
href="#{cgi_url}manage/mod/${post['dir']}?thread=#{post['parentid']}">Ver hilo completo
#{post['timestamp_formatted']}
|
#{post['ip']} -- cgit v1.2.1-18-gbd029 |