diff --git a/site/plugins/admin/templates/system/api/delivery/add.html b/site/plugins/admin/templates/system/api/delivery/add.html index b6f48bc3..ed494274 100644 --- a/site/plugins/admin/templates/system/api/delivery/add.html +++ b/site/plugins/admin/templates/system/api/delivery/add.html @@ -1,37 +1,64 @@ {% extends "plugins/admin/templates/partials/base.html" %} {% block content %} -
- {{ csrf() }} - -
-
-
- - - {{ tr('admin_help_text_for_tokens_label') }} -
-
- - - {{ tr('admin_help_text_for_api_calls_limit_label') }} -
-
- - - {{ tr('admin_help_text_for_api_token_icon', {':link': 'fontawesome'})|raw }} -
-
- - -
-
- + + {{ csrf() }} + +
+
+
+ + + {{ tr('admin_help_text_for_tokens_label') }} +
+
+ + + {{ tr('admin_help_text_for_api_calls_limit_label') }} +
+
+ + + {{ tr('admin_help_text_for_api_token_icon', {':link': 'fontawesome'})|raw }} +
+
+ + +
+
+ +
-
- -{% endblock %} + +{% endblock %} \ No newline at end of file diff --git a/site/plugins/admin/templates/system/api/delivery/edit.html b/site/plugins/admin/templates/system/api/delivery/edit.html index 993cb5c5..cc3393cc 100644 --- a/site/plugins/admin/templates/system/api/delivery/edit.html +++ b/site/plugins/admin/templates/system/api/delivery/edit.html @@ -1,42 +1,69 @@ {% extends "plugins/admin/templates/partials/base.html" %} {% block content %} -
- {{ csrf() }} - - - - - - -
-
-
- - - {{ tr('admin_help_text_for_tokens_label') }} -
-
- - - {{ tr('admin_help_text_for_api_calls_limit_label') }} -
-
- - - {{ tr('admin_help_text_for_api_token_icon', {':link': 'fontawesome'})|raw }} -
-
- - -
-
- + + {{ csrf() }} + + + + + + +
+
+
+ + + {{ tr('admin_help_text_for_tokens_label') }} +
+
+ + + {{ tr('admin_help_text_for_api_calls_limit_label') }} +
+
+ + + {{ tr('admin_help_text_for_api_token_icon', {':link': 'fontawesome'})|raw }} +
+
+ + +
+
+ +
-
- -{% endblock %} + +{% endblock %} \ No newline at end of file diff --git a/site/plugins/admin/templates/system/api/delivery/index.html b/site/plugins/admin/templates/system/api/delivery/index.html index f3bfa04f..64a02cf0 100644 --- a/site/plugins/admin/templates/system/api/delivery/index.html +++ b/site/plugins/admin/templates/system/api/delivery/index.html @@ -1,50 +1,58 @@ {% extends "plugins/admin/templates/partials/base.html" %} {% 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' %} - {% if filesystem_has(token_file_path) %} - {% set token_data = parser_decode(filesystem_read(token_file_path), 'yaml') %} - {% endif %} - - - - - - - - {% endfor %} - -
- - {{ token_data.title }}{{ delivery_token.dirname }}{{ token_data.calls }} / {% if(token_data.limit_calls > 0) %}{{ token_data.limit_calls }}{% else %}{% endif %} -
- - -
-
-{% else %} - {{ include ("plugins/admin/templates/ui/no-elements.html", {icon: 'fas fa-truck', + {% 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' %} + {% if filesystem_has(token_file_path) %} + {% set token_data = parser_decode(filesystem_read(token_file_path), 'yaml') %} + {% endif %} + + + + + + + + {% endfor %} + +
+ + + {{ token_data.title }} + {{ delivery_token.dirname }}{{ token_data.calls }} + / + {% if (token_data.limit_calls > 0) %}{{ token_data.limit_calls }} + {% else %}∞{% endif %} + + + +
+ {% else %} + {{ 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 %} + {% endif %} +{% endblock %} \ No newline at end of file diff --git a/site/plugins/admin/templates/system/api/index.html b/site/plugins/admin/templates/system/api/index.html index fc4a70b9..cbb7e6b8 100644 --- a/site/plugins/admin/templates/system/api/index.html +++ b/site/plugins/admin/templates/system/api/index.html @@ -1,20 +1,22 @@ {% extends "plugins/admin/templates/partials/base.html" %} {% block content %} -{% if (api_list|length > 0) %} - - - {% for key, api in api_list %} - - - - - {% endfor %} - -
- - {{ api }}
-{% else %} - {{ 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 %} + {% if (api_list | length > 0) %} + + + {% for key, api in api_list %} + + + + + {% endfor %} + +
+ + + {{ api }} +
+ {% else %} + {{ 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 %} \ No newline at end of file