Release 2.0.27 (#4107)

This commit is contained in:
Kevin Papst
2023-07-04 17:01:29 +02:00
committed by GitHub
parent 6a99ad41ca
commit 651f812da8
62 changed files with 506 additions and 427 deletions

View File

@@ -33,8 +33,7 @@ abstract class AbstractTimesheetSubscriber extends AbstractActionsSubscriber
}
if ($this->isGranted('edit', $timesheet)) {
$class = $event->isView('edit') ? '' : 'modal-ajax-form';
$event->addAction('edit', ['title' => 'edit', 'translation_domain' => 'actions', 'url' => $this->path($routeEdit, ['id' => $timesheet->getId()]), 'class' => $class]);
$event->addEdit($this->path($routeEdit, ['id' => $timesheet->getId()]), !$event->isView('edit'));
}
if ($this->isGranted('duplicate', $timesheet)) {

View File

@@ -35,8 +35,7 @@ final class ActivitySubscriber extends AbstractActionsSubscriber
}
if ($this->isGranted('edit', $activity)) {
$class = $event->isView('edit') ? '' : 'modal-ajax-form';
$event->addAction('edit', ['title' => 'edit', 'translation_domain' => 'actions', 'url' => $this->path('admin_activity_edit', ['id' => $activity->getId()]), 'class' => $class]);
$event->addEdit($this->path('admin_activity_edit', ['id' => $activity->getId()]), !$event->isView('edit'));
}
if ($this->isGranted('permissions', $activity)) {

View File

@@ -38,8 +38,7 @@ final class CustomerSubscriber extends AbstractActionsSubscriber
}
if ($this->isGranted('edit', $customer)) {
$class = $event->isView('edit') ? '' : 'modal-ajax-form';
$event->addAction('edit', ['title' => 'edit', 'translation_domain' => 'actions', 'url' => $this->path('admin_customer_edit', ['id' => $customer->getId()]), 'class' => $class]);
$event->addEdit($this->path('admin_customer_edit', ['id' => $customer->getId()]), !$event->isView('edit'));
}
if ($this->isGranted('permissions', $customer)) {

View File

@@ -35,7 +35,7 @@ final class InvoiceSubscriber extends AbstractActionsSubscriber
$allowCustomer = $this->isGranted('access', $invoice->getCustomer());
if ($allowCustomer && $allowCreate) {
$event->addAction('edit', ['url' => $this->path('admin_invoice_edit', ['id' => $invoice->getId()]), 'class' => 'modal-ajax-form']);
$event->addEdit($this->path('admin_invoice_edit', ['id' => $invoice->getId()]));
}
if ($allowCustomer && $allowView) {

View File

@@ -31,7 +31,7 @@ final class InvoiceTemplateSubscriber extends AbstractActionsSubscriber
}
if ($this->isGranted('manage_invoice_template')) {
$event->addAction('edit', ['url' => $this->path('admin_invoice_template_edit', ['id' => $template->getId()]), 'class' => 'modal-ajax-form']);
$event->addEdit($this->path('admin_invoice_template_edit', ['id' => $template->getId()]));
$event->addAction('copy', ['url' => $this->path('admin_invoice_template_copy', ['id' => $template->getId()]), 'class' => 'modal-ajax-form']);
$event->addDelete($this->path('admin_invoice_template_delete', ['id' => $template->getId(), 'csrfToken' => $payload['token']]), false);
}

View File

@@ -38,8 +38,7 @@ final class ProjectSubscriber extends AbstractActionsSubscriber
}
if ($this->isGranted('edit', $project)) {
$class = $event->isView('edit') ? '' : 'modal-ajax-form';
$event->addAction('edit', ['title' => 'edit', 'translation_domain' => 'actions', 'url' => $this->path('admin_project_edit', ['id' => $project->getId()]), 'class' => $class]);
$event->addEdit($this->path('admin_project_edit', ['id' => $project->getId()]), !$event->isView('edit'));
}
if ($this->isGranted('permissions', $project)) {

View File

@@ -42,8 +42,7 @@ final class TagSubscriber extends AbstractActionsSubscriber
}
if ($this->isGranted('manage_tag')) {
$class = ($event->isView('edit') ? '' : 'modal-ajax-form');
$event->addAction('edit', ['url' => $this->path('tags_edit', ['id' => $id]), 'class' => $class]);
$event->addEdit($this->path('tags_edit', ['id' => $id]));
}
if ($this->isGranted('view_other_timesheet')) {

View File

@@ -32,7 +32,7 @@ final class TeamSubscriber extends AbstractActionsSubscriber
if ($this->isGranted('edit', $team)) {
if (!$event->isView('edit')) {
$event->addAction('edit', ['url' => $this->path('admin_team_edit', ['id' => $team->getId()]), 'title' => 'action.edit']);
$event->addEdit($this->path('admin_team_edit', ['id' => $team->getId()]));
}
if ($this->isGranted('create_team')) {