Commit 2ac6c91e authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

Système de filtre sur les champs libres en place (Texte et Liste simple)

parent 8433671c
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -153,6 +153,7 @@ return array(
                    'controller' => 'Activity',
                    'action' => [
                        'advancedsearch2',
                        'reindex',
                        'show',
                        'show2',
                        'edit',
+7 −0
Original line number Diff line number Diff line
@@ -1001,6 +1001,13 @@ contract:
        defaults:
          action: myRole

    reindex:
      type: segment
      options:
        route: /reindex/:id
        defaults:
          action: reindex

    process-document-signed-send:
      type: segment
      options:
+22 −0
Original line number Diff line number Diff line
@@ -1818,6 +1818,28 @@ class ProjectGrantController extends AbstractOscarController implements UseNotif
        ];
    }

    /**
     * Force la réindexation d'un activité
     * @return void
     */
    public function reindexAction()
    {
        $this->getOscarUserContextService()->check(Privileges::MAINTENANCE_MENU_ADMIN);
        try {
            $id = $this->params()->fromRoute('id');
            $activity = $this->getActivityFromRoute();
            $this->getProjectGrantService()->getGearmanJobLauncherService()->triggerUpdateSearchIndexActivity($activity);
            if( $this->isAjax() ){
                return $this->getResponseOk("réindexation déclenchée");
            }
            $this->redirect()->toRoute('contract/show', ['id' => $id]);
        } catch (Exception $e){
            $msg = "Impossible de réindexer : " . $e->getMessage();
            $this->getLoggerService()->error($msg);
            throw $e;
        }
    }

    /**
     * @throws NotFoundExceptionInterface
     * @throws OscarException
+5 −0
Original line number Diff line number Diff line
@@ -90,6 +90,11 @@ class ActivityFreeField
        return $this->id;
    }

    public function getKey() :string
    {
       return sprintf('ff_%s', $this->getId());
    }

    public function getLabel(): ?string
    {
        return $this->label;
+5 −1
Original line number Diff line number Diff line
@@ -282,6 +282,9 @@ class ProjectGrantApiService implements
                                Privileges::ACTIVITY_CHANGE_PROJECT,
                                $activity
                            ),
                        'reindex' => !$locked && $oscarUserContext->hasPrivileges(
                                Privileges::MAINTENANCE_MENU_ADMIN
                            ),
                    ];
                    break;

@@ -605,7 +608,8 @@ class ProjectGrantApiService implements
                'delete' => $urlPlugin->fromRoute('contract/delete', ['id' => $activity->getId()]),
                'change_project' => $urlPlugin->fromRoute('contract/moveToProject', ['id' => $activity->getId()]),
                'new_project' => $urlPlugin->fromRoute('project/new') . '?ids=' . $activity->getId(),
                'pcru' => $urlPlugin->fromRoute('contract/pcru-informations', ['id' => $activity->getId()])
                'pcru' => $urlPlugin->fromRoute('contract/pcru-informations', ['id' => $activity->getId()]),
                'reindex' => $urlPlugin->fromRoute('contract/reindex', ['id' => $activity->getId()])
            ]
        ];

Loading