すべての役割をリストしたいだけです。役割にこのユーザーがいる場合、表示が異なります。
JSONデータを渡すには、配列Roles
(ユーザーが持つロール)と別の配列AllRoles
(すべてのロール値)が含まれます
{{for AllRoles ~roles=Roles}}
{{if ~roles.contains(#data)}} // I made this up, but how to write this if???
<a href="#" class="selected">{{:#data}}</a>
{{else}}
<a href="#" class="unselected">{{:#data}}</a>
{{/if}}
{{/for}}
誰でも私たちを助けることができますか?ありがとうございました。