## -*- coding: utf-8 -*-
<%inherit file="base/base.html"/>
<%def name="get_form_error(element)">
%if type(c.form_errors) == dict:
%if c.form_errors.get(element,False):
${c.form_errors.get(element,'')}
%endif
%endif
%def>
<%def name="title()">
${_('Repository managment')}
%def>
<%def name="breadcrumbs()">
${h.link_to(u'Home',h.url('/'))}
/
${h.link_to(u'Admin',h.url('admin_home'))}
%def>
<%def name="page_nav()">
${h.link_to(u'Home',h.url('/'))}
${_('Admin')}
%def>
<%def name="main()">
%if c.admin_user:
Welcome ${c.admin_username}
${_('Last 10 user actions')
%if c.users_log:
${_('Username')} |
${_('Repository')} |
${_('Action')} |
${_('Date')} |
%for cnt,l in enumerate(c.users_log):
${l.user.username} |
${l.repository} |
${l.action} |
${l.action_date} |
%endfor
%else:
${_('No actions yet')}
%endif
%else:
${_('Login')}
${h.form(h.url.current())}
${_('Username')} |
${h.text('username')} |
${get_form_error('username')} |
${_('Password')} |
${h.password('password')} |
${get_form_error('password')} |
|
${h.submit('login','login')} |
${h.end_form()}
%endif
%def>