@using Zap.BI.Portal.Pages.Printing
@model TableOfContentsPrintModel
@{
    Layout = null;
}
@helper DisplayItem(TableOfContentsEntry entry)
{    
   <li>
       <span>
           <div class="left">@entry.Name</div>
           <div class="right">@entry.PageNumber</div>
           <div class="dots"></div>
       </span>
   </li>
   if (entry.Items != null && entry.Items.Any())
   { 
       <li>
           <ul>
           @foreach (TableOfContentsEntry item in entry.Items)
           {
               @DisplayItem(item);
           }
           </ul>
       </li>
   }
}
<div class="toc">
    <label>@Model.Title</label>
    <ul>
    @foreach (TableOfContentsEntry item in Model.Items)
    {
        @DisplayItem(item);
    }
    </ul>
</div>
