From ffaa80e8d46b3b6b7597af6f157724005f48bae4 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 26 Feb 2013 10:48:08 +0100 Subject: RestoreJob scaffold --- app/views/restore_jobs/_form.html.haml | 7 +++++++ app/views/restore_jobs/_form_core.html.haml | 2 ++ app/views/restore_jobs/_index_core.html.haml | 12 ++++++++++++ app/views/restore_jobs/index.html.haml | 6 ++++++ app/views/restore_jobs/new.html.haml | 3 +++ app/views/restore_jobs/show.html.haml | 22 ++++++++++++++++++++++ 6 files changed, 52 insertions(+) create mode 100644 app/views/restore_jobs/_form.html.haml create mode 100644 app/views/restore_jobs/_form_core.html.haml create mode 100644 app/views/restore_jobs/_index_core.html.haml create mode 100644 app/views/restore_jobs/index.html.haml create mode 100644 app/views/restore_jobs/new.html.haml create mode 100644 app/views/restore_jobs/show.html.haml (limited to 'app/views/restore_jobs') diff --git a/app/views/restore_jobs/_form.html.haml b/app/views/restore_jobs/_form.html.haml new file mode 100644 index 0000000..43ced9a --- /dev/null +++ b/app/views/restore_jobs/_form.html.haml @@ -0,0 +1,7 @@ += simple_form_for(@restore_job) do |f| + = f.error_notification + + = render "form_core", :f => f + + .form-actions + = f.button :submit, conditional_t('restore_jobs.form.submit') diff --git a/app/views/restore_jobs/_form_core.html.haml b/app/views/restore_jobs/_form_core.html.haml new file mode 100644 index 0000000..017c124 --- /dev/null +++ b/app/views/restore_jobs/_form_core.html.haml @@ -0,0 +1,2 @@ +.inputs + = f.input :backup_file, :label => t('restore_jobs.form.backup_file.label'), :hint => conditional_hint('restore_jobs.form.backup_file.hint') diff --git a/app/views/restore_jobs/_index_core.html.haml b/app/views/restore_jobs/_index_core.html.haml new file mode 100644 index 0000000..f6127ba --- /dev/null +++ b/app/views/restore_jobs/_index_core.html.haml @@ -0,0 +1,12 @@ +%table.table.table-striped + %tr + %th= t('restore_jobs.index.state') + %th= t('restore_jobs.index.backup_file') + %th + + + - for restore_job in restore_jobs + %tr + %td= restore_job.state + %td= restore_job.to_s + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => restore_job} \ No newline at end of file diff --git a/app/views/restore_jobs/index.html.haml b/app/views/restore_jobs/index.html.haml new file mode 100644 index 0000000..b8aa74e --- /dev/null +++ b/app/views/restore_jobs/index.html.haml @@ -0,0 +1,6 @@ +- content_for :title, t("restore_jobs.index.page_title") + +- if @restore_jobs && @restore_jobs.count > 0 + = render "index_core", :restore_jobs => @restore_jobs + += render :partial => 'shared/create_link', :locals => {:child_class => RestoreJob} \ No newline at end of file diff --git a/app/views/restore_jobs/new.html.haml b/app/views/restore_jobs/new.html.haml new file mode 100644 index 0000000..ffae792 --- /dev/null +++ b/app/views/restore_jobs/new.html.haml @@ -0,0 +1,3 @@ +- content_for :title, t("restore_jobs.new.page_title") + += render "form" \ No newline at end of file diff --git a/app/views/restore_jobs/show.html.haml b/app/views/restore_jobs/show.html.haml new file mode 100644 index 0000000..5993872 --- /dev/null +++ b/app/views/restore_jobs/show.html.haml @@ -0,0 +1,22 @@ +- content_for :title, t("restore_jobs.show.page_title") + +%table.table.table-striped + %tbody + %tr + %td + %strong= t('restore_jobs.show.state') + ":" + %td + = @restore_job.state + %tr + %td + %strong= t('restore_jobs.show.backup_file') + ":" + %td + = @restore_job.to_s + %tr + %td + %strong= t('backup_jobs.show.size_of_the_backup') + ":" + %td + - if @restore_job.backup_file? + = number_to_human_size(@restore_job.backup_file.size, :precision => 2) + += render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @restore_job } \ No newline at end of file -- cgit v1.2.3