diff --git a/src/Utils/AvatarService.php b/src/Utils/AvatarService.php index 15beb90c..e54e8bbf 100644 --- a/src/Utils/AvatarService.php +++ b/src/Utils/AvatarService.php @@ -134,7 +134,6 @@ class AvatarService } $avatar = new Avatar(self::AVATAR_CONFIG); $avatar->create($profile->getDisplayName())->save($filePath, 90); - $avatar->create($profile->getDisplayName())->save($filePath, 90); } return true; diff --git a/templates/activity/index.html.twig b/templates/activity/index.html.twig index 4e609ea2..f2dc8dc1 100644 --- a/templates/activity/index.html.twig +++ b/templates/activity/index.html.twig @@ -4,10 +4,9 @@ {% import "macros/toolbar.html.twig" as toolbar %} {% import "activity/actions.html.twig" as actions %} -{% set showVisibility = query.visibility != 1 %} {% set columns = { - 'name': 'alwaysVisible', - 'project': 'hidden-xs', + 'name': {'class': 'alwaysVisible'}, + 'project': {'class': 'hidden-xs'}, 'comment': {'class': 'hidden-xs hidden-sm', 'title': 'label.description'|trans}, } %} {% for field in metaColumns %} @@ -15,13 +14,9 @@ ('mf_' ~ field.name): {'title': field.label|trans, 'class': 'hidden-xs hidden-sm', 'orderBy': false} }) %} {% endfor %} -{% if showVisibility %} - {% set columns = columns|merge({ - 'visible': {'class': 'text-center', 'orderBy': false}, - }) %} -{% endif %} {% set columns = columns|merge({ - 'actions': 'actions alwaysVisible', + 'visible': {'class': 'text-center hidden', 'orderBy': false}, + 'actions': {'class': 'actions alwaysVisible'}, }) %} {% set tableName = 'activity_admin' %} @@ -43,7 +38,7 @@ {% for entry in entries %} - {{ widgets.label_color_dot('activity', true, entry.name, null, entry.color) }} + {{ widgets.label_color_dot('activity', true, entry.name, null, entry.color) }} {# only none-global activities have a project and customer assigned #} {% if entry.project %} @@ -62,12 +57,8 @@ {{ tables.datatable_meta_column(entry, field) }} {% endfor %} - {% if showVisibility %} - {{ widgets.label_visible(entry.visible) }} - {% endif %} - - {{ actions.activity(entry, 'index') }} - + {{ widgets.label_visible(entry.visible) }} + {{ actions.activity(entry, 'index') }} {% endfor %} diff --git a/templates/customer/index.html.twig b/templates/customer/index.html.twig index 41dd1b37..0427c489 100644 --- a/templates/customer/index.html.twig +++ b/templates/customer/index.html.twig @@ -4,10 +4,21 @@ {% import "macros/toolbar.html.twig" as toolbar %} {% import "customer/actions.html.twig" as actions %} -{% set showVisibility = query.visibility != 1 %} {% set columns = { - 'name': 'alwaysVisible', + 'name': {'class': 'alwaysVisible'}, 'comment': {'class': 'hidden-xs hidden-sm', 'title': 'label.description'|trans}, + 'number': {'class': 'hidden-xs hidden-sm hidden', 'orderBy': false}, + 'company': {'class': 'hidden-xs hidden-sm hidden', 'orderBy': false}, + 'vat_id': {'class': 'hidden-xs hidden-sm hidden', 'orderBy': false}, + 'contact': {'class': 'hidden-xs hidden-sm hidden', 'orderBy': false}, + 'address': {'class': 'hidden-xs hidden-sm hidden', 'orderBy': false}, + 'country': {'class': 'hidden-xs hidden-sm hidden', 'orderBy': false}, + 'currency': {'class': 'hidden-xs hidden-sm hidden', 'orderBy': false}, + 'phone': {'class': 'hidden-xs hidden-sm hidden', 'orderBy': false}, + 'fax': {'class': 'hidden-xs hidden-sm hidden', 'orderBy': false}, + 'mobile': {'class': 'hidden-xs hidden-sm hidden', 'orderBy': false}, + 'email': {'class': 'hidden-xs hidden-sm hidden', 'orderBy': false}, + 'homepage': {'class': 'hidden-xs hidden-sm hidden', 'orderBy': false}, } %} {% for field in metaColumns %} {% set columns = columns|merge({ @@ -16,14 +27,8 @@ {% endfor %} {% set columns = columns|merge({ 'team': {'class': 'text-center', 'orderBy': false}, -}) %} -{% if showVisibility %} - {% set columns = columns|merge({ - 'visible': {'class': 'text-center', 'orderBy': false}, - }) %} -{% endif %} -{% set columns = columns|merge({ - 'actions': 'actions alwaysVisible', + 'visible': {'class': 'text-center hidden', 'orderBy': false}, + 'actions': {'class': 'actions alwaysVisible'}, }) %} {% set tableName = 'customer_admin' %} @@ -45,30 +50,28 @@ {% for entry in entries %} - - {{ widgets.label_color_dot('customer', true, entry.name, null, entry.color) }} - - - {{ entry.comment|comment2html }} - + {{ widgets.label_color_dot('customer', true, entry.name, null, entry.color) }} + {{ entry.comment|comment2html }} + {{ entry.number }} + {{ entry.company }} + {{ entry.vatId }} + {{ entry.contact }} + {{ entry.address }} + {{ entry.country|country }} + {{ entry.currency|currency }} + {{ entry.phone }} + {{ entry.fax }} + {{ entry.mobile }} + {{ entry.email }} + {{ entry.homepage }} {% for field in metaColumns %} {{ tables.datatable_meta_column(entry, field) }} {% endfor %} - - {% if entry.teams|length > 0 %} - {{ widgets.badge_counter(entry.teams|length) }} - {% else %} - {{ widgets.icon('unlocked') }} - {% endif %} - - {% if showVisibility %} - {{ widgets.label_visible(entry.visible) }} - {% endif %} - - {{ actions.customer(entry, 'index') }} - + {{ widgets.badge_team_access(entry.teams) }} + {{ widgets.label_visible(entry.visible) }} + {{ actions.customer(entry, 'index') }} {% endfor %} diff --git a/templates/macros/widgets.html.twig b/templates/macros/widgets.html.twig index 0a3b1926..1727847b 100644 --- a/templates/macros/widgets.html.twig +++ b/templates/macros/widgets.html.twig @@ -136,6 +136,15 @@ {% endmacro %} +{% macro badge_team_access(teams) %} + {% import _self as macro %} + {% if teams|length > 0 %} + {{ macro.badge_counter(teams|length) }} + {% else %} + {{ macro.icon('unlocked') }} + {% endif %} +{% endmacro %} + {% macro badge_counter(count, url) %} {% if url %} {{ count }} diff --git a/templates/project/index.html.twig b/templates/project/index.html.twig index bd1ebfc3..605fa816 100644 --- a/templates/project/index.html.twig +++ b/templates/project/index.html.twig @@ -4,11 +4,14 @@ {% import "macros/toolbar.html.twig" as toolbar %} {% import "project/actions.html.twig" as actions %} -{% set showVisibility = query.visibility != 1 %} {% set columns = { - 'name': 'alwaysVisible', - 'customer': 'hidden-xs', + 'name': {'class': 'alwaysVisible'}, + 'customer': {'class': 'hidden-xs'}, 'comment': {'class': 'hidden-xs hidden-sm', 'title': 'label.description'|trans}, + 'orderNumber': {'class': 'hidden-xs hidden-sm hidden', 'orderBy': false}, + 'orderDate': {'class': 'hidden-xs hidden-sm hidden', 'orderBy': false}, + 'start': {'class': 'hidden-xs hidden-sm hidden', 'title': 'label.project_start'|trans, 'orderBy': false}, + 'end': {'class': 'hidden-xs hidden-sm hidden', 'title': 'label.project_end'|trans, 'orderBy': false}, } %} {% for field in metaColumns %} {% set columns = columns|merge({ @@ -17,14 +20,8 @@ {% endfor %} {% set columns = columns|merge({ 'team': {'class': 'text-center', 'orderBy': false}, -}) %} -{% if showVisibility %} - {% set columns = columns|merge({ - 'visible': {'class': 'text-center', 'orderBy': false}, - }) %} -{% endif %} -{% set columns = columns|merge({ - 'actions': 'actions alwaysVisible', + 'visible': {'class': 'text-center hidden', 'orderBy': false}, + 'actions': {'class': 'actions alwaysVisible'}, }) %} {% set tableName = 'project_admin' %} @@ -46,29 +43,21 @@ {% for entry in entries %} - {{ widgets.label_color_dot('project', true, entry.name, null, entry.color) }} - - {{ widgets.label_customer(entry.customer) }} - + {{ widgets.label_color_dot('project', true, entry.name, null, entry.color) }} + {{ widgets.label_customer(entry.customer) }} {{ entry.comment|comment2html() }} + {{ entry.orderNumber }} + {% if entry.orderDate is not null %}{{ entry.orderDate|date_full }}{% endif %} + {% if entry.start is not null %}{{ entry.start|date_full }}{% endif %} + {% if entry.end is not null %}{{ entry.end|date_full }}{% endif %} {% for field in metaColumns %} {{ tables.datatable_meta_column(entry, field) }} {% endfor %} - - {% if entry.teams|length > 0 %} - {{ widgets.badge_counter(entry.teams|length) }} - {% else %} - {{ widgets.icon('unlocked') }} - {% endif %} - - {% if showVisibility %} - {{ widgets.label_visible(entry.visible) }} - {% endif %} - - {{ actions.project(entry, 'index') }} - + {{ widgets.badge_team_access(entry.teams) }} + {{ widgets.label_visible(entry.visible) }} + {{ actions.project(entry, 'index') }} {% endfor %} diff --git a/templates/timesheet/layout-listing.html.twig b/templates/timesheet/layout-listing.html.twig index 5a169837..4bd01058 100644 --- a/templates/timesheet/layout-listing.html.twig +++ b/templates/timesheet/layout-listing.html.twig @@ -26,10 +26,10 @@ {% set columns = columns|merge({'rate': ''}) %} {% endif %} {% set columns = columns|merge({ - 'customer': 'hidden-xs hidden-sm hidden-md', - 'project': 'hidden-xs hidden-sm hidden-md', - 'activity': 'hidden-xs hidden-sm', - 'description': 'hidden-xs hidden-sm', + 'customer': {'class': 'hidden-xs hidden-sm hidden-md'}, + 'project': {'class': 'hidden-xs hidden-sm hidden-md'}, + 'activity': {'class': 'hidden-xs hidden-sm'}, + 'description': {'class': 'hidden-xs hidden-sm'}, }) %} {% if canSeeUsername %} {% set columns = columns|merge({ @@ -45,7 +45,7 @@ }) %} {% endfor %} {% set columns = columns|merge({ - 'actions': 'actions alwaysVisible', + 'actions': {'class': 'actions alwaysVisible'}, }) %} {% block page_search %}{{ toolbar.dropDownSearch(toolbarForm) }}{% endblock %} diff --git a/templates/user/index.html.twig b/templates/user/index.html.twig index a8756d52..58a6656d 100644 --- a/templates/user/index.html.twig +++ b/templates/user/index.html.twig @@ -4,14 +4,13 @@ {% import "macros/toolbar.html.twig" as toolbar %} {% import "user/actions.html.twig" as actions %} -{% set showVisibility = query.visibility != 1 %} {% set columns = { - 'alias': 'alwaysVisible', - 'title': 'hidden-xs hidden-sm', + 'alias': {'class': 'alwaysVisible'}, + 'title': {'class': 'hidden-xs hidden-sm'}, + 'email': {'class': 'hidden-xs hidden-sm hidden', 'orderBy': false}, + 'lastLogin': {'class': 'hidden-xs hidden-sm hidden', 'orderBy': false}, + 'roles': {'class': 'hidden-sm', 'orderBy': false}, } %} -{% set columns = columns|merge({ - 'roles': {'class': 'hidden-xs hidden-sm', 'orderBy': false}, -}) %} {% for pref in preferences %} {% set columns = columns|merge({ ('mf_' ~ pref.name): {'title': pref.label|trans, 'class': 'hidden-xs hidden-sm', 'orderBy': false} @@ -19,14 +18,8 @@ {% endfor %} {% set columns = columns|merge({ 'team': {'class': 'text-center hidden-xs', 'orderBy': false}, -}) %} -{% if showVisibility %} - {% set columns = columns|merge({ - 'active': {'class': '', 'orderBy': false}, - }) %} -{% endif %} -{% set columns = columns|merge({ - 'actions': 'actions alwaysVisible', + 'active': {'class': 'hidden-xs hidden', 'orderBy': false}, + 'actions': {'class': 'actions alwaysVisible'}, }) %} {% set tableName = 'user_admin' %} @@ -48,8 +41,10 @@ {% for entry in entries %} - {{ widgets.user_avatar(entry) }} {{ widgets.username(entry) }} + {{ widgets.user_avatar(entry) }} {{ widgets.username(entry) }} {{ entry.title }} + {{ entry.email }} + {% if entry.lastLogin is not null %}{{ entry.lastLogin|date_full }}{% endif %} {% set showUserRole = entry.roles|length == 1 %} {% for role in entry.roles %} @@ -71,12 +66,8 @@ {{ widgets.badge_counter(entry.teams|length) }} {% endif %} - {% if showVisibility %} - {{ widgets.label_visible(entry.enabled) }} - {% endif %} - - {{ actions.user(entry, 'index') }} - + {{ widgets.label_visible(entry.enabled) }} + {{ actions.user(entry, 'index') }} {% endfor %} diff --git a/translations/messages.de.xlf b/translations/messages.de.xlf index fab75abf..d12ac0b4 100644 --- a/translations/messages.de.xlf +++ b/translations/messages.de.xlf @@ -492,6 +492,10 @@ label.login.initial_view Initiale Ansicht nach Anmeldung + + label.lastLogin + Letzte Anmeldung + month diff --git a/translations/messages.en.xlf b/translations/messages.en.xlf index 7a60dddb..55d88543 100644 --- a/translations/messages.en.xlf +++ b/translations/messages.en.xlf @@ -492,6 +492,10 @@ label.login.initial_view Initial view after login + + label.lastLogin + Last login + month