{"action":"closed","issue":{"url":"https://api.github.com/repos/tombenner/wp-mvc/issues/119","repository_url":"https://api.github.com/repos/tombenner/wp-mvc","labels_url":"https://api.github.com/repos/tombenner/wp-mvc/issues/119/labels{/name}","comments_url":"https://api.github.com/repos/tombenner/wp-mvc/issues/119/comments","events_url":"https://api.github.com/repos/tombenner/wp-mvc/issues/119/events","html_url":"https://github.com/tombenner/wp-mvc/issues/119","id":129819216,"number":119,"title":"Feature: Default admin action list","user":{"login":"MrTomAsh","id":368743,"avatar_url":"https://avatars.githubusercontent.com/u/368743?v=3","gravatar_id":"","url":"https://api.github.com/users/MrTomAsh","html_url":"https://github.com/MrTomAsh","followers_url":"https://api.github.com/users/MrTomAsh/followers","following_url":"https://api.github.com/users/MrTomAsh/following{/other_user}","gists_url":"https://api.github.com/users/MrTomAsh/gists{/gist_id}","starred_url":"https://api.github.com/users/MrTomAsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrTomAsh/subscriptions","organizations_url":"https://api.github.com/users/MrTomAsh/orgs","repos_url":"https://api.github.com/users/MrTomAsh/repos","events_url":"https://api.github.com/users/MrTomAsh/events{/privacy}","received_events_url":"https://api.github.com/users/MrTomAsh/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-29T16:39:49Z","updated_at":"2016-02-06T12:25:16Z","closed_at":"2016-02-06T12:25:16Z","body":"Please update function admin_action_cell in mvc_helper.php\r\n\r\n```\r\npublic function admin_actions_cell($controller, $object) {\r\n        $default_list_actions = array(\r\n            'Edit',\r\n            'View',\r\n            'Delete'\r\n        );\r\n        $default_list_actions = $controller->default_list_actions ? $controller->default_list_actions : $default_list_actions;\r\n        $links = array();\r\n        $object_name = empty($object->__name) ? 'Item #'.$object->__id : $object->__name;\r\n        $encoded_object_name = $this->esc_attr($object_name);\r\n        if(in_array(\"Edit\",$default_list_actions)) $links[] = '<a href=\"'.MvcRouter::admin_url(array('object' => $object, 'action' => 'edit')).'\" title=\"Edit '.$encoded_object_name.'\">Edit</a>';\r\n        if(in_array(\"View\",$default_list_actions)) $links[] = '<a href=\"'.MvcRouter::public_url(array('object' => $object)).'\" title=\"View '.$encoded_object_name.'\">View</a>';\r\n        if(in_array(\"Delete\",$default_list_actions)) $links[] = '<a href=\"'.MvcRouter::admin_url(array('object' => $object, 'action' => 'delete')).'\" title=\"Delete '.$encoded_object_name.'\" onclick=\"return confirm(&#039;Are you sure you want to delete '.$encoded_object_name.'?&#039;);\">Delete</a>';\r\n        if($links) $html = implode(' | ', $links);\r\n        return '<td>'.$html.'</td>';\r\n    }\r\n```\r\n\r\nthat way in Controller setting variable $default_list_actions we will be able to decide what actions to show on the list. Example:\r\n\r\n```\r\nvar $default_list_actions = array(\r\n        'Edit',\r\n        'Delete'\r\n    );\r\n```\r\n\r\nCheers"}}