/**
  * Support ajax paging pattern
  */
 public function actionPaging()
 {
     list($page, $query, $lp) = $this->request->getList('page', 'query', 'lp');
     $lp = new BlockParams($lp);
     $paging = app()->groupService()->loadGroupPaging($query, $page);
     $html = $this->partial($lp->script(), ['paging' => $paging]);
     $this->response = ['html' => $html, 'pager' => $paging->getPager(), 'hasNext' => $paging->hasNext(), 'hasPrev' => $paging->hasPrev()];
 }
 /**
  *
  */
 public function actionPaging()
 {
     $page = $this->request->getParam('page', 1);
     $query = $this->request->getArray('query');
     $paging = app()->user()->loadUserPaging($query, $page);
     $lp = new BlockParams($this->request->getParam('lp'));
     $html = $this->partial($lp->itemScript(), ['paging' => $paging, 'lp' => $lp]);
     $this->response = ['hasNext' => $paging->hasNext(), 'hasPrev' => $paging->hasPrev(), 'query' => $query, 'pager' => $paging->getPager(), 'html' => $html];
 }
 /**
  * Paging ajax pattern
  */
 public function actionPaging()
 {
     $page = $this->request->getParam('page', 1);
     $query = $this->request->getArray('query');
     $paging = app()->blogService()->loadAdminPostPaging($query, $page);
     $lp = new BlockParams($this->request->getParam('lp'));
     $html = $this->partial($lp->itemScript(), ['paging' => $paging, 'lp' => $lp]);
     $this->response = ['html' => $html];
 }
 /**
  *
  */
 public function actionPaging()
 {
     $page = $this->request->getParam('page', 1);
     $query = $this->request->getArray('query');
     $paging = app()->phraseService()->loadAdminPhrasePaging($query, $page);
     $lp = new BlockParams($this->request->getParam('lp'));
     $html = $this->partial($lp->itemScript(), ['paging' => $paging, 'lp' => $lp, 'langId' => $query['langId']]);
     $this->response = ['html' => $html, 'pager' => $paging->getPager(), 'query' => $query, 'hasNext' => $paging->hasNext(), 'hasPrev' => $paging->hasPrev()];
 }
 /**
  * Show report dialog
  */
 public function actionDialog()
 {
     list($type, $id) = $this->request->getList('type', 'id');
     $about = app()->find($type, $id);
     if (null == $about) {
         throw new \InvalidArgumentException("Invalid Report Item");
     }
     $form = new AddReport(['about' => $about]);
     $lp = new BlockParams(['base_path' => 'platform/report/dialog/report-about']);
     $html = $this->partial($lp->script(), ['form' => $form, 'about' => $about, 'lp' => $lp]);
     $this->response = ['html' => $html, 'directive' => 'update'];
 }
 /**
  * @return DecoratorParams
  */
 public function getDecoratorParams()
 {
     if (null == $this->decoratorParams) {
         $this->decoratorParams = new DecoratorParams($this->lp->get('decorator', 'default'), $this->lp->get('decorator_params', []));
     }
     return $this->decoratorParams;
 }
 /**
  * Show up edit avatar dialog
  */
 public function actionDialog()
 {
     list($type, $id) = $this->request->getList('type', 'id');
     $photo = null;
     $photoSrc = null;
     $data = ['photoSource' => '', 'photoId' => '', 'fileId' => '', 'photoFileId' => ''];
     if (!empty($type) && !empty($id)) {
         $photo = app()->find($type, $id);
         if (!$photo instanceof Photo) {
             throw new \InvalidArgumentException(app()->text('photo.invalid_photo'));
         }
     }
     if ($photo) {
         $photoSrc = $photo->getPhoto('origin');
         $data = ['photoSource' => $photoSrc, 'photoFileId' => $photo->getPhotoFileId(), 'photoId' => $photo->getId()];
     }
     $lp = new BlockParams(['base_path' => 'platform/photo/dialog/field-avatar']);
     $this->response = ['html' => $this->partial($lp->script(), $data)];
 }
 /**
  * Report general data
  */
 public function actionDialog()
 {
     $form = new AddGeneralReport([]);
     $lp = new BlockParams(['base_path' => 'platform/report/dialog/report-general']);
     $this->response = ['html' => $this->partial($lp->script(), ['form' => $form, 'lp' => $lp]), 'directive' => 'update'];
 }