Indicate the type of key in the table of keys

When looking at your keys, it’s useful to know which are `test`/`team`.

Default (`normal`) keys don’t get a label.
This commit is contained in:
Chris Hill-Scott
2016-06-29 16:04:00 +01:00
parent 7fcd56dc02
commit 01df039aab

View File

@@ -24,11 +24,24 @@
empty_message="You havent created any API keys yet",
caption="API keys",
caption_visible=false,
field_headings=['API keys', hidden_field_heading('Action')],
field_headings=[
'API keys',
hidden_field_heading('Key type'),
hidden_field_heading('Action')
],
) %}
{% call field() %}
{{ item.name }}
{% endcall %}
{% call field(status='default') %}
{% if item.key_type == 'normal' %}
<span class="visually-hidden">Normal</span>
{% elif item.key_type == 'team' %}
Only sends to team members
{% elif item.key_type == 'test' %}
Simulates sending messages
{% endif %}
{% endcall %}
{% if item.expiry_date %}
{% call field(align='right', status='default') %}
Revoked {{ item.expiry_date|format_datetime }}