define self button on table row by privilege
define self button on table row by privilege
ondrusu
Posts: 2Questions: 1Answers: 0
Hello, I have one question.
Use DataTables in Nette Framework (and Doctrine 2)
I have define ajax table and I need define self button on table row, but I want this to be rendered by any conditions for example:
in latte template:
{if $user->allowed('edit')}
DataTables can it or How should I do, I dont know?
Can you help me??
Thank you.
PS: I hope, you understand me, sorry my english is very bad.
This discussion has been closed.
Answers
Use
columns.defaultContent
if your button is static (i.e. doesn't depend on the data in the row), or usecolumns.render
if the button does depend on the data in the row.You would then optionally include that column using your if statement (or you could optionally hide it using
columns.visible
.Allan
Thank you, I try it.