예제 #1
0
 protected function displayFooter()
 {
     echo '<div class="footer">';
     $path = $this->app->config->blorg->path;
     $post_count = $this->loader->getPostCount();
     $this->pager = new SwatPagination();
     $this->pager->display_parts ^= SwatPagination::POSITION;
     $this->pager->total_records = $post_count;
     $this->pager->page_size = self::MAX_POSTS;
     $this->pager->setCurrentPage($this->getArgument('page'));
     /* These strings include a non-breaking space */
     $this->pager->previous_label = Blorg::_('« Newer');
     $this->pager->next_label = Blorg::_('Older »');
     $this->pager->link = $path . 'page%s';
     $this->pager->display();
     echo '<div class="results-message">';
     echo $this->pager->getResultsMessage(Blorg::_('post'), Blorg::_('posts'));
     echo '</div>';
     echo '<div class="archive-link">';
     $anchor_tag = new SwatHtmlTag('a');
     $anchor_tag->href = $path . 'archive';
     $anchor_tag->setContent(Blorg::_('Archive'));
     $anchor_tag->display();
     echo '</div>';
     echo '</div>';
 }
예제 #2
0
 protected function displayFooter()
 {
     $div_tag = new SwatHtmlTag('div');
     $div_tag->class = 'footer';
     $div_tag->open();
     $path = $this->app->config->blorg->path . 'author/' . $this->author->shortname;
     $post_count = $this->loader->getPostCount();
     $this->pager = new SwatPagination();
     $this->pager->display_parts ^= SwatPagination::POSITION;
     $this->pager->total_records = $post_count;
     $this->pager->page_size = self::MAX_POSTS;
     $this->pager->setCurrentPage($this->getArgument('page'));
     /* These strings include a non-breaking space */
     $this->pager->previous_label = Blorg::_('« Newer');
     $this->pager->next_label = Blorg::_('Older »');
     $this->pager->link = $path . '/page%s';
     $this->pager->display();
     $div_tag->class = 'results-message';
     $div_tag->open();
     echo $this->pager->getResultsMessage(Blorg::_('post'), Blorg::_('posts'));
     $div_tag->close();
     $div_tag->close();
 }