Commit ad9d5b09 authored by ale's avatar ale

implement audit action, fixing ticket #4

parent 08e42d76
......@@ -125,3 +125,13 @@ class AdminController(BaseController):
def audit(self):
c.user = request.params.get('u')
c.video_id = request.params.get('v')
if c.user:
c.logs = model.Audit.by_user(c.user)
elif c.video_id:
c.logs = model.Audit.by_video_id(c.video_id)
return render('admin/audit.html')
<%inherit file="admin_page.html"/>
<%def name="title()">
<form action="${h.url_for(acion='audit')}" method="get">
<td align="left">Filter by user:</td>
<td align="left"><input type="text" value="${c.user}" name="u" /></td>
<td align="left">or by video id:</td>
<td align="left"><input type="text" value="${c.video_id}" name="v" /></td>
<td align="right"><input type="submit" value="Filter" /></td>
% if c.logs:
% endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment