⚠ 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

view button disappears



superdan
  • profile picture
  • Member

Posted 06 August 2013 - 15:19 PM

Ho there

i have this issue

public function pagamentitipo()
    {
		//select table
                $this->grocery_crud->set_table('PAGAMENTITIPO');
			
		//set subject
		$this->grocery_crud->set_subject('Forma di Pagamento');
		
		//disable command buttons
		$this->grocery_crud->unset_add();
                $this->grocery_crud->unset_edit();
		$this->grocery_crud->unset_delete();

			
		//required fields ( mandatory )
		$this->grocery_crud->required_fields('AC_PAGAMENTOTIPO');
			
		//field names
		$this->grocery_crud->display_as('AC_PAGAMENTOTIPO','Tipo di Pagamento');

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

in particular

 

if you set

 

 

$this->grocery_crud->unset_add();
$this->grocery_crud->unset_edit();
$this->grocery_crud->unset_delete();

 

 

 

WILL ALSO DISAPPEAR THE read icon (that i have NOT UNSET)

 

Thank tou


superdan
  • profile picture
  • Member

Posted 06 August 2013 - 15:35 PM

ok solved

 

in

 

/assets/grocery_crud/themes/flexigrid/views/list.php

 

on line 18

replace

<?php if(!$unset_delete || !$unset_edit || !empty($actions)){?>

with

<?php if(!$unset_delete || !$unset_edit || !$unset_read || !empty($actions)){?>

and

on line 35

 

replace

<?php if(!$unset_delete || !$unset_edit || !empty($actions)){?>

with

<?php if(!$unset_delete || !$unset_edit || !$unset_read || !empty($actions)){?>

should work

 

regards


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

Posted 06 August 2013 - 20:54 PM

Thanks there. Agree and pushed to master branch :-) https://github.com/scoumbourdis/grocery-crud/commit/5fc27c22129e6f1edc05146e2d3224ed8e634e39


davidoster
  • profile picture
  • Member

Posted 07 August 2013 - 05:04 AM

Just to pin point, this pushed issue refers to both official themes, flexigrid AND datatables.

The change is very simple. Anybody can do it by changing the list.php file on their theme.