I have want to fill a table manually with some data. There should be
maximum of three columns to be filled, then a new row to be created.
The following dryml/erb combination doesnt seem to work, also I feel
its unneccessary complicated...
Is there something nicer to do this in dryml completely?
<table>
<% unless $result.nil? -%>
<tr>
<td>Items</td>
<% cnt_td = 1 %>
<% cnt_newtr = 0 %>
<% $result.each do |key, content| %>
<% if (cnt_td > 3) %>
<% if (cnt_newtr > 0) %>
</tr>
<%= cnt_newtr += -1 %>
<% end %>
<tr>
<% cnt_newtr += 1 %>
<% cnt_td = 0 %>
<% end %>
<td>
<% key %>
</a> (<%= number_to_human_size(content, :precision => 2)
%>)
</td>
<% cnt_td += 1 %>
<% end %>
<% if (cnt_newtr > 0) %></tr><% end %>
</tr>
<% end -%>
</table
Thanks,
Sebastian
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en.