Skip to content

Commit

Permalink
[FEATURE] Add domain selection in lead list
Browse files Browse the repository at this point in the history
  • Loading branch information
einpraegsam committed Mar 18, 2024
1 parent 048caf1 commit de1eba4
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions Classes/Controller/LeadController.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public function listAction(FilterDto $filter, string $export = ''): void
'filter' => $filter,
'allVisitors' => $this->visitorRepository->findAllWithIdentifiedFirst($filter),
'luxCategories' => $this->categoryRepository->findAllLuxCategories(),
'domains' => $this->pagevisitsRepository->getAllDomains($filter),
]);
}

Expand Down
3 changes: 3 additions & 0 deletions Classes/Domain/Repository/VisitorRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,9 @@ protected function extendLogicalAndWithFilterConstraintsForCrdate(
$logicalAnd[] = $query->equals('categoryscorings.category', $filter->getCategoryScoring());
$logicalAnd[] = $query->greaterThan('categoryscorings.scoring', 0);
}
if ($filter->getDomain() !== '') {
$logicalAnd[] = $query->equals('pagevisits.domain', $filter->getDomain());
}
return $logicalAnd;
}

Expand Down
23 changes: 23 additions & 0 deletions Resources/Private/Partials/Filter/Lead/List.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,29 @@ <h5><f:translate key="LLL:EXT:lux/Resources/Private/Language/locallang_db.xlf:mo
</lux:condition.isTypo3Eleven>
</div>

<f:if condition="{domains -> f:count()} > 0">
<div class="input-group form-group">
<f:form.select property="domain" class="form-control form-select" id="domain">
<f:form.select.option value="">
<f:translate key="LLL:EXT:lux/Resources/Private/Language/locallang_db.xlf:module.list.filter.firstoption.domain">Domain</f:translate>
</f:form.select.option>
<f:for each="{domains}" as="domain">
<f:form.select.option value="{domain}">{domain}</f:form.select.option>
</f:for>
</f:form.select>
<lux:condition.isTypo3Eleven>
<f:then>
<label class="btn btn-default" for="domain">
<span class="fa fa-globe"></span>
</label>
</f:then>
<f:else>
<label class="input-group-addon fa fa-globe" for="domain"></label>
</f:else>
</lux:condition.isTypo3Eleven>
</div>
</f:if>

<div class="input-group form-group" style="display: block">
<div class="form-check pull-left" style="position: relative;">
<f:form.checkbox
Expand Down

0 comments on commit de1eba4

Please sign in to comment.