From 3d9853726223367d627284f71ce6da2261092e9d Mon Sep 17 00:00:00 2001 From: ycc Date: Wed, 5 Aug 2020 15:29:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A2=84=E8=A7=88=E7=95=8C?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/information.php | 34 ++ .../views/bootstrap3/information_edit.php | 322 ++++++++++-------- application/views/mobile_first/cht.php | 136 ++++++++ 3 files changed, 349 insertions(+), 143 deletions(-) create mode 100644 application/views/mobile_first/cht.php diff --git a/application/controllers/information.php b/application/controllers/information.php index e8d33a75..17987478 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -137,6 +137,34 @@ class Information extends CI_Controller return true; } } + + //移动优先的编辑 + public function edit_mobile($is_id){ + //查询结构信息 + $Structure = $this->InfoStructures_model->Detail($is_id); + if ($Structure == FALSE) { + show_404(); + } + //查询结构根节点 + $rootStructure = $this->InfoStructures_model->GetParent($Structure->is_path, 1); + //没有根节点就从它本身开始查询 + if ($rootStructure == false) { + $rootStructure_ID = $Structure->is_id; + } else { + $rootStructure_ID = $rootStructure->is_id; + } + + //查询结构列表信息 + $data['informationList'] = $this->Information_model->StructureList($rootStructure_ID); + + //信息内容 + $data['information'] = $this->Information_model->Detail($is_id); + + $this->load->view('bootstrap3/header', $data); + $this->load->view('mobile_first/editor'); + $this->load->view('bootstrap3/footer'); + + } public function edit($is_id) { @@ -298,6 +326,12 @@ class Information extends CI_Controller $data['all_tags'] = array_filter($data['all_tags']); } + //获取移动优先的模板,如果有的话 + $mobile_first_template_path='mobile_first/'.$this->config->item('site_code'); + if(is_file(APPPATH.'views/'.$mobile_first_template_path.EXT)){ + $data['mobile_first_template']=$this->load->view($mobile_first_template_path, '', TRUE); + } + $this->load->view('bootstrap3/header', $data); $this->load->view('bootstrap3/information_edit'); $this->load->view('bootstrap3/footer'); diff --git a/application/views/bootstrap3/information_edit.php b/application/views/bootstrap3/information_edit.php index 5158e213..05b1e850 100644 --- a/application/views/bootstrap3/information_edit.php +++ b/application/views/bootstrap3/information_edit.php @@ -1,4 +1,4 @@ - +
-