⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Action Control Custom



Alfandi Nurulmukhlis
  • profile picture
  • Member

Posted 24 September 2013 - 13:28 PM

how can i hide delete button in action control ?
how can i hide edit button in action control ?

because not all of tabel have full access control
i can't find it, how can i custom action control?

please anybody help me...


web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 24 September 2013 - 18:09 PM

Hello [member='Alfandi Nurulmukhlis'] and welcome the forums.

 

As for your questions:

unset_delete

unset_edit

add_action

 

and of course... remember to always use the grocery CRUD manual

 

Cheers

Johnny


Alfandi Nurulmukhlis
  • profile picture
  • Member

Posted 25 September 2013 - 01:23 AM

thanks for reply

sorry for my newbie post. .
i have downloaded latest version grocerycrud (grocery-crud-1.4.1)

 

, but unset don't work properly

my code :

============================================================================
public function lokasi()
    {
        $crud = new grocery_CRUD();
        $crud->set_theme('datatables');
        $crud->set_table('lokasi');
        $crud->unset_add();
        $crud->unset_edit();
        $crud->unset_delete();
        
        $output = $this->grocery_crud->render();
        
        $this->lokasi_output($output);
    }

 

function lokasi_output ($output = null)
    {    
        date_default_timezone_set('Asia/Jakarta');
        error_reporting(0);
        $this->load->view('system_default/header',$data);
        $this->load->view('manajemen/sdm/lokasi',$output);
        $this->load->view('system_default/footer');
    }

====================================================================================

 

action control button still appear on tabel.. 

is there any mistake in my code ??


Alfandi Nurulmukhlis
  • profile picture
  • Member

Posted 25 September 2013 - 01:42 AM

i have solve my problem.

 

my conclussion ,

==============================================================

$crud = new grocery_CRUD();

$crud->set_table('lokasi');
$crud->unset_add();
$crud->unset_edit();
$crud->unset_delete();

 

$output = $crud->render();
        
$this->lokasi_output($output);

 

==============================================================

$this->grocery_crud->set_table('lokasi');
$this->grocery_crud->unset_add();
$this->grocery_crud->unset_edit();
$this->grocery_crud->unset_delete();

 

$output = $this->grocery_crud->render();
       

$this->lokasi_output($output);

 

==============================================================

 

the two code above have different UI views