1{% if toolbar.should_render() %}
2{% set exception=toolbar.request_exception() %}
3<script src="{{ asset('toolbar/toolbar.js') }}"></script>
4<div id="plaintoolbar" class="print:hidden text-sm py-1.5 text-stone-300 fixed bottom-3 mx-3 max-w-full drop-shadow-sm z-30 ring-1 ring-stone-200/5 rounded-2xl lg:flex lg:flex-col -translate-x-1/2 left-1/2 max-h-[90vh] bg-gradient-to-b from-stone-950/90 to-stone-950/95 backdrop-blur-sm">
5 <div class="flex justify-between px-3 mx-auto space-x-4">
6 <div class="flex items-center">
7 <code class="ml-1.5 text-xs whitespace-nowrap text-mono">{{ toolbar.version }}</code>
8
9 {% if request.impersonator is defined %}
10 <div class="flex items-center ml-1 font-light">
11 Impersonating <span class="font-medium">{{ request.user }}</span>
12 </span>
13 <a href="{{ url('admin:impersonate:stop') }}" title="Stop impersonating" class="flex items-center px-1 ml-1 text-red-300 hover:text-white">
14 <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="w-4 h-4 bi bi-x-octagon-fill" viewBox="0 0 16 16">
15 <path d="M11.46.146A.5.5 0 0 0 11.107 0H4.893a.5.5 0 0 0-.353.146L.146 4.54A.5.5 0 0 0 0 4.893v6.214a.5.5 0 0 0 .146.353l4.394 4.394a.5.5 0 0 0 .353.146h6.214a.5.5 0 0 0 .353-.146l4.394-4.394a.5.5 0 0 0 .146-.353V4.893a.5.5 0 0 0-.146-.353L11.46.146zm-6.106 4.5L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 1 1 .708-.708z"/>
16 </svg>
17 </a>
18 </div>
19 {% endif %}
20 </div>
21 <div class="flex items-center space-x-4">
22 {% include "querystats/toolbar.html" %}
23
24 <div class="flex items-center space-x-3 transition-all">
25 <a href="{{ url('admin:index') }}" class="hover:underline">Admin</a>
26 {% if object|default(false) and object|get_admin_model_detail_url %}
27 <a class="inline-flex items-center p-1 text-blue-500 hover:text-blue-400" href="{{ object|get_admin_model_detail_url }}">
28 <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="w-3 h-3 bi bi-database-fill" viewBox="0 0 16 16">
29 <path d="M3.904 1.777C4.978 1.289 6.427 1 8 1s3.022.289 4.096.777C13.125 2.245 14 2.993 14 4s-.875 1.755-1.904 2.223C11.022 6.711 9.573 7 8 7s-3.022-.289-4.096-.777C2.875 5.755 2 5.007 2 4s.875-1.755 1.904-2.223"/>
30 <path d="M2 6.161V7c0 1.007.875 1.755 1.904 2.223C4.978 9.71 6.427 10 8 10s3.022-.289 4.096-.777C13.125 8.755 14 8.007 14 7v-.839c-.457.432-1.004.751-1.49.972C11.278 7.693 9.682 8 8 8s-3.278-.307-4.51-.867c-.486-.22-1.033-.54-1.49-.972"/>
31 <path d="M2 9.161V10c0 1.007.875 1.755 1.904 2.223C4.978 12.711 6.427 13 8 13s3.022-.289 4.096-.777C13.125 11.755 14 11.007 14 10v-.839c-.457.432-1.004.751-1.49.972-1.232.56-2.828.867-4.51.867s-3.278-.307-4.51-.867c-.486-.22-1.033-.54-1.49-.972"/>
32 <path d="M2 12.161V13c0 1.007.875 1.755 1.904 2.223C4.978 15.711 6.427 16 8 16s3.022-.289 4.096-.777C13.125 14.755 14 14.007 14 13v-.839c-.457.432-1.004.751-1.49.972-1.232.56-2.828.867-4.51.867s-3.278-.307-4.51-.867c-.486-.22-1.033-.54-1.49-.972"/>
33 </svg>
34 </a>
35 {% endif %}
36 {% include "toolbar/links.html" ignore missing %}
37 <button data-plaintoolbar-expand class="hover:text-orange-500" type="button">
38 <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="w-4 h-4" viewBox="0 0 16 16">
39 <path fill-rule="evenodd" d="M3.646 9.146a.5.5 0 0 1 .708 0L8 12.793l3.646-3.647a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 0-.708zm0-2.292a.5.5 0 0 0 .708 0L8 3.207l3.646 3.647a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 0 0 0 .708z"/>
40 </svg>
41 </button>
42 </div>
43 </div>
44 </div>
45 <div id="plaintoolbar-details" class="{% if not exception %}hidden{% endif %} p-4 overflow-auto text-sm space-y-2">
46
47 {% if exception %}
48 <div class="p-2 border-amber-500 border rounded">
49 <div class="text-amber-500 text-lg flex justify-between items-center">
50 <div>
51 <span class="font-bold">Exception</span>
52 {{ exception }}
53 </div>
54 <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="w-5 h-5 bi bi-exclamation-triangle-fill" viewBox="0 0 16 16">
55 <path d="M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5m.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2"/>
56 </svg>
57 </div>
58 <div class="text-amber-400 text-xs mt-3 bg-white/5 p-2 rounded overflow-auto">
59 <pre><code>{{ exception._traceback_string }}</code></pre>
60 </div>
61 </div>
62 {% endif %}
63
64 <table>
65 <tbody>
66 {% for k, v in toolbar.metadata.items() %}
67 <tr>
68 <td class="pr-2 font-medium whitespace-nowrap">{{ k }}</td>
69 <td class="whitespace-nowrap">{{ v }}</td>
70 </tr>
71 {% endfor %}
72 </tbody>
73 </table>
74
75 {% if object|default(false) %}
76 <div class="font-mono" title="PK: {{ object.pk|default('unknown') }}">
77 {{ object.__repr__() }}
78 </div>
79 {% endif %}
80
81 <button data-plaintoolbar-hide class="hover:text-red-500" type="button">
82 Hide toolbar for 1 hour
83 </button>
84 </div>
85</div>
86{% endif %}