Add admin footer.

This commit is contained in:
Tom Preston-Werner
2010-07-10 21:27:54 -07:00
parent d14c16bf61
commit 74e42c47cc
3 changed files with 37 additions and 1 deletions
+20 -1
View File
@@ -1,7 +1,7 @@
module Precious
module Views
class Page < Layout
attr_reader :content
attr_reader :content, :page
def human_name
@name.gsub(/-/, ' ')
@@ -10,6 +10,25 @@ module Precious
def title
"A Page"
end
def author
@page.version.author.name
end
def date
@page.version.authored_date.strftime("%Y-%m-%d %H:%M:%S")
end
def versions
i = @page.versions.size + 1
@page.versions.map do |v|
i -= 1
{ :id => v.id,
:id7 => v.id[0..6],
:num => i,
:author => v.author.name }
end
end
end
end
end