Add shield to staff name

This commit is contained in:
Evert Prants 2017-12-28 12:15:32 +02:00
parent 04ec755daf
commit 61c853dcc7
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
2 changed files with 9 additions and 1 deletions

View File

@ -21,6 +21,7 @@
<span class="logo">Episodes<span class="period">.</span>Community</span> <span class="logo">Episodes<span class="period">.</span>Community</span>
<div class="userdata"> <div class="userdata">
{% if user.is_authenticated %} {% if user.is_authenticated %}
{% if user.is_staff %}<a class="mod" href="/admin"><i class="fa fa-fw fa-shield"></a></i>{% endif %}
{{ user.display_name }} {{ user.display_name }}
{% else %} {% else %}
<a href="/login">Log in</a> <a href="/login">Log in</a>

View File

@ -70,7 +70,14 @@
</form> </form>
</div> </div>
<div class="data"> <div class="data">
<span class="timestamp">Submitted {{sbm.timestamp}} by {{sbm.user.display_name}}</span><span class="divider">&middot;</span> {% get_obj_perms sbm.user for show as "publisher_perms" %}
<span class="timestamp">Submitted {{sbm.timestamp}} by
{% if sbm.user.is_staff or "can_moderate_show" in publisher_perms %}
<span class="mod"><i class="fa fa-fw fa-shield"></i></span>
{% endif %}
<span class="display_name">{{sbm.user.display_name}}</span>
</span>
<span class="divider">&middot;</span>
{% if "can_moderate_show" in show_perms %} {% if "can_moderate_show" in show_perms %}
<a href="/show/{{show.abbr}}/submission/{{sbm.id}}/moderate" class="button modbutton"><i class="fa fa-fw fa-shield"></i>&nbsp;Change</a> <a href="/show/{{show.abbr}}/submission/{{sbm.id}}/moderate" class="button modbutton"><i class="fa fa-fw fa-shield"></i>&nbsp;Change</a>
{% else %} {% else %}