Move show route files to components directory

pull/3783/head
Alex Dik 9 years ago
parent 7b3e2c2e7c
commit 7b9f9ec2dd
  1. 54
      frontend/app/components/routes/controllers/work-package-show.controller.js
  2. 0
      frontend/app/components/routes/templates/work-package-show.route.html
  3. 2
      frontend/app/routing.js
  4. 36
      frontend/app/work_packages/controllers/index.js

@ -1,4 +1,4 @@
//-- copyright
// -- copyright
// OpenProject is a project management system.
// Copyright (C) 2012-2015 the OpenProject Foundation (OPF)
//
@ -24,42 +24,20 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
// See doc/COPYRIGHT.rdoc for more details.
//++
module.exports = function($scope,
$rootScope,
$state,
$stateParams,
$location,
latestTab,
workPackage,
I18n,
RELATION_TYPES,
RELATION_IDENTIFIERS,
$filter,
$q,
WorkPackagesHelper,
PathHelper,
UsersHelper,
ConfigurationService,
WorkPackageService,
ActivityService,
ProjectService,
CommonRelationsHandler,
ChildrenRelationsHandler,
ParentRelationsHandler,
WorkPackagesOverviewService,
WorkPackageFieldService,
EditableFieldsState,
WorkPackagesDisplayHelper,
NotificationsService,
WorkPackageAuthorization,
PERMITTED_MORE_MENU_ACTIONS,
HookService,
$window,
WorkPackageAttachmentsService,
AuthorisationService
) {
// ++
angular
.module('openproject.workPackages.controllers')
.controller('WorkPackageShowController', WorkPackageShowController);
function WorkPackageShowController($scope, $rootScope, $state, latestTab, workPackage, I18n,
RELATION_TYPES, RELATION_IDENTIFIERS, $filter, $q, WorkPackagesHelper, PathHelper, UsersHelper,
ConfigurationService, WorkPackageService, ActivityService, ProjectService,
CommonRelationsHandler, ChildrenRelationsHandler, ParentRelationsHandler,
WorkPackagesOverviewService, WorkPackageFieldService, EditableFieldsState,
WorkPackagesDisplayHelper, NotificationsService, WorkPackageAuthorization,
PERMITTED_MORE_MENU_ACTIONS, HookService, $window, WorkPackageAttachmentsService,
AuthorisationService) {
$scope.can = AuthorisationService.can;
$scope.cannot = AuthorisationService.cannot;
@ -397,4 +375,4 @@ module.exports = function($scope,
NotificationsService.addSuccess(I18n.t('js.label_successful_update'));
});
}
};
}

@ -67,7 +67,7 @@ angular.module('openproject')
.state('work-packages.show', {
url: '/work_packages/{workPackageId:[0-9]+}?query_props',
templateUrl: '/templates/work_packages.show.html',
templateUrl: '/components/routes/templates/work-package-show.route.html',
controller: 'WorkPackageShowController',
controllerAs: 'vm',
abstract: true,

@ -72,42 +72,6 @@ angular.module('openproject.workPackages.controllers')
precedes: 'precedes',
follows: 'follows'
})
.controller('WorkPackageShowController', [
'$scope',
'$rootScope',
'$state',
'$stateParams',
'$location',
'latestTab',
'workPackage',
'I18n',
'RELATION_TYPES',
'RELATION_IDENTIFIERS',
'$filter',
'$q',
'WorkPackagesHelper',
'PathHelper',
'UsersHelper',
'ConfigurationService',
'WorkPackageService',
'ActivityService',
'ProjectService',
'CommonRelationsHandler',
'ChildrenRelationsHandler',
'ParentRelationsHandler',
'WorkPackagesOverviewService',
'WorkPackageFieldService',
'EditableFieldsState',
'WorkPackagesDisplayHelper',
'NotificationsService',
'WorkPackageAuthorization',
'PERMITTED_MORE_MENU_ACTIONS',
'HookService',
'$window',
'WorkPackageAttachmentsService',
'AuthorisationService',
require('./work-package-show-controller')
])
.controller('WorkPackagesController', [
'$scope',
'$state',

Loading…
Cancel
Save