From 0f3ca187902373f731035062fbb8de10be43c0d4 Mon Sep 17 00:00:00 2001 From: Mark Bussey Date: Tue, 31 Aug 2021 13:05:33 -0500 Subject: [PATCH] Present a simplified import form in the New UI The dashboard navigation bar now provides direct links to a number of actions preiviously only avaialbe on the import form, so we can now present a much simpler form in the new UI. --- app/views/zizia/csv_imports/_form.html.erb | 106 +----------------- .../zizia/csv_imports/_import_form.html.erb | 62 ++++++++++ .../zizia/csv_imports/_old_form.html.erb | 101 +++++++++++++++++ 3 files changed, 168 insertions(+), 101 deletions(-) create mode 100644 app/views/zizia/csv_imports/_import_form.html.erb create mode 100644 app/views/zizia/csv_imports/_old_form.html.erb diff --git a/app/views/zizia/csv_imports/_form.html.erb b/app/views/zizia/csv_imports/_form.html.erb index 8e14018..f638447 100644 --- a/app/views/zizia/csv_imports/_form.html.erb +++ b/app/views/zizia/csv_imports/_form.html.erb @@ -1,101 +1,5 @@ -<%= form_with(model: csv_import, local: true, html: { multipart: true }, url: preview_csv_import_path) do |form| %> - <%= form.hidden_field :manifest_cache %> -
-
-
-
-

1 Prepare Your Content

-
-

A

-
- Read the Metadata Field Guide to learn what fields are available for import. -
- -
-
-

B

-
- Download a CSV template and start filling in your metadata. -
- -
-
-

C

-
- Upload your files over SFTP, using a tool like FileZilla to transfer files. -
-
-
-
-

2 Upload Your Files

- <% if collections? %> -
-

A

-
- Upload a CSV that lists the metadata and files you want to import. -
-
- <%= render "file_upload", form: form %> -
-
-
-

B

-
- Choose a collection that you'd like your new works to be associated with. -
-
- <%= render "collection_selection", form: form %> -
-
-
-

C

-
- Select update behavior. New works will always be added to the repository. Existing works can be overwritten, updated, - or ignored. -
-
- <%= render "update_actor_stack", form: form %> -
-
-
-

D

-
- Preview your import and start the import if everything looks good. - or overwritten -
-
- <%= render "actions", form: form %> -
-
- <% else %> -
-

A

-
- You must create a collection before importing content. -
-
- <% end %> -
-
-

3 Monitor Your Progress

-
-

A

-
- Check the status of batches that have been submitted for import. -
- -
-
-
-
- <%= render "error", csv_import: csv_import %> -
-
-
-<% end %> +<% if Flipflop.new_ui? %> + <%= render 'import_form', csv_import: @csv_import %> +<% else %> + <%= render 'old_form', csv_import: @csv_import %> +<% end %> \ No newline at end of file diff --git a/app/views/zizia/csv_imports/_import_form.html.erb b/app/views/zizia/csv_imports/_import_form.html.erb new file mode 100644 index 0000000..5486145 --- /dev/null +++ b/app/views/zizia/csv_imports/_import_form.html.erb @@ -0,0 +1,62 @@ +<%= form_with(model: csv_import, local: true, html: { multipart: true }, url: preview_csv_import_path) do |form| %> + <%= form.hidden_field :manifest_cache %> +
+
+
+ +
+ <% if collections? %> +
+

A

+
+ Upload a CSV that lists the metadata and files you want to import. +
+
+ <%= render "file_upload", form: form %> +
+
+ +
+

B

+
+ Select update behavior. New works will always be added to the repository. Existing works can be overwritten, updated, + or ignored. +
+
+ <%= render "update_actor_stack", form: form %> +
+
+
+

C

+
+ Preview your import and start the import if everything looks good. + or overwritten +
+
+ <%= render "actions", form: form %> +
+
+ <% else %> +
+

A

+
+ You must create a collection before importing content. +
+
+ <% end %> +
+
+
+ <%= render "error", csv_import: csv_import %> +
+
+
+<% end %> diff --git a/app/views/zizia/csv_imports/_old_form.html.erb b/app/views/zizia/csv_imports/_old_form.html.erb new file mode 100644 index 0000000..8e14018 --- /dev/null +++ b/app/views/zizia/csv_imports/_old_form.html.erb @@ -0,0 +1,101 @@ +<%= form_with(model: csv_import, local: true, html: { multipart: true }, url: preview_csv_import_path) do |form| %> + <%= form.hidden_field :manifest_cache %> +
+
+
+
+

1 Prepare Your Content

+
+

A

+
+ Read the Metadata Field Guide to learn what fields are available for import. +
+ +
+
+

B

+
+ Download a CSV template and start filling in your metadata. +
+ +
+
+

C

+
+ Upload your files over SFTP, using a tool like FileZilla to transfer files. +
+
+
+
+

2 Upload Your Files

+ <% if collections? %> +
+

A

+
+ Upload a CSV that lists the metadata and files you want to import. +
+
+ <%= render "file_upload", form: form %> +
+
+
+

B

+
+ Choose a collection that you'd like your new works to be associated with. +
+
+ <%= render "collection_selection", form: form %> +
+
+
+

C

+
+ Select update behavior. New works will always be added to the repository. Existing works can be overwritten, updated, + or ignored. +
+
+ <%= render "update_actor_stack", form: form %> +
+
+
+

D

+
+ Preview your import and start the import if everything looks good. + or overwritten +
+
+ <%= render "actions", form: form %> +
+
+ <% else %> +
+

A

+
+ You must create a collection before importing content. +
+
+ <% end %> +
+
+

3 Monitor Your Progress

+
+

A

+
+ Check the status of batches that have been submitted for import. +
+ +
+
+
+
+ <%= render "error", csv_import: csv_import %> +
+
+
+<% end %>