2013-02-23 04:41:12 +08:00
|
|
|
/**
|
|
|
|
The default view in the admin section
|
2013-02-21 02:15:50 +08:00
|
|
|
|
2013-02-23 04:41:12 +08:00
|
|
|
@class AdminDashboardView
|
|
|
|
@extends Em.View
|
|
|
|
@namespace Discourse
|
|
|
|
@module Discourse
|
|
|
|
**/
|
|
|
|
Discourse.AdminDashboardView = Discourse.View.extend({
|
|
|
|
templateName: 'admin/templates/dashboard',
|
2013-02-22 03:09:28 +08:00
|
|
|
|
2013-02-23 04:41:12 +08:00
|
|
|
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'),
|
2013-02-22 04:03:43 +08:00
|
|
|
|
2013-02-23 04:41:12 +08:00
|
|
|
priorityClass: function() {
|
|
|
|
if (this.get('controller.versionCheck.critical_updates')) {
|
|
|
|
return 'version-check critical';
|
|
|
|
}
|
|
|
|
return 'version-check normal';
|
|
|
|
}.property('controller.versionCheck.critical_updates')
|
|
|
|
});
|
2013-02-22 04:03:43 +08:00
|
|
|
|
2013-02-21 02:15:50 +08:00
|
|
|
|