我猜这发生在 flexgrid 主题(杂货店的默认主题)中。
要实现这一点,您将更改杂货店的默认主题,以使用 twitter 引导程序或数据表主题。为此,您将使用一个名为 set_theme 的函数。
以下是如何执行此操作的代码示例:
//this is a controller method
function offices_management()
{
$crud = new grocery_CRUD();
$crud->set_theme('twitter-bootstrap'); //change the theme here
$crud->set_table('offices');
$crud->set_subject('Office');
$crud->required_fields('city');
$crud->columns('city','country','phone','addressLine1','postalCode');
$output = $crud->render();
$this->_example_output($output);
}
如果您需要/想要使用默认主题,则必须执行以下步骤:
1 - 使用一些编辑器打开文件 ../assets/grocery_crud/themes/flexigrid/views/list_template.php
(例如 Notepad++ 或 Sublime Text)
2 - 在 mDiv 块周围添加注释,在我的例子中(杂货店 1.4.1)它位于第 46 行
<!-- <div class="mDiv">
<div class="ftitle">
</div>
<div title="<?php echo $this->l('minimize_maximize');?>" class="ptogtitle">
<span></span>
</div>
</div> -->
3 - 保存您的文件并再次测试您的应用程序(确保清除浏览器缓存)