diff --git a/site/plugins/admin/templates/system/api/delivery/add.html b/site/plugins/admin/templates/system/api/delivery/add.html index 9e2af3b1..b6f48bc3 100644 --- a/site/plugins/admin/templates/system/api/delivery/add.html +++ b/site/plugins/admin/templates/system/api/delivery/add.html @@ -4,32 +4,32 @@
{{ csrf() }} -
-
-
- - - {{ tr('admin_help_text_for_tokens_label') }} +
+
+
+ + + {{ tr('admin_help_text_for_tokens_label') }}
-
- - - {{ tr('admin_help_text_for_api_calls_limit_label') }} +
+ + + {{ tr('admin_help_text_for_api_calls_limit_label') }}
-
- - - {{ tr('admin_help_text_for_api_token_icon', {':link': 'fontawesome'})|raw }} +
+ + + {{ tr('admin_help_text_for_api_token_icon', {':link': 'fontawesome'})|raw }}
-
- -
-
- +
+
diff --git a/site/plugins/admin/templates/system/api/delivery/edit.html b/site/plugins/admin/templates/system/api/delivery/edit.html index 61e92bfd..993cb5c5 100644 --- a/site/plugins/admin/templates/system/api/delivery/edit.html +++ b/site/plugins/admin/templates/system/api/delivery/edit.html @@ -9,32 +9,32 @@ -
-
-
- - - {{ tr('admin_help_text_for_tokens_label') }} +
+
+
+ + + {{ tr('admin_help_text_for_tokens_label') }}
-
- - - {{ tr('admin_help_text_for_api_calls_limit_label') }} +
+ + + {{ tr('admin_help_text_for_api_calls_limit_label') }}
-
- - - {{ tr('admin_help_text_for_api_token_icon', {':link': 'fontawesome'})|raw }} +
+ + + {{ tr('admin_help_text_for_api_token_icon', {':link': 'fontawesome'})|raw }}
-
- -
-
- +
+
diff --git a/site/plugins/admin/templates/system/api/delivery/index.html b/site/plugins/admin/templates/system/api/delivery/index.html index 9254b040..f3bfa04f 100644 --- a/site/plugins/admin/templates/system/api/delivery/index.html +++ b/site/plugins/admin/templates/system/api/delivery/index.html @@ -2,7 +2,7 @@ {% block content %} {% if (delivery_tokens_list|length > 0) %} - +
{% for key, delivery_token in delivery_tokens_list %} {% set token_file_path = PATH_TOKENS ~ '/' ~ api ~ '/' ~ delivery_token.dirname ~ '/' ~ 'token.yaml' %} @@ -10,28 +10,27 @@ {% set token_data = parser_decode(filesystem_read(token_file_path), 'yaml') %} {% endif %} - - - - + + + @@ -40,10 +39,12 @@
+ {{ token_data.title }}{{ delivery_token.dirname }}{{ token_data.calls }} / {% if(token_data.limit_calls > 0) %}{{ token_data.limit_calls }}{% else %}{% endif %}{{ token_data.title }}{{ delivery_token.dirname }}{{ token_data.calls }} / {% if(token_data.limit_calls > 0) %}{{ token_data.limit_calls }}{% else %}{% endif %} -
- -
{% else %} -
- -

{{ tr('admin_you_have_not_created_any_api_tokens_yet') }}

- {{ tr('admin_create_new_delivery_token') }} -
+ {{ include ("plugins/admin/templates/ui/no-elements.html", {icon: 'fas fa-truck', + message: 'admin_create_new_delivery_token', + button: { + link: path_for('admin.api_tokens.add') ~ '?api=' ~ api, + title: 'admin_create_new_delivery_token' + } + })}} {% endif %} {% endblock %} diff --git a/site/plugins/admin/templates/system/api/index.html b/site/plugins/admin/templates/system/api/index.html index a018dc7c..fc4a70b9 100644 --- a/site/plugins/admin/templates/system/api/index.html +++ b/site/plugins/admin/templates/system/api/index.html @@ -2,22 +2,19 @@ {% block content %} {% if (api_list|length > 0) %} - +
{% for key, api in api_list %} - - + {% endfor %}
+ {{ api }}{{ api }}
{% else %} -
- -

{{ tr('admin_you_have_not_created_any_api_tokens_yet') }}

-
+ {{ include ("plugins/admin/templates/ui/no-elements.html", {icon: 'fas fa-network-wired', message: 'admin_you_have_not_created_any_api_tokens_yet'}) }} {% endif %} {% endblock %} diff --git a/site/plugins/admin/templates/ui/no-elements.html b/site/plugins/admin/templates/ui/no-elements.html new file mode 100644 index 00000000..f15d6f96 --- /dev/null +++ b/site/plugins/admin/templates/ui/no-elements.html @@ -0,0 +1,5 @@ +
+ +

{{ tr(message) }}

+ {% if button %}{{ tr(button.title) }}{% endif %} +