Document preview in Edit Task page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2019 08:02 AM
Hello,
As i am filling information about the attached document I would like to simultaneously preview it. Especially because the whole right side of my browser page in totally empty.
Is there a simple way to achieve it?
I know it is possible to obtain a URL to the content (but how?) so i could just insert it to the HTML iframe tag and then modify edit task page Freemarker Template (but where is it?) by creating second column (which will fill the right side of the Edit-Task page).
I am using Alfresco 6.1
I thing it should be very common thing to do but i did not find any simple, complimentary & up-to-date guildlines.
Regards,
Mike
Alfresco Developer
- Labels:
-
Alfresco Content Services
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2019 02:54 AM
Hi,
To add document ‘s preview and its actions in edit task you have to edit workflow-details page .ftl file which is OOTB available at
share/src/main/amp/config/alfresco/templates/org/alfresco/workflow-details.ftl
- First import ftl, js, css files in template header which are available in actual preview of documents.
- In body part of template add like this,
<#if page.url.args.nodeRef??>
<br>
<hr/>
<br>
<div>
<div class="yui-gc">
<div class="yui-u first">
<@region id="metadata-web-preview" scope="template" />
<@region id="metadata-comments" scope="template"/>
</div>
<div class="yui-u">
<@region id="metadata-document-actions" scope="template" />
<@region id="metadata-document-links" scope="template" />
<@region id="metadata-document-metadata" scope="template" />
<@region id="metadata-document-workflow" scope="template" />
<@region id="metadata-document-versions" scope="template" />
</div>
</div>
<@region id="metadata-html-upload" scope="template"/>
<@region id="metadata-flash-upload" scope="template"/>
<@region id="metadata-file-upload" scope="template"/>
<@region id="metadata-dnd-upload" scope="template"/>
</div>
</#if>
- customize my-task.js file to pass noderef of attached document during opening task edit page at
share/src/main/amp/web/components/dashlets/my-tasks.js
http://localhost:8081/share/page/task-edit?taskId=XXXX&nodeRef=workspace://SpacesStore/514fe37b-6032-4220-9e07-cacbc2f895e0
Thanks,
Prachi Shah
