Only display dropzone if "Show all" is selected.

pull/3563/head
Tim Habermaas 9 years ago committed by Stefan Botzenhart
parent ed23d6eb7f
commit bcd4195ca3
  1. 2
      frontend/app/templates/work_packages.show.html
  2. 1
      frontend/app/work_packages/controllers/index.js
  3. 8
      frontend/app/work_packages/controllers/work-package-show-controller.js

@ -162,7 +162,7 @@
</dl>
</div>
<work-package-attachments edit work-package="vm.workPackage"></work-package-attachments>
<work-package-attachments edit data-ng-show="!vm.hideEmptyFields || vm.filesExist" work-package="vm.workPackage"></work-package-attachments>
</div>
</div>
<div class="work-packages--right-panel">

@ -138,6 +138,7 @@ angular.module('openproject.workPackages.controllers')
'PERMITTED_MORE_MENU_ACTIONS',
'HookService',
'$window',
'WorkPackageAttachmentsService',
require('./work-package-show-controller')
])
.controller('WorkPackagesController', [

@ -53,7 +53,8 @@ module.exports = function($scope,
WorkPackageAuthorization,
PERMITTED_MORE_MENU_ACTIONS,
HookService,
$window
$window,
WorkPackageAttachmentsService
) {
@ -374,9 +375,14 @@ module.exports = function($scope,
vm.isSpecified = WorkPackagesDisplayHelper.isSpecified;
vm.hasNiceStar = WorkPackagesDisplayHelper.hasNiceStar;
vm.showToggleButton = WorkPackagesDisplayHelper.showToggleButton;
vm.filesExist = false;
activate();
WorkPackageAttachmentsService.hasAttachments(vm.workPackage).then(function(bool) {
vm.filesExist = bool;
});
function activate() {
EditableFieldsState.forcedEditState = false;
$scope.$watch('workPackage.schema', function(schema) {

Loading…
Cancel
Save