<ul id="recent-edits-sidenav" class="sidenav">
  <li class="blue">
    <%= link_to main_app.root_path, class: 'logo-container white-text' do %>
      Recent updates
    <% end %>
  </li>
  <li class="no-padding">
    <% @recently_edited_pages.each do |content| %>
      <% content_class = content.is_a?(ContentPage) ? content_class_from_name(content.page_type) : content.class %>
      <li>
        <%= link_to main_app.polymorphic_path(content_class), class: "#{content_class.text_color} tooltipped",
          data: {
            position: 'left',
            tooltip: "#{content_class.name} updated #{time_ago_in_words content.updated_at} ago"
          } do %>
          <i class="material-icons left <%= content_class.text_color %>"><%= content_class.icon %></i>
          <%= truncate(content.name, length: 36) %>
        <% end %>
      </li>
    <% end %>
    <% if @recently_edited_pages.length > 0 %>
      <li class="divider"></li>
      <li class="grey lighten-3">
        <%= link_to 'More...', main_app.recent_content_path, class: 'blue-text' %>
      </li>
    <% end %>
  </li>
</ul>
