Skip to content

Commit

Permalink
Merge pull request sonata-project#336 from WouterJ/admin_tree
Browse files Browse the repository at this point in the history
Add custom actions
  • Loading branch information
dbu committed Apr 25, 2015
2 parents 8f6c6e1 + bc0db00 commit d7e1af0
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions Resources/views/Tree/tree.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,18 @@ file that was distributed with this source code.
request: {
load: function (nodePath) {
return {
url: Routing.generate('_cmf_resource', jQuery.extend(defaults, {
repositoryName: 'phpcrodm_repo',
path: nodePath
}))
url: '{{ path('_cmf_resource', {
repositoryName: 'default',
path: '__path__'
}) }}'.replace('__path__', nodePath)
{# todo: include routing defaults #}
};
},
}
},
actions: {
'edit': { url: { data: '?sonata_links.edit' }, label: 'Edit', icon: 'fa fa-pencil' },
'delete': { url: { data: '?sonata_links.delete' }, label: 'Delete', icon: 'fa fa-trash-o' }
}
});
});
</script>
Expand Down

0 comments on commit d7e1af0

Please sign in to comment.