From f907907533574023a992579901a7b0d5cf4e37c9 Mon Sep 17 00:00:00 2001 From: Renee LeBeau Date: Wed, 3 Jun 2026 08:26:54 -0400 Subject: [PATCH 1/2] IULRDC-196 DataCORE: adding views from hyrax --- .../hyrax/admin/admin_sets/_form.html.erb | 47 ++++++ .../admin_sets/_form_visibility.html.erb | 64 ++++++++ .../_show_document_list_row.html.erb | 51 ++++++ .../hyrax/admin/admin_sets/show.html.erb | 36 +++++ .../admin/collection_types/_form.html.erb | 72 +++++++++ .../_form_participants.html.erb | 66 ++++++++ app/views/hyrax/admin/features/index.html.erb | 67 ++++++++ .../hyrax/admin/stats/_stats_by_date.html.erb | 8 + app/views/hyrax/admin/stats/_works.html.erb | 8 + app/views/hyrax/admin/stats/show.html.erb | 7 + .../hyrax/admin/workflow_roles/index.html.erb | 65 ++++++++ app/views/hyrax/base/_share_with.html.erb | 6 + app/views/hyrax/content_blocks/_form.html.erb | 65 ++++++++ .../collections/_collection_title.html.erb | 23 +++ .../dashboard/collections/_form.html.erb | 110 +++++++++++++ .../collections/_form_branding.html.erb | 153 ++++++++++++++++++ .../dashboard/profiles/_edit_primary.html.erb | 59 +++++++ app/views/hyrax/embargoes/index.html.erb | 24 +++ app/views/hyrax/file_sets/edit.html.erb | 35 ++++ app/views/hyrax/my/works/_tabs.html.erb | 8 + app/views/hyrax/pages/_form.html.erb | 82 ++++++++++ 21 files changed, 1056 insertions(+) create mode 100644 app/views/hyrax/admin/admin_sets/_form.html.erb create mode 100644 app/views/hyrax/admin/admin_sets/_form_visibility.html.erb create mode 100644 app/views/hyrax/admin/admin_sets/_show_document_list_row.html.erb create mode 100644 app/views/hyrax/admin/admin_sets/show.html.erb create mode 100644 app/views/hyrax/admin/collection_types/_form.html.erb create mode 100644 app/views/hyrax/admin/collection_types/_form_participants.html.erb create mode 100644 app/views/hyrax/admin/features/index.html.erb create mode 100644 app/views/hyrax/admin/stats/_stats_by_date.html.erb create mode 100644 app/views/hyrax/admin/stats/_works.html.erb create mode 100644 app/views/hyrax/admin/stats/show.html.erb create mode 100644 app/views/hyrax/admin/workflow_roles/index.html.erb create mode 100644 app/views/hyrax/base/_share_with.html.erb create mode 100644 app/views/hyrax/content_blocks/_form.html.erb create mode 100644 app/views/hyrax/dashboard/collections/_collection_title.html.erb create mode 100644 app/views/hyrax/dashboard/collections/_form.html.erb create mode 100644 app/views/hyrax/dashboard/collections/_form_branding.html.erb create mode 100644 app/views/hyrax/dashboard/profiles/_edit_primary.html.erb create mode 100644 app/views/hyrax/embargoes/index.html.erb create mode 100644 app/views/hyrax/file_sets/edit.html.erb create mode 100644 app/views/hyrax/my/works/_tabs.html.erb create mode 100644 app/views/hyrax/pages/_form.html.erb diff --git a/app/views/hyrax/admin/admin_sets/_form.html.erb b/app/views/hyrax/admin/admin_sets/_form.html.erb new file mode 100644 index 00000000..0c30fe51 --- /dev/null +++ b/app/views/hyrax/admin/admin_sets/_form.html.erb @@ -0,0 +1,47 @@ +
+ +
+
+
+ <%= simple_form_for @form, url: [hyrax, :admin, @form] do |f| %> +
+ <%= render 'form_metadata', f: f %> + + <% if f.object.persisted? && f.object.member_ids.present? %> + <%# we're loading these values dynamically to speed page load %> + <%= f.input :thumbnail_id, + input_html: { data: { text: f.object.thumbnail_title } } %> + <% end %> + +
+ + + <% end %> +
+
+ <% if @form.persisted? %> + <%= render 'form_participants' %> + <%= render 'form_visibility' %> + <%= render 'form_workflow' %> + <% end %> +
+
diff --git a/app/views/hyrax/admin/admin_sets/_form_visibility.html.erb b/app/views/hyrax/admin/admin_sets/_form_visibility.html.erb new file mode 100644 index 00000000..297dd419 --- /dev/null +++ b/app/views/hyrax/admin/admin_sets/_form_visibility.html.erb @@ -0,0 +1,64 @@ +
+
+ <%= simple_form_for @form.permission_template, + url: [hyrax, :admin, @form, :permission_template] do |f| %> +
+

<%= t('.page_description') %>

+

<%= t('.release.title') %>

+

<%= t('.release.description') %>

+
+ +
+
+ +
    +
  • + +
  • +
  • + + <%= f.date_field :release_date, wrapper: :inline, class: 'datepicker form-control' %> +
  • +
  • + +
  • +
+
+
+ + <%= f.date_field :release_date, wrapper: :inline, class: 'datepicker form-control' %> +
+

<%= t('.visibility.title') %>

+

<%= t('.visibility.description') %>

+ <%# List each option in a
tag %> + <%= f.collection_radio_buttons :visibility, f.object.visibility_options, :first, :last, item_wrapper_tag: :div, item_wrapper_class: 'radio' do |b| %> + <%# NOTE: Bug in simple_form causes nested labels: https://github.com/plataformatec/simple_form/issues/1190 This block is a workaround. %> + <% b.radio_button + b.text %> + <% end %> +
+ + <% end %> +
+
diff --git a/app/views/hyrax/admin/admin_sets/_show_document_list_row.html.erb b/app/views/hyrax/admin/admin_sets/_show_document_list_row.html.erb new file mode 100644 index 00000000..7cb5538c --- /dev/null +++ b/app/views/hyrax/admin/admin_sets/_show_document_list_row.html.erb @@ -0,0 +1,51 @@ +<% document = show_document_list_row %> +<% id = document.id %> + +   + <% if current_user and document.depositor != current_user.user_key %> + + <% end %> + + +
+ <%= link_to [main_app, document], class: "media-left" do %> + <%= render_thumbnail_tag document, { class: "hidden-xs file_listing_thumbnail" }, { suppress_link: true } %> + <% end %> +
+

+ <%= link_to document.title_or_label, [main_app, document], id: "src_copy_link#{id}", class: "#{'document-title' if document.title_or_label == document.label}" %> + +

+ <%= render_collection_links(document) %> +
+
+ + <%= document.date_uploaded %> + + <%= render_visibility_link(document) %> + + + <%= document.workflow_state %> + + + <%= render 'hyrax/dashboard/collections/show_document_list_menu', document: document %> + + + + +
+
Creator:
+
<%= document.creator.to_a.to_sentence %>
+
Depositor:
+
<%= link_to_profile document.depositor %>
+
Edit Access:
+
+ <% if document.edit_groups.present? %> + Groups: <%= document.edit_groups.join(', ') %> +
+ <% end %> + Users: <%= document.edit_people.join(', ') %> +
+
+ + diff --git a/app/views/hyrax/admin/admin_sets/show.html.erb b/app/views/hyrax/admin/admin_sets/show.html.erb new file mode 100644 index 00000000..c987dbb3 --- /dev/null +++ b/app/views/hyrax/admin/admin_sets/show.html.erb @@ -0,0 +1,36 @@ +<% provide :page_header do %> +

<%= t('.header') %>

+<% end %> + +
+
+
+ <%= render 'show_actions', presenter: @presenter %> + +
+
+ <% if has_thumbnail? @presenter.solr_document %> +
+ <%= render_thumbnail_tag @presenter.solr_document, {}, suppress_link: true %> +
+ <% else %> + + <% end %> +
+
+ <%= render 'collection_description', presenter: @presenter %> + <%= render 'show_descriptions' %> +
+
+ +
+

<%= t '.item_list_header' %>

+ <%= render 'sort_and_per_page', collection: @presenter %> + + <%= render_document_index @member_docs %> + + <%= render 'paginate' %> +
+
+
+
diff --git a/app/views/hyrax/admin/collection_types/_form.html.erb b/app/views/hyrax/admin/collection_types/_form.html.erb new file mode 100644 index 00000000..e8556488 --- /dev/null +++ b/app/views/hyrax/admin/collection_types/_form.html.erb @@ -0,0 +1,72 @@ +<%= render "shared/nav_safety_modal" %> +
+ + <% form_url = @form.id.nil? ? hyrax.admin_collection_types_path : hyrax.admin_collection_type_path(@form.id) %> + <%= simple_form_for @form, url: form_url, as: :collection_type, html: {class: 'nav-safety'} do |f| %> +
+ <% if @collection_type.admin_set? %> +
+
+
+ <%= render 'form_metadata_admin_set', f: f %> +
+
+
+ <% else %> +
+
+
+ <%= render 'form_metadata', f: f %> +
+
+
+ <% end %> +
+
+
+ <%= render 'form_settings', f: f %> +
+
+
+ <% # end of form %> + <% # TODO: The participants partial can't sit inside the other form, moved down here temporarily %> +
+
+
+ <%= render 'form_participants' %> +
+
+
+
+
+
+ <%= render 'form_appearance', f: f %> +
+
+
+ +
+ <% end %> +
diff --git a/app/views/hyrax/admin/collection_types/_form_participants.html.erb b/app/views/hyrax/admin/collection_types/_form_participants.html.erb new file mode 100644 index 00000000..c7b0b3b4 --- /dev/null +++ b/app/views/hyrax/admin/collection_types/_form_participants.html.erb @@ -0,0 +1,66 @@ +

<%= t('.add_participants') %>

+

<%= t('.instructions') %>

+<% access_options = options_for_select([['Manager', Hyrax::CollectionTypeParticipant::MANAGE_ACCESS], ['Creator', Hyrax::CollectionTypeParticipant::CREATE_ACCESS]]) %> +<% unless @collection_type_participant.nil? %> + +
+ +
+ <%= simple_form_for @collection_type_participant, + url: hyrax.admin_collection_type_participants_path, + html: { id: 'group-participants-form' }, + as: :collection_type_participant do |f| %> +
+ + +
+ <%= f.hidden_field :hyrax_collection_type_id, value: @collection_type_participant.hyrax_collection_type_id %> + <%= f.hidden_field :agent_type, value: Hyrax::CollectionTypeParticipant::GROUP_TYPE %> + <%= f.text_field :agent_id, + placeholder: "Search for a group...", + class: 'form-control' %> + as + <%= f.select :access, + access_options, + { prompt: "Select a role..." }, + class: 'form-control' %> + + <%= f.submit t('.submit'), class: 'btn btn-info', :disabled => true %> +
+
+ <% end %> +
+ + +
+ <%= simple_form_for @collection_type_participant, + url: hyrax.admin_collection_type_participants_path, + html: { id: 'user-participants-form' }, + as: :collection_type_participant do |f| %> +
+ + +
+ <%= f.hidden_field :hyrax_collection_type_id, value: @collection_type_participant.hyrax_collection_type_id %> + <%= f.hidden_field :agent_type, value: Hyrax::CollectionTypeParticipant::USER_TYPE %> + <%= f.text_field :agent_id, + placeholder: "Search for a user..." %> + as + <%= f.select :access, + access_options, + { prompt: "Select a role..." }, + class: 'form-control' %> + + <%= f.submit t('.submit'), class: 'btn btn-info', :disabled => true %> +
+
+ <% end %> +
+
+ +<% end %> +
+ <%= t('.current_participants') %> + <%= render 'form_participant_table', access: 'managers', filter: :manager? %> + <%= render 'form_participant_table', access: 'creators', filter: :creator? %> +
diff --git a/app/views/hyrax/admin/features/index.html.erb b/app/views/hyrax/admin/features/index.html.erb new file mode 100644 index 00000000..e850a395 --- /dev/null +++ b/app/views/hyrax/admin/features/index.html.erb @@ -0,0 +1,67 @@ +<% provide :page_header do %> +

<%= t('.header') %>

+<% end %> +
+
+
+
+
+ + + + + + + + + + + <% @feature_set.grouped_features.each do |group, features| -%> + <% if @feature_set.grouped? -%> + + + + + <% end -%> + <% features.each do |feature| %> + + + + + + <% @feature_set.strategies.each do |strategy| -%> + <% next unless strategy.is_a? Flipflop::Strategies::ActiveRecordStrategy %> + + <% end -%> + + <% end -%> + <% end -%> + +
<%= t('.feature') %><%= t('.description') %><%= t('.action') %>
+

+ <%= t(group ? group.name : :default, scope: [:flipflop, :groups], default: group ? group.title : nil) -%> +

+
+ <%= @feature_set.status(feature) -%> + <%= feature.name.humanize -%><%= feature.description -%> +
+ <%= form_tag(hyrax.admin_feature_strategy_path(feature.key, strategy.key), method: :put) do -%> +
+ <%= submit_tag "on", + type: "submit", + class: Flipflop.enabled?(feature.name.to_sym) ? 'active' : nil, + disabled: !strategy.switchable? -%> + + <%= submit_tag "off", + type: "submit", + class: Flipflop.enabled?(feature.name.to_sym) ? nil : 'active', + disabled: !strategy.switchable? -%> +
+ <% end -%> +
+
+
+
+
+
+
diff --git a/app/views/hyrax/admin/stats/_stats_by_date.html.erb b/app/views/hyrax/admin/stats/_stats_by_date.html.erb new file mode 100644 index 00000000..ec793dfc --- /dev/null +++ b/app/views/hyrax/admin/stats/_stats_by_date.html.erb @@ -0,0 +1,8 @@ +

Statistics By Date

+

Statistics in this section are filtered by the dates entered in the form below. + The data is unfiltered unless the date form has been filled in. Start date is required and the default end is now. +

+<%= render "date_form" %> +<%= render "works" %> +<%= render "new_users" %> +<%= render "deposits" %> diff --git a/app/views/hyrax/admin/stats/_works.html.erb b/app/views/hyrax/admin/stats/_works.html.erb new file mode 100644 index 00000000..38242ae6 --- /dev/null +++ b/app/views/hyrax/admin/stats/_works.html.erb @@ -0,0 +1,8 @@ +

<%= t('hyrax.admin.stats.works.headers.main') %> (<%= @presenter.date_filter_string %>)

+

<%= t('hyrax.admin.stats.works.headers.total') %> <%= @presenter.works_count[:total] %>

+

<%= t('hyrax.admin.stats.works.headers.visibility') %>

+
    +
  • <%= t('hyrax.visibility.open.text') %> (<%= @presenter.works_count[:public] %>)
  • +
  • <%= t('hyrax.visibility.authenticated.text', institution: institution_name) %> (<%= @presenter.works_count[:registered] %>)
  • +
  • <%= t('hyrax.visibility.restricted.text') %> (<%= @presenter.works_count[:private] %>)
  • +
diff --git a/app/views/hyrax/admin/stats/show.html.erb b/app/views/hyrax/admin/stats/show.html.erb new file mode 100644 index 00000000..0e0416d5 --- /dev/null +++ b/app/views/hyrax/admin/stats/show.html.erb @@ -0,0 +1,7 @@ +
+
+ <%= render "stats_by_date" %> +
+ <%= render "top_data" %> +
+
diff --git a/app/views/hyrax/admin/workflow_roles/index.html.erb b/app/views/hyrax/admin/workflow_roles/index.html.erb new file mode 100644 index 00000000..dc26cd18 --- /dev/null +++ b/app/views/hyrax/admin/workflow_roles/index.html.erb @@ -0,0 +1,65 @@ +<% provide :page_header do %> +

<%= t("hyrax.admin.workflow_roles.header") %>

+<% end %> + +
+
+
+
+

<%= t('.new_role') %>

+
+
+ <%= simple_form_for Hyrax::Forms::WorkflowResponsibilityForm.new, url: hyrax.admin_workflow_roles_path do |f| %> + <%= f.input :user_id, as: :select, collection: f.object.user_options %> + <%= f.input :workflow_role_id, as: :select, collection: f.object.workflow_role_options %> + <%= f.submit class: 'btn btn-sm btn-primary' %> + <% end %> +
+
+
+
+ +
+
+
+
+

<%= t('.current_roles') %>

+
+
+ + + + + + + + <% @presenter.users.each do |user| %> + + + + <% agent_presenter = @presenter.presenter_for(user) %> + <% if agent_presenter && agent_presenter.responsibilities_present? %> + + <% else %> + + <% end %> + + <% end %> + +
<%= t('.header.name') %><%= t('.header.user') %><%= t('.header.roles') %>
<%= user.name %><%= user.user_key %> +
    + <% agent_presenter.responsibilities do |responsibility_presenter| %> +
  • <%= responsibility_presenter.label %> + <%= link_to hyrax.admin_workflow_role_path(responsibility_presenter.responsibility), + method: :delete, + data: { confirm: t('.delete.confirm') } do %> + + <% end %> +
  • + <% end %> +
+
<%= t('.no_roles') %>
+
+
+
+
diff --git a/app/views/hyrax/base/_share_with.html.erb b/app/views/hyrax/base/_share_with.html.erb new file mode 100644 index 00000000..9ca9a1cf --- /dev/null +++ b/app/views/hyrax/base/_share_with.html.erb @@ -0,0 +1,6 @@ +

<%= t('.share_with_html', account_name: t('hyrax.account_name')) %>

+<%= render 'hyrax/file_sets/groups_description' %> +
<%= t('.definition_heading') %>
+

+ <%= t('.definitions_html', application_name: application_name, institution_name: institution_name) %> +

diff --git a/app/views/hyrax/content_blocks/_form.html.erb b/app/views/hyrax/content_blocks/_form.html.erb new file mode 100644 index 00000000..a5cc592e --- /dev/null +++ b/app/views/hyrax/content_blocks/_form.html.erb @@ -0,0 +1,65 @@ +<%= render "shared/nav_safety_modal" %> +
+ +
+
+
+ <%= simple_form_for ContentBlock.for(:announcement), url: hyrax.content_block_path(ContentBlock.for(:announcement)), html: {class: 'nav-safety'} do |f| %> +
+
+ <%= f.label :announcement %>
+ <%= f.text_area :announcement, value: f.object.value, class: 'form-control tinymce', rows: 20, cols: 120 %> +
+
+ + <% end %> +
+
+
+
+ <%= simple_form_for ContentBlock.for(:marketing), url: hyrax.content_block_path(ContentBlock.for(:marketing)), html: {class: 'nav-safety'} do |f| %> +
+
+ <%= f.label :marketing %>
+ <%= f.text_area :marketing, value: f.object.value, class: 'form-control tinymce', rows: 20, cols: 120 %> +
+
+ + <% end %> +
+
+
+
+ <%= simple_form_for ContentBlock.for(:researcher), url: hyrax.content_block_path(ContentBlock.for(:researcher)), html: {class: 'nav-safety'} do |f| %> +
+
+ <%= f.label :researcher %>
+ <%= f.text_area :researcher, value: f.object.value, class: 'form-control tinymce', rows: 20, cols: 120 %> +
+
+ + <% end %> +
+
+
+
+<%= tinymce :content_block %> diff --git a/app/views/hyrax/dashboard/collections/_collection_title.html.erb b/app/views/hyrax/dashboard/collections/_collection_title.html.erb new file mode 100644 index 00000000..c1b2cf05 --- /dev/null +++ b/app/views/hyrax/dashboard/collections/_collection_title.html.erb @@ -0,0 +1,23 @@ +<% id = presenter.id %> + +
+ +
+

+ <% # List multiple titles %> + <% presenter.title.each_with_index do |title, index| %> + <%= title %> + <% end %> +

+ <%= presenter.permission_badge %> + <%= presenter.collection_type_badge %> +
+
+ <%= render 'show_actions', presenter: presenter %> +
+
diff --git a/app/views/hyrax/dashboard/collections/_form.html.erb b/app/views/hyrax/dashboard/collections/_form.html.erb new file mode 100644 index 00000000..99bc1d57 --- /dev/null +++ b/app/views/hyrax/dashboard/collections/_form.html.erb @@ -0,0 +1,110 @@ +
+ + + <%= simple_form_for @form, url: [hyrax, :dashboard, @form], html: { class: 'editor' } do |f| %> +
+
+
+
+ +
+ <% f.object.primary_terms.each do |term| %> + <%= render_edit_field_partial(term, f: f) %> + <% end %> + + <% if f.object.persisted? %> + <%# we're loading these values dynamically to speed page load %> + <%= f.input :thumbnail_id, + input_html: { data: { text: f.object.thumbnail_title } } %> + <% end %> +
+ <% if f.object.display_additional_fields? %> + <%= link_to t('hyrax.collection.form.additional_fields'), + '#extended-terms', + class: 'btn btn-default additional-fields', + data: { toggle: 'collapse' }, + role: "button", + 'aria-expanded'=> "false", + 'aria-controls'=> "extended-terms" %> +
+ <% f.object.secondary_terms.each do |term| %> + <%= render_edit_field_partial(term, f: f) %> + <% end %> +
+ <% end %> + <%= hidden_field_tag :type, params[:type] %> + <%= hidden_field_tag :stay_on_edit, true %> + <%= hidden_field_tag :collection_type_gid, @collection.collection_type_gid %> + + <% if params[:parent_id].present? %> + <%= hidden_field_tag :parent_id, params[:parent_id] %> + <% end %> + <% if params[:batch_document_ids].present? %> + <% params[:batch_document_ids].each do |batch_item| %> + + <% end %> + <% end %> +
+
+
+ + <% if @form.persisted? %> +
+
+
+ <%= render 'form_branding', f: f %> +
+
+
+ +
+
+
+ <%= render 'form_discovery', f: f %> +
+
+
+ +
+
+
+ <%= render 'form_share', f: f %> +
+
+
+ <% end %> + + +
+ <% end # simple_form_for %> + +
diff --git a/app/views/hyrax/dashboard/collections/_form_branding.html.erb b/app/views/hyrax/dashboard/collections/_form_branding.html.erb new file mode 100644 index 00000000..ad90f376 --- /dev/null +++ b/app/views/hyrax/dashboard/collections/_form_branding.html.erb @@ -0,0 +1,153 @@ +
+

<%= t('.branding.label') %>

+

<%= t('.branding.description') %>

+ +

<%= t('.banner.description') %>.

+ +
+ + + + + +
+
+ + + + Choose File + + +
+ + +
+ +
+
+
+ +
 
+
+
+ +
+
+
+ <% if f.object.banner_info[:file] %> + + + <% else %> + + <% end %> + + + +
+
+
+
+ + <%= render 'hyrax/uploads/js_templates_branding' %> + + +

<%= t('.logo.description') %>

+ + +
diff --git a/app/views/hyrax/dashboard/profiles/_edit_primary.html.erb b/app/views/hyrax/dashboard/profiles/_edit_primary.html.erb new file mode 100644 index 00000000..1f3e7e06 --- /dev/null +++ b/app/views/hyrax/dashboard/profiles/_edit_primary.html.erb @@ -0,0 +1,59 @@ +<%= form_for @user, + url: hyrax.dashboard_profile_path(@user.to_param), + html: { multipart: true, class: 'form-horizontal' } do |f| %> +
+ <%= f.label :avatar, ' Change picture'.html_safe, class: "col-xs-4 control-label" %> +
+ <%= image_tag @user.avatar.url(:thumb) if @user.avatar? %> + <%= f.file_field :avatar %> + <%= f.hidden_field :avatar_cache %> + JPG, GIF, or PNG (less than 2MB) + +
+ <%= f.label :remove_avatar do %> + <%= f.check_box :remove_avatar %> + Delete picture + + <% end %> +
+
+
+ + <% if Hyrax.config.arkivo_api? %> + <%= render partial: 'zotero', locals: { f: f, user: @user } %> + <% end %> + +
+ <%= f.label :orcid, class: 'col-xs-4 control-label' do %> + <%= orcid_label %> + <% end %> +
+ <%= f.text_field :orcid, class: "form-control" %> +
+
+ +
+ <%= f.label :twitter_handle, ' Twitter Handle'.html_safe, class: 'col-xs-4 control-label' %> +
+ <%= f.text_field :twitter_handle, class: "form-control" %> +
+
+ +
+ <%= f.label :facebook_handle, ' Facebook Handle'.html_safe, class: 'col-xs-4 control-label' %> +
+ <%= f.text_field :facebook_handle, class: "form-control" %> +
+
+ +
+ <%= f.label :googleplus_handle, ' Google+ Handle'.html_safe, class: 'col-xs-4 control-label' %> +
+ <%= f.text_field :googleplus_handle, class: "form-control" %> +
+
+ + <%= render 'trophy_edit', trophies: @trophies %> + + <%= f.button ' Save Profile'.html_safe, type: 'submit', class: "btn btn-primary" %> +<% end %> diff --git a/app/views/hyrax/embargoes/index.html.erb b/app/views/hyrax/embargoes/index.html.erb new file mode 100644 index 00000000..6467f2ce --- /dev/null +++ b/app/views/hyrax/embargoes/index.html.erb @@ -0,0 +1,24 @@ +<% provide :page_header do %> +

<%= t('.manage_embargoes') %>

+<% end %> + +
+ +
+
+
+ <%= render "list_active_embargoes" %> +
+
+ <%= render "list_expired_active_embargoes" %> +
+
+ <%= render "list_deactivated_embargoes" %> +
+
+
+
diff --git a/app/views/hyrax/file_sets/edit.html.erb b/app/views/hyrax/file_sets/edit.html.erb new file mode 100644 index 00000000..70e4f057 --- /dev/null +++ b/app/views/hyrax/file_sets/edit.html.erb @@ -0,0 +1,35 @@ +<% provide :page_title, curation_concern_page_title(curation_concern) %> +<% provide :page_header do %> +

<%= t('.header', file_set: curation_concern) %>

+<% end %> + +
+
+ <%= media_display curation_concern.to_presenter %> +
+
+
+ +
+
+
+

<%= t('.descriptions') %>

+ <%= render "form" %> +
+ <%= render "permission", file_set: curation_concern %> + <%= render "versioning", file_set: curation_concern %> +
+
+
+
+
diff --git a/app/views/hyrax/my/works/_tabs.html.erb b/app/views/hyrax/my/works/_tabs.html.erb new file mode 100644 index 00000000..7b9d7011 --- /dev/null +++ b/app/views/hyrax/my/works/_tabs.html.erb @@ -0,0 +1,8 @@ + diff --git a/app/views/hyrax/pages/_form.html.erb b/app/views/hyrax/pages/_form.html.erb new file mode 100644 index 00000000..e3b9c825 --- /dev/null +++ b/app/views/hyrax/pages/_form.html.erb @@ -0,0 +1,82 @@ +
+ +
+
+
+ <%= simple_form_for ContentBlock.for(:about), url: hyrax.page_path(ContentBlock.for(:about)) do |f| %> +
+
+ <%= f.label :about %>
+ <%= f.text_area :about, value: f.object.value, class: 'form-control tinymce', rows: 20, cols: 120 %> +
+
+ + <% end %> +
+
+
+
+ <%= simple_form_for ContentBlock.for(:help), url: hyrax.page_path(ContentBlock.for(:help)) do |f| %> +
+
+ <%= f.label :help %>
+ <%= f.text_area :help, value: f.object.value, class: 'form-control tinymce', rows: 20, cols: 120 %> +
+
+ + <% end %> +
+
+
+
+ <%= simple_form_for ContentBlock.for(:agreement), url: hyrax.page_path(ContentBlock.for(:agreement)) do |f| %> +
+
+ <%= f.label :agreement %>
+ <%= f.text_area :agreement, value: f.object.value, class: 'form-control tinymce', rows: 20, cols: 120 %> +
+
+ + <% end %> +
+
+
+
+ <%= simple_form_for ContentBlock.for(:terms), url: hyrax.page_path(ContentBlock.for(:terms)) do |f| %> +
+
+ <%= f.label :terms %>
+ <%= f.text_area :terms, value: f.object.value, class: 'form-control tinymce', rows: 20, cols: 120 %> +
+
+ + <% end %> +
+
+
+
From e34fc9db9041d7512a890acac9afb3170ce55801 Mon Sep 17 00:00:00 2001 From: Renee LeBeau Date: Tue, 14 Jul 2026 14:20:20 -0400 Subject: [PATCH 2/2] IULRDC-196 DataCORE: dashboard accessibility updates --- .../stylesheets/custom_layout/tweaks.css | 24 +-- app/assets/stylesheets/main.scss | 183 +++++++++++++----- app/assets/stylesheets/mlib-styles.css | 2 +- app/views/bulkrax/exporters/index.html.erb | 6 +- app/views/bulkrax/importers/index.html.erb | 6 +- .../hyrax/admin/admin_sets/_form.html.erb | 8 +- .../admin_sets/_form_visibility.html.erb | 2 +- .../_show_document_list_row.html.erb | 4 +- .../hyrax/admin/admin_sets/show.html.erb | 2 +- .../admin/collection_types/_form.html.erb | 8 +- .../_form_participants.html.erb | 3 +- app/views/hyrax/admin/features/index.html.erb | 2 +- .../hyrax/admin/stats/_stats_by_date.html.erb | 4 +- app/views/hyrax/admin/stats/_works.html.erb | 9 +- app/views/hyrax/admin/stats/show.html.erb | 10 +- .../hyrax/admin/workflow_roles/index.html.erb | 4 +- .../hyrax/admin/workflows/index.html.erb | 4 +- .../base/_form_member_of_collections.html.erb | 2 +- app/views/hyrax/base/_items.html.erb | 2 +- app/views/hyrax/base/_member.html.erb | 2 +- app/views/hyrax/base/_share_with.html.erb | 2 +- app/views/hyrax/base/_work_title.erb | 8 +- app/views/hyrax/content_blocks/_form.html.erb | 6 +- app/views/hyrax/dashboard/_sidebar.html.erb | 2 +- .../collections/_collection_title.html.erb | 4 +- .../dashboard/collections/_form.html.erb | 8 +- .../collections/_form_branding.html.erb | 2 +- .../collections/_list_collections.html.erb | 3 +- .../hyrax/dashboard/collections/show.html.erb | 8 +- .../dashboard/profiles/_edit_primary.html.erb | 2 +- app/views/hyrax/dashboard/show_admin.html.erb | 10 +- .../embargoes/_list_active_embargoes.html.erb | 60 +++--- .../_list_deactivated_embargoes.html.erb | 19 +- .../_list_expired_active_embargoes.html.erb | 21 +- app/views/hyrax/embargoes/index.html.erb | 8 +- app/views/hyrax/file_sets/_actions.html.erb | 2 +- app/views/hyrax/file_sets/edit.html.erb | 6 +- .../_featured_collection_fields.html.erb | 2 +- .../my/collections/_list_collections.html.erb | 3 +- app/views/hyrax/my/collections/_tabs.html.erb | 4 +- app/views/hyrax/my/works/_tabs.html.erb | 4 +- app/views/hyrax/pages/_form.html.erb | 8 +- app/views/rack_attacks/edit.html.erb | 3 +- app/views/robots/edit.html.erb | 2 +- config/locales/hyrax.en.yml | 12 +- 45 files changed, 297 insertions(+), 199 deletions(-) diff --git a/app/assets/stylesheets/custom_layout/tweaks.css b/app/assets/stylesheets/custom_layout/tweaks.css index eb8658ca..30be3e14 100644 --- a/app/assets/stylesheets/custom_layout/tweaks.css +++ b/app/assets/stylesheets/custom_layout/tweaks.css @@ -14,10 +14,6 @@ border-radius: 10px; } -td.status span.enabled { - background-color: #387f38; -} - .text-bold { font-weight: bold; } @@ -116,6 +112,7 @@ form#new_collection, .help-block { font-size: 0.85em; background-color: #ffffff; + color: #595959; } /* To support [more...] and [less...] */ @@ -483,25 +480,6 @@ a { font-weight: bold; } -/* hyrax/_work-show.scss modifications */ -.panel-workflow { - background: #fff; - border-color: #e0e0e0; - - .panel-heading { - background-color: #e6ab5f; - color: #191919; /* improved contrast ratio from #ffffff */ - - a { - color: #191919; /* improved contrast ratio from #ffffff */ - } - } - - .panel-body { - background-color: #f2f1eb; - } -} - /* iu-chimera/_vars-colors.scss modifications */ .nav-pills > li.active > a, .nav-pills > li.active > a:focus, .nav-pills > li.active > a:hover { background: #fff !important;color: #191919 !important;border:1px solid #dbd8d7 !important; /* modified from #ACA39A for improved contrast ratio */ diff --git a/app/assets/stylesheets/main.scss b/app/assets/stylesheets/main.scss index f31d6aac..2110ff5f 100644 --- a/app/assets/stylesheets/main.scss +++ b/app/assets/stylesheets/main.scss @@ -103,10 +103,6 @@ caption { } } -.dropdown-menu > li > a, .twitter-typeahead .tt-menu > li > a { - color: #000; -} - .navbar-inverse .navbar-nav > .active > a, .navbar-inverse .navbar-nav > .active > a, .navbar-inverse .navbar-nav > .active > a:hover, .navbar-inverse .navbar-nav > .active > a:focus { background-color: transparent; } @@ -152,7 +148,7 @@ caption { .image-masthead { margin: 0; background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.7)), - asset-url("home_banner.jpg"); + asset-url("home_banner.jpg"); background-size: cover; } @@ -277,16 +273,37 @@ body.dashboard { padding-top: 2em; } -ul.breadcrumb li a { - color: #555; +.sidebar.maximized { + background-color: #525252; +} + +.sidebar.maximized .h5 { + color: #ffffee; +} + +.sidebar .profile { + background-color: #434343; +} + +.sidebar .nav li { + overflow: visible !important; + white-space: wrap; +} + +nav.breadcrumb { + background-color: #ffffff; +} + +nav.breadcrumb ol li:first-child { + margin-left: 0.5em; } nav.breadcrumb ol li a { - color:$primary-link; + color: #245A90; } -.nav-tabs > li > a { - color: $primary-link; +nav.breadcrumb ol li a:hover { + color: #990000; } /** Search on dash **/ @@ -326,7 +343,7 @@ nav.breadcrumb ol li a { } li > a { - color: $primary-link; + color: $primary-link; } } @@ -364,9 +381,9 @@ span.collection-tag { } .search-result-wrapper { - border-bottom: none; - margin-right: 0; - margin-left: 0; + border-bottom: none; + margin-right: 0; + margin-left: 0; } .search-result-wrapper .search-results-title-row { @@ -401,10 +418,15 @@ table.table.table-striped.related-filesĀ  { #new_data_set { .nav-tabs > li > a { - color: $primary-link; + color: $primary-link; } } +#new_data_set .panel, #new_dissertation .panel, form.edit_data_set .panel, #new_batch_upload_item .panel { + background-color: #ffffff; +} + + #metadata { .form-control { border: solid 1px #000 !important; @@ -448,8 +470,30 @@ table.table.table-striped.related-filesĀ  { font-size: 1.05em; } +.label-danger { + background-color: #A32824; +} + +.label-info { + background-color: #215A97; +} + +.label-success, td.status span.enabled { + background-color: #2C632C; +} + div.branding-banner-row { - border-top: 0; + border-top: 0; +} + +.settings_intro { + background-color: white; + padding: .75em; + margin-bottom: 0; +} + +code { + color: #9B1C3F; } /** Work Details **/ @@ -457,11 +501,12 @@ div.branding-banner-row { .work-details-container { border-radius: 4px; -webkit-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.12), - 0 2px 4px 0 rgba(0, 0, 0, 0.24); + 0 2px 4px 0 rgba(0, 0, 0, 0.24); box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 2px 4px 0 rgba(0, 0, 0, 0.24); } .title-header { font-size: 1.5em; + display: inline-block; } .work-description-panel-heading { @@ -492,10 +537,6 @@ div.branding-banner-row { font-size: 1.5em !important; } - .text-muted { - font-size: 0.5em; - } - span.label.label-warning, span.label.label-danger, span.label.label-info, @@ -548,11 +589,40 @@ ul.tabular li.attribute-fundedby { } } +/* Embargoes */ + +table.embargoes th label { + margin-bottom: 0; +} + + .panel-workflow .panel-heading { background-color: #e68406; font-weight: bold; + + h2 { + color: #191919; + } } +/* hyrax/_work-show.scss modifications */ +.panel-workflow { + background: #fff; + border-color: #e0e0e0; + + .panel-heading { + background-color: #e6ab5f; + color: #191919; /* improved contrast ratio from #ffffff */ + + a { + color: #191919; /* improved contrast ratio from #ffffff */ + } + } + + .panel-body { + background-color: #f2f1eb; + } +} .panel-items { margin-top: 1em; @@ -598,6 +668,17 @@ ul.tabular li.attribute-fundedby { } } +.stats_section { + background-color: #ffffff; + margin-top: 1em; + margin-left: -.25em; + padding: 1em; +} + +.stats_works h3, .stats_works div { + display: inline-block; +} + a#stats { margin-bottom: 1em; } @@ -618,11 +699,20 @@ a#stats { } } +.pagination li a { + color: #265A87; +} + +.pagination .active span { + background-color: #265A87; + border-color: #265A87; +} + #sortAndPerPage { - border: 0; - padding: .5em; - background-color: #FAFAFA; - border-radius: 4px; + border: 0; + padding: .5em; + background-color: #FAFAFA; + border-radius: 4px; } #per_page-dropdown.btn-group { @@ -662,6 +752,12 @@ div.facets h3 { background-color: #fafafa; } +/** Admin Sets **/ + +div.panel-body.admin-set.row { + margin: 0; +} + /** Collections **/ .hyc-container { @@ -690,10 +786,10 @@ div.facets h3 { -webkit-box-orient: horizontal; -webkit-box-direction: normal; -ms-flex-flow: row wrap; - flex-flow: row wrap; + flex-flow: row wrap; -webkit-box-align: center; -ms-flex-align: center; - align-items: center; + align-items: center; margin-bottom: 2em; padding: .75em 0; @@ -702,9 +798,9 @@ div.facets h3 { color:#000; padding-left: .5em; padding-right: .5em; - -webkit-box-flex: 2; - -ms-flex-positive: 2; - flex-grow: 2; + -webkit-box-flex: 2; + -ms-flex-positive: 2; + flex-grow: 2; } } @@ -732,15 +828,15 @@ div.facets h3 { } .hyc-metadata { - padding: 0; - max-width: 100%; + padding: 0; + max-width: 100%; h2 { - margin:0; - padding: 0 .25em; + margin:0; + padding: 0 .25em; } dl { - padding: 0 .25em; + padding: 0 .25em; } } @@ -758,7 +854,7 @@ div.facets h3 { padding: 1em 0; .edit_collection { - margin: 0 1em; + margin: 0 1em; } } @@ -845,21 +941,13 @@ div.facets h3 { color: $primary-link; } - /* ul { - list-style-type: disc; - list-style-position: inside; - } */ ol { list-style-type: decimal; list-style-position: inside; padding: 0.5em 0.5em 0.5em 1.5em; text-indent: -1.0em; } - /*ul ul, ol ul { - list-style-type: circle; - list-style-position: inside; - margin-left: 15px; - } */ + ol ol, ul ol { list-style-type: lower-latin; list-style-position: inside; @@ -993,6 +1081,11 @@ div.facets h3 { justify-content: space-between; } +legend small, h3 small { + color: #595958; +} + + @media (max-width: 767px) { .dropdown-menu > li > a, .twitter-typeahead .tt-menu > li > a { color: #fff; diff --git a/app/assets/stylesheets/mlib-styles.css b/app/assets/stylesheets/mlib-styles.css index 1996eda3..6a9a32ae 100644 --- a/app/assets/stylesheets/mlib-styles.css +++ b/app/assets/stylesheets/mlib-styles.css @@ -159,7 +159,7 @@ body { flex: 0 0 25%; } } body { font-family: 'Source Sans Pro', sans-serif; - color: #262626; + color: #525252; } a { diff --git a/app/views/bulkrax/exporters/index.html.erb b/app/views/bulkrax/exporters/index.html.erb index 29f36434..a350da37 100644 --- a/app/views/bulkrax/exporters/index.html.erb +++ b/app/views/bulkrax/exporters/index.html.erb @@ -34,9 +34,9 @@ <%= link_to raw(''), exporter_download_path(exporter) %> <% end%> - <%= link_to raw(''), exporter_path(exporter) %> - <%= link_to raw(''), edit_exporter_path(exporter) %> - <%= link_to raw(''), exporter, method: :delete, data: { confirm: 'Are you sure?' } %> + <%= link_to raw(''), exporter_path(exporter), title: 'View ' + exporter.name %> + <%= link_to raw(''), edit_exporter_path(exporter), title: 'Edit ' + exporter.name %> + <%= link_to raw(''), exporter, method: :delete, data: { confirm: 'Are you sure?' }, title: 'Delete ' + exporter.name %> <% end %> diff --git a/app/views/bulkrax/importers/index.html.erb b/app/views/bulkrax/importers/index.html.erb index effb9b1e..78d225cc 100644 --- a/app/views/bulkrax/importers/index.html.erb +++ b/app/views/bulkrax/importers/index.html.erb @@ -44,9 +44,9 @@ <%= importer.importer_runs.last&.deleted_records %> <%= importer.importer_runs.last&.total_collection_entries %> <%= importer.importer_runs.last&.total_work_entries %> - <%= link_to raw(''), importer_path(importer) %> - <%= link_to raw(''), edit_importer_path(importer) %> - <%= link_to raw(''), importer, method: :delete, data: { confirm: 'Are you sure?' } %> + <%= link_to raw(''), importer_path(importer), title: 'View ' + importer.name %> + <%= link_to raw(''), edit_importer_path(importer), title: 'Edit ' + importer.name %> + <%= link_to raw(''), importer, method: :delete, data: { confirm: 'Are you sure?' }, title: 'Delete ' + importer.name %> <% end %> diff --git a/app/views/hyrax/admin/admin_sets/_form.html.erb b/app/views/hyrax/admin/admin_sets/_form.html.erb index 0c30fe51..2460c4ed 100644 --- a/app/views/hyrax/admin/admin_sets/_form.html.erb +++ b/app/views/hyrax/admin/admin_sets/_form.html.erb @@ -1,16 +1,16 @@