2013-02-20 13:15:50 -05:00
|
|
|
(function() {
|
|
|
|
|
2013-02-21 14:09:28 -05:00
|
|
|
/**
|
|
|
|
The default view in the admin section
|
|
|
|
|
2013-02-21 15:03:43 -05:00
|
|
|
@class AdminDashboardView
|
2013-02-21 18:57:11 -05:00
|
|
|
@extends Discourse.View
|
2013-02-21 14:09:28 -05:00
|
|
|
@namespace Discourse
|
|
|
|
@module Discourse
|
2013-02-21 15:03:43 -05:00
|
|
|
**/
|
2013-02-21 18:57:11 -05:00
|
|
|
Discourse.AdminDashboardView = window.Discourse.View.extend({
|
2013-02-21 15:03:43 -05:00
|
|
|
templateName: 'admin/templates/dashboard',
|
|
|
|
|
|
|
|
updateIconClasses: function() {
|
|
|
|
var classes;
|
|
|
|
classes = "icon icon-warning-sign ";
|
|
|
|
if (this.get('controller.versionCheck.critical_updates')) {
|
|
|
|
classes += "critical-updates-available";
|
|
|
|
} else {
|
|
|
|
classes += "updates-available";
|
|
|
|
}
|
|
|
|
return classes;
|
|
|
|
}.property('controller.versionCheck.critical_updates'),
|
|
|
|
|
|
|
|
priorityClass: function() {
|
|
|
|
if (this.get('controller.versionCheck.critical_updates')) {
|
|
|
|
return 'version-check critical';
|
|
|
|
}
|
|
|
|
return 'version-check normal';
|
|
|
|
}.property('controller.versionCheck.critical_updates')
|
2013-02-20 13:15:50 -05:00
|
|
|
});
|
|
|
|
|
|
|
|
}).call(this);
|