From 637119cd2748180d4acbf19bc28aa7c0456e6cb7 Mon Sep 17 00:00:00 2001 From: Nathan Broadbent Date: Thu, 1 Sep 2011 10:29:15 +0800 Subject: [PATCH] If an app has zero unresolved errors, make the 'Errs' button green (in apps/index) --- app/views/apps/index.html.haml | 3 ++- public/stylesheets/application.css | 4 ++++ public/stylesheets/images/resolved-badge-bg.png | Bin 0 -> 119 bytes 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 public/stylesheets/images/resolved-badge-bg.png diff --git a/app/views/apps/index.html.haml b/app/views/apps/index.html.haml index 0f49ba7..0bf6688 100644 --- a/app/views/apps/index.html.haml +++ b/app/views/apps/index.html.haml @@ -15,7 +15,8 @@ %td.deploy= app.last_deploy_at ? link_to( app.last_deploy_at.to_s(:micro) << " (#{app.deploys.last.short_revision})", app_deploys_path(app)) : 'n/a' %td.count - if app.errs.count > 0 - = link_to app.errs.unresolved.count, app_path(app) + - unresolved = app.errs.unresolved.count + = link_to unresolved, app_path(app), :class => (unresolved == 0 ? "resolved" : nil) - else \- - if @apps.none? diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 38933ab..06fc31b 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -600,6 +600,10 @@ td.count { -moz-opacity: 0.8; -webkit-opacity: 0.8 } +.count a.resolved { + background: #00cc33 url(images/resolved-badge-bg.png) 0 bottom repeat-x; + border: 1px solid #090; +} .count a:hover { text-decoration: none; opacity: 1; diff --git a/public/stylesheets/images/resolved-badge-bg.png b/public/stylesheets/images/resolved-badge-bg.png new file mode 100644 index 0000000..052bfc7 Binary files /dev/null and b/public/stylesheets/images/resolved-badge-bg.png differ -- libgit2 0.21.2