From 9ab86ab582946973c113a68a9da657e348a8a2f4 Mon Sep 17 00:00:00 2001 From: Jared Pace Date: Thu, 5 Aug 2010 12:55:13 -0500 Subject: [PATCH] Format times for deploys --- app/views/errs/_table.html.haml | 2 +- config/initializers/time_formats.rb | 1 + public/stylesheets/application.css | 18 ++++++------------ 3 files changed, 8 insertions(+), 13 deletions(-) create mode 100644 config/initializers/time_formats.rb diff --git a/app/views/errs/_table.html.haml b/app/views/errs/_table.html.haml index 574f320..50ac520 100644 --- a/app/views/errs/_table.html.haml +++ b/app/views/errs/_table.html.haml @@ -19,7 +19,7 @@ = link_to err.message, project_err_path(err.project, err) %em= err.where %td.latest #{time_ago_in_words(err.last_notice_at)} ago - %td.deploy= err.project.last_deploy_at ? err.project.last_deploy_at.to_date.to_s(:micro) : 'n/a' + %td.deploy= err.project.last_deploy_at ? err.project.last_deploy_at.to_s(:micro) : 'n/a' %td.count= err.notices.count - if errs.none? %tr diff --git a/config/initializers/time_formats.rb b/config/initializers/time_formats.rb new file mode 100644 index 0000000..ba157a2 --- /dev/null +++ b/config/initializers/time_formats.rb @@ -0,0 +1 @@ +Time::DATE_FORMATS[:micro] = '%b %d %l:%M%P' \ No newline at end of file diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 480fa7a..3337efd 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -172,27 +172,21 @@ pre { .html ol li { margin-bottom: 0.5em; list-style: decimal; } /* Projects Table */ -table.projects td.name { +table.projects td.name, table.errs td.message { width: 100%; } -table.projects td.deploy { - white-space: no-wrap; +td.deploy { + white-space: nowrap; +} +td.latest { + white-space: nowrap; } /* Err Tables */ -table.errs td.message { - width: 100%; -} table.errs td.message a { display: block; } table.errs td.message em { color: #727272; font-size: 0.9em; -} -table.errs td.latest { - white-space: nowrap; -} -table.errs td.deploy { - white-space: nowrap; } \ No newline at end of file -- libgit2 0.21.2