From 0254c74f5c00f2d74fb127b2cba2df6eab556fc7 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Sun, 29 Nov 2015 00:23:14 +0000 Subject: [PATCH] Show modal to inform login is required when adding Tags Change-Id: Ib917ffd01fb3da04432ad588683d3c9077962199 --- src/app/stories/controller/story_detail_controller.js | 10 +++++++++- src/app/stories/template/detail.html | 7 ++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/app/stories/controller/story_detail_controller.js b/src/app/stories/controller/story_detail_controller.js index 721143be..31c7e4c7 100644 --- a/src/app/stories/controller/story_detail_controller.js +++ b/src/app/stories/controller/story_detail_controller.js @@ -21,7 +21,8 @@ angular.module('sb.story').controller('StoryDetailController', function ($log, $rootScope, $scope, $state, $stateParams, $modal, Session, Preference, TimelineEvent, Comment, TimelineEventTypes, story, Story, creator, tasks, Task, DSCacheFactory, User, - storyboardApiBase, SubscriptionList, CurrentUser) { + storyboardApiBase, SubscriptionList, CurrentUser, + SessionModalService) { 'use strict'; var pageSize = Preference.get('story_detail_page_size'); @@ -292,6 +293,13 @@ angular.module('sb.story').controller('StoryDetailController', ); }; + /** + * Show modal informing the user login is required. + */ + $scope.showLoginRequiredModal = function() { + SessionModalService.showLoginRequiredModal(); + }; + // ################################################################### // Task Management // ################################################################### diff --git a/src/app/stories/template/detail.html b/src/app/stories/template/detail.html index b96bad19..8968e4e3 100644 --- a/src/app/stories/template/detail.html +++ b/src/app/stories/template/detail.html @@ -164,7 +164,12 @@

+ ng-show="!showAddTag && isLoggedIn"> + Add + + + Add