예제 #1
0
 public function getEditor(Request $request)
 {
     $user = getUser();
     $Input = new Input();
     $Input->setId('admin.page.editor');
     $Input->setFields(['ident' => '标识符', 'father' => '父页面', 'title' => '标题', 'content' => '正文', 'keywords' => '关键字', 'description' => '描述']);
     $Input->init($request);
     $data['helpStatus'] = $Input->getHelpStatus();
     $data['hiddenFields'] = $Input->getHiddenFields();
     $data['helpLink'] = true;
     $data['optionLink'] = true;
     $data['options'] = $Input->options();
     $data['tip'] = '左边选项是权限列表,右边权限是当下角色拥有的权限。';
     $data['pages'] = Pages::where('user_id', $user['id'])->get();
     $data['referer'] = setReferer('/admin/page/pages', '/admin/page/editor');
     $data['active'] = 'editor';
     $data = array_merge($data, $this->checkEdit($request));
     if (!$request->ajax()) {
         return view('admin.page.editor', $data);
     }
 }
예제 #2
0
 public function getEditor(Request $request)
 {
     $user = getUser();
     $Input = new Input();
     $Input->setId('admin.post.editor');
     $Input->setFields(['alias' => '标识符', 'page_id' => '父页面', 'title' => '标题', 'content' => '正文', 'tag' => '标签', 'summary' => '摘要', 'keywords' => '关键字', 'description' => '描述']);
     $Input->init($request);
     $data['helpLink'] = true;
     $data['optionLink'] = true;
     $data['helpStatus'] = $Input->getHelpStatus();
     $data['hiddenFields'] = $Input->getHiddenFields();
     $data['options'] = $Input->options();
     $data['tip'] = '编辑文章';
     $data['pages'] = Pages::where('user_id', $user['id'])->orderBy('page_id', 'asc')->get();
     $data['referer'] = setReferer('/admin/post/posts', '/admin/post/editor');
     $data['active'] = 'editor';
     $data = array_merge($data, $this->checkEdit($request));
     if (!$request->ajax()) {
         return view('admin.post.editor', $data);
     }
 }