Hey, so I see you've added a "View" button to the grids in 1.4. I don't however see an unset_view method. How do I remove the "view" button from the grids if I don't need them?
Thanks.
⚠ 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. ⚠
Posted 29 July 2013 - 22:22 PM
Hey, so I see you've added a "View" button to the grids in 1.4. I don't however see an unset_view method. How do I remove the "view" button from the grids if I don't need them?
Thanks.
Posted 30 July 2013 - 02:06 AM
Hello and welcome to the forums [member=thaMink].
As of stable version 1.4 there is a new public method added that is:
void unset_read()
and it Unsets the read(view) operation from the list.
Example:
$output = $crud->render();
$this->_example_output($output);Posted 31 July 2013 - 18:53 PM
Super. Thanks for the reply.
Posted 01 August 2013 - 13:32 PM
good,
I think, should update the documentation, to learn about new methods of GC 1.4
http://www.grocerycrud.com/documentation/options_functions
Posted 05 August 2013 - 21:46 PM
how to make the button only displays the operation view?
thanks
Posted 05 August 2013 - 22:44 PM
Hello and welcome to the forums [member=axxella].
Use the unset_add, the unset_delete and unset_edit.
Posted 06 August 2013 - 12:23 PM
Thanks for answering so quickly!
Probe do what I decis
unset_add ()
unset_edit ()
unset_delete ()
but it turns out so will the view button.
What I can do?
I just want to show the view button.
Greetings.
Posted 06 August 2013 - 12:32 PM
I use
unset_add ()
unset_edit ()
unset_delete ()
but disappears the view button also
What I can do?
Greetings.
Posted 06 August 2013 - 15:37 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
Posted 06 August 2013 - 20:50 PM
worked
thank you very much!
Posted 06 August 2013 - 20:55 PM
Guys this is pushed in the master branch so you will not have the same problem at the next release: https://github.com/scoumbourdis/grocery-crud/commit/5fc27c22129e6f1edc05146e2d3224ed8e634e39