Add admin footer.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user