2024-03-05 22:40:52 -08:00
< div class = "card mb-3 shadow-sm bg-light" [ class . card-selected ] = " selected " [ class . document-card ] = " selectable " [ class . popover-hidden ] = " popoverHidden " ( mouseleave ) = " mouseLeaveCard ( ) " >
2022-02-19 21:38:07 -08:00
< div class = "row g-0" >
2023-03-28 22:10:12 -07:00
< div class = "col-md-2 doc-img-background rounded-start" [ class . doc-img-background-selected ] = " selected " ( click ) = " this . toggleSelected . emit ( $ event ) " ( dblclick ) = " dblClickDocument . emit ( ) " >
2022-02-20 01:21:30 +01:00
< img [ src ] = " getThumbUrl ( ) " class = "card-img doc-img border-end rounded-start" [ class . inverted ] = " getIsThumbInverted ( ) " >
2020-12-22 02:43:18 +01:00
2022-02-19 22:57:04 -08:00
< div class = "border-end border-bottom bg-light document-card-check" >
< div class = "form-check" >
< input type = "checkbox" class = "form-check-input" id = "smallCardCheck{{document.id}}" [ checked ] = " selected " ( click ) = " this . toggleSelected . emit ( $ event ) " >
< label class = "form-check-label" for = "smallCardCheck{{document.id}}" > < / label >
2020-12-22 02:43:18 +01:00
< / div >
< / div >
2020-10-27 01:10:18 +01:00
< / div >
< div class = "col" >
2024-03-05 22:40:52 -08:00
< div class = "card-body" >
2020-11-02 12:44:06 +01:00
< div class = "d-flex justify-content-between align-items-center" >
2020-12-11 15:20:47 -08:00
< h5 class = "card-title" >
2024-04-26 06:41:12 -07:00
@if (displayFields.includes(DisplayField.CORRESPONDENT) & & document.correspondent) {
2023-12-19 15:02:05 -08:00
@if (clickCorrespondent.observers.length ) {
< a title = "Filter by correspondent" i18n-title ( click ) = " clickCorrespondent . emit ( document . correspondent ) ; $ event . stopPropagation ( ) " class = "fw-bold btn-link" > {{(document.correspondent$ | async)?.name}}< / a >
} @else {
{{(document.correspondent$ | async)?.name}}
}
:
}
2024-04-26 06:41:12 -07:00
@if (displayFields.includes(DisplayField.TITLE)) {
{{document.title | documentTitle}}
}
@if (displayFields.includes(DisplayField.TAGS)) {
@for (t of document.tags$ | async; track t) {
< pngx-tag [ tag ] = " t " linkTitle = "Filter by tag" i18n-linkTitle class = "ms-1" ( click ) = " clickTag . emit ( t . id ) ; $ event . stopPropagation ( ) " [ clickable ] = " clickTag . observers . length " > < / pngx-tag >
}
2023-12-19 15:02:05 -08:00
}
2020-11-28 21:28:07 +01:00
< / h5 >
2020-11-02 12:44:06 +01:00
< / div >
2020-10-27 01:10:18 +01:00
< p class = "card-text" >
2024-05-14 21:38:10 -07:00
@if (document.__search_hit__ & & document.__search_hit__.highlights) {
2023-12-19 15:02:05 -08:00
< span [ innerHtml ] = " document . __search_hit__ . highlights " > < / span >
}
@for (highlight of searchNoteHighlights; track highlight) {
< span class = "d-block" >
2024-01-17 16:27:38 -08:00
< i-bs name = "chat-left-text" > < / i-bs >
2023-12-19 15:02:05 -08:00
< span [ innerHtml ] = " highlight " > < / span >
< / span >
}
2024-04-26 06:41:12 -07:00
@if (!document.__search_hit__?.score) {
2023-12-19 15:02:05 -08:00
< span class = "result-content" > {{contentTrimmed}}< / span >
}
2020-10-27 01:10:18 +01:00
< / p >
2021-01-09 19:52:31 -08:00
< div class = "d-flex flex-column flex-md-row align-items-md-center" >
2020-10-27 01:10:18 +01:00
< div class = "btn-group" >
2021-03-17 22:25:22 +01:00
< a class = "btn btn-sm btn-outline-secondary" ( click ) = " clickMoreLike . emit ( ) " >
2024-03-05 22:40:52 -08:00
< i-bs name = "diagram-3" > < / i-bs > < span class = "d-none d-md-inline" i18n > More like this< / span >
< / a >
< a routerLink = "/documents/{{document.id}}" class = "btn btn-sm btn-outline-secondary" * pngxIfPermissions = "{ action: PermissionAction.Change, type: PermissionType.Document }" >
< i-bs name = "pencil" > < / i-bs > < span class = "d-none d-md-inline" i18n > Edit< / span >
< / a >
< a class = "btn btn-sm btn-outline-secondary" target = "_blank" [ href ] = " previewUrl "
[ngbPopover]="previewContent" [popoverTitle]="document.title | documentTitle"
autoClose="true" popoverClass="shadow popover-preview" (mouseenter)="mouseEnterPreview()" (mouseleave)="mouseLeavePreview()" #popover="ngbPopover">
< i-bs name = "eye" > < / i-bs > < span class = "d-none d-md-inline" i18n > View< / span >
< / a >
< ng-template # previewContent >
< pngx-preview-popup [ document ] = " document " > < / pngx-preview-popup >
< / ng-template >
< a class = "btn btn-sm btn-outline-secondary" [ href ] = " getDownloadUrl ( ) " >
< i-bs name = "download" > < / i-bs > < span class = "d-none d-md-inline" i18n > Download< / span >
2023-12-19 15:02:05 -08:00
< / a >
2024-03-05 22:40:52 -08:00
< / div >
2023-03-16 00:42:24 -07:00
2024-03-05 22:40:52 -08:00
< div class = "list-group list-group-horizontal border-0 card-info ms-md-auto mt-2 mt-md-0" >
2024-04-26 06:41:12 -07:00
@if (displayFields.includes(DisplayField.NOTES) & & notesEnabled & & document.notes.length) {
2024-03-05 22:40:52 -08:00
< button routerLink = "/documents/{{document.id}}/notes" class = "list-group-item btn btn-sm bg-light text-dark p-1 border-0 me-2 d-flex align-items-center" title = "View notes" i18n-title >
2024-05-29 00:07:32 -07:00
< i-bs width = ".9em" height = ".9em" class = "me-2 text-muted" name = "chat-left-text" > < / i-bs > < small > {{document.notes.length}} Notes< / small >
2024-03-05 22:40:52 -08:00
< / button >
}
2024-04-26 06:41:12 -07:00
@if (displayFields.includes(DisplayField.DOCUMENT_TYPE) & & document.document_type) {
2024-03-05 22:40:52 -08:00
< button type = "button" class = "list-group-item btn btn-sm bg-light text-dark p-1 border-0 me-2 d-flex align-items-center" title = "Filter by document type" i18n-title
(click)="clickDocumentType.emit(document.document_type);$event.stopPropagation()">
< i-bs width = ".9em" height = ".9em" class = "me-2 text-muted" name = "file-earmark" > < / i-bs > < small > {{(document.document_type$ | async)?.name}}< / small >
< / button >
}
2024-04-26 06:41:12 -07:00
@if (displayFields.includes(DisplayField.STORAGE_PATH) & & document.storage_path) {
2024-03-05 22:40:52 -08:00
< button type = "button" class = "list-group-item btn btn-sm bg-light text-dark p-1 border-0 me-2 d-flex align-items-center" title = "Filter by storage path" i18n-title
(click)="clickStoragePath.emit(document.storage_path);$event.stopPropagation()">
< i-bs width = ".9em" height = ".9em" class = "me-2 text-muted" name = "archive" > < / i-bs > < small > {{(document.storage_path$ | async)?.name}}< / small >
< / button >
}
2024-04-26 06:41:12 -07:00
@if (displayFields.includes(DisplayField.ASN) & & document.archive_serial_number | isNumber) {
2024-03-05 22:40:52 -08:00
< div class = "list-group-item me-2 bg-light text-dark p-1 border-0 d-flex align-items-center" >
< i-bs width = ".9em" height = ".9em" class = "me-2 text-muted" name = "upc-scan" > < / i-bs > < small > #{{document.archive_serial_number}}< / small >
2023-12-19 15:02:05 -08:00
< / div >
2024-03-05 22:40:52 -08:00
}
2024-04-26 06:41:12 -07:00
@if (displayFields.includes(DisplayField.CREATED) || displayFields.includes(DisplayField.ADDED)) {
< ng-template # dateTooltip >
< div class = "d-flex flex-column text-light" >
2024-05-17 10:20:40 -07:00
< span i18n > Created: {{ document.created_date | customDate }}< / span >
2024-04-26 06:41:12 -07:00
< span i18n > Added: {{ document.added | customDate }}< / span >
< span i18n > Modified: {{ document.modified | customDate }}< / span >
< / div >
< / ng-template >
@if (displayFields.includes(DisplayField.CREATED)) {
< div class = "list-group-item bg-light text-dark p-1 border-0 d-flex align-items-center" [ ngbTooltip ] = " dateTooltip " >
< i-bs width = ".9em" height = ".9em" class = "me-2 text-muted" name = "calendar-event" > < / i-bs > < small > {{document.created_date | customDate:'mediumDate'}}< / small >
< / div >
}
@if (displayFields.includes(DisplayField.ADDED)) {
< div class = "list-group-item bg-light text-dark p-1 border-0 d-flex align-items-center" [ ngbTooltip ] = " dateTooltip " >
< i-bs width = ".9em" height = ".9em" class = "me-2 text-muted" name = "calendar-event" > < / i-bs > < small > {{document.added | customDate:'mediumDate'}}< / small >
< / div >
}
}
@if (displayFields.includes(DisplayField.OWNER) & & document.owner & & document.owner !== settingsService.currentUser.id) {
2024-03-05 22:40:52 -08:00
< div class = "list-group-item bg-light text-dark p-1 border-0 d-flex align-items-center" >
< i-bs width = ".9em" height = ".9em" class = "me-2 text-muted" name = "person-fill-lock" > < / i-bs > < small > {{document.owner | username}}< / small >
< / div >
}
2024-04-26 06:41:12 -07:00
@if (displayFields.includes(DisplayField.SHARED) & & document.is_shared_by_requester) {
2024-03-05 22:40:52 -08:00
< div class = "list-group-item bg-light text-dark p-1 border-0 d-flex align-items-center" >
< i-bs width = ".9em" height = ".9em" class = "me-2 text-muted" name = "people-fill" > < / i-bs > < small i18n > Shared< / small >
< / div >
}
@if (document.__search_hit__?.score) {
< div class = "list-group-item bg-light text-dark border-0 d-flex p-0 ps-4 search-score" >
< small class = "me-2 text-muted" i18n > Score:< / small >
< ngb-progressbar [ type ] = " searchScoreClass " [ value ] = " document . __search_hit__ . score " class = "search-score-bar mx-2 mt-1" [ max ] = " 1 " > < / ngb-progressbar >
< / div >
}
2024-07-09 13:06:06 -07:00
@for (field of document.custom_fields; track field.field) {
2024-04-26 06:41:12 -07:00
@if (displayFields.includes(DisplayField.CUSTOM_FIELD + field.field)) {
< div class = "list-group-item bg-light text-dark p-1 border-0 d-flex align-items-center" >
< i-bs width = ".9em" height = ".9em" class = "me-2 text-muted" name = "ui-radios" > < / i-bs >
< small >
2024-05-07 11:09:15 -07:00
< pngx-custom-field-display [ document ] = " document " [ fieldId ] = " field . field " showNameIfEmpty = "true" > < / pngx-custom-field-display >
2024-04-26 06:41:12 -07:00
< / small >
< / div >
}
}
2021-04-03 21:50:05 +02:00
< / div >
2021-01-09 19:52:31 -08:00
< / div >
2020-10-27 01:10:18 +01:00
< / div >
2024-03-05 22:40:52 -08:00
< / div >
< / div >
< / div >