NexusDash-izebra/app/templates/partials/_character.html.j2

116 lines
3.7 KiB
Plaintext
Raw Normal View History

2022-01-16 18:22:00 +00:00
<div class="card shadow-sm bg-dark border-primary">
<div class="card-body">
<div class="row">
<div class="col text-center">
<h4>
{{ character.name }}
</h4>
</div>
</div>
<br/>
{% if character.pending_name %}
<div class="row">
<div class="col text-right">
Pending:
</div>
<br/>
<div class="col">
{{ character.pending_name }}
</div>
</div>
{% endif %}
<div class="row">
<div class="col text-right">
Rename:
</div>
<br/>
<div class="col">
{% if character.needs_rename %}
<h5 class="far fa-check-square text-danger"></h5>
{% else %}
<h5 class="far fa-times-circle text-success"></h5>
{% endif %}
</div>
</div>
<div class="row">
<div class="col text-right">
Last Login:
</div>
<div class="col">
{{ character.last_login|ctime }}
</div>
</div>
{% if request.endpoint != "characters.view" %}
<br/>
<div class="row">
<div class="col text-center">
<a role="button" class="btn btn-primary btn-block"
href='{{ url_for('characters.view', id=character.id) }}'>
View Character
</a>
</div>
2022-01-16 18:22:00 +00:00
</div>
{% else %}
<br/>
2022-10-17 23:00:50 +00:00
<a role="button" class="btn btn-primary btn-block"
href='{{ url_for('characters.view_xml', id=character.id) }}'>
View XML
</a>
<a role="button" class="btn btn-primary btn-block"
href='{{ url_for('characters.get_xml', id=character.id) }}'>
Download XML
</a>
2022-11-18 03:59:15 +00:00
{% if config.ENABLE_CHAR_XML_UPLOAD and current_user.gm_level == 8 %}
<a role="button" class="btn btn-primary btn-block"
href='{{ url_for('characters.upload', id=character.id) }}'>
Upload XML
</a>
{% endif %}
<a role="button" class="btn btn-primary btn-block"
href='{{ url_for('accounts.view', id=character.account_id) }}'>
View Account: {{character.account.username}}
2022-10-17 23:00:50 +00:00
</a>
2022-01-16 18:22:00 +00:00
{% endif %}
2022-02-20 04:36:33 +00:00
{% if current_user.gm_level > 2 %}
2022-01-16 18:22:00 +00:00
<hr class="bg-primary"/>
<div class="row">
<div class="col text-center">
<h4>Actions</h4>
</div>
</div>
<br/>
{% if not character.needs_rename %}
<a role="button" class="btn btn-danger btn btn-block"
href='{{url_for('characters.approve_name', id=character.id, action="rename")}}'>
Needs Rename
</a>
{% endif %}
{% if character.pending_name or character.needs_rename %}
<a role="button" class="btn btn-success btn btn-block"
href='{{url_for('characters.approve_name', id=character.id, action="approve")}}'>
Approve Name
</a>
{% endif %}
2022-02-20 04:36:33 +00:00
<a role="button" class="btn btn-warning btn-block"
href='{{ url_for('characters.rescue', id=character.id) }}'>
Rescue
</a>
2022-01-16 18:22:00 +00:00
<a role="button" class="btn btn-primary btn-block"
href='{{ url_for('characters.restrict', id=character.id, bit=4) }}'>
{% if character.permission_map|check_perm_map(4) %}Unrestrict{% else %}Restrict{% endif %} Trade
</a>
<a role="button" class="btn btn-primary btn-block"
href='{{ url_for('characters.restrict', id=character.id, bit=5) }}'>
{% if character.permission_map|check_perm_map(5) %}Unrestrict{% else %}Restrict{% endif %} Mail
</a>
<a role="button" class="btn btn-primary btn-block"
href='{{ url_for('characters.restrict', id=character.id, bit=6) }}'>
{% if character.permission_map|check_perm_map(6) %}Unrestrict{% else %}Restrict{% endif %} Chat
</a>
{% endif %}
</div>
</div>