<% #listItem %>
<tr>
   <td class='uk-text-right'><% tag.size %></td>
   <td>
      <a href='<% tag.href action=<% request.action encoding='form' %> %>'><% tag.name %></a>
   </td>
   <td class='uk-text-right uk-text-nowrap'>
      <% tag.link rss.xml "<i class='uk-icon-rss'></i>" %>
      <% tag.link delete "<i class='uk-icon-trash-o'></i>" class='av-delete-tag uk-hidden' data-av-tag-url=<% tag.href delete %> %>
      <% tag.link rename "<i class='uk-icon-pencil'></i>" class='av-rename-tag uk-hidden' data-av-tag-url=<% tag.href rename %> %>
   </td>
</tr>

<% #main %>
<div class='av-tag'>
   <% list.render skin="$TagHub#main" %>
</div>
<ul class='uk-pagination uk-text-left'>
  <% list.prevLink text="<i class='uk-icon-arrow-left'></i>" prefix=<li> suffix=</li> default="<li class='uk-disabled'><span><i class='uk-icon-arrow-left'></i></span></li>" %>
  <% list.nextLink text="<i class='uk-icon-arrow-right'></i>" prefix=<li> suffix=</li> default="<li class='uk-disabled'><span><i class='uk-icon-arrow-right'></i></span></li>" %>
</ul>
<script type='text/javascript'>
   if ('<% tag.type parent %>' === 'Image') {
      $('.av-tag').addClass('av-collage');
   }
   $(window).load(function() {
      var resizeTimer = null;
      $('.av-collage').collageCaption();
      $(window).bind('resize', function() {
         $('.av-tagged-image').css('opacity', 0);
         if (resizeTimer) clearTimeout(resizeTimer);
         resizeTimer = setTimeout(collage, 200);
      });

      collage();

      function collage() {
         $('.av-collage').removeWhitespace().collagePlus({
            allowPartialLastRow: true,
            fadeSpeed: 'slow'
         });
      }
   });
</script>

<% #simple %>
<li>
   <a href='<% tag.href action=<% request.action encoding='form' %> %>'><% tag.name %></a>
</li>
