mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACA-2314] display "locked by" in search results (#1732)
* display "locked by" in search results * Trigger build
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
.aca-locked-by {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 10px;
|
||||
color: var(--theme-text-color, rgba(0, 0, 0, 0.54));
|
||||
|
||||
.locked_by--icon {
|
||||
@@ -10,6 +9,7 @@
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.locked_by--label,
|
||||
.locked_by--name {
|
||||
font-size: 12px;
|
||||
padding: 0 2px;
|
||||
|
@@ -23,15 +23,15 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Component, Input, OnInit, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';
|
||||
|
||||
import { Component, Input, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';
|
||||
import { NodeEntry } from '@alfresco/js-api';
|
||||
|
||||
@Component({
|
||||
selector: 'aca-locked-by',
|
||||
template: `
|
||||
<mat-icon class="locked_by--icon">lock</mat-icon>
|
||||
<span class="locked_by--name">{{ writeLockedBy() }}</span>
|
||||
<span class="locked_by--label">{{ 'APP.LOCKED_BY' | translate }}</span>
|
||||
<span class="locked_by--name">{{ text }}</span>
|
||||
`,
|
||||
styleUrls: ['./locked-by.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
@@ -40,19 +40,11 @@ import { NodeEntry } from '@alfresco/js-api';
|
||||
class: 'aca-locked-by'
|
||||
}
|
||||
})
|
||||
export class LockedByComponent implements OnInit {
|
||||
export class LockedByComponent {
|
||||
@Input()
|
||||
context: any;
|
||||
|
||||
node: NodeEntry;
|
||||
|
||||
constructor() {}
|
||||
|
||||
ngOnInit() {
|
||||
this.node = this.context.row.node;
|
||||
}
|
||||
|
||||
writeLockedBy() {
|
||||
get text(): string {
|
||||
return (
|
||||
this.node && this.node.entry.properties && this.node.entry.properties['cm:lockOwner'] && this.node.entry.properties['cm:lockOwner'].displayName
|
||||
);
|
||||
|
@@ -27,9 +27,10 @@ import { NgModule } from '@angular/core';
|
||||
import { LockedByComponent } from './locked-by.component';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule, MatIconModule],
|
||||
imports: [CommonModule, MatIconModule, TranslateModule.forChild()],
|
||||
declarations: [LockedByComponent],
|
||||
exports: [LockedByComponent]
|
||||
})
|
||||
|
Reference in New Issue
Block a user