Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Odevzdávací Systém MO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MO-P
Odevzdávací Systém MO
Merge requests
!6
Project 'mj/mo-submit' was moved to 'mo-p/osmo'. Please update any links and bookmarks that may still have the old path.
Práva organizátorů
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Práva organizátorů
jirka/users
into
master
Overview
15
Commits
4
Changes
8
All threads resolved!
Hide all comments
Merged
Práva organizátorů
Jiří Setnička
requested to merge
jirka/users
into
master
Jan 2, 2021
Overview
15
Commits
4
Changes
3
All threads resolved!
Hide all comments
0
0
Merge request reports
Compare
version 2
version 2
c2a84f94
Jan 2, 2021
version 1
2db42cee
Jan 2, 2021
master (base)
and
latest version
latest version
94788a9c
4 commits,
Jan 2, 2021
version 2
c2a84f94
4 commits,
Jan 2, 2021
version 1
2db42cee
4 commits,
Jan 2, 2021
Show latest version
3 files
+
15
−
26
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
mo/web/templates/org_org.html
0 → 100644
+
83
−
0
View file @ 94788a9c
Edit in single-file editor
Open in Web IDE
{% extends "base.html" %}
{% import "bootstrap/wtf.html" as wtf %}
{% block body %}
<h2>
{% if user.is_admin %}Správce:{% else %}Organizátor:{% endif %} {{ user.first_name }} {{ user.last_name }}
</h2>
<table
class=
data
>
<tr><td>
Jméno:
</td><td>
{{ user.first_name }}
</td></tr>
<tr><td>
Příjmení:
</td><td>
{{ user.last_name }}
</td></tr>
<tr><td>
E-mail:
</td><td><a
href=
"mailto:{{ user.email }}"
>
{{ user.email }}
</a></td></tr>
{% if user.is_admin %}
<tr><td>
Správce:
</td><td>
ano
</td></tr>
{% endif %}
{% if user.is_org %}
<tr><td>
Organizátor:
</td><td>
ano
</td></tr>
{% endif %}
<tr><td>
Poznámka:
</td><td
style=
"white-space: pre;"
>
{{ user.note }}
</td></tr>
</table>
{% if can_edit %}
<div
class=
"btn-group"
role=
"group"
style=
"margin: 10px 0px;"
>
<a
class=
"btn btn-primary"
href=
"{{ url_for('org_org_edit', id=user.user_id) }}"
>
Editovat
</a>
</div>
{% endif %}
{% if user.is_org or user.is_admin %}
<h3>
Role
</h3>
{% if can_assign_rights %}
<h4>
Přidělení nové role
</h4>
<p>
Lze přidělit jen roli, která je podmnožinou nějaké vlastní role (včetně omezení na oblast, kolo,
…
).
</p>
{% if role_errors %}
<div
class=
"alert alert-danger"
role=
"alert"
>
{{ role_errors|join("
<br>
") }}
</div>
{% endif %}
<form
action=
""
method=
"POST"
class=
"form form-inline"
role=
"form"
>
{{ form_add_role.csrf_token() }}
<div
class=
"form-group"
>
{{ wtf.form_field(form_add_role.role) }}
</div>
<div
class=
"form-group"
>
{{ wtf.form_field(form_add_role.place_code, placeholder='Kód / #ID', size=8) }}
</div>
<div
class=
"form-group"
>
{{ wtf.form_field(form_add_role.year, type='number', size=3, maxlength=2) }}
</div>
<div
class=
"form-group"
>
{{ wtf.form_field(form_add_role.category, size=2, maxlength=2) }}
</div>
<div
class=
"form-group"
>
{{ wtf.form_field(form_add_role.seq, type='number', size=3, maxlength=2) }}
</div>
<div
class=
"form-group"
>
{{ wtf.form_field(form_add_role.submit) }}
</div>
</form>
{% endif %}
<table
class=
"data full"
>
<thead>
<tr>
<th>
Role
</th><th>
Oblast
</th><th>
Ročník
</th><th>
Kategorie
</th><th>
Kolo
</th><th>
Akce
</th>
</tr>
</thead>
{% for role in user.roles %}
<tr>
<td>
{{ roles_by_type[role.role].name }}
</td>
<td><a
href=
"{{ url_for('org_place', id=role.place_id) }}"
>
{{ role.place.type_name() + ": " + role.place.name or '*' }}
</a></td>
<td>
{{ role.year or '*' }}
</td>
<td>
{{ role.category or '*' }}
</td>
<td>
{{ role.seq or '*' }}
</td>
<td>
{% if can_assign_rights %}
<form
action=
""
method=
"POST"
>
{{ form_remove_role.csrf_token() }}
<input
type=
"hidden"
name=
"remove_role_id"
value=
"{{ role.user_role_id }}"
>
<button
type=
"submit"
class=
"btn btn-xs btn-danger"
>
Odebrat
</button>
</form>
{% endif %}
</td>
</tr>
{% endfor %}
</table>
{% endif %}
{% endblock %}
Loading