Skip to content

Commit 1f68bbb

Browse files
authored
Merge pull request #460 from patriciomacadden/partial-improvements
improve partial: correct use of tags + attachment links styling
2 parents 17113f9 + 5738559 commit 1f68bbb

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,18 +1,18 @@
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
<% elsif attribute.type == :boolean -%>
1212
<%%= <%= singular_name %>.<%= attribute.column_name %>? ? "Yes" : "No" %>
1313
<% else -%>
1414
<%%= <%= singular_name %>.<%= attribute.column_name %> %>
1515
<% end -%>
16-
</p>
16+
</div>
1717
<% end -%>
1818
</div>

0 commit comments

Comments
 (0)