ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 3 replies, has 2 voices, and was last updated by Yevhen Shyshkin Yevhen Shyshkin 1 year, 4 months ago.

  • Creator
    Topic
  • #17198

    mike_m
    Participant

    I want to implement a download link for rtf file in a datagrid.

    datagrid.yml:

    But if I clicked on the download-icon the framework sends an ajax request is send to the server and the loading animation shows up. The content of the file is rendered in the page directly.
    How is the correct configuration for downloads?

    Thanks in advance.

    Regrads Mike

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #17212
    Yevhen Shyshkin
    Yevhen Shyshkin
    Oro Core

    Hello, Mike.

    This is really odd, but look’s like we don’t have appropriate action to download files via grid action. We definitely have to add such action type.

    But for now there are several solutions:

    1) you can create such action yourself based on navigation action (we’ll be happy to receive pull request with this functionality)

    2) you can just create custom twig template for one of the columns (or create new column) and render there link to your file, just don’t forget to add class “no-hash” to it to disable regular navigation.

    #17689

    mike_m
    Participant

    Hello,

    I am sorry to answer so late, but I was in the hospital.

    I implemented solution 1. I do not know how to pull this into git.
    Here are my source files.

    DownloadAction.php

    service.yml

    download-action.js

    datagrid.yml

    #17690
    Yevhen Shyshkin
    Yevhen Shyshkin
    Oro Core

    Thank you!
    We will, probably, use this code in platform.

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.