Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Fix gallery button hidden in folders without create permission #401

Conversation

danxuliu
Copy link
Member

This pull request ensures that the button to switch to the Gallery app is shown in read-only folders.

This is necessary for the fix introduced in nextcloud/server#8589, and it requires nextcloud/server#8588.

In the "Files" app the actions that require the create permission (those
marked as "creatable") are hidden in folders that do not have that
permission. However, as there is only one ".actions" element inside
"#controls" and that ".actions" element also has the "creatable" CSS
class appending the gallery button to it meant that the gallery button
was hidden in folders without create permissions. Now the gallery button
is appended to the "#controls" element instead, and thus it is no longer
affected by the permissions of the folder.

As the button is now appended to the "#controls" element its top margin
was increased to align it with the rest of the buttons (as the
".actions" element uses a padding of 5px), and as the button appears in
the top right corner of the contents its right margin was set to the
same value as the top margin to "frame" the button.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@danxuliu danxuliu added backport-request Pending backport by the backport-bot 3. to review Waiting for reviews labels Feb 28, 2018
@danxuliu danxuliu added this to the Nextcloud 14 milestone Feb 28, 2018
Copy link
Member

@skjnldsv skjnldsv left a comment

Choose a reason for hiding this comment

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

Ok for me

@codecov
Copy link

codecov bot commented Feb 28, 2018

Codecov Report

Merging #401 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #401   +/-   ##
=========================================
  Coverage     82.55%   82.55%           
  Complexity      360      360           
=========================================
  Files            38       38           
  Lines          1313     1313           
=========================================
  Hits           1084     1084           
  Misses          229      229

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 105493f...df92586. Read the comment docs.

@danxuliu danxuliu merged commit a4b0d2a into master Mar 1, 2018
@danxuliu danxuliu deleted the fix-gallery-button-hidden-in-folders-without-create-permission branch March 1, 2018 01:44
@danxuliu danxuliu removed the backport-request Pending backport by the backport-bot label Mar 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants