From d4126593c65c4db2f14145fee8a91bf750743b64 Mon Sep 17 00:00:00 2001 From: Craig Williams Date: Fri, 11 Mar 2022 12:53:15 +0000 Subject: [PATCH] Updates to admin dashboard template --- templates/pages/dashboard.html.twig | 484 ++++++++++------------------ 1 file changed, 175 insertions(+), 309 deletions(-) diff --git a/templates/pages/dashboard.html.twig b/templates/pages/dashboard.html.twig index 0f480da..dabd7e2 100644 --- a/templates/pages/dashboard.html.twig +++ b/templates/pages/dashboard.html.twig @@ -1,345 +1,211 @@ -{% extends "@admin/pages/dashboard.html.twig" %} +{% extends "@blockier-templates/pages/dashboard.html.twig" %} -{% block body_matter %} - {% block info_boxes %} - - {% if hasRole('site-admin') or hasRole('organisations-admin') %} +{% block info_boxes_users %} + {% if hasRole('site-admin') or hasRole('organisations-admin') %}
- {% if checkAccess('uri_users') %} {% block info_box_users %} -
- - - + + {% endif %} {% endblock %} - {% endif %} - {% if checkAccess('uri_roles') %} {% block info_box_roles %} -
- - - + + {% endif %} {% endblock %} - {% endif %} - {% if checkAccess('uri_groups') %} {% block info_box_groups %} -
- - - + + {% endif %} {% endblock %} - {% endif %} - {% if checkAccess('uri_organisations') %} {% block info_box_organisations %} - - - {% elseif checkAccess('uri_group', { - 'group': current_user.group - }) %} -
- {% block info_box_group %} -
-
- -
-

{{current_user.group.name}}

-
- -
- -
- - {% endblock %} - - {% block info_box_group_users %} -
-
- -
- {{ translate("USER", 2) }} - {{current_user.group.users.count}} -
- -
- -
- + + {% endif %} {% endblock %}
- {% endif %} - {% endblock %} + {% endif %} +{% endblock %} - -
- {% if checkAccess('uri_users') or checkAccess('view_system_info') or (hasRole('site-admin') or hasRole('organisations-admin')) %} + +{% block main_panels %} +
+ {% if + checkAccess('uri_users') or + checkAccess('view_system_info') or + checkAccess('uri_activities') or + checkAccess('view_group_field', { + 'group': current_user.group, + 'property': 'users' + }) or + hasRole('site-admin') or + hasRole('organisations-admin') + %} + {% block left_panels %} + {% if checkAccess('uri_users') or checkAccess('view_system_info') or (hasRole('site-admin') or hasRole('organisations-admin')) %}
- {% if checkAccess('uri_users') %} -
-
- -
-
-

{{translate("USER.LATEST")}}

-
- -
- - -
- - - -
- -
- -
- - {% endif %} + {% block latest_users %}{{ parent() }}{% endblock %} + {% block latest_organisations %} {% if (hasRole('site-admin') or hasRole('organisations-admin')) and checkAccess('uri_activities') %} - {% block latest_organisations %} -
-
- -
-
-

{{translate("ORGANISATION.LATEST")}}

-
- -
- {% for organisation in organisations %} - -
- +
+
+ +
+
+

{{translate("ORGANISATION.LATEST")}}

+ +
+ {% for organisation in organisations %} - {% endfor %} - -
- - - -
- -
- -
- - {% endblock %} - {% endif %} - - {% if checkAccess('view_system_info') %} -
-
-
-
-

{{translate("SYSTEM_INFO")}}

+ - -
-
-
{{translate("SYSTEM_INFO.UF_VERSION")}}
-
{{info.version.UF}}
-
{{translate("SYSTEM_INFO.PHP_VERSION")}}
-
{{info.version.php}}
- -
{{translate("SYSTEM_INFO.SERVER")}}
-
{{info.environment.SERVER_SOFTWARE}}
- -
{{translate("SYSTEM_INFO.DB_VERSION")}}
-
{{info.version.database.type}} {{info.version.database.version}}
- -
{{translate("SYSTEM_INFO.DB_NAME")}}
-
{{info.database.name}}
- -
{{translate("SYSTEM_INFO.DIRECTORY")}}
-
{{info.path.project}}
- -
{{translate("SYSTEM_INFO.URL")}}
-
{{site.uri.public}}
- -
{{translate("SYSTEM_INFO.SPRINKLES")}}
-
-
    - {% for sprinkle in sprinkles %} -
  • - {{sprinkle}} -
  • - {% endfor %} -
-
-
-
- - - + {% endfor %} + +
+ + +
-
- -
- +
+ +
+ {% endif %} -
- - {% endif %} + {% endblock %} - {% if checkAccess('uri_activities') %} -
-
-
-

{{translate('ACTIVITY', 2)}}

- {% include "tables/table-tool-menu.html.twig" %} -
-
- {% include "tables/activities.html.twig" with { - "table" : { - "id" : "table-activities", - "columns" : ["user"] - } - } - %} -
-
-
- {% elseif (hasRole('site-admin') or hasRole('organisations-admin')) %} -
- {{block('latest_organisations')}} + {% block system_info %}{{ parent() }}{% endblock %}
- {% elseif checkAccess('view_group_field', { - 'group': current_user.group, - 'property': 'users' - }) %} -
-
-
-

{{translate('USER', 2)}}

- {% include "tables/table-tool-menu.html.twig" %} -
-
- {% include "tables/users.html.twig" with { - "table" : { - "id" : "table-group-users" - } - } - %} -
- - {% else %} -
-
- -
-

- {{translate("WELCOME", { - 'first_name': current_user.first_name - })}} -

-
-
- User Avatar -
- -
- -
- - {% endif %} -
- + {% endif %} + {% endblock %} + + {% block group_users_summary %}{{ parent() }}{% endblock %} + {% endblock %} + {% else %} + {% block user_welcome %}{{ parent() }}{% endblock %} + {% endif %} +
+ {% endblock %}