欢迎来到我的资源网!
阿里云推广
阿里云推广

迅睿CMS

当前位置:首页 > CMS教程 > 迅睿CMS >

Table操作类-列表右侧链接和底部按钮写法

时间:2024-04-19 17:05:52|栏目:迅睿CMS|点击:0

右侧链接位置:

Table操作类-列表右侧链接和底部按钮写法

底部按钮位置:

Table操作类-列表右侧链接和底部按钮写法


实现方法:
右侧链接示例代码:
public function index() {
 $tpl = $this->_Admin_List(true);

 $this->mytable = \Phpcmf\Service::V()->get_value("mytable");
 // 侧链接,加一个a标签链接
 $this->mytable['link_tpl'].= '<label><a href="'.dr_url(APP_DIR.'/customer/show').'&id={id}" class="btn btn-xs blue"> <i class="fa fa-user"></i> 测试</a></label>';

 \Phpcmf\Service::V()->assign([
  'mytable' => $this->mytable,
 ]);
 return \Phpcmf\Service::V()->display($tpl);
}

底部按钮示例代码:

// 底部按钮

// 加入多选框按钮
$this->mytable['foot_tpl'].= '<label class="table_select_all"><input onclick=dr_table_select_all(this)" type="checkbox"><span></span></label>';
// 加入删除按钮
$this->mytable['foot_tpl'].= '<label><button type="button" onclick=dr_table_option(\''.(IS_ADMIN ? dr_url($uriprefix.'/del') : dr_member_url($uriprefix.'/del')).'\', \''.dr_lang('你确定要删除它们吗?').'\')" class="btn red btn-sm"> <i class="fa fa-trash"></i> '.dr_lang('删除').'</button></label>';
// 加入新的按钮
$this->mytable['foot_tpl'].= '<label><button type="button" onclick=dr_table_option(\''.dr_url('member/verify/edit').'\', \''.dr_lang('你确定要通过审核吗?').'\')" class="btn blue btn-sm"> <i class="fa fa-check-square-o"></i> '.dr_lang('测试').'</button></label>

广告投放 | 联系我们 | 版权申明

重要申明:本站所有的文章、图片、评论等,均由网友发表或上传并维护或收集自网络,属个人行为,与本站立场无关。

如果侵犯了您的权利,请与我们联系,我们将在24小时内进行处理、任何非本站因素导致的法律后果,本站均不负任何责任。

联系QQ:1435567186 | 邮箱:admin@wqjdym.top

Copyright © 2016-2025我的资源网 版权所有 鲁ICP备18026231号-3