mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-ADF-2528] share directive (#3102)
* share file directive * share link phase 2 * share dialog * share dialog test * more documentation * add more meaningfully specification * Add description in the dialog
This commit is contained in:
@@ -42,6 +42,7 @@ for more information about installing and using the source code.
|
||||
| [Folder create directive](folder-create.directive.md) | Allows folders to be created. | [Source](../../lib/content-services/folder-directive/folder-create.directive.ts) |
|
||||
| [Folder edit directive](folder-edit.directive.md) | Allows folders to be edited. | [Source](../../lib/content-services/folder-directive/folder-edit.directive.ts) |
|
||||
| [File draggable directive](file-draggable.directive.md) | Provide drag-and-drop features for an element such as a `div`. | [Source](../../lib/content-services/upload/directives/file-draggable.directive.ts) |
|
||||
| [Share Directive](share.directive.md) | Proide a pop up that generat a public linlk to share a file | [Source](../../lib/content-services/upload/directives/share.directive.ts) |
|
||||
|
||||
## Models
|
||||
|
||||
|
49
docs/content-services/share.directive.md
Normal file
49
docs/content-services/share.directive.md
Normal file
@@ -0,0 +1,49 @@
|
||||
---
|
||||
Added: v2.3.0
|
||||
Status: Active
|
||||
---
|
||||
# Node Public file Share Directive
|
||||
|
||||
Create and manage public shared links for files
|
||||
|
||||

|
||||
|
||||
This dialog will generate a link that will be formed as "baseShareUrl + sharedId".
|
||||
For example if you set the input parameter [baseShareUrl]="http://localhos:8080/myrouteForShareFile/",
|
||||
the directive will ask to the Content service to generate a sharedId for the file. This will end up with a url link like :
|
||||
|
||||
http://localhos:8080/myrouteForShareFile/NEW_GENERATED_SHAREID
|
||||
|
||||
After you will need to implement in your app a logic that throught the router get the NEW_GENERATED_SHAREID and pass it to the ***adf-viewer***
|
||||
|
||||
```html
|
||||
<adf-viewer
|
||||
[sharedLinkId]="NEW_GENERATED_SHAREID"
|
||||
[allowGoBack]="false">
|
||||
</adf-viewer>
|
||||
```
|
||||
|
||||
## Basic Usage
|
||||
|
||||
```html
|
||||
<adf-toolbar>
|
||||
<button mat-icon-button
|
||||
[baseShareUrl]="http://localhos:8080/myrouteForShareFile/"
|
||||
[adf-share]="documentList.selection[0]">
|
||||
<mat-icon>share</mat-icon>
|
||||
</button>
|
||||
</adf-toolbar>
|
||||
|
||||
<adf-document-list #documentList ...>
|
||||
...
|
||||
</adf-document-list>
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| node | `MinimalNodeEntity` | | Nodes to share. |
|
||||
| baseShareUrl | `string` | | baseShareUrl to add as prefix to the generated link |
|
||||
|
||||
|
BIN
docs/docassets/images/share-directive.png
Normal file
BIN
docs/docassets/images/share-directive.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 64 KiB |
Reference in New Issue
Block a user