Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional fixes based on issues found in Adventist #2449

Merged
merged 2 commits into from
Feb 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ GIT

GIT
remote: https://github.com/samvera/hyrax.git
revision: ec94f984da7e1c45cc685781a0982d5954b11265
revision: a726d9bc5b2ad6fcf40108bfa5c54feae7ba82cf
branch: main_before_rails_72
specs:
hyrax (5.0.3)
Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/hyku.scss
Original file line number Diff line number Diff line change
Expand Up @@ -443,9 +443,9 @@ a.btn.btn-secondary.restore-default-color.with-color-hint {
}
}

// make sure that URLs don't go outside the container on all work-show pages
// make sure that URLs and titles don't go outside the container on all work-show pages
.work-show ul.tabular li {
word-wrap: break-word;
overflow-wrap: anywhere;
}

// removes the extra whitespace extending past the sides of the page
Expand Down
18 changes: 18 additions & 0 deletions app/assets/stylesheets/hyrax.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,21 @@
#collection-edit-controls label.control-label {
font-weight: bold !important;
}

// Overrides to prevent long titles from breaking out of their container
// OVERRIDE: Hyrax for show page
.work-title-wrapper .title-with-badges {
overflow-wrap: anywhere;
align-items: baseline;
}

// override Blacklight for catalog search
.document-title-heading {
overflow-wrap: anywhere;
}

// Override Bootstrap for list results
a {
overflow-wrap: anywhere;
}

24 changes: 14 additions & 10 deletions app/views/themes/cultural_show/hyrax/base/_work_title.html.erb
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
<% presenter.title.each_with_index do |title, index| %>
<div class="row">
<div class="col-12 text-show-title d-flex">
<% if index == 0 %>
<h2><%= markdown(title) %></h2><span class="ml-2 mt-2"><%= presenter.permission_badge %> <%= presenter.workflow.badge %></span>
<% else %>
<h2><%= markdown(title) %></h2>
<% end %>
</div>
<div class="work-title-wrapper">
<div class="title-with-badges">
<% presenter.title.each_with_index do |title, index| %>
<div class="row">
<div class="col-12 text-show-title d-flex">
<% if index == 0 %>
<h2><%= markdown(title) %></h2><span class="ml-2 mt-2"><%= presenter.permission_badge %> <%= presenter.workflow.badge %></span>
<% else %>
<h2><%= markdown(title) %></h2>
<% end %>
</div>
</div>
<% end %>
</div>
<% end %>
</div>
10 changes: 10 additions & 0 deletions app/views/themes/image_show/hyrax/base/_work_title.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<%# TODO: This theme is not defined in Hyku %>
<!-- Pals has image_show.scss but is theme used anywhere?
Activate classes for title wrapping if needed
<div class="work-title-wrapper">
<div class="title-with-badges">
-->
<% presenter.title.each_with_index do |title, index| %>
<div class="row">
<div class="col-sm-6">
Expand All @@ -16,3 +22,7 @@
</div>
</div>
<% end %>
<!--
</div>
</div>
-->
34 changes: 19 additions & 15 deletions app/views/themes/scholarly_show/hyrax/base/_work_title.html.erb
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
<% presenter.title.each_with_index do |title, index| %>
<div class="row">
<div class="col-md-6">
<% if index == 0 %>
<h2><%= markdown(title) %></h2><span class="ml-2 mt-2"><%= presenter.permission_badge %> <%= presenter.workflow.badge %></span>
<% else %>
<h2><%= markdown(title) %></h2>
<% end %>
</div>
<div class="col-md-6 text-md-right">
<% if index == 0 %>
<%= render "show_actions", presenter: presenter %>
<% end %>
</div>
<div class="work-title-wrapper">
<div class="title-with-badges">
<% presenter.title.each_with_index do |title, index| %>
<div class="row">
<div class="col-md-6">
<% if index == 0 %>
<h2><%= markdown(title) %></h2><span class="ml-2 mt-2"><%= presenter.permission_badge %> <%= presenter.workflow.badge %></span>
<% else %>
<h2><%= markdown(title) %></h2>
<% end %>
</div>
<div class="col-md-6 text-md-right">
<% if index == 0 %>
<%= render "show_actions", presenter: presenter %>
<% end %>
</div>
</div>
<% end %>
</div>
<% end %>
</div>
Loading