Skip to content

Commit

Permalink
Comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
tpendragon committed Feb 11, 2019
1 parent c6519d5 commit ea5dd00
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/presenters/rtl_index_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def value_from_symbol(field)
default_title_field = @configuration.index.title_field.to_sym
display_title_field = @configuration.index.display_title_field.to_sym

# When asked for a title, display the override title if it's present.
if field == default_title_field && @document.key?(display_title_field)
@document[override_title_field] || @document[display_title_field]
else
Expand Down
1 change: 1 addition & 0 deletions app/presenters/rtl_show_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def heading
field_values(field_config(f), value: document[f].map(&:html_safe))
end

# Automatically display the override title if it's present.
def title_field
if @document.has?(override_title_field) && @document[override_title_field].present?
override_title_field
Expand Down
1 change: 1 addition & 0 deletions app/services/iiif_manifest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def manifest_metadata
end
end

# When importing a IIIF Resource the first time, create an "Override Title" field.
def default_metadata(metadata)
return {} if metadata["Title"].blank?
{
Expand Down
1 change: 1 addition & 0 deletions app/views/spotlight/catalog/_edit_default.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<% else %>
<%= d.text_field_without_bootstrap field.field, value: document.sidecar(current_exhibit).data[field.field.to_s], class: 'form-control', readonly: field.readonly_field? %>
<% end %>
<%# Don't show a warning for the override title - it should never display in the show fields. %>
<% unless field.slug == "override-title_ssim" || field.configured_to_display? %>
<p class="bg-warning help-block">
<%= t(:'.blank_field_warning_html',
Expand Down

0 comments on commit ea5dd00

Please sign in to comment.