0
@@ -52,40 +52,40 @@ class MephistoController < ApplicationController
0
- def list_section_articles_with(template_type)
0
- @article_pages = Paginator.new self, @section.articles.size, 15, params[:page]
0
- @articles = @section.articles.find_by_date(
0
- :limit => @article_pages.items_per_page,
0
- :offset => @article_pages.current.offset)
0
- self.cached_references << @section
0
- render_liquid_template_for(template_type, 'section' => @section.name,
0
- 'section_title' => @section.title,
0
- 'articles' => @articles,
0
- 'previous_page' => paged_section_url_for(@article_pages.current.previous),
0
- 'next_page' => paged_section_url_for(@article_pages.current.next))
0
- def show_section_page_with(page_name, template_type)
0
- @article = page_name.nil? ? @section.articles.find_by_position : @section.articles.find_by_permalink(page_name)
0
- self.cached_references << @section << @article
0
- render_liquid_template_for(template_type, 'section' => @section.name,
0
- 'section_title' => @section.title,
0
- 'pages' => @section.articles.collect { |a| a.to_liquid },
0
- 'article' => @article.to_liquid(:single))
0
- def paged_search_url_for(page)
0
- page ? paged_search_url(:q => params[:q], :page => page) : ''
0
- def paged_monthly_url_for(page)
0
- page ? paged_monthly_url(:year => params[:year], :month => params[:month], :page => page) : ''
0
- def paged_section_url_for(page)
0
- page ? section_url(:sections => @section.to_url << 'page' << page) : ''
0
+ def list_section_articles_with(template_type)
0
+ @article_pages = Paginator.new self, @section.articles.size, 15, params[:page]
0
+ @articles = @section.articles.find_by_date(
0
+ :limit => @article_pages.items_per_page,
0
+ :offset => @article_pages.current.offset)
0
+ self.cached_references << @section
0
+ render_liquid_template_for(template_type, 'section' => @section.name,
0
+ 'section_title' => @section.title,
0
+ 'articles' => @articles,
0
+ 'previous_page' => paged_section_url_for(@article_pages.current.previous),
0
+ 'next_page' => paged_section_url_for(@article_pages.current.next))
0
+ def show_section_page_with(page_name, template_type)
0
+ @article = page_name.nil? ? @section.articles.find_by_position : @section.articles.find_by_permalink(page_name)
0
+ self.cached_references << @section << @article
0
+ render_liquid_template_for(template_type, 'section' => @section.name,
0
+ 'section_title' => @section.title,
0
+ 'pages' => @section.articles.collect { |a| a.to_liquid },
0
+ 'article' => @article.to_liquid(:single))
0
+ def paged_search_url_for(page)
0
+ page ? paged_search_url(:q => params[:q], :page => page) : ''
0
+ def paged_monthly_url_for(page)
0
+ page ? paged_monthly_url(:year => params[:year], :month => params[:month], :page => page) : ''
0
+ def paged_section_url_for(page)
0
+ page ? section_url(:sections => @section.to_url << 'page' << page) : ''
Comments
No one has commented yet.