Show modal to inform login is required when adding Tags

Change-Id: Ib917ffd01fb3da04432ad588683d3c9077962199
This commit is contained in:
Pedro Alvarez 2015-11-29 00:23:14 +00:00
parent 7b00281f8e
commit 0254c74f5c
2 changed files with 15 additions and 2 deletions

View File

@ -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
// ###################################################################

View File

@ -164,7 +164,12 @@
</span>
<h4>
<span class="label label-default" ng-click="toggleAddTag()"
ng-show="!showAddTag">
ng-show="!showAddTag && isLoggedIn">
Add
<i class="fa fa-plus"></i>
</span>
<span class="label label-default" ng-click="showLoginRequiredModal()"
ng-show="!isLoggedIn">
Add
<i class="fa fa-plus"></i>
</span>