aboutsummaryrefslogtreecommitdiff
path: root/cgi
diff options
context:
space:
mode:
Diffstat (limited to 'cgi')
-rw-r--r--cgi/manage.py2
-rw-r--r--cgi/templates/manage/recent.html33
2 files changed, 25 insertions, 10 deletions
diff --git a/cgi/manage.py b/cgi/manage.py
index 86d8ffa..776747e 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 * FROM `posts` WHERE parentid > 0 ORDER BY `timestamp` DESC LIMIT 50")
+ 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 ORDER BY timestamp DESC LIMIT 50")
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 7ec6853..c73ba59 100644
--- a/cgi/templates/manage/recent.html
+++ b/cgi/templates/manage/recent.html
@@ -16,20 +16,35 @@
<?py for post in posts: ?>
<tr>
<td>#{post['id']}</td>
- <td>/#{post['boardid']}/</td>
- <td>#{post['file']}</td>
- <td>#{post['timestamp']}</td>
- <td>#{post['message']}</td>
+ <td>/#{post['dir']}/</td>
+ <td>
+ <?py if post['file']: ?><a href="/${dir}/src/#{post['file']}" target="_blank"><img
+ src="/${dir}/mobile/${post['thumb']}" /></a>
+ <?py #endif ?>
+ </td>
+ <td>
+ <div data-ts="#{post['timestamp']}">#{post['timestamp_formatted']}</div>
+ </td>
+ <td>
+ <div style="display: block; margin-bottom: 0.5em;">#{post['subject']} #{post['name']} #{post['tripcode']}
+ </div>
+ <div style="display: block">#{post['message']}</div>
+ <?py if post['parentid'] != 0: ?>
+ <div style="display: block; margin-top: 0.5em; font-size: 0.75em;"><a
+ href="#{cgi_url}manage/mod/#{dir}?thread=#{parentid}">Ver hilo completo</a>
+ </div>
+ <?py #endif ?>
+ </td>
<td>
<a href="#{cgi_url}manage/mod/ipshow?ip=#{post['ip']}">#{post['ip']}</a>
</td>
- <th>
- <a title="Eliminar mensaje" href="#{cgi_url}manage/mod/delete/#{post['boardid']}/#{post['id']}"><img
- src="/icons/comment_delete.png" /></a>
+ <td>
+ <a title="Eliminar mensaje" href="#{cgi_url}manage/mod/delete/#{post['dir']}/#{post['id']}"><img
+ src="/statuc/icons/comment_delete.png" /></a>
<a title="Banear" href="#{cgi_url}manage/ban?ip=#{post['ip']}"><img src="/static/icons/user_delete.png" /></a>
- <a title="Eliminar y Banear" href="#{cgi_url}manage/mod/delete/#{post['boardid']}/#{post['id']}?ban=true"><img
+ <a title="Eliminar y Banear" href="#{cgi_url}manage/mod/delete/#{post['dir']}/#{post['id']}?ban=true"><img
src="/static/icons/cross.png" /></a>
- </th>
+ </td>
</tr>
<?py #endfor ?>
</tbody>