From 4ebfaaa33579977de899341567e7b7dbb7fd4b50 Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Wed, 5 Mar 2014 08:54:24 +0000 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=86=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/Admin/Controller/ArticleController.php | 12 ++++++++++++ module/Admin/view/admin/article/add.phtml | 7 ++++--- module/Admin/view/admin/article/list.phtml | 8 ++++++-- vendor/Sookon/Article/Article.php | 14 ++++++++++++++ 4 files changed, 36 insertions(+), 5 deletions(-) diff --git a/module/Admin/src/Admin/Controller/ArticleController.php b/module/Admin/src/Admin/Controller/ArticleController.php index e65f2d0d..4a6eff2d 100644 --- a/module/Admin/src/Admin/Controller/ArticleController.php +++ b/module/Admin/src/Admin/Controller/ArticleController.php @@ -139,6 +139,18 @@ class ArticleController extends AbstractActionController } } + public function delAction() + { + $id = $this->params()->fromRoute('id'); + + $record = new \Sookon\Article\Article; + + if($record->del($id) === true) + return view::Post($this,'删除成功',-1); + else + return view::Post($this,"删除失败",-1); + } + public function searchAction() { diff --git a/module/Admin/view/admin/article/add.phtml b/module/Admin/view/admin/article/add.phtml index e4acd01f..245e3086 100644 --- a/module/Admin/view/admin/article/add.phtml +++ b/module/Admin/view/admin/article/add.phtml @@ -53,15 +53,17 @@ var _this = {}; + - + + + -->
@@ -106,7 +108,6 @@ var _this = {};
- data['is_pub']) ?>