2014-04-14 37 views

回答

1

我想这发生在FlexGrid的主题(杂货店的默认主题)加入。

要达到此目的,您需要更改杂货店的默认主题,以便使用twitter bootstrap或datatables主题。您将使用一个名为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使用一些编辑 (例如记事本+ +欧崇高文本)

2 - 添加评论围绕MDIV块,在我的情况(杂货店1.4.1)它是在号码46

<!-- <div class="mDiv"> 
    <div class="ftitle"> 
     &nbsp; 
    </div> 
    <div title="<?php echo $this->l('minimize_maximize');?>" class="ptogtitle"> 
     <span></span> 
    </div> 
</div> --> 

3 - 保存文件并再次测试您的应用程序(一定要清除浏览器缓存)

+0

如果我说,我想这个主题,并希望禁用所提到的功能比? –

+0

我将编辑答案添加那里你需要做什么在这种情况下 –

+1

完成,我编辑的答案包括这种情况 –