2013-02-21 02:15:50 +08:00
|
|
|
(function() {
|
|
|
|
|
2013-02-22 03:09:28 +08:00
|
|
|
/**
|
|
|
|
The default view in the admin section
|
|
|
|
|
2013-02-22 04:03:43 +08:00
|
|
|
@class AdminDashboardView
|
2013-02-22 23:20:23 +08:00
|
|
|
@extends Em.View
|
2013-02-22 03:09:28 +08:00
|
|
|
@namespace Discourse
|
|
|
|
@module Discourse
|
2013-02-22 04:03:43 +08:00
|
|
|
**/
|
2013-02-22 23:20:23 +08:00
|
|
|
Discourse.AdminDashboardView = Discourse.View.extend({
|
2013-02-22 04:03:43 +08: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-21 02:15:50 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
}).call(this);
|