2023-05-04 04:42:37 +00:00
{% extends "admin/base_main.html" %}
2023-01-11 03:31:50 +00:00
{% load activity_tags %}
{% block subtitle %}Emoji{% endblock %}
2023-05-04 04:42:37 +00:00
{% block settings_content %}
2023-01-11 03:31:50 +00:00
< form action = "." class = "search" >
< input type = "search" name = "query" value = "{{ query }}" placeholder = "Search by shortcode or domain" >
{% if local_only %}
< input type = "hidden" name = "local_only" value = "true" >
{% endif %}
< button > < i class = "fa-solid fa-search" > < / i > < / button >
< / form >
< div class = "view-options" >
{% if local_only %}
< a href = ".?{% urlparams local_only=False %}" class = "selected" > < i class = "fa-solid fa-check" > < / i > Local Only< / a >
{% else %}
< a href = ".?{% urlparams local_only=True %}" > < i class = "fa-solid fa-xmark" > < / i > Local Only< / a >
{% endif %}
< a href = "{% url " admin_emoji_create " % } " class = "button" > Add Emoji< / a >
< / div >
< table class = "items" >
{% for emoji in page_obj %}
< tr >
< td class = "icon" >
< img src = "{{ emoji.full_url_admin.relative }}" class = "icon" >
< / td >
< td class = "name" >
{{ emoji.shortcode }}
{% if emoji.domain %}< small > {{ emoji.domain }}< / small > {% endif %}
< / td >
< td >
< / td >
< td class = "actions" >
2023-01-14 17:35:20 +00:00
{% if emoji.can_copy_local %}
< a hx-post = "{{ emoji.urls.admin_copy }}" title = "Copy to Local" > < i class = "fa-solid fa-copy" > < / i > < / a >
{% endif %}
2023-01-11 03:31:50 +00:00
{% if not emoji.is_usable %}
< span class = "bad" > Disabled< / span >
< a hx-post = "{{ emoji.urls.admin_enable }}" title = "Enable" > < i class = "fa-solid fa-circle-check" > < / i > < / a >
{% else %}
< a hx-post = "{{ emoji.urls.admin_disable }}" class = "danger" title = "Disable" > < i class = "fa-solid fa-circle-xmark" > < / i > < / a >
{% endif %}
< a hx-post = "{{ emoji.urls.admin_delete }}" hx-confirm = "Are you sure you want to delete :{{ emoji.shortcode }}:?" class = "danger" title = "Delete" > < i class = "fa-solid fa-trash" > < / i > < / a >
< / td >
< / tr >
{% empty %}
< tr class = "empty" >
< td >
{% if query %}
No emoji match your query.
{% else %}
There are no emoji yet.
{% endif %}
< / td >
< / tr >
{% endfor %}
< / table >
2023-01-13 22:54:21 +00:00
{% include "admin/_pagination.html" with nouns="emoji,emoji" %}
2023-01-11 03:31:50 +00:00
{% endblock %}