Hi,
I want to add a condition for the toolbar template as follow:
I want to add a condition for the toolbar template as follow:
.ToolBar(toolbar =>
{
toolbar.Template(
@{
if(centre.AttributeCenterRels.Count < 6) {
@<div class="action text-align-right">
<a href="~/AttributCentreRel/Create?CentreId=@centre.Id" class="btn"><i class="icon-plus"></i> Create</a>
</div>
}
else{
@<div class="action text-align-right">
Vous ne pouvez spécifier que 6 attributs pour un centre.
</div>
}
}
);
})
Is this possible?
Regards,