From c4f3618bca36754865bf665a22fbb5252bb65700 Mon Sep 17 00:00:00 2001 From: Bess Sadler Date: Thu, 22 Aug 2019 16:38:31 -0400 Subject: [PATCH] Style missing data on the metadata field guide Make it easier to find missing import headers and form labels by putting the missing data indicators in a different color. --- app/assets/stylesheets/curate.scss | 4 ++++ app/helpers/metadata_details_helper.rb | 6 ++++++ app/views/metadata_details/show.html.erb | 4 ++++ 3 files changed, 14 insertions(+) create mode 100644 app/helpers/metadata_details_helper.rb diff --git a/app/assets/stylesheets/curate.scss b/app/assets/stylesheets/curate.scss index 617b8d52..2119a2c2 100644 --- a/app/assets/stylesheets/curate.scss +++ b/app/assets/stylesheets/curate.scss @@ -17,3 +17,7 @@ display: block; height: 20px; } + +.missing { + color: grey; +} diff --git a/app/helpers/metadata_details_helper.rb b/app/helpers/metadata_details_helper.rb new file mode 100644 index 00000000..d836e2c2 --- /dev/null +++ b/app/helpers/metadata_details_helper.rb @@ -0,0 +1,6 @@ +module MetadataDetailsHelper + def css_class(value) + return "missing" if value == "not configured" + return "missing" if value.match?(/translation missing/) + end +end diff --git a/app/views/metadata_details/show.html.erb b/app/views/metadata_details/show.html.erb index 07185736..b71eb0d3 100644 --- a/app/views/metadata_details/show.html.erb +++ b/app/views/metadata_details/show.html.erb @@ -27,11 +27,15 @@
Edit Form Label: + > <%= detail[1][:label] %> +
Import header: + > <%= detail[1][:csv_header] %> +