diff --git a/app/controllers/backend/UserController.php b/app/controllers/backend/UserController.php index 88a4e4f..c0c6bf4 100644 --- a/app/controllers/backend/UserController.php +++ b/app/controllers/backend/UserController.php @@ -2,9 +2,18 @@ namespace App\Controller\Backend; +use App\Model\Data\User; + class UserController extends \Phalcon\Mvc\Controller { - public function indexAction() + /** + * @param $page + */ + public function indexAction($page = 1) { + $paginator = User::getPaginationList($page,15); + + $this->view->pagination_url = '/admin/user/list/'; + $this->view->page = $paginator->getPaginate(); } } diff --git a/app/views/backend/user/index.volt b/app/views/backend/user/index.volt index f12e351..13c539e 100644 --- a/app/views/backend/user/index.volt +++ b/app/views/backend/user/index.volt @@ -1,2 +1,36 @@ -
| # | +Username | +Name | +Type | +Status | +|
|---|---|---|---|---|---|
| {{ item.id }} | +{{ item.username }} | +{{ item.name }} | +{{ item.email }} | +{{ item.type }} | +{{ item.status }} | +