public function sortField($id = '', $ids = null)
 {
     if (IS_POST) {
         $builder = new AdminSortBuilder();
         $builder->doSort('FieldSetting', $ids);
     } else {
         $profile = D('field_group')->where('id=' . $id)->find();
         $map['status'] = array('egt', 0);
         $map['profile_group_id'] = $id;
         $list = D('field_setting')->where($map)->order("sort asc")->select();
         foreach ($list as $key => $val) {
             $list[$key]['title'] = $val['field_name'];
         }
         $builder = new AdminSortBuilder();
         $builder->meta_title = $profile['profile_name'] . L('_FIELD_SORT_');
         $builder->data($list);
         $builder->buttonSubmit(U('sortField'))->buttonBack();
         $builder->display();
     }
 }
 public function sortPostCate($ids = null)
 {
     if (IS_POST) {
         $builder = new AdminSortBuilder();
         $builder->doSort('GroupPostCategory', $ids);
     } else {
         $map['status'] = array('egt', 0);
         $list = D('GroupPostCategory')->where($map)->order("sort asc")->select();
         foreach ($list as $key => $val) {
             $list[$key]['title'] = $val['title'];
         }
         $builder = new AdminSortBuilder();
         $builder->meta_title = '分组排序';
         $builder->data($list);
         $builder->buttonSubmit(U('sortPostCate'))->buttonBack();
         $builder->display();
     }
 }
 /**
  * 对身份进行排序
  * @author 郑钟良<*****@*****.**>
  */
 public function sort($ids = null)
 {
     if (IS_POST) {
         $builder = new AdminSortBuilder();
         $builder->doSort('Role', $ids);
     } else {
         $map['status'] = array('egt', 0);
         $list = $this->roleModel->selectByMap($map, 'sort asc', 'id,title,sort');
         foreach ($list as $key => $val) {
             $list[$key]['title'] = $val['title'];
         }
         $builder = new AdminSortBuilder();
         $builder->meta_title = L('_IDENTITY_SORT_');
         $builder->data($list);
         $builder->buttonSubmit(U('sort'))->buttonBack();
         $builder->display();
     }
 }
Пример #4
0
 /**
  * 对教程进行排序
  * @author 郑钟良<*****@*****.**>
  */
 public function sortSections($ids = null, $pid = 0, $book_id = 0)
 {
     if (IS_POST) {
         $builder = new AdminSortBuilder();
         $builder->doSort('BookSection', $ids);
     } else {
         if ($ids != null) {
             !is_array($ids) && ($ids = explode(',', $ids));
             $map['id'] = array('in', $ids);
         }
         $map['pid'] = $pid;
         $map['book_id'] = $book_id;
         $map['status'] = array('egt', 0);
         $list = $this->bookSectionModel->getList($map, 'id,title,sort', 'sort asc');
         foreach ($list as $key => $val) {
             $list[$key]['title'] = $val['title'];
         }
         $builder = new AdminSortBuilder();
         $builder->meta_title = L('_TUTORIAL_SORT_');
         $builder->data($list);
         $builder->buttonSubmit(U('sortSections'))->buttonBack();
         $builder->display();
     }
 }