diff --git a/templates/pages/dashboard.html.twig b/templates/pages/dashboard.html.twig index 2db8e31..d145af1 100644 --- a/templates/pages/dashboard.html.twig +++ b/templates/pages/dashboard.html.twig @@ -1,94 +1,175 @@ -{% extends "@blockier-templates/pages/dashboard.html.twig" %} +{% extends "@uf-tweaks/pages/dashboard.html.twig" %} -{% block info_boxes_users %} - {% if hasRole('site-admin') or hasRole('organisations-admin') %} +{% block body_matter %} + {% set dashboard_is_empty = true %} + +
- {% block info_box_users %} - {% if checkAccess('uri_users') %} -
- -
- -
- {{ translate("USER", 2) }} - {{counter.users}} -
- -
- -
+ {% if checkAccess('uri_users') %} + {% set dashboard_is_empty = false %} + + + {% endif %} - {% block info_box_roles %} - {% if checkAccess('uri_roles') %} -
- -
- -
- {{ translate("ROLE", 2) }} - {{counter.roles}} -
- -
- -
+ {% if checkAccess('uri_roles') %} + {% set dashboard_is_empty = false %} + + + {% endif %} - {% block info_box_groups %} - {% if checkAccess('uri_groups') %} -
- -
- -
- {{ translate("GROUP", 2) }} - {{counter.groups}} -
- -
- -
+ {% if checkAccess('uri_groups') %} + {% set dashboard_is_empty = false %} + + + {% endif %} - {% block info_box_organisations %} - {% if checkAccess('uri_organisations') %} - - {% endif %} -{% endblock %} - - -{% block latest_organisations %} - {% if (hasRole('site-admin') or hasRole('organisations-admin')) %} +
-
+ {% if checkAccess('view_system_info') %} + {% set dashboard_is_empty = false %} +
+
+
+

{{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 %} +
+
+
+
+ + + +
+ +
+ + {% endif %} + + {% if checkAccess('uri_users') %} + {% set dashboard_is_empty = false %} +
+ +
+
+

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

+
+ +
+ + +
+ + + +
+ +
+ + {% endif %} + + {% if hasRole('organisations-admin') %} + {% set dashboard_is_empty = false %} +
@@ -97,10 +178,9 @@
{% for organisation in organisations %} -
-
+

{{organisation.name}}

{{organisation.description}}
@@ -114,7 +194,6 @@
- {% endfor %}
@@ -127,49 +206,11 @@
-
- - {% endif %} -{% endblock %} + {% endif %} - - -{% set empty_dashboard = true %} -{% block main_panels %} - {% if - checkAccess('uri_users') or - checkAccess('view_group_field', { - 'group': current_user.group, - 'property': 'users' - }) or - hasRole('site-admin') or - hasRole('organisations-admin') - %} - {% set empty_dashboard = false %} -
- {% block left_panels %} -
- {{ block("latest_users") }} - - {{ block("group_users_summary") }} -
- - {% endblock %} - - {% block right_panels %} -
- {{ block("latest_organisations") }} -
- {% endblock %} -
- - {% endif %} - - {% if checkAccess('uri_activities') %} - {% set empty_dashboard = false %} -
- {% if checkAccess('uri_activities') %} -
+ {% if checkAccess('uri_activities') %} + {% set dashboard_is_empty = false %} +

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

@@ -186,26 +227,114 @@
+ {% endif %} +
+ + + + {% if current_user.group %} + +
+ {% if checkAccess('uri_group', { + 'group': current_user.group + }) %} + {% set dashboard_is_empty = false %} +
+
+ +
+

{{current_user.group.name}}

+
+ +
+ +
+ + +
+
+ +
+ {{ translate("USER", 2) }} + {{current_user.group.users.count}} +
+ +
+ +
+ + {% endif %} +
+ + + +
+ {% if checkAccess('view_group_field', { + 'group': current_user.group, + 'property': 'users' + }) %} + {% set dashboard_is_empty = false %} +
+
+
+

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

+ {% include "tables/table-tool-menu.html.twig" %} +
+
+ {% include "tables/users.html.twig" with { + "table" : { + "id" : "table-group-users", + "columns" : [ + (checkAccess('view_user_field', { "property" : 'activities' }) ? "last_activity" : "") + ] + } + } + %} +
+ +
+
+ {% endif %} +
+ + {% endif %} -
- - {% endif %} - {% if - checkAccess('view_system_info') or - hasRole('site-admin') - %} - {% set empty_dashboard = false %} -
-
- {{ block("system_info") }} -
- -
- - {% endif %} - {% if empty_dashboard == true %} - {{ block("user_welcome") }} - {% endif %} + {% if dashboard_is_empty %} +
+
+
+ +
+

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

+
+
+ User Avatar +
+ +
+ +
+ +
+ + {% endif %} {% endblock %} diff --git a/templates/pages/deleted-organisations.html.twig b/templates/pages/deleted-organisations.html.twig index b68a6ba..7c878bc 100644 --- a/templates/pages/deleted-organisations.html.twig +++ b/templates/pages/deleted-organisations.html.twig @@ -1,4 +1,4 @@ -{% extends "pages/abstract/dashboard.html.twig" %} +{% extends "@admin/pages/abstract/dashboard.html.twig" %} {% block stylesheets_page %} diff --git a/templates/pages/organisation.html.twig b/templates/pages/organisation.html.twig index 106b9b0..40c0f35 100644 --- a/templates/pages/organisation.html.twig +++ b/templates/pages/organisation.html.twig @@ -1,4 +1,4 @@ -{% extends "@blockier-templates/pages/abstract/dashboard.html.twig" %} +{% extends "@admin/pages/abstract/dashboard.html.twig" %} {% block stylesheets_page %} diff --git a/templates/pages/organisations.html.twig b/templates/pages/organisations.html.twig index 0879d1d..b627fd3 100644 --- a/templates/pages/organisations.html.twig +++ b/templates/pages/organisations.html.twig @@ -1,4 +1,4 @@ -{% extends "@blockier-templates/pages/abstract/dashboard.html.twig" %} +{% extends "@admin/pages/abstract/dashboard.html.twig" %} {% block stylesheets_page %}