143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
|
# File 'lib/amber/render/helpers/navigation_helper.rb', line 143
def render_page_summary(page, heading=2, options={})
locale = @locals[:locale]
klass = options[:class] || '.page-summary'
haml ".#{klass}" do
haml "h#{heading}" do
haml :a, page.nav_title(locale), :href => amber_path(page)
end
if options[:summary] != false
if summary = page.prop(locale, 'summary')
haml '.summary', summary
elsif preview = page.prop(locale, 'preview')
haml '.preview', preview
end
end
if options[:include_toc]
toc_html = render_toc(page, :locale => locale)
haml toc_html
end
end
end
|