2017 © Pedro Peláez
 

library nette-visualpaginator

VisualPaginator Control for Nette Framework

image

radekdostal/nette-visualpaginator

VisualPaginator Control for Nette Framework

  • Thursday, September 15, 2016
  • by radekdostal
  • Repository
  • 1 Watchers
  • 0 Stars
  • 47 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 18 % Grown

The README.md

VisualPaginator for Nette Framework

VisualPaginator Control for Nette Framework, (*1)

This add-on creates visual paginator with localizations and with optional "all" button. It supports custom localizations and custom templates (default template is designed for Bootstrap 3)., (*2)

Requirements

GNU Lesser General Public License

LGPL licenses are very very long, so instead of including them here we offer you URLs with full text:, (*3)

Example

config.neon

extensions:
  translation: Kdyby\Translation\DI\TranslationExtension
  visualPaginator: RadekDostal\NetteComponents\VisualPaginator\VisualPaginatorExtension

translation:
  default: cs
  fallback: [cs_CZ, cs]
  whitelist: [cs, en]
  resolvers: # optional
    header: off

visualPaginator:
  translator: @translation.default
  #template: '%appDir%/components/VisualPaginator/custom.latte'
  #viewButtonAll: TRUE

Kdyby\Translation looks for localizations in the directory app/lang. For example english localization file must be named visualPaginator.en_GB.neon (in case of using the NEON syntax)., (*4)

Presenter

class DefaultPresenter extends BasePresenter
{
  use \RadekDostal\NetteComponents\VisualPaginator\TVisualPaginator;

  public function renderDefault()
  {
    $paginator = $this['vp']->getPaginator();
    $paginator->setItemsPerPage(1);
    $paginator->setItemCount(10);
  }

  /**
   * Creates the visual paginator
   *
   * @return \RadekDostal\NetteComponents\VisualPaginator\VisualPaginator
   */
  protected function createComponentVp()
  {
    return $this->visualPaginator;
  }

  // For multiple paginators on the same page
  protected function createComponentVp2()
  {
    $control = $this->visualPaginator->create();
    // $control->setTemplate(...);

    // Dynamic change localization
    $control->getTranslator()->setLocale('en');

    return $control;
  }
}

Template default.latte

{control vp}

The Versions

15/09 2016

dev-master

9999999-dev

VisualPaginator Control for Nette Framework

  Sources   Download

LGPL-3.0 LGPL-2.1

The Requires

 

by Radek Dostál

04/11 2015

2.0.0

2.0.0.0

VisualPaginator Control for Nette Framework

  Sources   Download

LGPL-3.0 LGPL-2.1

The Requires

 

by Radek Dostál

03/11 2015

1.1.1

1.1.1.0

VisualPaginator Control for Nette Framework

  Sources   Download

LGPL-3.0 LGPL-2.1

The Requires

 

by Radek Dostál

28/10 2015

1.1.0

1.1.0.0

VisualPaginator Control for Nette Framework

  Sources   Download

LGPL-3.0 LGPL-2.1

The Requires

 

by Radek Dostál

27/10 2015

1.0.0

1.0.0.0

VisualPaginator Control for Nette Framework

  Sources   Download

LGPL-3.0 LGPL-2.1

The Requires

 

by Radek Dostál