unset_action only for one row ?
- Single Page
Posted 14 December 2012 - 17:30 PM
(Not this way) /topic/689-disable-edit-and-delete-actions-for-specific-rows/
Thanks
Posted 14 December 2012 - 20:15 PM
Posted 15 December 2012 - 20:30 PM
Posted 18 December 2012 - 20:54 PM
Hi, dontako, can you expline how you made it ? THX.
[/quote]
Hello!! I did this:
First opened list.php file (located in "assets \ grocery_crud \ themes \ Flexigrid \ views")
Then, near line 37:
<div class='tools'>
<?php if(!$unset_delete){
// GET ITEM ID
$id = substr($row->delete_url,-1);
// GET METHOD NAME
$CI = &get_instance();
$method = $CI->router->method;
// Prevent hide content with the same ID in other methods.
if($method == 'admin' && $id != 5)
{
?>
<a href='<?php echo $row->delete_url?>' title='<?php echo $this->l('list_delete')?> <?php echo $subject?>' class="delete-row" >
<span class='delete-icon'></span>
</a>
<?php }
}?>
And Voilá
Posted 18 December 2012 - 21:20 PM
Posted 19 December 2012 - 09:40 AM
You should to check it in the controller.
Posted 19 December 2012 - 13:51 PM
But user can go by url site.com/your_controller/your_function/delete/5 and this operation can delete this row.
You should to check it in the controller.
[/quote]
You're right ! mmm I'll check it later
Posted 13 March 2013 - 20:53 PM
hi! i have same problem, i want hide actions "edit" or "delete" in some rows, depending of result of a query.
I appreciate someone help me