Next major version 2 with PHP 8.1, Symfony 6, Tabler UI, 2FA ... (#2902)
This commit is contained in:
@@ -1,28 +1,28 @@
|
||||
{% set timeBudgetVisible = is_granted('time', entity) %}
|
||||
{% set durationTrans = entity.isMonthlyBudget() ? 'stats.durationMonth' : 'stats.durationTotal' %}
|
||||
{% if timeBudgetVisible %}
|
||||
{% embed '@AdminLTE/Widgets/box-widget.html.twig' %}
|
||||
{% embed '@theme/embeds/card.html.twig' %}
|
||||
{% import "macros/progressbar.html.twig" as progress %}
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
{% block box_title %}
|
||||
{{ 'label.timeBudget'|trans }} {% if entity.isMonthlyBudget() %}({{ 'label.budgetType_month'|trans }}){% endif %}
|
||||
{{ 'timeBudget'|trans }} {% if entity.isMonthlyBudget() %}({{ 'budgetType_month'|trans }}){% endif %}
|
||||
{% endblock %}
|
||||
{% block box_body_class %}no-padding{% endblock %}
|
||||
{% block box_body_class %}p-0{% endblock %}
|
||||
{% block box_attributes %}id="time_budget_box"{% endblock %}
|
||||
{% block box_body %}
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-5">
|
||||
<div class="col-12 col-md-6 order-1 order-md-0">
|
||||
<table class="table table-hover dataTable">
|
||||
<tr>
|
||||
<td>{{ 'label.timeBudget'|trans }}</td>
|
||||
<td class="text-nowrap text-right">
|
||||
<td>{{ 'timeBudget'|trans }}</td>
|
||||
<td class="text-nowrap text-end">
|
||||
{% if entity.timeBudget > 0 %}
|
||||
{{ entity.timeBudget|duration }}
|
||||
{% else %}
|
||||
-
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-nowrap text-right">
|
||||
<td class="text-nowrap text-end">
|
||||
{% if entity.timeBudget > 0 %}
|
||||
100%
|
||||
{% else %}
|
||||
@@ -36,21 +36,21 @@
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td>{{ durationTrans|trans }}</td>
|
||||
<td class="text-nowrap text-right">{{ stats.duration|duration }}</td>
|
||||
<td class="text-nowrap text-right">{{ totalPercentReached|number_format(2) }}%</td>
|
||||
<td class="text-nowrap text-end">{{ stats.duration|duration }}</td>
|
||||
<td class="text-nowrap text-end">{{ totalPercentReached|number_format(2) }}%</td>
|
||||
</tr>
|
||||
{% set percentReached = 0 %}
|
||||
{% if stats.duration > 0 %}
|
||||
{% set percentReached = (stats.durationBillable / (stats.duration / 100)) %}
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td>{{ 'label.billable'|trans }}</td>
|
||||
<td class="text-nowrap text-right">{{ stats.durationBillable|duration }}</td>
|
||||
<td class="text-nowrap text-right">{{ percentReached|number_format(2) }}%</td>
|
||||
<td>{{ 'billable'|trans }}</td>
|
||||
<td class="text-nowrap text-end">{{ stats.durationBillable|duration }}</td>
|
||||
<td class="text-nowrap text-end">{{ percentReached|number_format(2) }}%</td>
|
||||
</tr>
|
||||
{% if entity.timeBudget > 0 %}
|
||||
<tr>
|
||||
<th colspan="3" class="text-nowrap text-right">
|
||||
<th colspan="3" class="text-nowrap text-end">
|
||||
{% if totalPercentReached < 100 %}
|
||||
{{ 'stats.percentUsedLeft'|trans({'%percent%': totalPercentReached|number_format(2), '%left%': (entity.timeBudget - stats.durationBillable)|duration}) }}
|
||||
{% else %}
|
||||
@@ -61,42 +61,40 @@
|
||||
{% endif %}
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-7">
|
||||
<div class="box-padding">
|
||||
{% if entity.timeBudget > 0 %}
|
||||
{{ progress.progressbar(entity.timeBudget, stats.durationBillable, durationTrans|trans, stats.durationBillable|duration ~ ' / ' ~ entity.timeBudget|duration) }}
|
||||
{% endif %}
|
||||
{{ progress.progressbar(stats.duration, stats.durationBillable, 'label.billable'|trans, stats.durationBillable|duration ~ ' / ' ~ stats.duration|duration, true) }}
|
||||
</div>
|
||||
<div class="col-12 col-md-6 order-0 order-md-1 p-3">
|
||||
{% if entity.timeBudget > 0 %}
|
||||
<div class="mb-3">{{ progress.progressbar(entity.timeBudget, stats.durationBillable, durationTrans|trans, stats.durationBillable|duration ~ ' / ' ~ entity.timeBudget|duration) }}</div>
|
||||
{% endif %}
|
||||
<div class="mb-3">{{ progress.progressbar(stats.duration, stats.durationBillable, 'billable'|trans, stats.durationBillable|duration ~ ' / ' ~ stats.duration|duration, true) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endembed %}
|
||||
{% endif %}
|
||||
{% if is_granted('budget', entity) %}
|
||||
{% embed '@AdminLTE/Widgets/box-widget.html.twig' %}
|
||||
{% embed '@theme/embeds/card.html.twig' %}
|
||||
{% import "macros/progressbar.html.twig" as progress %}
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
{% block box_title %}
|
||||
{{ 'label.budget'|trans }} {% if entity.isMonthlyBudget() %}({{ 'label.budgetType_month'|trans }}){% endif %}
|
||||
{{ 'budget'|trans }} {% if entity.isMonthlyBudget() %}({{ 'budgetType_month'|trans }}){% endif %}
|
||||
{% endblock %}
|
||||
{% block box_body_class %}no-padding{% endblock %}
|
||||
{% block box_body_class %}p-0{% endblock %}
|
||||
{% block box_attributes %}id="budget_box"{% endblock %}
|
||||
{% block box_body %}
|
||||
{% set rateTrans = entity.isMonthlyBudget() ? 'stats.amountMonth' : 'stats.amountTotal' %}
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-5">
|
||||
<div class="col-12 col-md-6 order-1 order-md-0">
|
||||
<table class="table table-hover dataTable">
|
||||
<tr>
|
||||
<td>{{ 'label.budget'|trans }}</td>
|
||||
<td class="text-nowrap text-right">
|
||||
<td>{{ 'budget'|trans }}</td>
|
||||
<td class="text-nowrap text-end">
|
||||
{% if entity.budget > 0 %}
|
||||
{{ entity.budget|money(currency) }}
|
||||
{% else %}
|
||||
-
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-nowrap text-right">
|
||||
<td class="text-nowrap text-end">
|
||||
{% if entity.budget > 0 %}
|
||||
100%
|
||||
{% else %}
|
||||
@@ -110,38 +108,38 @@
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td>{{ rateTrans|trans }}</td>
|
||||
<td class="text-nowrap text-right">{{ stats.rate|money(currency) }}</td>
|
||||
<td class="text-nowrap text-right">{{ totalPercentReached|number_format(2) }}%</td>
|
||||
<td class="text-nowrap text-end">{{ stats.rate|money(currency) }}</td>
|
||||
<td class="text-nowrap text-end">{{ totalPercentReached|number_format(2) }}%</td>
|
||||
</tr>
|
||||
{% set percentReached = 0 %}
|
||||
{% if stats.rate > 0 %}
|
||||
{% set percentReached = (stats.rateBillable / (stats.rate / 100)) %}
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td>{{ 'label.billable'|trans }}</td>
|
||||
<td class="text-nowrap text-right">{{ stats.rateBillable|money(currency) }}</td>
|
||||
<td class="text-nowrap text-right">{{ percentReached|number_format(2) }}%</td>
|
||||
<td>{{ 'billable'|trans }}</td>
|
||||
<td class="text-nowrap text-end">{{ stats.rateBillable|money(currency) }}</td>
|
||||
<td class="text-nowrap text-end">{{ percentReached|number_format(2) }}%</td>
|
||||
</tr>
|
||||
{% set percentReached = 0 %}
|
||||
{% if stats.rateBillable > 0 %}
|
||||
{% set percentReached = (stats.internalRate / (stats.rateBillable / 100)) %}
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td>{{ 'label.rate_internal'|trans }}</td>
|
||||
<td class="text-nowrap text-right">{{ stats.internalRate|money(currency) }}</td>
|
||||
<td class="text-nowrap text-right">{{ percentReached|number_format(2) }}%</td>
|
||||
<td>{{ 'internalRate'|trans }}</td>
|
||||
<td class="text-nowrap text-end">{{ stats.internalRate|money(currency) }}</td>
|
||||
<td class="text-nowrap text-end">{{ percentReached|number_format(2) }}%</td>
|
||||
</tr>
|
||||
{% if not entity.isMonthlyBudget() and timeBudgetVisible and stats.duration > 0 %}
|
||||
{% set realHourlyRate = stats.rateBillable / stats.duration|chart_duration %}
|
||||
<tr>
|
||||
<td>{{ 'label.hourlyRate'|trans }} ({{ 'label.billable'|trans }} / {{ durationTrans|trans }})</td>
|
||||
<td class="text-nowrap text-right">{{ realHourlyRate|money(currency) }}</td>
|
||||
<td class="text-nowrap text-right">-</td>
|
||||
<td>{{ 'hourlyRate'|trans }} ({{ 'billable'|trans }} / {{ durationTrans|trans }})</td>
|
||||
<td class="text-nowrap text-end">{{ realHourlyRate|money(currency) }}</td>
|
||||
<td class="text-nowrap text-end">-</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if entity.budget > 0 %}
|
||||
<tr>
|
||||
<th colspan="3" class="text-nowrap text-right">
|
||||
<tr>
|
||||
<th colspan="3" class="text-nowrap text-end">
|
||||
{% if totalPercentReached < 100 %}
|
||||
{{ 'stats.percentUsedLeft'|trans({'%percent%': totalPercentReached|number_format(2), '%left%': (entity.budget - stats.rateBillable)|money(currency)}) }}
|
||||
{% else %}
|
||||
@@ -152,14 +150,12 @@
|
||||
{% endif %}
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-7">
|
||||
<div class="box-padding">
|
||||
{% if entity.budget > 0 %}
|
||||
{{ progress.progressbar(entity.budget, stats.rateBillable, rateTrans|trans, stats.rateBillable|money(currency) ~ ' / ' ~ entity.budget|money(currency)) }}
|
||||
{% endif %}
|
||||
{{ progress.progressbar(stats.rate, stats.rateBillable, 'label.billable'|trans, stats.rateBillable|money(currency) ~ ' / ' ~ stats.rate|money(currency), true) }}
|
||||
{{ progress.progressbar(stats.rateBillable, stats.internalRate, 'label.rate_internal'|trans, stats.internalRate|money(currency) ~ ' / ' ~ stats.rateBillable|money(currency)) }}
|
||||
</div>
|
||||
<div class="col-12 col-md-6 order-0 order-md-1 p-3">
|
||||
{% if entity.budget > 0 %}
|
||||
<div class="mb-3">{{ progress.progressbar(entity.budget, stats.rateBillable, rateTrans|trans, stats.rateBillable|money(currency) ~ ' / ' ~ entity.budget|money(currency)) }}</div>
|
||||
{% endif %}
|
||||
<div class="mb-3">{{ progress.progressbar(stats.rate, stats.rateBillable, 'billable'|trans, stats.rateBillable|money(currency) ~ ' / ' ~ stats.rate|money(currency), true) }}</div>
|
||||
<div class="mb-3">{{ progress.progressbar(stats.rateBillable, stats.internalRate, 'internalRate'|trans, stats.internalRate|money(currency) ~ ' / ' ~ stats.rateBillable|money(currency)) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{% embed '@AdminLTE/Widgets/box-widget.html.twig' with {'form': form, 'comments': comments, 'route_pin': route_pin|default(null), 'route_delete': route_delete|default(null), 'delete_by_user': delete_by_user|default(false), 'csrf_delete': csrf_token(csrf_delete|default('comment.delete')), 'csrf_pin': csrf_token(csrf_pin|default('comment.pin'))} %}
|
||||
{% embed '@theme/embeds/card.html.twig' with {'form': form, 'comments': comments, 'route_pin': route_pin|default(null), 'route_delete': route_delete|default(null), 'delete_by_user': delete_by_user|default(false), 'csrf_delete': csrf_token(csrf_delete|default('comment.delete')), 'csrf_pin': csrf_token(csrf_pin|default('comment.pin'))} %}
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
{% block box_title %}{{ 'label.comment'|trans }}{% endblock %}
|
||||
{% block box_title %}{{ 'comment'|trans }}{% endblock %}
|
||||
{% block box_attributes %}id="comments_box"{% endblock %}
|
||||
{% block box_body_class %}box-body-scrollable{% endblock %}
|
||||
{% block box_body_class %}box-body-scrollable{% if comments|length > 0%} p-0{% endif %}{% endblock %}
|
||||
{% block box_body %}
|
||||
{% set replacer = {} %}
|
||||
{% for pref in app.user.preferences %}
|
||||
@@ -11,54 +11,48 @@
|
||||
{% if comments|length == 0 %}
|
||||
{{ 'error.no_comments_found'|trans }}
|
||||
{% else %}
|
||||
{% for comment in comments %}
|
||||
<div class="direct-chat-msg">
|
||||
<div class="direct-chat-info clearfix">
|
||||
<span class="direct-chat-name pull-left">
|
||||
{{ widgets.username(comment.createdBy) }}
|
||||
</span>
|
||||
<span class="direct-chat-timestamp pull-left">
|
||||
|
||||
{{ comment.createdAt|date_full }}
|
||||
|
||||
</span>
|
||||
<span class="pull-right">
|
||||
{% if route_pin is not null %}
|
||||
<a href="{{ path(route_pin, {'id': comment.id, 'token': csrf_pin}) }}" class="btn btn-default btn-xs {% if comment.pinned %}active{% endif %}"><i class="{{ 'pin'|icon }}"></i></a>
|
||||
{% elseif comment.pinned %}
|
||||
<i class="{{ 'pin'|icon }}"></i>
|
||||
{% endif %}
|
||||
{% if route_delete is not null and ((not delete_by_user) or (delete_by_user and comment.createdBy.id == app.user.id)) %}
|
||||
<a href="{{ path(route_delete, {'id': comment.id, 'token': csrf_delete}) }}" class="confirmation-link btn btn-default btn-xs" data-question="confirm.delete"><i class="{{ 'delete'|icon }}"></i></a>
|
||||
{% endif %}
|
||||
</span>
|
||||
<div class="divide-y">
|
||||
{% for comment in comments %}
|
||||
<div class="p-3">
|
||||
<div class="row">
|
||||
<div class="col-auto">
|
||||
{{ widgets.user_avatar(comment.createdBy, false) }}
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="text-truncate">
|
||||
<strong>{{ widgets.username(comment.createdBy) }}</strong>
|
||||
</div>
|
||||
<div class="text-muted">{{ comment.createdAt|date_time }}</div>
|
||||
</div>
|
||||
<div class="col-auto align-self-center">
|
||||
{% if route_pin is not null %}
|
||||
<a href="{{ path(route_pin, {'id': comment.id, 'token': csrf_pin}) }}" class="btn{% if not comment.pinned %} btn-ghost-secondary{% else %} btn-ghost-info{% endif%} btn-icon {% if comment.pinned %}active{% endif %} pin-comment-link">{{ icon('pin') }}</a>
|
||||
{% elseif comment.pinned %}
|
||||
{{ icon('pin') }}
|
||||
{% endif %}
|
||||
{% if route_delete is not null and ((not delete_by_user) or (delete_by_user and comment.createdBy.id == app.user.id)) %}
|
||||
<a href="{{ path(route_delete, {'id': comment.id, 'token': csrf_delete}) }}" class="confirmation-link btn btn-ghost-secondary btn-icon delete-comment-link" data-question="confirm.delete">{{ icon('delete') }}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{{ widgets.user_avatar(comment.createdBy, false, 'direct-chat-img img-sm') }}
|
||||
<div class="direct-chat-text">
|
||||
<div class="row pt-2 direct-chat-text">
|
||||
{{ comment.message|replace(replacer)|comment2html }}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block box_footer -%}
|
||||
{% if form is not null %}
|
||||
{% block box_footer %}
|
||||
{%- if form is not null -%}
|
||||
{{ form_start(form) }}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{{ form_widget(form.message, {'attr': {'rows': '3', 'placeholder': 'placeholder.type_message'|trans, 'style': 'margin-bottom: 5px'}}) }}
|
||||
<button type="submit" class="btn btn-default">
|
||||
<i class="{{ 'comment'|icon }}"></i>
|
||||
{{ 'label.comment'|trans }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
</div>
|
||||
</div>
|
||||
{{ form_widget(form.message, {'attr': {'rows': '3', 'placeholder': 'placeholder.type_message'|trans, 'style': 'margin-bottom: 5px'}}) }}
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{ icon('comment', true) }}
|
||||
{{ 'comment'|trans }}
|
||||
</button>
|
||||
{{ form_widget(form) }}
|
||||
{{ form_end(form) }}
|
||||
{% endif %}
|
||||
{%- endblock %}
|
||||
{%- endif -%}
|
||||
{% endblock %}
|
||||
{% endembed %}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
{#
|
||||
REQUIRED CHANGES NEED TO BE DONE IN THESE FILES:
|
||||
- embeds/modal.html.twig
|
||||
- default/_form_modal.html.twig
|
||||
#}
|
||||
<div class="modal{% if block('modal_class') is defined %} {{ block('modal_class') }}{% endif %}" id="{{ block('modal_id') }}" tabindex="-1" role="dialog" aria-labelledby="{{ block('modal_id') }}_label">
|
||||
<div class="modal-dialog {% block modal_size %}modal-lg{% endblock %}" role="document">
|
||||
<div class="modal-content">
|
||||
{% if block('modal_before') is defined %}{{ block('modal_before') }}{% endif %}
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="{{ 'action.close'|trans }}"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="{{ block('modal_id') }}_label">{{ block('modal_title') }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{{ block('modal_body') }}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
{{ block('modal_footer') }}
|
||||
</div>
|
||||
{% if block('modal_end') is defined %}{{ block('modal_end') }}{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,13 +1,13 @@
|
||||
{% embed '@AdminLTE/Widgets/box-widget.html.twig' with {'id': id, 'entity': entity, 'create_url': create_url, 'delete_route': delete_route, 'currency': currency} %}
|
||||
{% embed '@theme/embeds/card.html.twig' with {'id': id, 'entity': entity, 'create_url': create_url, 'delete_route': delete_route, 'currency': currency} %}
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
{% block box_attributes %}id="{{ id }}"{% endblock %}
|
||||
{% block box_title %}
|
||||
{{ 'label.hourlyRate'|trans }}
|
||||
{{ 'rates.title'|trans }}
|
||||
{% endblock %}
|
||||
{% block box_tools %}
|
||||
<a class="modal-ajax-form open-edit btn btn-default btn-sm" data-href="{{ create_url }}" data-toggle="tooltip" data-placement="top" title="{{ 'create'|trans }}"><i class="{{ 'create'|icon }}"></i></a>
|
||||
{{ widgets.card_tool_button('create', {'class': 'modal-ajax-form open-edit', 'title': 'create', 'url': create_url}) }}
|
||||
{% endblock %}
|
||||
{% block box_body_class %}no-padding{% endblock %}
|
||||
{% block box_body_class %}{% if rates is not empty %}p-0{% endif %}{% endblock %}
|
||||
{% block box_body %}
|
||||
{% if rates is empty %}
|
||||
<div class="comment">{{ 'rates.empty'|trans }}</div>
|
||||
@@ -16,23 +16,23 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
{{ 'label.user'|trans }}
|
||||
{{ 'user'|trans }}
|
||||
</th>
|
||||
<th>
|
||||
{{ 'label.hourlyRate'|trans }}
|
||||
{{ 'hourlyRate'|trans }}
|
||||
</th>
|
||||
<th class="d-none d-sm-table-cell">
|
||||
{{ 'internalRate'|trans }}
|
||||
</th>
|
||||
<th>
|
||||
{{ 'label.rate_internal'|trans }}
|
||||
</th>
|
||||
<th>
|
||||
{{ 'label.fixedRate'|trans }}
|
||||
{{ 'fixedRate'|trans }}
|
||||
</th>
|
||||
<th class="actions"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for rate in rates %}
|
||||
<tr>
|
||||
<tr class="modal-ajax-form open-edit" data-href="{{ path(edit_route, {'id': entity.id, 'rate': rate.id}) }}">
|
||||
<td>
|
||||
{% if rate.user is not null %}
|
||||
{{ widgets.user_avatar(rate.user) }}
|
||||
@@ -43,14 +43,17 @@
|
||||
<td>
|
||||
{{ rate.rate|money(currency) }}
|
||||
</td>
|
||||
<td>
|
||||
<td class="d-none d-sm-table-cell">
|
||||
{{ rate.internalRate|money(currency) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ widgets.label_boolean(rate.fixed) }}
|
||||
</td>
|
||||
<td class="actions">
|
||||
<a href="{{ path(delete_route, {'id': entity.id, 'rateId': rate.id}) }}" class="btn btn-default btn-xs api-link" data-question="confirm.delete" data-event="kimai.rateUpdate kimai.rateDelete" data-method="DELETE" data-msg-error="action.delete.error" data-msg-success="action.delete.success"><i class="{{ 'delete'|icon }}"></i></a>
|
||||
<div class="btn-group">
|
||||
<a href="{{ path(edit_route, {'id': entity.id, 'rate': rate.id}) }}" class="modal-ajax-form btn btn-icon">{{ icon('edit', true) }}</a>
|
||||
<a href="{{ path(delete_route, {'id': entity.id, 'rateId': rate.id}) }}" class="btn btn-icon api-link" data-question="confirm.delete" data-event="kimai.rateUpdate kimai.rateDelete" data-method="DELETE" data-msg-error="action.delete.error" data-msg-success="action.delete.success">{{ icon('delete', true) }}</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
@@ -7,25 +7,25 @@
|
||||
'empty_message': empty_message|default('team.visibility_global')
|
||||
}
|
||||
%}
|
||||
{% embed '@AdminLTE/Widgets/box-widget.html.twig' with options %}
|
||||
{% embed '@theme/embeds/card.html.twig' with options %}
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
{% block box_tools %}
|
||||
{% if route_create is not null and (teams|length == 0 or team is null) and is_granted('create_team') %}
|
||||
<a class="btn btn-default btn-sm" href="{{ route_create }}" data-toggle="tooltip" data-placement="top" title="{{ 'team.create_default'|trans({}, 'teams') }}"><i class="{{ 'create'|icon }}"></i></a>
|
||||
{{ widgets.card_tool_button('create', {'title': 'team.create_default', 'translation_domain': 'teams', 'url': route_create}) }}
|
||||
{% endif %}
|
||||
{% if route_edit is not null %}
|
||||
<a class="modal-ajax-form open-edit btn btn-default btn-sm" href="{{ route_edit }}" data-toggle="tooltip" data-placement="top" title="{{ 'action.edit'|trans }}"><i class="{{ 'edit'|icon }}"></i></a>
|
||||
{{ widgets.card_tool_button('edit', {'class': 'modal-ajax-form open-edit', 'title': 'action.edit', 'url': route_edit}) }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block box_attributes %}id="team_listing_box"{% endblock %}
|
||||
{% block box_title %}
|
||||
{{ 'permissions'|trans({}, 'actions') }}
|
||||
{% if teams|length > 0 %}<small class="hidden-xs">{{ 'team.visibility_restricted'|trans({}, 'teams') }}</small>{% endif %}
|
||||
{% if teams|length > 0 %}<small class="text-muted d-none d-sm-inline ms-1">{{ 'team.visibility_restricted'|trans({}, 'teams') }}</small>{% endif %}
|
||||
{% endblock %}
|
||||
{% block box_body_class %}no-padding{% endblock %}
|
||||
{% block box_body_class %}{% if teams|length > 0 %}p-0{% endif %}{% endblock %}
|
||||
{% block box_body %}
|
||||
{% if teams|length > 0 %}
|
||||
{{ widgets.team_list(teams) }}
|
||||
{{ widgets.team_list(teams, {name_class: 'w-min'}) }}
|
||||
{% else %}
|
||||
<div class="comment">{{ empty_message|default('team.visibility_global')|trans({}, 'teams') }}</div>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user