When the folder is empty, the link to "Download as zip file" should not show

Bug #1298144 reported by Son Nguyen
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Low
Marcelo Ortega

Bug Description

Version: master

The link to "Download folder content as a zip file" should not show if the folder is empty

Tags: bite-sized
Revision history for this message
Robert Lyon (robertl-9) wrote :

This would all depend on whether all subfolders below this folder are also empty as well

Changed in mahara:
status: New → Confirmed
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/4115

Changed in mahara:
assignee: nobody → Marcelo Ortega (marcetega)
status: Confirmed → Fix Committed
assignee: Marcelo Ortega (marcetega) → nobody
Revision history for this message
Marcelo Ortega (marcetega) wrote :

The logic to control the print of the link was all implemented on the view layer. As the link to the parent folder is listed as another row on the files list, the conditions for printing the link are: -there are two or more rows on the list OR -theres only one row on the list, but it is not a link to the parent folder.
With this solution subfolders are considered a content even if they are empty, so the case of downloading the zip of a folder full of subfolders but all of them empty is still posible.

Changed in mahara:
status: Fix Committed → In Progress
milestone: none → 15.04.0
assignee: nobody → Marcelo Ortega (marcetega)
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 15.04.0 → 15.04.1
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 15.04.1 → 15.10.0
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 15.10.0 → 16.04.0
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 16.04.0 → 16.10.0
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/4115
Committed: https://git.mahara.org/mahara/mahara/commit/52ab75a794f257d20662960d98cbc1bb6c5efdc1
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 52ab75a794f257d20662960d98cbc1bb6c5efdc1
Author: Marcelo Ortega <email address hidden>
Date: Mon Dec 29 15:01:04 2014 +0000

Bug #1298144 Don't show "Download as zip file" link when not needed

When:

1) The folder is empty
2) When the folder only contains folders that are also empty

behatnotneeded

Change-Id: I7e86a3ff051ff9d46a4b68e763574abfe0c6b14d

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.