diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-02-12 13:53:28 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-02-12 13:53:28 +0100 |
commit | c9066760fd1f5f2f892ce2be5cf2a83bb5210246 (patch) | |
tree | 82ecdd528e803ccd1b469dc13482e06cf8ea0b8e /app/views/backup_jobs/_index_core.html.haml | |
parent | 0b97717b2171820dea41de8df705f8f0e4b71464 (diff) | |
parent | fb66a5e5a4c5d5f9eac4a5e8de6a286482cb55d5 (diff) |
Release a new beta.5.1-beta4
Diffstat (limited to 'app/views/backup_jobs/_index_core.html.haml')
-rw-r--r-- | app/views/backup_jobs/_index_core.html.haml | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/app/views/backup_jobs/_index_core.html.haml b/app/views/backup_jobs/_index_core.html.haml new file mode 100644 index 0000000..0102546 --- /dev/null +++ b/app/views/backup_jobs/_index_core.html.haml @@ -0,0 +1,49 @@ +%table.table.table-striped + %tr + %th= t('backup_jobs.index.started_at') + %th + %span.hidden-phone + = t('backup_jobs.index.finished_at') + %th= t('backup_jobs.index.state') + %th + %span.hidden-phone + = t('backup_jobs.index.size_of_the_backup') + %th{:colspan => '2'} + + - for backup_job in backup_jobs + - if backup_job.state == 'queued' + - row_marker = 'warning' + - else + - if backup_job.state == 'failed' + - row_marker = 'error' + - else + - row_marker = '' + %tr{:class => row_marker} + - if backup_job.finished_at.blank? + %td{:colspan => '2'} + - if (Time.now - 1.day) > backup_job.started_at + = l backup_job.started_at, :format => :short + - else + - case I18n.locale + - when :de + = "vor #{time_ago_in_words(backup_job.started_at)}" + - when :en + = "#{time_ago_in_words(backup_job.started_at)} ago" + - else + = l backup_job.started_at, :format => :short + - else + %td + = l backup_job.started_at, :format => :short + %td + %span.hidden-phone + = l backup_job.finished_at, :format => :short + %td= backup_job.state + %td + %span.hidden-phone + - if backup_job.backup_file? + %a{:href => backup_job.backup_file.url} + %i{:class => 'icon-download'} + = number_to_human_size(backup_job.backup_file.size, :precision => 2) + - else + = '-' + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => backup_job} |