This commit is contained in:
2009-09-06 12:36:04 -03:00
parent 3208d07a89
commit 829797e236
25 changed files with 169 additions and 89 deletions

View File

@@ -1,6 +1,6 @@
= "Anexo " + link_to(h(entry.attachment.file_name), course_attachment_url(entry.course, entry.attachment))
= "criou " if entry.kind_of?(AttachmentCreateLogEntry)
= "editou " if entry.kind_of?(AttachmentEditLogEntry)
= "excluiu " if entry.kind_of?(AttachmentDeleteLogEntry)
= "restaurou " if entry.kind_of?(AttachmentRestoreLogEntry)
= "criado " if entry.kind_of?(AttachmentCreateLogEntry)
= "editado " if entry.kind_of?(AttachmentEditLogEntry)
= "excluído " if entry.kind_of?(AttachmentDeleteLogEntry)
= "restaurado " if entry.kind_of?(AttachmentRestoreLogEntry)
= "o anexo " + link_to(h(entry.attachment.file_name), course_attachment_url(entry.course, entry.attachment))

View File

@@ -1,6 +1,6 @@
= "Evento " + link_to(h(entry.event.title), course_event_url(entry.course, entry.event, :version => entry.version))
= "criou " if entry.kind_of?(EventCreateLogEntry)
= "editou " if entry.kind_of?(EventEditLogEntry)
= "excluiu " if entry.kind_of?(EventDeleteLogEntry)
= "restaurou " if entry.kind_of?(EventRestoreLogEntry)
= "criado " if entry.kind_of?(EventCreateLogEntry)
= "editado " if entry.kind_of?(EventEditLogEntry)
= "excluído " if entry.kind_of?(EventDeleteLogEntry)
= "restaurado " if entry.kind_of?(EventRestoreLogEntry)
= "o evento " + link_to(h(entry.event.title), course_event_url(entry.course, entry.event, :version => entry.version))

View File

@@ -1,6 +1,6 @@
= "Notícia " + link_to(h(entry.news.title), course_news_instance_url(entry.course, entry.news, :version => entry.version))
= "criou " if entry.kind_of?(NewsCreateLogEntry)
= "editou " if entry.kind_of?(NewsEditLogEntry)
= "excluiu " if entry.kind_of?(NewsDeleteLogEntry)
= "restaurou " if entry.kind_of?(NewsRestoreLogEntry)
= "criada " if entry.kind_of?(NewsCreateLogEntry)
= "editada " if entry.kind_of?(NewsEditLogEntry)
= "excluída " if entry.kind_of?(NewsDeleteLogEntry)
= "restaurada " if entry.kind_of?(NewsRestoreLogEntry)
= "a notícia " + link_to(h(entry.news.title), course_news_instance_url(entry.course, entry.news, :version => entry.version))

View File

@@ -1,19 +1,21 @@
- if entry.version
= "Página " + link_to(h(entry.wiki_page.title), course_wiki_instance_url(entry.course, entry.wiki_page.id, :version => entry.version))
- else
= "Página " + link_to(h(entry.wiki_page.title), course_wiki_instance_url(entry.course, entry.wiki_page.id))
= "criou " if entry.kind_of?(WikiCreateLogEntry)
= "editou " if entry.kind_of?(WikiEditLogEntry)
= "excluiu " if entry.kind_of?(WikiDeleteLogEntry)
= "restaurou " if entry.kind_of?(WikiRestoreLogEntry)
- if entry.version
= "a página " + link_to(h(entry.wiki_page.title), course_wiki_instance_url(entry.course, entry.wiki_page.id, :version => entry.version))
- else
= "a página " + link_to(h(entry.wiki_page.title), course_wiki_instance_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 = entry.wiki_page.versions.find_by_version(entry.version)
- previous_version = current_version.previous
- previous_version = current_version.previous if current_version
- if entry.kind_of?(WikiEditLogEntry)
- if current_version.description and !current_version.description.empty?
= "(<i>#{h(current_version.description)}</i>)"
- unless current_version.nil?
- 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_instance_url(entry.course, entry.wiki_page.id, :from => previous_version.version, :to => entry.version)) + ")"

View File

@@ -4,18 +4,20 @@
-# if @course
=# auto_discovery_link_tag :rss, course_log_url(@course.id, :format => :rss)
- @log_entries_by_day = @log_entries.group_by { |l| l.created_at.beginning_of_day }
.box
%table
%tr
%th Data
%th Usuário
- unless @course
%th Disciplina
%th Descrição
- @log_entries.each do |entry|
%tr
%td= tz(entry.created_at).strftime("%d/%m/%y&nbsp;%H:%M:%S")
%td= link_to truncate(h(entry.user.display_name), :length => 20), user_url(entry.user.id)
- unless @course
%td= link_to h(entry.course.short_name), course_url(entry.course)
%td= render(:partial => 'log/log_entry', :locals => { :entry => entry })
%ul.log_entries
- @log_entries_by_day.each do |day, entries|
%h3
=tz(day).strftime("%d&nbsp;de&nbsp;%B&nbsp;de&nbsp;%Y")
- entries.each do |entry|
%li
.date
= tz(entry.created_at).strftime("%H:%M")
%img.avatar{:src => gravatar_url_for(entry.user.email, 27)}
= "Disciplina " + link_to(h(entry.course.full_name), course_url(entry.course))
%br
=link_to truncate(h(entry.user.display_name), :length => 20), user_url(entry.user.id)
= render(:partial => 'log/log_entry', :locals => { :entry => entry })
= will_paginate @log_entries