Merge "Show modal to inform login is required when adding Tags"

This commit is contained in:
Jenkins 2015-11-30 10:57:31 +00:00 committed by Gerrit Code Review
commit 1f668a733a
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>