diff options
author | spag <spag@golwen.net> | 2013-02-12 08:19:10 +0100 |
---|---|---|
committer | spag <spag@golwen.net> | 2013-02-12 08:19:10 +0100 |
commit | 8e55bf891a0520ba241585d8295ccc37ed57b09e (patch) | |
tree | df823d812586612de3a285e22a4cca52170a9b60 /app/views/backup_jobs | |
parent | d1145ad9d4f495d7416ed97e0dd3c17365990323 (diff) | |
parent | 3d817bef265f70b147455db4b0fb5e1ca3c0d379 (diff) |
Merge branch 'develop' of github.com:amooma/GS5 into develop
Diffstat (limited to 'app/views/backup_jobs')
-rw-r--r-- | app/views/backup_jobs/_index_core.html.haml | 34 | ||||
-rw-r--r-- | app/views/backup_jobs/show.html.haml | 4 |
2 files changed, 29 insertions, 9 deletions
diff --git a/app/views/backup_jobs/_index_core.html.haml b/app/views/backup_jobs/_index_core.html.haml index 9eebefd..0102546 100644 --- a/app/views/backup_jobs/_index_core.html.haml +++ b/app/views/backup_jobs/_index_core.html.haml @@ -1,12 +1,15 @@ %table.table.table-striped %tr %th= t('backup_jobs.index.started_at') - %th= t('backup_jobs.index.finished_at') + %th + %span.hidden-phone + = t('backup_jobs.index.finished_at') %th= t('backup_jobs.index.state') - %th= t('backup_jobs.index.size_of_the_backup') + %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' @@ -18,14 +21,29 @@ %tr{:class => row_marker} - if backup_job.finished_at.blank? %td{:colspan => '2'} - = time_ago_in_words(backup_job.started_at) + - 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 - = l backup_job.finished_at, :format => :short + %span.hidden-phone + = l backup_job.finished_at, :format => :short %td= backup_job.state %td - - if backup_job.backup_file? - = number_to_human_size(backup_job.backup_file.size, :precision => 2) - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => backup_job}
\ No newline at end of file + %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} diff --git a/app/views/backup_jobs/show.html.haml b/app/views/backup_jobs/show.html.haml index 5d85bbc..6fcb1dc 100644 --- a/app/views/backup_jobs/show.html.haml +++ b/app/views/backup_jobs/show.html.haml @@ -15,6 +15,8 @@ %p %strong= t('backup_jobs.show.size_of_the_backup') + ":" - if @backup_job.backup_file? - = number_to_human_size(@backup_job.backup_file.size, :precision => 2) + %a{:href => backup_job.backup_file.url} + %i{:class => 'icon-download'} + = number_to_human_size(backup_job.backup_file.size, :precision => 2) = render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @backup_job }
\ No newline at end of file |