- if entry.version
  = "Página " + link_to(h(entry.wiki_page.title), course_wiki_url(entry.course, entry.wiki_page.id, :version => entry.version))
- else
  = "Página " + link_to(h(entry.wiki_page.title), course_wiki_url(entry.course, entry.wiki_page.id))

= "criada "     if entry.kind_of?(WikiCreateLogEntry)
= "editada "    if entry.kind_of?(WikiEditLogEntry)
= "excluída "   if entry.kind_of?(WikiDeleteLogEntry)
= "restaurada " if entry.kind_of?(WikiRestoreLogEntry)

- current_version = WikiPage.find_version(entry.wiki_page.id, entry.version)
- previous_version = entry.wiki_page.previous_version(entry.version)

- if entry.kind_of?(WikiEditLogEntry)
  - if current_version.description and !current_version.description.empty?
    = "(<i>#{h(current_version.description)}</i>)"

  - unless previous_version.nil?
    = "(" + link_to("diff", diff_course_wiki_url(entry.course, entry.wiki_page.id, :from => previous_version.version, :to => entry.version)) + ")" 
  
  = "(" + link_to("edit", edit_course_wiki_url(entry.course, entry.wiki_page.id, :description => "Revertendo para versão #{entry.version}", :version => entry.version)) + ")"
  
  - unless previous_version.nil?
    = "(" + link_to("undo", edit_course_wiki_url(entry.course, entry.wiki_page.id, :description => "Revertendo para versão #{previous_version.version}", :version => previous_version.version)) + ")"
