This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
wmanager:dummy_attachment [2018/04/26 12:39] raghav naik |
wmanager:dummy_attachment [2018/04/26 13:15] (current) Gianluca Pelliccioli |
||
---|---|---|---|
Line 1: | Line 1: | ||
======Attachment Directive====== | ======Attachment Directive====== | ||
+ | |||
+ | |||
+ | ==== Summary ==== | ||
+ | ^ Objective | Handle attachments and attachments types | | ||
+ | ^ Name | attachments | | ||
+ | ^ Script | / | ||
+ | ^ Tables | setup_attachments; | ||
+ | ^ Configurations | $upload_dir | | ||
+ | ^ Dependency | nothing in particular | | ||
+ | |||
+ | |||
+ | |||
+ | ==== What are we talking about ==== | ||
+ | |||
+ | * Attachment is the feature that allows the user to upload attachmnts to the system after having selected a certain attachment type and description; | ||
+ | * We handle a dedicated admin page to conifugure the attachment types; | ||
+ | * Attachments can be referred to any entity (activities, | ||
+ | * To do so we have a simple html tag that can be included in the view to show the attachment form; | ||
+ | * All attachments are saved in local folder after $upload_dir; | ||
+ | * All attachment metadata are saved in the attachments table where we have customer_id (compulsory), | ||
+ | |||
+ | |||
+ | ==== How does is work ==== | ||
+ | |||
+ | |||
Attachment in WManager can be handled through a simple html tag that allows you to add attachments sections to yours web pages where you can add,delete or download attachments. It is handled through a angular directive that be used all around the application. The syntax to use it is. | Attachment in WManager can be handled through a simple html tag that allows you to add attachments sections to yours web pages where you can add,delete or download attachments. It is handled through a angular directive that be used all around the application. The syntax to use it is. | ||
Line 6: | Line 31: | ||
<div attachment attachment-refid=' | <div attachment attachment-refid=' | ||
</ | </ | ||
+ | |||
+ | **What are ambits? | ||
+ | Ambits are nothing but the entity to be which attachment will be added for eg. Activity, | ||
+ | |||
+ | |||
+ | ^Parameter List | | | ||
+ | ^attachment-refkey: | ||
+ | ^attachment-refid: | ||
+ | ^custid: | ||
+ | ^beid: | ||
The tables in which the attachments will be stored is **attachment**. And the path in which the attachment will be stored is in the config value **UPLOAD_DIR**. Attachment type is taken from **list_ambits** table. If the **setup_attachment** table has more then one ambits it will show types in the dropdown list otherwise attach type will be taken from the hidden field. | The tables in which the attachments will be stored is **attachment**. And the path in which the attachment will be stored is in the config value **UPLOAD_DIR**. Attachment type is taken from **list_ambits** table. If the **setup_attachment** table has more then one ambits it will show types in the dropdown list otherwise attach type will be taken from the hidden field. | ||
Line 17: | Line 52: | ||
^Attachment Download function: | ^Attachment Download function: | ||
+ | |||
+ | The library **Attachment_with_ref** will be used by this controller to perform all the upload operations. | ||