Changeset - 99afa4d28e2b
[Not reviewed]
default
0 2 0
Marcin Kuzminski - 16 years ago 2010-04-13 22:30:52
marcin@python-blog.com
Changed order of user actions log
2 files changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
pylons_app/controllers/admin.py
Show inline comments
 
@@ -50,13 +50,14 @@ class AdminController(BaseController):
 
                    html,
 
                    defaults=c.form_result,
 
                    encoding="UTF-8"
 
                )
 
        if c.admin_user:
 
            sa = meta.Session
 
            c.users_log = sa.query(UserLogs).limit(10).all()
 
            c.users_log = sa.query(UserLogs)\
 
                .order_by(UserLogs.action_date.desc()).limit(10).all()
 
        return render('/admin.html')
 

	
 
    def hgrc(self, dirname):
 
        filename = os.path.join(dirname, '.hg', 'hgrc')
 
        return filename
 

	
pylons_app/templates/admin.html
Show inline comments
 
@@ -31,13 +31,13 @@
 
            ${h.link_to(u'Users',h.url('users'))}
 
        </li>
 
    </ul>
 
    <br/>
 
    <div>
 
        <h2>Welcome ${c.admin_username}</h2>
 
        <div>Last 5 user actions</div>
 
        <div>${_('Last 10 user actions')</div>
 
        %if c.users_log:
 
	        <table>
 
	        <tr>
 
	        	<td>${_('Username')}</td>
 
	        	<td>${_('Repository')}</td>
 
	        	<td>${_('Action')}</td>
0 comments (0 inline, 0 general)