-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update design of new CSV import page
- Loading branch information
Showing
9 changed files
with
140 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
.bullet { | ||
background: black; | ||
color: white; | ||
border-radius: 0.8em; | ||
-moz-border-radius: 0.8em; | ||
-webkit-border-radius: 0.8em; | ||
display: inline-block; | ||
font-weight: bold; | ||
line-height: 1.6em; | ||
margin-right: 5px; | ||
text-align: center; | ||
width: 1.6em; | ||
} | ||
|
||
.well { | ||
margin-bottom: 0.25em; | ||
min-height: 5em; | ||
h4 { | ||
margin-top: 0; | ||
.bullet { | ||
float: left; | ||
background: white; | ||
color: black; | ||
border: 1px solid #e3e3e3; | ||
} | ||
} | ||
} | ||
|
||
.no-collection { | ||
background: #f7ecb5; | ||
} | ||
|
||
.step { | ||
margin-top: -1em; | ||
margin-bottom: .5em; | ||
} | ||
|
||
.zizia .btn { | ||
width: 60%; | ||
} | ||
|
||
.zizia h3 { | ||
margin-bottom: 1.5em; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
@import 'file_upload'; | ||
@import 'field_guide'; | ||
@import 'new'; | ||
|
||
.btn { | ||
white-space:normal !important; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<div class="actions"> | ||
<%= form.submit 'Preview Import', class: "btn btn-primary btn-lg" %> | ||
</div> | ||
<span class="glyphicon glyphicon-square-checkbox"></span><%= form.submit 'Preview Import', class: "btn btn-default btn-lg glyphicon glyphicon-square-checkbox" %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
<div class="form-group"> | ||
<%= form.select :fedora_collection_id, options_for_select(collections_for_select), {}, class: "form-control", id: "fedora_collection_id" %> | ||
</div> | ||
<%= form.select :fedora_collection_id, options_for_select(collections_for_select), {}, class: "form-control", id: "fedora_collection_id" %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<%= form.file_field :manifest, required: true, id: 'file-upload', class: "file-upload form-control", onchange: "Zizia.displayUploadedFile()" %> | ||
<label for="file-upload" class="btn btn-lg btn-primary"><span class="glyphicon glyphicon-upload"></span> Upload Your CSV</label> | ||
<label for="file-upload" class="btn btn-lg btn-default"><span class="glyphicon glyphicon-upload"></span> Upload Your CSV</label> | ||
<div id="file-upload-display"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,101 @@ | ||
<%= form_with(model: csv_import, local: true, html: { multipart: true }, url: preview_csv_import_path) do |form| %> | ||
<%= form.hidden_field :manifest_cache %> | ||
<div class="panel panel-default"> | ||
<div class="panel-body"> | ||
<div class="row"> | ||
<div class="col-md-8"> | ||
<h2> Getting Started </h2> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col-md-4"> | ||
<div class="well well-lg"> | ||
<p><b>Read the CSV Field Guide</b> to learn what is required in your CSV.</p> | ||
<h3><span class="bullet">1</span> Prepare Your Content</h3> | ||
<div class="well well-sm"> | ||
<h4><span class="bullet">A</span></h4> | ||
<div class="step"> | ||
<b>Read the Metadata Field Guide</b> to learn what fields are available for import. | ||
</div> | ||
<div class="text-center"> | ||
<a href="/importer_documentation/guide" class="btn btn-default btn-lg"><i class="glyphicon glyphicon-book"></i> CSV Field Guide</a> | ||
<a href="/importer_documentation/guide" class="btn btn-default btn-lg"><i class="glyphicon glyphicon-book"></i> Field Guide</a> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="col-md-4"> | ||
<div class="well well-lg"> | ||
<p><b>Download a CSV template</b> to get started.</b></p> | ||
<div class="well well-sm"> | ||
<h4><span class="bullet">B</span></h4> | ||
<div class="step"> | ||
<b>Download a CSV template</b> and start filling in your metadata. | ||
</div> | ||
<div class="text-center"> | ||
<a href="/importer_documentation/csv" data-turbolinks="false" class="btn btn-default btn-lg"><i class="glyphicon glyphicon-list"></i> Download an Import Template</a> | ||
<a href="/importer_documentation/csv" data-turbolinks="false" class="btn btn-default btn-lg"><i class="glyphicon glyphicon-list"></i> Import Template</a> | ||
</div> | ||
</div> | ||
<div class="well well-sm"> | ||
<h4><span class="bullet">C</span></h4> | ||
<div class="step"> | ||
<b>Upload your files</b> over SFTP, using a tool like <a href="https://filezilla-project.org">FileZilla</a> to transfer files. | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<hr/> | ||
|
||
<% if collections? %> | ||
<div class="row"> | ||
<div class="col-md-8"> | ||
<h2> Upload Your CSV </h2> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col-md-4"> | ||
<div class="well well-lg"> | ||
<p> <b>Upload a CSV</b> that has your content. </p> | ||
<div class="text-center"> | ||
<%= render "file_upload", form: form %> | ||
<div class="col-md-4"> | ||
<h3><span class="bullet">2</span> Upload Your Files</h3> | ||
<% if collections? %> | ||
<div class="well well-sm"> | ||
<h4><span class="bullet">A</span></h4> | ||
<div class="step"> | ||
<b>Upload a CSV</b> that lists the metadata and files you want to import. | ||
</div> | ||
<div class="text-center"> | ||
<%= render "file_upload", form: form %> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="col-md-4"> | ||
<div class="well well-lg"> | ||
<p> <b>Choose a collection</b>. All imports need to be associated with a collection. </p> | ||
<div class="text-center"> | ||
<%= render "collection_selection", form: form %> | ||
<div class="well well-sm"> | ||
<h4><span class="bullet">B</span></h4> | ||
<div class="step"> | ||
<b>Choose a collection</b> that you'd like your new works to be associated with. | ||
</div> | ||
<div class="text-center"> | ||
<%= render "collection_selection", form: form %> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="col-md-4"> | ||
<div class="well well-lg"> | ||
<p> <b>Import Behavior</b>. Choose how you would like existing IDs to be handled.</p> | ||
<div class="text-center"> | ||
<%= render "update_actor_stack", form: form %> | ||
<div class="well well-sm"> | ||
<h4><span class="bullet">C</span></h4> | ||
<div class="step"> | ||
<b>Select update behavior.</b> New works will always be added to the repository. Existing works can be overwritten, updated, | ||
or ignored. | ||
</div> | ||
<div class="text-center"> | ||
<%= render "update_actor_stack", form: form %> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="col-md-4"> | ||
<div class="well well-lg"> | ||
<p> <b>Preview your import</b> before starting the process. </p> | ||
<div class="text-center"> | ||
<%= render "actions", form: form %> | ||
<div class="well well-sm"> | ||
<h4><span class="bullet">D</span></h4> | ||
<div class="step"> | ||
<b>Preview your import</b> and start the import if everything looks good. | ||
or overwritten | ||
</div> | ||
<div class="text-center"> | ||
<%= render "actions", form: form %> | ||
</div> | ||
</div> | ||
</div> | ||
<% else %> | ||
<div class="well well-sm no-collection "> | ||
<h4><span class="bullet">A</span></h4> | ||
<div class="step"> | ||
You must <a href="/dashboard/collections">create a collection</a> before importing content. | ||
</div> | ||
</div> | ||
<% end %> | ||
</div> | ||
|
||
<div class="row"> | ||
<div class="col-md-4"> | ||
<%= render "error", csv_import: csv_import %> | ||
</div> | ||
<div class="col-md-4"> | ||
<div class="col-md-4"> | ||
<h3><span class="bullet">3</span> Monitor Your Progress</h3> | ||
<div class="well well-sm"> | ||
<h4><span class="bullet">A</span></h4> | ||
<div class="step"> | ||
<b>Check the status</b> of batches that have been submitted for import. | ||
</div> | ||
<div class="text-center"> | ||
<a href="/csv_import_details/index" class="btn btn-default btn-lg"><i class="glyphicon glyphicon-roundabout"></i> Import History</a> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
|
||
<%= form.hidden_field :manifest_cache %> | ||
<% else %> | ||
<%= render 'no_collection' %> | ||
<% end %> | ||
</div> <!-- row --> | ||
<div class="row"> | ||
<%= render "error", csv_import: csv_import %> | ||
</div> <!-- row --> | ||
</div> <!-- panel-body --> | ||
</div> <!-- panel --> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
<div class="form-group"> | ||
<%= form.select :update_actor_stack, options_for_select([['Update metadata for any existing IDs', 'HyraxMetadataOnly'], | ||
['Only create works for new IDs', 'HyraxOnlyNew' ], | ||
['Update metadata and files or create new works as required', 'HyraxDelete']]), {}, class: "form-control", id: "update_actor_stack_id" %> | ||
</div> | ||
<%= form.select :update_actor_stack, options_for_select([['Overwrite All Files & Metadata', 'HyraxDelete'], | ||
['Update Existing Metadata, create new works', 'HyraxMetadataOnly'], | ||
['Ignore Existing Works, new works only', 'HyraxOnlyNew' ]]), {}, class: "form-control", id: "update_actor_stack_id" %> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<%= javascript_include_tag 'zizia/application' %> | ||
<h2><span class="glyphicon glyphicon-cloud-upload"></span> Begin Your CSV Import </h2> | ||
<%= render 'form', csv_import: @csv_import %> | ||
<div id="zizia_new" class="zizia"> | ||
<h2><span class="glyphicon glyphicon-cloud-upload"></span> Batch Import </h2> | ||
<%= render 'form', csv_import: @csv_import %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters