diff --git a/frontend/app/assets/stylesheets/archivesspace/common.scss b/frontend/app/assets/stylesheets/archivesspace/common.scss index b8f4c69746..8e728dc054 100644 --- a/frontend/app/assets/stylesheets/archivesspace/common.scss +++ b/frontend/app/assets/stylesheets/archivesspace/common.scss @@ -176,6 +176,10 @@ td .btn-group { margin-right: 15px; // because bootstrap `.row`s } +.mr-36px { + margin-right: 36px !important; // 2.25rem +} + .p-12px { padding: 12px; } diff --git a/frontend/app/assets/stylesheets/archivesspace/help.scss b/frontend/app/assets/stylesheets/archivesspace/help.scss index 22f80eb9d9..0ada71bc29 100644 --- a/frontend/app/assets/stylesheets/archivesspace/help.scss +++ b/frontend/app/assets/stylesheets/archivesspace/help.scss @@ -4,7 +4,7 @@ @include transition(color 0.5s); color: var(--bs-text-body); - position: static !important; + position: relative !important; padding-top: 1rem; padding-bottom: 1rem; @@ -18,16 +18,22 @@ color: var(--bs-text-body); } } -} -// h3 > .context-help { -// float: right; -// margin: 6px 6px 0 0; -// } -// h4 > .context-help { -// float: right; -// margin: 2px 6px 0 0; -// } + // ANW-1977: Rectify help links that were nested inside headings before + // the Bootstrap 4 upgrade. After upgrade on hover the tooltip forced vertical + // scroll on the headings. While some nested help links elsewhere could be solved + // by making it a sibling to the heading and wrapping them both in a
, + // the (nested) subform action button siblings of the previously nested help links + // depend on rigid assumptions about the markup to perform. In lieu of changing form + // behavior, here's a quick hack to make siblilngs of the help link and heading. + &.previously-nested-help-link { + position: absolute !important; + top: 16px; + right: 0; + padding-top: 0; + padding-bottom: 0; + } +} .record-pane > .context-help { float: right; diff --git a/frontend/app/helpers/application_helper.rb b/frontend/app/helpers/application_helper.rb index c979b8aad2..9c3873a9cb 100644 --- a/frontend/app/helpers/application_helper.rb +++ b/frontend/app/helpers/application_helper.rb @@ -183,7 +183,8 @@ def wrap_with_tooltip(text, i18n_path, classes) options["data-html"] = true options["data-delay"] = 500 options["data-trigger"] = "manual" - options["data-template"] = '
' + options["data-boundary"] = "viewport" + options["data-template"] = '
' options[:class] = " has-tooltip #{classes}" content_tag(:span, text, options) diff --git a/frontend/app/views/agents/new.html.erb b/frontend/app/views/agents/new.html.erb index 0c4b20ae40..64069bb18c 100644 --- a/frontend/app/views/agents/new.html.erb +++ b/frontend/app/views/agents/new.html.erb @@ -12,7 +12,7 @@ <%= link_to_help :topic => "#{@agent.agent_type}" %>

<%= "#{t("agent.new_title.#{@agent.agent_type}")}" %> <%= t("agent._singular") %>

<%= render_aspace_partial :partial => "agents/form", :locals => {:form => form} %> -
+
diff --git a/frontend/app/views/archival_objects/_new_inline.html.erb b/frontend/app/views/archival_objects/_new_inline.html.erb index 0f0a023006..ec7223a8f7 100644 --- a/frontend/app/views/archival_objects/_new_inline.html.erb +++ b/frontend/app/views/archival_objects/_new_inline.html.erb @@ -8,7 +8,7 @@ <%= render_aspace_partial :partial => "shared/toolbar_new_records" %>
<%= render_aspace_partial :partial => "archival_objects/form_container", :locals => {:form => form} %> -
+
diff --git a/frontend/app/views/assessments/new.html.erb b/frontend/app/views/assessments/new.html.erb index 25ad028f4e..822d67458b 100644 --- a/frontend/app/views/assessments/new.html.erb +++ b/frontend/app/views/assessments/new.html.erb @@ -14,7 +14,7 @@

<%= t("assessment.new_title") %> <%= t("assessment._singular") %>

<%= render_aspace_partial :partial => "assessments/form", :locals => {:form => form} %> -
+
<%= link_to t("actions.cancel"), :back, :class => "btn btn-cancel btn-default" %>
diff --git a/frontend/app/views/classifications/new.html.erb b/frontend/app/views/classifications/new.html.erb index 1d7ed66e4e..a25d1f0bb6 100644 --- a/frontend/app/views/classifications/new.html.erb +++ b/frontend/app/views/classifications/new.html.erb @@ -12,7 +12,7 @@ <%= render_aspace_partial :partial => "classifications/form_container", :locals => {:form => form} %> -
+
<%= link_to t("actions.cancel"), :back, :class => "btn btn-cancel btn-default" %>
diff --git a/frontend/app/views/container_profiles/new.html.erb b/frontend/app/views/container_profiles/new.html.erb index 47921a307e..e7e830b36f 100644 --- a/frontend/app/views/container_profiles/new.html.erb +++ b/frontend/app/views/container_profiles/new.html.erb @@ -14,7 +14,7 @@

<%= t("container_profile.new_title") %> <%= t("container_profile._singular") %>

<%= render_aspace_partial :partial => "container_profiles/form", :locals => {:form => form} %> -
+
diff --git a/frontend/app/views/custom_report_templates/new.html.erb b/frontend/app/views/custom_report_templates/new.html.erb index 0640df2eca..80867c87bf 100644 --- a/frontend/app/views/custom_report_templates/new.html.erb +++ b/frontend/app/views/custom_report_templates/new.html.erb @@ -14,7 +14,7 @@ <%= form_context :custom_report_template, @custom_report_template do |form| %> <%= render_aspace_partial :partial => "custom_report_templates/form", :locals => {:form => form} %> -
+
diff --git a/frontend/app/views/digital_objects/new.html.erb b/frontend/app/views/digital_objects/new.html.erb index 91d581024a..5d7bdbc44c 100644 --- a/frontend/app/views/digital_objects/new.html.erb +++ b/frontend/app/views/digital_objects/new.html.erb @@ -18,7 +18,7 @@ <%= render_aspace_partial :partial => "digital_objects/form_container", :locals => {:form => form} %> -
+
<%= link_to t("actions.cancel"), :back, :class => "btn btn-cancel btn-default" %>
diff --git a/frontend/app/views/instances/_subrecord_form_action.html.erb b/frontend/app/views/instances/_subrecord_form_action.html.erb index f9f2b0f0ab..42e6a7b30f 100644 --- a/frontend/app/views/instances/_subrecord_form_action.html.erb +++ b/frontend/app/views/instances/_subrecord_form_action.html.erb @@ -1,4 +1,4 @@ -
+
diff --git a/frontend/app/views/jobs/new.html.erb b/frontend/app/views/jobs/new.html.erb index 2a2f7a9992..3f4c0baf21 100644 --- a/frontend/app/views/jobs/new.html.erb +++ b/frontend/app/views/jobs/new.html.erb @@ -17,7 +17,7 @@ <%= render_aspace_partial :partial => "form", :locals => {:form => form} %>
-
+
diff --git a/frontend/app/views/location_profiles/new.html.erb b/frontend/app/views/location_profiles/new.html.erb index f8e55d55f3..f7883d642b 100644 --- a/frontend/app/views/location_profiles/new.html.erb +++ b/frontend/app/views/location_profiles/new.html.erb @@ -14,7 +14,7 @@

<%= t("location_profile.new_title") %> <%= t("location_profile._singular") %>

<%= render_aspace_partial :partial => "location_profiles/form", :locals => {:form => form} %> -
+
diff --git a/frontend/app/views/repositories/new.html.erb b/frontend/app/views/repositories/new.html.erb index b797d94365..bcf16231f4 100644 --- a/frontend/app/views/repositories/new.html.erb +++ b/frontend/app/views/repositories/new.html.erb @@ -13,7 +13,7 @@

<%= t("repository.new_title") %> <%= t("repository._singular") %>


<%= render_aspace_partial :partial => "repositories/form_container", :locals => {:form => form} %> -
+
diff --git a/frontend/app/views/resources/new.html.erb b/frontend/app/views/resources/new.html.erb index 72c23e4fc8..a2d040db96 100644 --- a/frontend/app/views/resources/new.html.erb +++ b/frontend/app/views/resources/new.html.erb @@ -13,7 +13,7 @@ <%= render_aspace_partial :partial => "resources/form_container", :locals => {:form => form} %> -
+
<%= link_to t("actions.cancel"), :back, :class => "btn btn-cancel btn-default" %>
diff --git a/frontend/app/views/shared/_subrecord_form.html.erb b/frontend/app/views/shared/_subrecord_form.html.erb index 38cee4db61..29cfa18183 100644 --- a/frontend/app/views/shared/_subrecord_form.html.erb +++ b/frontend/app/views/shared/_subrecord_form.html.erb @@ -33,7 +33,7 @@ <%= render_aspace_partial :partial => template_erb, :locals => {:form => form} %> -
data-custom-action="true"<% end %> data-cardinality="<%= cardinality %>" <% if remove_disabled %>data-remove="disabled" <% end %>> +
data-custom-action="true"<% end %> data-cardinality="<%= cardinality %>" <% if remove_disabled %>data-remove="disabled" <% end %>> <% unless hidden %> <<%= heading_size %> class="subrecord-form-heading d-flex py-2 align-items-center"> <%= wrap_with_tooltip(heading_text, "#{form.i18n_for(name)}_tooltip", "subrecord-form-heading-label") %> @@ -42,12 +42,12 @@ <% if custom_action_template %> <%= render :partial => custom_action_template %> <% else %> - + <% end %> - <%= link_to_help :topic => help_topic %> <% end %> > + <%= link_to_help :topic => help_topic, :class => "previously-nested-help-link" %> <% end %>
diff --git a/frontend/app/views/subjects/new.html.erb b/frontend/app/views/subjects/new.html.erb index 0bf51c7b58..8855bb4654 100644 --- a/frontend/app/views/subjects/new.html.erb +++ b/frontend/app/views/subjects/new.html.erb @@ -13,7 +13,7 @@

<%= I18n.t("subject.new_title") %> <%= I18n.t("subject._singular") %>


<%= render_aspace_partial :partial => "subjects/form", :locals => {:form => form} %> -
+
diff --git a/frontend/app/views/top_containers/new.html.erb b/frontend/app/views/top_containers/new.html.erb index cf91c77a2b..8965bbc907 100644 --- a/frontend/app/views/top_containers/new.html.erb +++ b/frontend/app/views/top_containers/new.html.erb @@ -14,7 +14,7 @@ <%= render_aspace_partial :partial => "form", :locals => {:form => form} %> -
+
<%= link_to t("actions.cancel"), :back, :class => "btn btn-cancel btn-default" %>
diff --git a/frontend/app/views/users/new.html.erb b/frontend/app/views/users/new.html.erb index cc1cc87636..cb38465621 100644 --- a/frontend/app/views/users/new.html.erb +++ b/frontend/app/views/users/new.html.erb @@ -11,7 +11,7 @@ <%= form_context :user, @user do |form| %> <%= render_aspace_partial :partial => "users/form", :locals => {:form => form} %> -
+
<%= link_to t("actions.cancel"), {:controller => :welcome}, :class => "btn btn-cancel btn-default" %>