diff --git a/static/directives/quay-message-bar.html b/static/directives/quay-message-bar.html new file mode 100644 index 000000000..f5b512511 --- /dev/null +++ b/static/directives/quay-message-bar.html @@ -0,0 +1,5 @@ +
+
+ {{ message.content }} +
+
diff --git a/static/js/directives/quay-message-bar.js b/static/js/directives/quay-message-bar.js new file mode 100644 index 000000000..55d4b1b8a --- /dev/null +++ b/static/js/directives/quay-message-bar.js @@ -0,0 +1,17 @@ +/** + * An element which displays a message for users to read. + */ +angular.module('quay').directive('quayMessageBar', function () { + return { + priority: 0, + templateUrl: '/static/directives/quay-message-bar.html', + replace: false, + transclude: false, + restrict: 'C', + scope: {}, + controller: function ($scope, $element, ApiService) { + $scope.messages = []; + // ApiService.getMessages().then(function(data){ $scope.messages = data['messages'] || []; }); + } + }; +}); diff --git a/templates/base.html b/templates/base.html index c67835a93..f860cef37 100644 --- a/templates/base.html +++ b/templates/base.html @@ -229,6 +229,7 @@ mixpanel.init("{{ mixpanel_key }}", { track_pageview : false, debug: {{ is_debug {% endif %} +