Sha256: 37af94703f0a4610d5964c6096058ad90877a2e28a9855b80bef5a75f23e730d
Contents?: true
Size: 628 Bytes
Versions: 3
Compression:
Stored size: 628 Bytes
Contents
require 'cgi' module Protozoa module Views class Layout < Mustache include Rack::Utils alias_method :h, :escape_html attr_reader :name def escaped_name CGI.escape(@name) end def title "Home" end def view_url if @page.class == Amiba::Source::Entry "/entries#{@page.link}" else "/pages#{@page.link}" end end def edit_url if @page.class == Amiba::Source::Entry "/entries/edit#{@page.link}" else "/pages/edit#{@page.link}" end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
amiba-1.0.2 | lib/amiba/frontend/views/layout.rb |
amiba-1.0.1 | lib/amiba/frontend/views/layout.rb |
amiba-1.0.0 | lib/amiba/frontend/views/layout.rb |