Skip to content

Commit 57780dc

Browse files
committed
remove border on horizontal item description (DLC-1118)
1 parent 181758a commit 57780dc

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

app/components/dcv/document/sidebar_panels/item_description_component.html.erb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="inner" <%= "style=\"margin-top:1em;\"".html_safe if @alignment != 'vertical' %>>
1+
<%= content_tag(:div, class: panel_classes) do -%>
22
<dl class="dl-<%= @alignment %>">
33
<% @document_presenter.fields_to_render.each do |solr_fname, field, field_presenter| %>
44
<dt class="blacklight-<%= solr_fname.parameterize %>"><%= field_presenter.label('show') %></dt>
@@ -16,4 +16,4 @@
1616
<% @link_helpers.each do |link_helper| %>
1717
<%= send link_helper, @document %>
1818
<% end %>
19-
</div>
19+
<%- end %>

app/components/dcv/document/sidebar_panels/item_description_component.rb

+11
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@ def initialize(document:, citation_presenter: nil, document_presenter: nil, alig
1010
@alignment = alignment
1111
@link_helpers = link_helpers
1212
end
13+
14+
def panel_classes
15+
@panel_classes ||= begin
16+
_pc = ['inner']
17+
if @alignment != 'vertical'
18+
_pc << 'mt-3' << 'border-0'
19+
end
20+
_pc
21+
end
22+
end
23+
1324
def before_render
1425
@citation_presenter ||= helpers.citation_presenter(@document)
1526
@document_presenter ||= helpers.document_presenter(@document)

0 commit comments

Comments
 (0)