From 70f5ee5fa9815de47c31bedd38acc866a245f706 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Tue, 19 Mar 2013 13:51:09 -0400 Subject: [PATCH] New layout for version check on admin dashboard --- .../admin/templates/dashboard.js.handlebars | 80 ++++++++++--------- app/assets/stylesheets/admin/admin_base.scss | 12 ++- config/locales/client.en.yml | 7 +- 3 files changed, 57 insertions(+), 42 deletions(-) diff --git a/app/assets/javascripts/admin/templates/dashboard.js.handlebars b/app/assets/javascripts/admin/templates/dashboard.js.handlebars index a159b194a90..f67bf9fca57 100644 --- a/app/assets/javascripts/admin/templates/dashboard.js.handlebars +++ b/app/assets/javascripts/admin/templates/dashboard.js.handlebars @@ -1,45 +1,51 @@
-
- {{#if Discourse.SiteSettings.version_checks}} - {{#if loading }} -

{{i18n loading}}

- {{else}} -

- {{i18n admin.dashboard.version}}: {{ versionCheck.installed_version }} - - {{#if versionCheck.installed_sha}} - ({{versionCheck.shortSha}}) - {{/if}} -

- -

- {{i18n admin.dashboard.latest_version}}: {{ versionCheck.latest_version }} - {{#if versionCheck.upToDate }} - {{i18n admin.dashboard.up_to_date}} - {{else}} - - {{#if versionCheck.behindByOneVersion}} - ☺ + {{#if Discourse.SiteSettings.version_checks}} +

+ + + + + + + + + + + {{#unless loading}} + + + + + + + + {{/unless}} +
 {{i18n admin.dashboard.installed_version}}{{i18n admin.dashboard.latest_version}}  
{{i18n admin.dashboard.version}}{{ versionCheck.installed_version }}{{ versionCheck.latest_version }} + {{#if versionCheck.upToDate }} + {{else}} - ☹ + + {{#if versionCheck.behindByOneVersion}} + ☺ + {{else}} + ☹ + {{/if}} + {{/if}} - - {{i18n admin.dashboard.critical_available}} - {{i18n admin.dashboard.updates_available}} - {{i18n admin.dashboard.please_upgrade}} - {{/if}} -

- {{/if}} - {{/if}} - -

- - {{i18n admin.dashboard.update_often}} -

- +
+ {{#if versionCheck.upToDate }} + {{i18n admin.dashboard.up_to_date}} + {{else}} + {{i18n admin.dashboard.critical_available}} + {{i18n admin.dashboard.updates_available}} + {{i18n admin.dashboard.please_upgrade}} + {{/if}} +
+
+ {{/if}} -
+
{{i18n admin.dashboard.total_users}}: {{#unless loading}}{{ totalUsers }}{{/unless}}
diff --git a/app/assets/stylesheets/admin/admin_base.scss b/app/assets/stylesheets/admin/admin_base.scss index c82988b60c0..64b256b1e71 100644 --- a/app/assets/stylesheets/admin/admin_base.scss +++ b/app/assets/stylesheets/admin/admin_base.scss @@ -302,11 +302,15 @@ table { .version-check { .version-number { font-size: 18px; - font-weight: bold + font-weight: bold; + text-align: center; + } + + .face { + width: 20px; } .version-notes .icon { - margin-left: 20px; vertical-align: bottom; } @@ -372,6 +376,10 @@ table { width: 33px; } } + + &.total-users { + margin-left: 45px; + } } diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 4cd07acb2b2..54b58f16400 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -687,12 +687,13 @@ en: dashboard: title: "Admin Dashboard" - version: "Installed version" - up_to_date: "You are running the latest version of Discourse." + version: "Version" + up_to_date: "You're up to date!" critical_available: "A critical update is available." updates_available: "Updates are available." please_upgrade: "Please upgrade!" - latest_version: "Latest version" + installed_version: "Installed" + latest_version: "Latest" update_often: 'Please update often!' total_users: "Total Users" moderator_short: "mod"