Skip to content

Commit 5738559

Browse files
improve partial: correct use of tags + attachment links styling
1 parent b128001 commit 5738559

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
<div id="<%%= dom_id <%= singular_name %> %>">
1+
<div id="<%%= dom_id <%= singular_name %> %>" class="my-5 space-y-5">
22
<% attributes.reject(&:password_digest?).each do |attribute| -%>
3-
<p class="my-5">
3+
<div>
44
<strong class="block font-medium mb-1"><%= attribute.human_name %>:</strong>
55
<% if attribute.attachment? -%>
6-
<%%= link_to <%= singular_name %>.<%= attribute.column_name %>.filename, <%= singular_name %>.<%= attribute.column_name %> if <%= singular_name %>.<%= attribute.column_name %>.attached? %>
6+
<%%= link_to <%= singular_name %>.<%= attribute.column_name %>.filename, <%= singular_name %>.<%= attribute.column_name %>, class: "text-gray-700 underline hover:no-underline" if <%= singular_name %>.<%= attribute.column_name %>.attached? %>
77
<% elsif attribute.attachments? -%>
88
<%% <%= singular_name %>.<%= attribute.column_name %>.each do |<%= attribute.singular_name %>| %>
9-
<div><%%= link_to <%= attribute.singular_name %>.filename, <%= attribute.singular_name %> %></div>
9+
<div><%%= link_to <%= attribute.singular_name %>.filename, <%= attribute.singular_name %>, class: "text-gray-700 underline hover:no-underline" %></div>
1010
<%% end %>
1111
<% else -%>
1212
<%%= <%= singular_name %>.<%= attribute.column_name %> %>
1313
<% end -%>
14-
</p>
14+
</div>
1515
<% end -%>
1616
</div>

0 commit comments

Comments
 (0)