Minor fixes

This commit is contained in:
2015-09-05 11:29:13 -04:00
parent 60fea13794
commit 1cf1c28d3a
30 changed files with 154 additions and 1184 deletions

View File

@@ -3,4 +3,4 @@
= "excluiu " if entry.kind_of?(AttachmentDeleteLogEntry)
= "restaurou " if entry.kind_of?(AttachmentRestoreLogEntry)
= "o anexo " + link_to(h(entry.attachment.file_name), course_attachment_url(entry.course, entry.attachment))
= raw "o anexo " + link_to(h(entry.attachment.file_name), course_attachment_url(entry.course, entry.attachment))

View File

@@ -4,9 +4,11 @@
= "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))
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))
a página
=link_to(h(entry.wiki_page.title), course_wiki_instance_url(entry.course, entry.wiki_page.id))
- current_version = entry.wiki_page.versions.find_by_version(entry.version)
@@ -15,12 +17,12 @@
- if entry.kind_of?(WikiEditLogEntry)
- unless current_version.nil?
- if current_version.description and !current_version.description.empty?
= "(<i>#{h(current_version.description)}</i>)"
= raw "(<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)) + ")"
= "(" + link_to("edit", edit_course_wiki_instance_url(entry.course, entry.wiki_page.id, :description => "Revertendo para versão #{entry.version}", :version => entry.version)) + ")"
= raw "(" + link_to("diff", diff_course_wiki_instance_url(entry.course, entry.wiki_page.id, :from => previous_version.version, :to => entry.version)) + ")"
= raw "(" + link_to("edit", edit_course_wiki_instance_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_instance_url(entry.course, entry.wiki_page.id, :description => "Revertendo para versão #{previous_version.version}", :version => previous_version.version)) + ")"
= raw "(" + link_to("undo", edit_course_wiki_instance_url(entry.course, entry.wiki_page.id, :description => "Revertendo para versão #{previous_version.version}", :version => previous_version.version)) + ")"

View File

@@ -9,15 +9,15 @@
%ul.log_entries
- @log_entries_by_day.each do |day, entries|
%h3
=tz(day).strftime("%d&nbsp;de&nbsp;%B&nbsp;de&nbsp;%Y")
=tz(day).strftime("%d de %B de %Y")
- entries.each do |entry|
%li
.date
= tz(entry.created_at).strftime("%H:%M")
%img.avatar{:src => gravatar_url_for(entry.user.email, 27)}
=link_to truncate(h(entry.user.display_name), :length => 20), user_url(entry.user.id)
= render(:partial => 'log/log_entry', :locals => { :entry => entry })
= link_to truncate(h(entry.user.display_name), :length => 20), user_url(entry.user.id)
= render(:partial => 'log/log_entry', :locals => { :entry => entry })
%br
= "Disciplina " + link_to(h(entry.course.full_name), course_url(entry.course))
= raw "Disciplina " + link_to(h(entry.course.full_name), course_url(entry.course))
= will_paginate @log_entries