From df1374d15892aea3de35d31093e1e766415e597b Mon Sep 17 00:00:00 2001 From: Summer Cook Date: Tue, 1 Aug 2023 14:31:37 -0300 Subject: [PATCH 1/3] add 3 cdl fields and cdl's own attribute rows --- app/views/hyrax/cdls/_attribute_rows.html.erb | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 app/views/hyrax/cdls/_attribute_rows.html.erb diff --git a/app/views/hyrax/cdls/_attribute_rows.html.erb b/app/views/hyrax/cdls/_attribute_rows.html.erb new file mode 100644 index 000000000..1d1189dc7 --- /dev/null +++ b/app/views/hyrax/cdls/_attribute_rows.html.erb @@ -0,0 +1,23 @@ +<%= presenter.attribute_to_html(:admin_note, html_dl: true) if presenter.editor? %> +<%= presenter.attribute_to_html(:alternative_title, html_dl: true) %> +<%= presenter.attribute_to_html(:creator, render_as: :faceted, html_dl: true) %> +<%= presenter.attribute_to_html(:contributor, render_as: :faceted, html_dl: true) %> +<%= presenter.attribute_to_html(:subject, render_as: :faceted, html_dl: true) %> +<%= presenter.attribute_to_html(:abstract, html_dl: true) %> +<%= presenter.attribute_to_html(:publisher, render_as: :faceted, html_dl: true) %> +<%= presenter.attribute_to_html(:language, render_as: :faceted, html_dl: true) %> +<%= presenter.attribute_to_html(:identifier, render_as: :linked, search_field: 'identifier_tesim', html_dl: true) %> +<%= presenter.attribute_to_html(:based_near_label, html_dl: true) %> +<%= presenter.attribute_to_html(:keyword, render_as: :faceted, html_dl: true) %> +<%= presenter.attribute_to_html(:date_created, render_as: :linked, search_field: 'date_created_tesim', html_dl: true) %> +<%= presenter.attribute_to_html(:related_url, render_as: :external_link, html_dl: true, label: 'Related URL') %> +<%= presenter.attribute_to_html(:resource_type, render_as: :faceted, html_dl: true) %> +<%= presenter.attribute_to_html(:source, html_dl: true) %> +<%= presenter.attribute_to_html(:additional_information, html_dl: true) %> +<%= presenter.attribute_to_html(:rights_statement, html_dl: true) %> +<%= presenter.attribute_to_html(:rights_notes, render_as: :linked, html_dl: true) %> +<%= presenter.attribute_to_html(:extent, html_dl: true) %> +<%= presenter.attribute_to_html(:bibliographic_citation, html_dl: true) %> +<%= presenter.attribute_to_html(:contributing_library, html_dl: true) %> +<%= presenter.attribute_to_html(:library_catalog_identifier, html_dl: true) %> +<%= presenter.attribute_to_html(:chronology_note, html_dl: true) %> From 887e566ec86959b7f28d3d7453a34c9b87015c38 Mon Sep 17 00:00:00 2001 From: Summer Cook Date: Tue, 1 Aug 2023 14:47:53 -0300 Subject: [PATCH 2/3] make only visible to admin --- app/views/hyrax/cdls/_attribute_rows.html.erb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/hyrax/cdls/_attribute_rows.html.erb b/app/views/hyrax/cdls/_attribute_rows.html.erb index 1d1189dc7..f6a8dbdf8 100644 --- a/app/views/hyrax/cdls/_attribute_rows.html.erb +++ b/app/views/hyrax/cdls/_attribute_rows.html.erb @@ -18,6 +18,7 @@ <%= presenter.attribute_to_html(:rights_notes, render_as: :linked, html_dl: true) %> <%= presenter.attribute_to_html(:extent, html_dl: true) %> <%= presenter.attribute_to_html(:bibliographic_citation, html_dl: true) %> -<%= presenter.attribute_to_html(:contributing_library, html_dl: true) %> -<%= presenter.attribute_to_html(:library_catalog_identifier, html_dl: true) %> -<%= presenter.attribute_to_html(:chronology_note, html_dl: true) %> +<%= raise 'hell' %> +<%= presenter.attribute_to_html(:contributing_library, html_dl: true) if presenter.editor? %> +<%= presenter.attribute_to_html(:library_catalog_identifier, html_dl: true) if presenter.editor? %> +<%= presenter.attribute_to_html(:chronology_note, html_dl: true) if presenter.editor? %> From 5dbc5164e9621eb3967df8832dd260a948d84aaa Mon Sep 17 00:00:00 2001 From: Summer Cook Date: Tue, 1 Aug 2023 14:51:42 -0300 Subject: [PATCH 3/3] move attribute rows back into reshare theme --- app/views/hyrax/cdls/_attribute_rows.html.erb | 24 ------------------- .../hyrax/base/_attribute_rows.html.erb | 5 +++- 2 files changed, 4 insertions(+), 25 deletions(-) delete mode 100644 app/views/hyrax/cdls/_attribute_rows.html.erb diff --git a/app/views/hyrax/cdls/_attribute_rows.html.erb b/app/views/hyrax/cdls/_attribute_rows.html.erb deleted file mode 100644 index f6a8dbdf8..000000000 --- a/app/views/hyrax/cdls/_attribute_rows.html.erb +++ /dev/null @@ -1,24 +0,0 @@ -<%= presenter.attribute_to_html(:admin_note, html_dl: true) if presenter.editor? %> -<%= presenter.attribute_to_html(:alternative_title, html_dl: true) %> -<%= presenter.attribute_to_html(:creator, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:contributor, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:subject, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:abstract, html_dl: true) %> -<%= presenter.attribute_to_html(:publisher, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:language, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:identifier, render_as: :linked, search_field: 'identifier_tesim', html_dl: true) %> -<%= presenter.attribute_to_html(:based_near_label, html_dl: true) %> -<%= presenter.attribute_to_html(:keyword, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:date_created, render_as: :linked, search_field: 'date_created_tesim', html_dl: true) %> -<%= presenter.attribute_to_html(:related_url, render_as: :external_link, html_dl: true, label: 'Related URL') %> -<%= presenter.attribute_to_html(:resource_type, render_as: :faceted, html_dl: true) %> -<%= presenter.attribute_to_html(:source, html_dl: true) %> -<%= presenter.attribute_to_html(:additional_information, html_dl: true) %> -<%= presenter.attribute_to_html(:rights_statement, html_dl: true) %> -<%= presenter.attribute_to_html(:rights_notes, render_as: :linked, html_dl: true) %> -<%= presenter.attribute_to_html(:extent, html_dl: true) %> -<%= presenter.attribute_to_html(:bibliographic_citation, html_dl: true) %> -<%= raise 'hell' %> -<%= presenter.attribute_to_html(:contributing_library, html_dl: true) if presenter.editor? %> -<%= presenter.attribute_to_html(:library_catalog_identifier, html_dl: true) if presenter.editor? %> -<%= presenter.attribute_to_html(:chronology_note, html_dl: true) if presenter.editor? %> diff --git a/app/views/themes/reshare_show/hyrax/base/_attribute_rows.html.erb b/app/views/themes/reshare_show/hyrax/base/_attribute_rows.html.erb index 76bb6e572..c05132f70 100644 --- a/app/views/themes/reshare_show/hyrax/base/_attribute_rows.html.erb +++ b/app/views/themes/reshare_show/hyrax/base/_attribute_rows.html.erb @@ -17,4 +17,7 @@ <%= presenter.attribute_to_html(:rights_statement, html_dl: true) %> <%= presenter.attribute_to_html(:rights_notes, html_dl: true) %> <%= presenter.attribute_to_html(:extent, html_dl: true) %> -<%= presenter.attribute_to_html(:bibliographic_citation, html_dl: true) %> \ No newline at end of file +<%= presenter.attribute_to_html(:bibliographic_citation, html_dl: true) %> +<%= presenter.attribute_to_html(:contributing_library, html_dl: true) if presenter.editor? %> +<%= presenter.attribute_to_html(:library_catalog_identifier, html_dl: true) if presenter.editor? %> +<%= presenter.attribute_to_html(:chronology_note, html_dl: true) if presenter.editor? %> \ No newline at end of file