lib/rails_erd/diagram/templates/node.erb in rails-erd-0.2.0 vs lib/rails_erd/diagram/templates/node.erb in rails-erd-0.3.0
- old
+ new
@@ -1,17 +1,14 @@
<% if vertical? %>{<% end %>
<table border="0" align="center" cellspacing="0.5" cellpadding="0" width="<%= NODE_WIDTH + 4 %>">
<tr><td align="center" valign="bottom" width="<%= NODE_WIDTH %>"><font face="Arial Bold" point-size="11"><%= entity.name %></font></td></tr>
</table>
+<% if attributes.any? %>
|
<table border="0" align="left" cellspacing="2" cellpadding="0" width="<%= NODE_WIDTH + 4 %>">
- <% if attributes.any? %>
- <% attributes.each do |attribute| %>
- <tr>
- <td align="left" width="<%= NODE_WIDTH %>" port="<%= attribute %>"><%= attribute %> <font face="Arial Italic" color="grey60"><%= attribute.type_description %></font></td>
- </tr>
- <% end %>
- <% else %>
- <tr><td height="6"></td></tr>
- <% end %>
+<% attributes.each do |attribute| %>
+ <tr><td align="left" width="<%= NODE_WIDTH %>" port="<%= attribute %>"><%= attribute %> <font face="Arial Italic" color="grey60"><%= attribute.type_description %></font></td></tr>
+<% end %>
</table>
+<% else %>
+<% end %>
<% if vertical? %>}<% end %>
\ No newline at end of file