feat: add the number of contacts not tagged (#6761)
Co-authored-by: Alexis Saettler <alexis@saettler.org>
This commit is contained in:
@@ -85,6 +85,8 @@ class ContactsController extends Controller
|
||||
}
|
||||
|
||||
$tagsCount = Tag::contactsCount();
|
||||
$contactsWithoutTagsCount = $contacts->doesntHave('tags')->count();
|
||||
|
||||
$tags = null;
|
||||
$url = null;
|
||||
$count = 1;
|
||||
@@ -134,7 +136,8 @@ class ContactsController extends Controller
|
||||
->withTagsCount($tagsCount)
|
||||
->withUrl($url)
|
||||
->withTagCount($count)
|
||||
->withTagLess($request->input('no_tag') ?? false);
|
||||
->withTagLess($request->input('no_tag') ?? false)
|
||||
->with('contactsWithoutTagsCount', $contactsWithoutTagsCount);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Vendored
+5
-1
@@ -41,7 +41,8 @@
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.number-contacts-per-tag {
|
||||
.number-contacts-per-tag,
|
||||
.number-contacts-without-tag {
|
||||
@if $htmldir == ltr {
|
||||
float: right;
|
||||
} @else {
|
||||
@@ -49,6 +50,9 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.number-contacts-without-tag{
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.list {
|
||||
|
||||
@@ -144,6 +144,7 @@
|
||||
@if ($tagsCount->count() != 0)
|
||||
<li class="f7 mt3">
|
||||
<a href="{{ route('people.index') }}?no_tag=true">{{ trans('people.people_list_untagged') }}</a>
|
||||
<span class="number-contacts-without-tag">{{ trans_choice('people.people_list_contacts_per_tags', $contactsWithoutTagsCount) }}</span>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user