Skip to main content

max / makenotwork

1.5 KB · 44 lines History Blame Raw
1 {%- import "partials/_ui.html" as ui -%}
2 <div id="license-keys-list">
3 {% if license_keys.is_empty() %}
4 {% call ui::empty_state("", "No license keys generated yet.") %}{% endcall %}
5 {% else %}
6 <table class="data-table well">
7 <thead>
8 <tr>
9 <th>Key Code</th>
10 <th>Activations</th>
11 <th>Status</th>
12 <th>Created</th>
13 <th></th>
14 </tr>
15 </thead>
16 <tbody>
17 {% for key in license_keys %}
18 <tr>
19 <td>
20 <span class="key-code" title="Click to copy" data-copy="{{ key.key_code }}" data-action="copyText">{{ crate::quasi::literal::html(key.key_code.as_str())|safe }}</span>
21 </td>
22 <td>
23 {{ key.activation_count }}{% if let Some(max) = key.max_activations %} / {{ max }}{% else %} / &infin;{% endif %}
24 </td>
25 <td>
26 {% if key.is_revoked %}
27 <span class="badge badge-error">Revoked</span>
28 {% else %}
29 <span class="badge" data-tone="success">Active</span>
30 {% endif %}
31 </td>
32 <td>{{ key.created_at }}</td>
33 <td>
34 {% if !key.is_revoked %}
35 {{ crate::quasi::license_key_act::html(key.id)|safe }}
36 {% endif %}
37 </td>
38 </tr>
39 {% endfor %}
40 </tbody>
41 </table>
42 {% endif %}
43 </div>
44