Like and comment feature

cancel
Showing results for 
Search instead for 
Did you mean: 
rsocorro
Active Member II

Like and comment feature

Can I recreate the like and comment to folder and file feature in share to adf?

5 Replies
rsocorro
Active Member II

Re: Like and comment feature

Thanks, already implemented that with my file feature, now I'm trying to implement that in my folder feature, wondering on how to add the like and comment icon below the folders

eugenio_romano
Alfresco Employee

Re: Like and comment feature

you need to add a custom data column in the document list as we have done in this example here:

alfresco-ng2-components/files.component.html at development · Alfresco/alfresco-ng2-components · Git... 

You can find more details about custom data column here:

https://github.com/Alfresco/alfresco-ng2-components/blob/development/docs/content-services/document-...

rsocorro
Active Member II

Re: Like and comment feature

Just want to ask regarding the "lock document" feature, I followed the one that you gave me, now there's a Lock column in my documentLibrary, but when I tried using it to lock a document, the lock dialog appears for a second and before I can choose to lock it in it goes straight to open the chosen document.

in my documentlist.component.html,

<data-column title="Lock" key="id">
    <ng-template let-entry="$implicit">
        <button mat-icon-button [adf-node-lock]="entry.row.node.entry" class="adf-lock-button">
            <mat-icon *ngIf="entry.row.getValue('isLocked')">lock</mat-icon>
            <mat-icon *ngIf="!entry.row.getValue('isLocked')">lock_open</mat-icon>
         </button>
      </ng-template>
</data-column>

in my documentlist.component.ts,

includeFields = 'isLocked';

and another question about having a like and comment icon below the folders, I have no idea on how to do it, is it to be implemented in the data column itself? this is what I have done so far.

in my documentlist.component.html,

<data-column title="Name" key="name" class="full-width ellipsis-cell">
    <mat-icon>like</mat-icon>
    <mat-icon>comment</mat-icon>
</data-column>

eugenio_romano
Alfresco Employee

Re: Like and comment feature

I guess you need to switch from single click to double click your document list otherwise it will perform the same operation for display and lock:

alfresco-ng2-components/document-list.component.md at development · Alfresco/alfresco-ng2-components... 

I guess anyway is a better pattern add this operation in the action menu.