- <%= render 'search/results/item_details/type', type: object.object_name %>
+ <%= render 'search/results/item_details/category_or_subtype', category: object.category, subtype: object.subtype %>
diff --git a/app/views/search/results/item_details/_abstract.html.erb b/app/views/search/results/item_details/_abstract.html.erb
index 04c86e9..a2a0d4a 100644
--- a/app/views/search/results/item_details/_abstract.html.erb
+++ b/app/views/search/results/item_details/_abstract.html.erb
@@ -1,7 +1,7 @@
<% unless abstract.blank? %>
- <%= raw abstract[:value].truncate_words(50) %>
+ <%= raw format_html(abstract[:value], 50) %>
<% end %>
\ No newline at end of file
diff --git a/app/views/search/results/item_details/_category_or_subtype.haml b/app/views/search/results/item_details/_category_or_subtype.haml
new file mode 100644
index 0000000..d7aba6a
--- /dev/null
+++ b/app/views/search/results/item_details/_category_or_subtype.haml
@@ -0,0 +1,13 @@
+- unless category.blank? && subtype.blank?
+ %div.item-details
+ %div.item-details-label= "Type"
+ - unless category.blank?
+ - if category.is_a?(Array)
+ = render 'search/fragments/simple_list', items: category, separator: ';', terminator: '', singular: false
+ - else
+ = object_display_name(category, singular: false)
+ - if category.blank?
+ - if subtype.is_a?(Array)
+ = render 'search/fragments/simple_list', items: subtype, separator: ';', terminator: '', singular: false
+ - else
+ = object_display_name(subtype, singular: true)
\ No newline at end of file
diff --git a/app/views/search/results/item_details/_contribution_text.html.erb b/app/views/search/results/item_details/_contribution_text.html.erb
index 26f82a9..3ed3ec6 100644
--- a/app/views/search/results/item_details/_contribution_text.html.erb
+++ b/app/views/search/results/item_details/_contribution_text.html.erb
@@ -1,7 +1,7 @@
<% unless contribution_text.blank? %>
- <%= raw contribution_text[:value].truncate_words(50) %>
+ <%= raw format_html(contribution_text[:value], 50) %>
<% end %>
\ No newline at end of file
diff --git a/app/views/search/results/item_details/_correction_text.html.erb b/app/views/search/results/item_details/_correction_text.html.erb
index 72b2856..2e54982 100644
--- a/app/views/search/results/item_details/_correction_text.html.erb
+++ b/app/views/search/results/item_details/_correction_text.html.erb
@@ -1,7 +1,7 @@
<% unless correction_text.blank? %>
- <%= raw correction_text[:value].truncate_words(50) %>
+ <%= raw format_html(correction_text[:value], 50) %>
<% end %>
\ No newline at end of file
diff --git a/app/views/search/results/item_details/_description.html.erb b/app/views/search/results/item_details/_description.html.erb
index 1ad0b1d..a228277 100644
--- a/app/views/search/results/item_details/_description.html.erb
+++ b/app/views/search/results/item_details/_description.html.erb
@@ -2,10 +2,10 @@
<% if full_text == true %>
- <%= raw description[:value] %>
- <% else %>
- <%= raw description[:value].truncate_words(50) %>
- <% end %>
+ <%= raw format_html(description[:value], false) %>
+ <% else %>
+ <%= raw format_html(description[:value], 50) %>
+ <% end %>
<% end %>
\ No newline at end of file
diff --git a/app/views/search/results/item_details/_motion_text.html.erb b/app/views/search/results/item_details/_motion_text.html.erb
index bca93f4..68dc4fa 100644
--- a/app/views/search/results/item_details/_motion_text.html.erb
+++ b/app/views/search/results/item_details/_motion_text.html.erb
@@ -1,7 +1,7 @@
<% unless motion_text.blank? %>
- <%= raw motion_text[:value].truncate_words(50) %>
+ <%= raw format_html(motion_text[:value], 50) %>
<% end %>
\ No newline at end of file
diff --git a/app/views/search/results/item_details/_petition_text.html.erb b/app/views/search/results/item_details/_petition_text.html.erb
index 2166da4..2244496 100644
--- a/app/views/search/results/item_details/_petition_text.html.erb
+++ b/app/views/search/results/item_details/_petition_text.html.erb
@@ -1,7 +1,7 @@
<% unless petition_text.blank? %>
- <%= raw petition_text[:value]&.truncate_words(50) %>
+ <%= raw format_html(petition_text[:value], 50) %>
<% end %>
\ No newline at end of file
diff --git a/app/views/search/results/item_details/_subtype_and_type.html.haml b/app/views/search/results/item_details/_subtype_and_type.haml
similarity index 100%
rename from app/views/search/results/item_details/_subtype_and_type.html.haml
rename to app/views/search/results/item_details/_subtype_and_type.haml
diff --git a/app/views/search/results/item_details/_subtype_or_type.html.haml b/app/views/search/results/item_details/_subtype_or_type.haml
similarity index 100%
rename from app/views/search/results/item_details/_subtype_or_type.html.haml
rename to app/views/search/results/item_details/_subtype_or_type.haml