Adding the ability to open in the browser instead of downloading

Comments

mahseri created an issue. See original summary.

mahseri’s picture

Status: Active » Needs review
StatusFileSize
new2.71 KB
new22.89 KB
weseze’s picture

Why do we need a token replacement here:?
$openinbrowser = \Drupal::token()->replace($config->get('openinbrowser'), [ $entity->getEntityTypeId() => $entity ], ['langcode' => $langcode]);

I would also like to see an update hook to set the default value.

weseze’s picture

Status: Needs review » Needs work
Pooja Ganjage’s picture

StatusFileSize
new2.77 KB

Hi,

I am creating a patch for including an update hook for set default value.

Please review the patch.

Thanks.

Pooja Ganjage’s picture

Status: Needs work » Needs review
Pooja Ganjage’s picture

StatusFileSize
new3.19 KB

Uploaded new patch.

weseze’s picture

Status: Needs review » Needs work

Question form #3 remains unanswered. I think it is incorrect. Either it needs to be corrected, or it needs some documentation.

nicodh’s picture

Status: Needs work » Needs review
StatusFileSize
new2.48 KB

Hi
I rerolled a patch, without token replacement, and handling default setting or query parameter to open pdf directly in browser.

weseze’s picture

Status: Needs review » Reviewed & tested by the community

Looks good, just some small nitpicks. Will fix those myself.

  • weseze committed 5de041ee on 2.x
    Issue #3176870 by Pooja Ganjage, mahseri, rkcreation, weseze: Adding the...
weseze’s picture

Status: Reviewed & tested by the community » Fixed

Comitted and released in 2.0.4.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.