diff --git a/static/css/quay.css b/static/css/quay.css index ed5ed3662..16789b8a5 100644 --- a/static/css/quay.css +++ b/static/css/quay.css @@ -145,6 +145,15 @@ nav.navbar-default .navbar-nav>li>a.active { max-width: 320px; } +.notification-view-element .right-controls button { + margin-left: 10px; +} + +.notification-view-element .message i.fa { + margin-right: 6px; +} + + .notification-view-element .orginfo { margin-top: 8px; float: left; diff --git a/static/directives/notification-view.html b/static/directives/notification-view.html index f03133e55..fbdb4b419 100644 --- a/static/directives/notification-view.html +++ b/static/directives/notification-view.html @@ -7,10 +7,13 @@ {{ notification.organization }} -
{{ parseDate(notification.created) | date:'medium'}}
Dismiss Notification +
+
{{ parseDate(notification.created) | date:'medium'}}
diff --git a/static/js/app.js b/static/js/app.js index f5651c007..74a7b3454 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -535,6 +535,7 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading stringBuilderService.buildString = function(value_or_func, metadata) { var fieldIcons = { + 'adder': 'user', 'username': 'user', 'activating_username': 'user', 'delegate_user': 'user', @@ -1132,6 +1133,19 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading 'page': '/about/', 'dismissable': true }, + 'org_team_invite': { + 'level': 'primary', + 'message': '{adder} is inviting you to join team {team} under organization {org}', + 'actions': [ + { + 'title': 'Join team', + 'kind': 'primary', + 'handler': function(notification) { + } + }, + {'title': 'Decline', 'kind': 'default'} + ] + }, 'password_required': { 'level': 'error', 'message': 'In order to begin pushing and pulling repositories, a password must be set for your account', @@ -1224,6 +1238,15 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading } }; + notificationService.getActions = function(notification) { + var kindInfo = notificationKinds[notification['kind']]; + if (!kindInfo) { + return []; + } + + return kindInfo['actions'] || []; + }; + notificationService.canDismiss = function(notification) { var kindInfo = notificationKinds[notification['kind']]; if (!kindInfo) { @@ -5104,6 +5127,10 @@ quayApp.directive('notificationView', function () { $scope.getClass = function(notification) { return NotificationService.getClass(notification); }; + + $scope.getActions = function(notification) { + return NotificationService.getActions(notification); + }; } }; return directiveDefinitionObject;