Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1603: Fix - Download button visibility with url and view only perms #1606

Merged
merged 2 commits into from
Nov 9, 2023

Conversation

dsuren1
Copy link

@dsuren1 dsuren1 commented Oct 30, 2023

Description

This PR fixes the download button visibility with download_urls present and with view only perms

Issue

@dsuren1 dsuren1 added bug Something isn't working master labels Oct 30, 2023
@dsuren1 dsuren1 self-assigned this Oct 30, 2023
@dsuren1 dsuren1 linked an issue Oct 30, 2023 that may be closed by this pull request
giohappy
giohappy previously approved these changes Oct 30, 2023
if ((isEmpty(_resource?.download_urls) && !_resource?.perms?.includes('download_resourcebase')) || (!isButton && isNotAjaxSafe)) {
if ((isEmpty(_resource?.download_urls) && !_resource?.perms?.includes('download_resourcebase'))
|| !_resource?.perms?.includes('download_resourcebase')
|| (!isButton && isNotAjaxSafe)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we showing a different icon in case of isNotAjaxSafe @dsuren1? I think it should still be shown as download even if it's not handled over ajax.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@giohappy Yes, currently image (AJAX safe) and image (AJAX not safe)

I think it should still be shown as download even if it's not handled over ajax.

Sure but should we also show image when sourceType: REMOTE?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure but should we also show image when sourceType: REMOTE?

No, image should be used for REMOTE (only)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@giohappy giohappy self-requested a review November 6, 2023 14:57
@giohappy giohappy dismissed their stale review November 6, 2023 14:58

waiting for an answer to my comment

@allyoucanmap allyoucanmap merged commit a3a1848 into GeoNode:master Nov 9, 2023
1 check passed
giohappy added a commit that referenced this pull request Nov 13, 2023
* #1596 - Catalog page path configuration (#1597)

* [create-pull-request] automated change (#1599)

Co-authored-by: allyoucanmap <allyoucanmap@users.noreply.github.com>

* Fix ajax safe download button render (#1601)

* #1598: Facet fixes on different filter type (#1600)

* [create-pull-request] automated change (#1602)

Co-authored-by: allyoucanmap <allyoucanmap@users.noreply.github.com>

* #1594 - Enhance filter panel and accordion with configurable options (#1595)

* [create-pull-request] automated change (#1605)

Co-authored-by: allyoucanmap <allyoucanmap@users.noreply.github.com>

* #1607: Tabs component enhancement (#1608)

* [create-pull-request] automated change (#1609)

Co-authored-by: allyoucanmap <allyoucanmap@users.noreply.github.com>

* #1603: Fix - Download button visibility with url and view only perms (#1606)

* [create-pull-request] automated change (#1610)

Co-authored-by: allyoucanmap <allyoucanmap@users.noreply.github.com>

* Fixes #1612 - Implement Django admin management for MS Search services (#1613)

* Implement django admin management search services

* Implement django admin management search services

* Implement django admin management search services

* Implement django admin management search services

* Implement django admin management search services

* Implement django admin management search services

* Fix typo

* Improvements to model help texts

* fixed cache name and key

* Improvements to hel texts

---------

Co-authored-by: Giovanni Allegri <giovanni.allegri@gmail.com>
Co-authored-by: G. Allegri <giohappy@gmail.com>

---------

Co-authored-by: Suren <dsuren1@gmail.com>
Co-authored-by: geosolutions-pr-generator[bot] <87376048+geosolutions-pr-generator[bot]@users.noreply.github.com>
Co-authored-by: allyoucanmap <allyoucanmap@users.noreply.github.com>
Co-authored-by: mattiagiupponi <51856725+mattiagiupponi@users.noreply.github.com>
@giohappy giohappy added this to the 4.2.0 milestone Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

On subsites with view perms only, the download button is visible
3 participants