From 29756e1e8c97b6c67a6d4423f18ede4a13c23f31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Tue, 9 Oct 2018 17:15:38 +0200 Subject: [PATCH] Make timeline tab only available if comments/activity apps are enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- js/controller/BoardController.js | 5 +++++ js/controller/CardController.js | 4 ++++ templates/part.board.sidebarView.php | 4 ++-- templates/part.card.php | 5 ++--- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/js/controller/BoardController.js b/js/controller/BoardController.js index d4951fbd2..4d54b088c 100644 --- a/js/controller/BoardController.js +++ b/js/controller/BoardController.js @@ -486,4 +486,9 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St $scope.unreadCommentCount = function(card) { return card.commentsUnread; }; + + $scope.isTimelineEnabled = function() { + return OCP.Comments && OCA.Activity; + }; + }); diff --git a/js/controller/CardController.js b/js/controller/CardController.js index e738c4c68..c3de3a4fa 100644 --- a/js/controller/CardController.js +++ b/js/controller/CardController.js @@ -278,4 +278,8 @@ app.controller('CardController', function ($scope, $rootScope, $sce, $location, }; }; + $scope.isTimelineEnabled = function() { + return OCP.Comments && OCA.Activity; + }; + }); diff --git a/templates/part.board.sidebarView.php b/templates/part.board.sidebarView.php index 369e71649..6519e7e70 100644 --- a/templates/part.board.sidebarView.php +++ b/templates/part.board.sidebarView.php @@ -16,7 +16,7 @@
  • t('Tags')); ?>
  • t('Deleted Stacks')); ?>
  • t('Deleted Cards')); ?>
  • -
  • t('Activity')); ?>
  • +
  • t('Timeline')); ?>
  • @@ -150,7 +150,7 @@
    -
    +
    diff --git a/templates/part.card.php b/templates/part.card.php index 325af78a7..a2913e63e 100644 --- a/templates/part.card.php +++ b/templates/part.card.php @@ -92,8 +92,7 @@
    t('Saved')); ?> @@ -131,7 +130,7 @@
    -
    +