Sha256: ded6207cea3f2ce9f55bfd431b934940cb54a17fc911c31a3e51a59d51744525
Contents?: true
Size: 1.63 KB
Versions: 6
Compression:
Stored size: 1.63 KB
Contents
/** * @ngdoc object * @name Bastion.content-views.controller:ContentViewHistoryController * * @requires $scope * @requires ContentView * @requires Nutupane * * @description * A controller for showing the history of a content view */ angular.module('Bastion.content-views').controller('ContentViewHistoryController', ['$scope', 'translate', 'ContentViewHistory', 'Nutupane', function ($scope, translate, ContentViewHistory, Nutupane) { var nutupane; nutupane = new Nutupane(ContentViewHistory, { contentViewId: $scope.$stateParams.contentViewId, 'sort_by': 'created_at', 'sort_order': 'DESC' }); nutupane.table.closeItem = function () {}; $scope.table = nutupane.table; $scope.actionText = function (history) { var message, taskType = history.task.label, taskTypes = $scope.taskTypes; if (taskType === taskTypes.deletion) { message = translate("Deleted from %s").replace('%s', history.environment.name); } else if (taskType === taskTypes.promotion) { message = translate("Promoted to %s").replace('%s', history.environment.name); } else if (taskType === taskTypes.publish) { message = translate("Published new version"); } else if (taskType === taskTypes.export) { message = translate("Exported content view"); } else if (taskType === taskTypes.incrementalUpdate) { message = translate("Incremental update"); } return message; }; }] );
Version data entries
6 entries across 6 versions & 1 rubygems