1 define(function(require) {
6 var $ = require('libs/jquery'),
7 template = require('libs/text!modules/statusBar/statusBar.html'),
8 logging = require('fnpjs/logging/logging');
10 var logger = logging.getLogger('statusBar');
12 return function(sandbox){
14 var view = $(template);
18 return sandbox.publish('ready');
23 showAction: function(action) {
24 var state = action.getState(),
28 description = gettext('error :(');
29 logger.error('Got undefined action state: ' + action.name);
31 description = state.description;
33 description = state.allowed ? gettext('Undescribed action') : gettext('Action not allowed');
34 logger.info('Undescribed action: ' + action.name);
38 view.text(description);
40 view.prepend('<span class="badge badge-warning" style="margin-right: 5px">!</span>');
43 clearAction: function() {