% use DateTime::Format::RFC3339;
% layout 'main';
%= t 'div', class => 'wiki-body' => begin
  %= t 'h2' => 'Wiki Pages'
  % if ( ( my $user = session 'user' ) == 1) {
    %= link_to "New Wiki Page" => url_for('admin_wiki_new')
  % }
  %= tag 'ul' => begin
    % foreach (@{$pages}) {
      %= tag 'li' => begin
        % my $f = DateTime::Format::RFC3339->new;
        % my $dt = $f->parse_datetime($_->{created});
        <span class="date"><strong><%= $dt->strftime('%Y-%m-%d') %></strong></span>
        <b><a href="/pages/<%= $_->{slug} %>">
            <%= $_->{topic} %>
        </a></b>
      %= end
    % }
  %= end
%= end
