feat: add the number of contacts not tagged (#6761)

Co-authored-by: Alexis Saettler <alexis@saettler.org>
This commit is contained in:
Anas Ouda
2023-11-01 11:26:52 +02:00
committed by GitHub
parent 7f72437dfc
commit 3ecf57be1d
3 changed files with 10 additions and 2 deletions
+4 -1
View File
@@ -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);
}
/**
+5 -1
View File
@@ -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 {
+1
View File
@@ -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