-
- Downloads
Detail, přidávání a editace uživatelů
parent
3e8de9dd
Branches
No related tags found
This commit is part of merge request !5. Comments created here will be created in the context of that merge request.
Showing
- mo/rights.py 7 additions, 0 deletionsmo/rights.py
- mo/web/org_users.py 140 additions, 10 deletionsmo/web/org_users.py
- templates/org_user.html 88 additions, 0 deletionstemplates/org_user.html
- templates/org_user_edit.html 25 additions, 0 deletionstemplates/org_user_edit.html
- templates/org_user_new.html 10 additions, 0 deletionstemplates/org_user_new.html
- templates/org_users_orgs.html 5 additions, 2 deletionstemplates/org_users_orgs.html
templates/org_user.html
0 → 100644
templates/org_user_edit.html
0 → 100644
templates/org_user_new.html
0 → 100644
... | ... | @@ -38,16 +38,19 @@ |
<table class="table"> | ||
<thead> | ||
<tr> | ||
<th>Jméno</th><th>Příjmení</th><th>E-mail</th><th>Akce</th> | ||
<th>Jméno</th><th>Příjmení</th><th>E-mail</th><th>Nejvyšší role</th><th>Akce</th> | ||
|
||
</tr> | ||
</thead> | ||
{% for user in users %} | ||
<tr> | ||
<td>{{ user.first_name }}</td><td>{{ user.last_name }}</td> | ||
<td><a href="mailto:{{ user.email }}">{{ user.email }}</a></td> | ||
<td>{% if user.is_admin %}administrátor{% else %} | ||
{%- if user.roles|count > 0 %}{{user.roles[0].role.name}}{% else %}<i>žádná role</i>{% endif -%} | ||
{% endif %}</td> | ||
<td class='btn-group'> | ||
<a class="btn btn-xs btn-default" href="{{ url_for('org_user', id=user.user_id) }}">Detail</a> | ||
<a class="btn btn-xs btn-default" href="{{ url_for('org_user_edit', id=user.user_id) }}">Edit</a> | ||
{% if can_edit and not user.is_admin %}<a class="btn btn-xs btn-default" href="{{ url_for('org_user_edit', id=user.user_id) }}">Edit</a>{% endif %} | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
... | ... |