Back to Paperless Ngx

Global Search.Component

src-ui/src/app/components/app-frame/global-search/global-search.component.html

3.0.32.4 KB
Original Source

@if (loading()) {

}

@if (query()) { @if (useAdvancedForFullSearch) { Advanced search } @else { Search } }

{{item[nameProp]}} @if (date) { {{date | customDate}} }

@if (type === DataType.Document) { Open } @else if (type === DataType.SavedView) { Open } @else if (type === DataType.Workflow || type === DataType.CustomField || type === DataType.Group || type === DataType.User || type === DataType.MailAccount || type === DataType.MailRule) { Open } @else { Filter documents } @if (type !== DataType.SavedView && type !== DataType.Workflow && type !== DataType.CustomField && type !== DataType.Group && type !== DataType.User && type !== DataType.MailAccount && type !== DataType.MailRule) { @if (type === DataType.Document) { Download } @else { Open } }

@if (searchResults()?.total === 0) {

No results

} @else { @if (searchResults()?.documents.length) {

Documents

@for (document of searchResults().documents; track document.id) { } } @if (searchResults()?.saved_views.length) {

Saved Views

@for (saved_view of searchResults().saved_views; track saved_view.id) { } } @if (searchResults()?.tags.length) {

Tags

@for (tag of searchResults().tags; track tag.id) { } } @if (searchResults()?.correspondents.length) {

Correspondents

@for (correspondent of searchResults().correspondents; track correspondent.id) { } } @if (searchResults()?.document_types.length) {

Document types

@for (documentType of searchResults().document_types; track documentType.id) { } } @if (searchResults()?.storage_paths.length) {

Storage paths

@for (storagePath of searchResults().storage_paths; track storagePath.id) { } } @if (searchResults()?.users.length) {

Users

@for (user of searchResults().users; track user.id) { } } @if (searchResults()?.groups.length) {

Groups

@for (group of searchResults().groups; track group.id) { } } @if (searchResults()?.custom_fields.length) {

Custom fields

@for (customField of searchResults().custom_fields; track customField.id) { } } @if (searchResults()?.mail_accounts.length) {

Mail accounts

@for (mailAccount of searchResults().mail_accounts; track mailAccount.id) { } } @if (searchResults()?.mail_rules.length) {

Mail rules

@for (mailRule of searchResults().mail_rules; track mailRule.id) { } } @if (searchResults()?.workflows.length) {

Workflows

@for (workflow of searchResults().workflows; track workflow.id) { } } }