diff options
-rw-r--r-- | app/models/backup_job.rb | 2 | ||||
-rw-r--r-- | app/views/backup_jobs/_form_core.html.haml | 1 | ||||
-rw-r--r-- | app/views/backup_jobs/_index_core.html.haml | 4 | ||||
-rw-r--r-- | app/views/backup_jobs/show.html.haml | 3 |
4 files changed, 5 insertions, 5 deletions
diff --git a/app/models/backup_job.rb b/app/models/backup_job.rb index 78d95a7..8bb7959 100644 --- a/app/models/backup_job.rb +++ b/app/models/backup_job.rb @@ -1,5 +1,5 @@ class BackupJob < ActiveRecord::Base - attr_accessible :started_at, :finished_at, :state, :directory, :size_of_the_backup + attr_accessible :started_at, :finished_at, :state, :directory mount_uploader :backup_file, BackupFileUploader diff --git a/app/views/backup_jobs/_form_core.html.haml b/app/views/backup_jobs/_form_core.html.haml index 536fb18..9d439c5 100644 --- a/app/views/backup_jobs/_form_core.html.haml +++ b/app/views/backup_jobs/_form_core.html.haml @@ -3,4 +3,3 @@ = f.input :finished_at, :label => t('backup_jobs.form.finished_at.label'), :hint => conditional_hint('backup_jobs.form.finished_at.hint') = f.input :state, :label => t('backup_jobs.form.state.label'), :hint => conditional_hint('backup_jobs.form.state.hint') = f.input :directory, :label => t('backup_jobs.form.directory.label'), :hint => conditional_hint('backup_jobs.form.directory.hint') - = f.input :size_of_the_backup, :label => t('backup_jobs.form.size_of_the_backup.label'), :hint => conditional_hint('backup_jobs.form.size_of_the_backup.hint') diff --git a/app/views/backup_jobs/_index_core.html.haml b/app/views/backup_jobs/_index_core.html.haml index a706424..9eebefd 100644 --- a/app/views/backup_jobs/_index_core.html.haml +++ b/app/views/backup_jobs/_index_core.html.haml @@ -26,6 +26,6 @@ = l backup_job.finished_at, :format => :short %td= backup_job.state %td - - if !backup_job.size_of_the_backup.blank? - = number_to_human_size(backup_job.size_of_the_backup, :precision => 2) + - 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 diff --git a/app/views/backup_jobs/show.html.haml b/app/views/backup_jobs/show.html.haml index 65091b8..5d85bbc 100644 --- a/app/views/backup_jobs/show.html.haml +++ b/app/views/backup_jobs/show.html.haml @@ -14,6 +14,7 @@ = @backup_job.directory %p %strong= t('backup_jobs.show.size_of_the_backup') + ":" - = number_to_human_size(@backup_job.size_of_the_backup, :precision => 2) + - if @backup_job.backup_file? + = 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 |