% items ||= [] within_multitype_list ||= false within_multitype_list_class = " gem-c-document-list__multi-list" if within_multitype_list margin_top_class = " gem-c-document-list--top-margin" if local_assigns[:margin_top] margin_bottom_class = " gem-c-document-list--bottom-margin" if local_assigns[:margin_bottom] title_with_context_class = " gem-c-document-list__item-title--context" brand ||= false brand_helper = GovukPublishingComponents::AppHelpers::BrandHelper.new(brand) %> <% if items.any? %> <% unless within_multitype_list %>
<%= item[:highlight_text] %>
<% end %> <%= link_to( item[:link][:text], item[:link][:path], data: item[:link][:data_attributes], class: "gem-c-document-list__item-title #{brand_helper.color_class} #{title_with_context_class if item[:link][:context]}" ) %> <% if item[:link][:context] %> <%= item[:link][:context] %> <% end %> <% if item[:link][:description] %><%= item[:link][:description] %>
<% end %> <% if item[:metadata] %> <% end %> <% if item[:subtext] %><%= item[:subtext] %>
<% end %>