From c804c595fbe92d799f79e91df7a5727c8589359f Mon Sep 17 00:00:00 2001 From: Mark Bussey Date: Thu, 2 Sep 2021 09:38:06 -0500 Subject: [PATCH] Add a link to the CSV template in the Field Guide (#116) Ensure the user can download the current version of the CSV template file from the Metadata Field Guide. Also adds additional formatting enhancements to the Field Guide. --- .../stylesheets/zizia/_field_guide.scss | 10 +++++++ .../zizia/metadata_details/show.html.erb | 25 ++++++++++------ .../metadata_details/show.html.erb_spec.rb | 30 +++++++++++++++++++ 3 files changed, 56 insertions(+), 9 deletions(-) create mode 100644 spec/views/zizia/metadata_details/show.html.erb_spec.rb diff --git a/app/assets/stylesheets/zizia/_field_guide.scss b/app/assets/stylesheets/zizia/_field_guide.scss index 2ee2e08..fd98838 100644 --- a/app/assets/stylesheets/zizia/_field_guide.scss +++ b/app/assets/stylesheets/zizia/_field_guide.scss @@ -4,6 +4,16 @@ margin-top: 1em; margin-bottom: 1em; font-size: large; + width: 50em; + border-bottom: 5px solid lightgray; + + p { + margin-bottom: 1em; + }; +} + +.guide-container { + width: 50em; } .delimiter { diff --git a/app/views/zizia/metadata_details/show.html.erb b/app/views/zizia/metadata_details/show.html.erb index d5e9b2e..7753d36 100644 --- a/app/views/zizia/metadata_details/show.html.erb +++ b/app/views/zizia/metadata_details/show.html.erb @@ -1,25 +1,32 @@

Metadata Field Guide

- This is a dynamically generated guide to the metadata used in this application. - Many fields are multi-valued. To include multiple values in a single CSV cell, - separate them with the delimiter that has been configured for this application: - <%= @delimiter %> + This is a dynamically generated guide to the metadata used in this application. + You can download a CSV template with the headers required to describe and import + your own collections. Download the template and use the field descriptions below to help + guide filling out the import manifest for works and collections you would like + to import into your repository. +

+ +

data-turbolinks="false" > Template for New Imports

+ +

+ Some fields can accept multiple values. To include multiple values in a single CSV cell, + separate them with the delimiter that has been configured for this application: + <%= @delimiter %>

- Example: Value 1<%= @delimiter %>Value 2 + Example: Value 1<%= @delimiter %>Value 2

-<% content_for :title, 'Importer Field Guide' %>
- Download as CSV