Sha256: 5b4652e18c2fc72745c62f16072bd309d22c6ac88ac35b4cc78c215030c158ac
Contents?: true
Size: 588 Bytes
Versions: 125
Compression:
Stored size: 588 Bytes
Contents
<% def category_list(cat) str = "<ul>" str << category_list_items(cat) str << "</ul>" return str end def category_list_items(cat) str = "<li><a href='/admin/categories/#{cat.id}'>#{cat.name}</a>" cat.children.each{ |kid| str << category_list(kid) } if cat.children && cat.children.count > 0 str << "</li>" return str end %> <h1>Categories</h1> <a class="caboose-btn" href='/admin/categories/new'>New Category</a> <%= category_list(@top_cat) %> <% content_for :caboose_js do %> <script type='text/javascript'> </script> <% end %>
Version data entries
125 entries across 125 versions & 1 rubygems