Release 2.0.27 (#4107)
This commit is contained in:
@@ -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)) {
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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')) {
|
||||
|
||||
@@ -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')) {
|
||||
|
||||
Reference in New Issue
Block a user