增加了项目来源的删除功能
This commit is contained in:
parent
0e13e997e4
commit
7d8dde03f2
|
@ -955,7 +955,26 @@ class Admin_DataController extends Zend_Controller_Action
|
||||||
$this->view->paginator=$paginator;
|
$this->view->paginator=$paginator;
|
||||||
|
|
||||||
$this->_helper->viewRenderer('sourceselect');
|
$this->_helper->viewRenderer('sourceselect');
|
||||||
|
}// 为元数据选择项目来源
|
||||||
|
|
||||||
|
else if($do == 'del' && !empty($id))
|
||||||
|
{
|
||||||
|
$redirect = "/admin/data/source/";
|
||||||
|
$sql = "delete from source where id='$id'";
|
||||||
|
try{
|
||||||
|
if($this->db->exec($sql))
|
||||||
|
{
|
||||||
|
$this->messenger->addMessage('删除成功');
|
||||||
|
$this->_redirect($redirect);
|
||||||
|
}else{
|
||||||
|
$this->messenger->addMessage('删除失败,可能该数据已不存在');
|
||||||
|
$this->_redirect($redirect);
|
||||||
}
|
}
|
||||||
|
}catch (Exception $e){
|
||||||
|
$this->messenger->addMessage('删除失败:'.$e->getMessage());
|
||||||
|
$this->_redirect($redirect);
|
||||||
|
}
|
||||||
|
}// 删除项目来源
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="/data/<?php echo $item['uuid'];?>"><?php echo $item['title']; ?></a></td>
|
<td><a href="/data/<?php echo $item['uuid'];?>"><?php echo $item['title']; ?></a></td>
|
||||||
<td><?php echo $item['code'];?></td>
|
<td><?php echo $item['code'];?></td>
|
||||||
<td><a href="/admin/data/source/do/edit/id/<?php echo $item['id']?>">查看编辑</a></td>
|
<td><a href="/admin/data/source/do/edit/id/<?php echo $item['id']?>">查看编辑</a>|<a href="/admin/data/source/do/del/id/<?php echo $item['id']?>" onclick="return confirm('是否确定删除该来源')">删除</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
Loading…
Reference in New Issue