From 5f4d0bfc66d4d763faff4895e09f06c7723a562b Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Fri, 26 Mar 2021 15:03:36 -0700 Subject: [PATCH] wrap up link autoload-name js --- .../display/attribute_value/_link.html.erb | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/app/views/content/display/attribute_value/_link.html.erb b/app/views/content/display/attribute_value/_link.html.erb index e19b6a77..19ea5ad2 100644 --- a/app/views/content/display/attribute_value/_link.html.erb +++ b/app/views/content/display/attribute_value/_link.html.erb @@ -1,27 +1,18 @@ - - <% value.each do |link_code| %> <% klass, id = link_code.split('-') %>
- <%= link_to content_class_from_name(klass) do %> + <%= link_to send("#{klass.downcase}_path", id) do %> <%= content_class_from_name(klass).icon %> - <%= id %> + Loading <%= klass %> <% end %>
<% end %> -

- -<%# - simple_format ContentFormatterService.show( - text: value.map { |link_code| "[[#{link_code}]]"}.join("\n"), - viewing_user: current_user - ) -%> +

\ No newline at end of file